Пример #1
0
 private void txtBxUsuario_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (txtBxUsuario.Text == string.Empty)
     {
         ErrPvdrRegistroGeral.SetError(txtBxUsuario, ValidationsMessages.VALIDA_CAMPO_VAZIO);
         tlstrpActionMenuBtnConfirm.Enabled = false;
     }
     else
     {
         ErrPvdrRegistroGeral.SetError(txtBxUsuario, string.Empty);
         tlstrpActionMenuBtnConfirm.Enabled = true;
     }
 }
Пример #2
0
        private void mskdEdtDtInclusaoFim_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (mskdEdtDtInclusaoFim.Text == string.Empty)
            {
                ErrPvdrRegistroGeral.SetError(mskdEdtDtInclusaoFim, ValidationsMessages.VALIDA_CAMPO_VAZIO);
                tlstrpActionMenuBtnConfirm.Enabled = false;
            }
            else
            {
                ErrPvdrRegistroGeral.SetError(mskdEdtDtInclusaoFim, string.Empty);
                tlstrpActionMenuBtnConfirm.Enabled = true;

                if (!ValidationData.CreateInstance.ValidaData(mskdEdtDtInclusaoFim.Text))
                {
                    ErrPvdrRegistroGeral.SetError(mskdEdtDtInclusaoFim, ValidationsMessages.VALIDA_DATA);
                    tlstrpActionMenuBtnConfirm.Enabled = false;
                }
                else
                {
                    ErrPvdrRegistroGeral.SetError(mskdEdtDtInclusaoFim, string.Empty);
                    tlstrpActionMenuBtnConfirm.Enabled = true;
                }
            }
        }
Пример #3
0
        private void txtBxCEP_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (txtBxCEP.Text == string.Empty)
            {
                ErrPvdrRegistroGeral.SetError(txtBxCEP, ValidationsMessages.VALIDA_CAMPO_VAZIO);
                tlstrpActionMenuBtnConfirm.Enabled = false;
            }
            else
            {
                ErrPvdrRegistroGeral.SetError(txtBxCEP, string.Empty);
                tlstrpActionMenuBtnConfirm.Enabled = true;

                if (!ValidationData.CreateInstance.ValidaCEP(txtBxCEP.Text))
                {
                    ErrPvdrRegistroGeral.SetError(txtBxCEP, ValidationsMessages.VALIDA_CEP);
                    tlstrpActionMenuBtnConfirm.Enabled = false;
                }
                else
                {
                    ErrPvdrRegistroGeral.SetError(txtBxCEP, string.Empty);
                    tlstrpActionMenuBtnConfirm.Enabled = true;
                }
            }
        }
Пример #4
0
        private void txtBxInscrEst_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (txtBxInscrEst.Text == string.Empty)
            {
                ErrPvdrRegistroGeral.SetError(txtBxInscrEst, ValidationsMessages.VALIDA_CAMPO_VAZIO);
                tlstrpActionMenuBtnConfirm.Enabled = false;
            }
            else
            {
                ErrPvdrRegistroGeral.SetError(txtBxInscrEst, string.Empty);
                tlstrpActionMenuBtnConfirm.Enabled = true;

                if (!ValidationData.CreateInstance.ValidaIncricaoEstadual(txtBxInscrEst.Text))
                {
                    ErrPvdrRegistroGeral.SetError(txtBxInscrEst, ValidationsMessages.VALIDA_INSCEST);
                    tlstrpActionMenuBtnConfirm.Enabled = false;
                }
                else
                {
                    ErrPvdrRegistroGeral.SetError(txtBxInscrEst, string.Empty);
                    tlstrpActionMenuBtnConfirm.Enabled = true;
                }
            }
        }
Пример #5
0
        private void txtBxNome_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (txtBxNome.Text == string.Empty)
            {
                ErrPvdrRegistroGeral.SetError(txtBxNome, ValidationsMessages.VALIDA_CAMPO_VAZIO);
                tlstrpActionMenuBtnConfirm.Enabled = false;
            }
            else
            {
                ErrPvdrRegistroGeral.SetError(txtBxNome, string.Empty);
                tlstrpActionMenuBtnConfirm.Enabled = true;

                if (!ValidationData.CreateInstance.ValidaAceiteSomenteCaracteres(txtBxNome.Text))
                {
                    ErrPvdrRegistroGeral.SetError(txtBxNome, ValidationsMessages.VALIDA_NOME);
                    tlstrpActionMenuBtnConfirm.Enabled = false;
                }
                else
                {
                    ErrPvdrRegistroGeral.SetError(txtBxNome, string.Empty);
                    tlstrpActionMenuBtnConfirm.Enabled = true;
                }
            }
        }