// ...::: INICIO VALIDAÇÕES :::... private void txtEMail_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if (!ValidationData.CreateInstance.ValidaEMail(txtEMail.Text)) { ErrPrvdrContato.SetError(txtEMail, ValidationsMessages.VALIDA_EMAIL); } else { ErrPrvdrContato.SetError(txtEMail, string.Empty); } }
private void txtNro_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if (!ValidationData.CreateInstance.ValidaAceiteSomenteNumeros(txtNro.Text)) { ErrPrvdrContato.SetError(txtNro, ValidationsMessages.VALIDA_NUMERO); tlstrpActionMenuBtnConfirm.Enabled = false; } else { ErrPrvdrContato.SetError(txtNro, string.Empty); tlstrpActionMenuBtnConfirm.Enabled = true; } }
private void tlstrpActionMenuBtnConfirm_Click(object sender, System.EventArgs e) { if (txtddd.Text == string.Empty) { ErrPrvdrContato.SetError(txtddd, ValidationsMessages.VALIDA_CAMPO_VAZIO); tlstrpActionMenuBtnConfirm.Enabled = false; tlstrpLblError.Visible = true; txtddd.Focus(); return; } if (txtNro.Text == string.Empty) { ErrPrvdrContato.SetError(txtNro, ValidationsMessages.VALIDA_CAMPO_VAZIO); tlstrpActionMenuBtnConfirm.Enabled = false; tlstrpLblError.Visible = true; txtNro.Focus(); return; } ExecuteModifyContato(); this.Close(); }
private void txtNro_KeyPress(object sender, KeyPressEventArgs e) { ErrPrvdrContato.SetError(txtNro, string.Empty); tlstrpActionMenuBtnConfirm.Enabled = true; tlstrpLblError.Visible = false; }