Beispiel #1
0
 private void txtBxDescricao_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (txtBxDescricao.Text == string.Empty)
     {
         ErrPrvdrStatus.SetError(txtBxDescricao, ValidationsMessages.VALIDA_CAMPO_VAZIO);
         tlstrpActionMenuBtnConfirm.Enabled = false;
     }
     else
     {
         ErrPrvdrStatus.SetError(txtBxDescricao, string.Empty);
         tlstrpActionMenuBtnConfirm.Enabled = true;
     }
 }
Beispiel #2
0
        private void txtBxCodigo_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (txtBxCodigo.Text == string.Empty)
            {
                ErrPrvdrStatus.SetError(txtBxCodigo, ValidationsMessages.VALIDA_CAMPO_VAZIO);
                tlstrpActionMenuBtnConfirm.Enabled = false;
            }
            else
            {
                ErrPrvdrStatus.SetError(txtBxCodigo, string.Empty);
                tlstrpActionMenuBtnConfirm.Enabled = true;

                if (!ValidationData.CreateInstance.ValidaAceiteSomenteNumeros(txtBxCodigo.Text))
                {
                    ErrPrvdrStatus.SetError(txtBxCodigo, ValidationsMessages.VALIDA_CODIGO);
                    tlstrpActionMenuBtnConfirm.Enabled = false;
                }
                else
                {
                    ErrPrvdrStatus.SetError(txtBxCodigo, string.Empty);
                    tlstrpActionMenuBtnConfirm.Enabled = true;
                }
            }
        }