// ...::: INICIO VALIDAÇÕES :::... private void txtBxDescricao_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if (txtBxDescricao.Text == string.Empty) { ErrPrvdrGrupo.SetError(txtBxDescricao, ValidationsMessages.VALIDA_CAMPO_VAZIO); tlstrpActionMenuBtnConfirm.Enabled = false; } else { ErrPrvdrGrupo.SetError(txtBxDescricao, string.Empty); tlstrpActionMenuBtnConfirm.Enabled = true; } }
private void tlstrpActionMenuBtnConfirm_Click(object sender, System.EventArgs e) { ExecuteModifyGrupo(); if (txtBxDescricao.Text == string.Empty) { ErrPrvdrGrupo.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(); }
private void txtBxDescricao_KeyPress(object sender, KeyPressEventArgs e) { ErrPrvdrGrupo.SetError(txtBxDescricao, string.Empty); tlstrpActionMenuBtnConfirm.Enabled = true; tlstrpLblError.Visible = false; }