private void BindBrokenMessages2WinformErrorProvider(System.Windows.Forms.ErrorProvider errorProvider, System.Windows.Forms.Control.ControlCollection controls, bool clearMessages) { if (clearMessages) { errorProvider.Clear(); } foreach (BrokenRuleMessage rule in this.BrokenRuleMessages) { for (int i = 0; i < controls.Count; i++) { if (controls[i] is System.Windows.Forms.Control) { System.Windows.Forms.Control cv = (System.Windows.Forms.Control)controls[i]; if (cv.Tag == null) { continue; } if (Convert.ToString(cv.Tag) != rule.Key) { continue; } errorProvider.SetError(cv, rule.Message); } else if (controls[i].Controls.Count > 0) { BindBrokenMessages2WinformErrorProvider(errorProvider, controls[i].Controls, false); } } } }
private bool ControlErrores() { bool Retorno = true; if (txtDominio.Text == "") { epControlCampos.SetError(txtDominio, "Debe ingresar un Dominio"); Retorno = false; } else { epControlCampos.Clear(); } return(Retorno); }
void CbReasonSelectedIndexChanged(object sender, System.EventArgs e) { epReason.Clear(); }
void CbDurationSelectedIndexChanged(object sender, System.EventArgs e) { epDuration.Clear(); }