Example #1
0
        private void tlstrpActionMenuBtnConfirm_Click(object sender, System.EventArgs e)
        {
            this.ExecuteModifyTipoRg();

            if (txtBxTipo.Text == string.Empty)
            {
                ErrPrvdrTipoRg.SetError(txtBxTipo, ValidationsMessages.VALIDA_CAMPO_VAZIO);
                tlstrpActionMenuBtnConfirm.Enabled = false;
                tlstrpLblError.Visible             = true;
                txtBxTipo.Focus();
                return;
            }

            if (txtBxDescricao.Text == string.Empty)
            {
                ErrPrvdrTipoRg.SetError(txtBxDescricao, ValidationsMessages.VALIDA_CAMPO_VAZIO);
                tlstrpActionMenuBtnConfirm.Enabled = false;
                tlstrpLblError.Visible             = true;
                txtBxDescricao.Focus();
                return;
            }

            if (_IdExcepitionLog != string.Empty)
            {
                tlstrpActionMenuBtnConfirm.Enabled = false;
                tlstrpLblExcecao.Text    = _MenssageLogError;
                tlstrpLblExcecao.Visible = true;
                return;
            }

            this.Close();
        }
Example #2
0
 private void txtBxDescricao_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (txtBxDescricao.Text == string.Empty)
     {
         ErrPrvdrTipoRg.SetError(txtBxDescricao, ValidationsMessages.VALIDA_CAMPO_VAZIO);
         tlstrpActionMenuBtnConfirm.Enabled = false;
     }
     else
     {
         ErrPrvdrTipoRg.SetError(txtBxDescricao, string.Empty);
         tlstrpActionMenuBtnConfirm.Enabled = true;
     }
 }
Example #3
0
        // ...::: INICIO VALIDAÇÕES :::...
        private void txtBxTipo_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (txtBxTipo.Text == string.Empty)
            {
                ErrPrvdrTipoRg.SetError(txtBxTipo, ValidationsMessages.VALIDA_CAMPO_VAZIO);
                tlstrpActionMenuBtnConfirm.Enabled = false;
            }
            else
            {
                ErrPrvdrTipoRg.SetError(txtBxTipo, string.Empty);
                tlstrpActionMenuBtnConfirm.Enabled = true;

                if (!ValidationData.CreateInstance.ValidaAceiteSomenteCaracteres(txtBxTipo.Text))
                {
                    ErrPrvdrTipoRg.SetError(txtBxTipo, ValidationsMessages.VALIDA_TIPO_RG);
                    tlstrpActionMenuBtnConfirm.Enabled = false;
                }
                else
                {
                    ErrPrvdrTipoRg.SetError(txtBxTipo, string.Empty);
                    tlstrpActionMenuBtnConfirm.Enabled = true;
                }
            }
        }
Example #4
0
 private void txtBxDescricao_KeyPress(object sender, KeyPressEventArgs e)
 {
     ErrPrvdrTipoRg.SetError(txtBxDescricao, string.Empty);
     tlstrpActionMenuBtnConfirm.Enabled = true;
     tlstrpLblError.Visible             = false;
 }