1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ' this is just for intellisense, ' since the itemVO parameter is declared as an object type dim paraItem as ParameterVO = itemVO
' IsEqual determines if the value of the "description" field is equal to a given text, ' it is a better alternative than using ' descricao.trim.tolower = "u9999_zzzmy_paratxt" or descricao.trim.toupper = "U9999_ZZZMY_PARATXT", ' ie it is Case-insensitive ' Another example if paraItem.IsEqual("ge_avenca")
Select Case paraItem.valor
Case "TOP" ' Return an empty list of messages so that the frontend displays its own success message.
Case "T" ' The parameter is successfully saved, but with your value, and a warning message type is returned. paraItem.valor = "TOP" listMsg.add(new MsgWarning("O valor foi automaticamente modificado para TOP."))
Case "NOT" ' The parameter is not saved, and a error message type is returned. listMsg.add(new MsgError("O valor NOT não é uma opção válida."))
Case Else ' The parameter is successfully saved and a information message type is returned. listMsg.add(new MsgInfo("Relembramos que o valor definido não é TOP."))
End Select
end if
|