public bool Validar() { bool ok = true; if (txtNmAula.Text == "") { ErrorNombre.SetError(txtNmAula, "Ingrese Nombre de Aula"); ok = false; } else { ErrorNombre.Clear(); } return(ok); }
public bool Validar() { bool ok = true; if (txtNmComision.Text == "") { ErrorNombre.SetError(txtNmComision, "Ingrese Nombre de Comision"); ok = false; } else { ErrorNombre.Clear(); } return(ok); }
public bool Validar() { bool ok = true; if (txtNombre.Text == "") { ErrorNombre.SetError(txtNombre, "Ingrese Nombre"); ok = false; } else { ErrorNombre.Clear(); } if (txtApellido.Text == "") { ErrorApellido.SetError(txtApellido, "Ingrese Apellido"); ok = false; } else { ErrorApellido.Clear(); } if (txtDni.Text == "") { ErrorDNI.SetError(txtDni, "Ingrese DNI"); ok = false; } else { ErrorDNI.Clear(); } if (dtpFechaNac.Value >= DateTime.Today) { ErrorFecha.SetError(dtpFechaNac, "Ingrese Fecha Nacimento menor a Hoy"); ok = false; } else { ErrorFecha.Clear(); } // [email protected] Regex RX = new Regex("^[a-zA-Z0-9]{1,20}@[a-zA-Z0-9]{1,20}.[a-zA-Z]{2,3}$"); if (!RX.IsMatch(txtMail.Text)) { ErrorMail.SetError(txtMail, "Ingrese Mail con formato correcto([email protected])"); ok = false; } else { ErrorMail.Clear(); } if (txtNumero.Text != "" && cboTipoTelefono.SelectedIndex == -1) { ErrorTipo.SetError(cboTipoTelefono, "Ingrese Tipo de Telefono"); ok = false; } else { ErrorTipo.Clear(); } return(ok); }