private bool NoRepetidos() { bool paso = true; if (Validaciones.VacantesNoIguales(NombreVacantetextBox.Text)) { MyerrorProvider.SetError(NombreVacantetextBox, "La vacante ya existe"); NombreVacantetextBox.Focus(); paso = false; } return(paso); }
private bool Validar() { bool paso = true; if (string.IsNullOrEmpty(NombreVacantetextBox.Text)) { MyerrorProvider.SetError(NombreVacantetextBox, "El nombre no puede estar vacio"); NombreVacantetextBox.Focus(); paso = false; } if (NombreVacantetextBox.Text.Length < 5) { MyerrorProvider.SetError(NombreVacantetextBox, "Vacante invalida"); NombreVacantetextBox.Focus(); paso = false; } return(paso); }