private bool Validar() { if (string.IsNullOrWhiteSpace(nombresTextBox.Text)) { NombresErrorProvider.SetError(nombresTextBox, "Por favor digite los nombres"); return(false); } return(true); }
private bool Validar() { bool retorno = true; if (string.IsNullOrWhiteSpace(nombresTextBox.Text)) { NombresErrorProvider.SetError(nombresTextBox, "Por favor digite los nombres"); retorno = false; } if (string.IsNullOrWhiteSpace(sueldoTextBox.Text)) { NombresErrorProvider.SetError(sueldoTextBox, "Por favor digite el sueldo"); retorno = false; } return(retorno); }