public bool ValidarTextbox() { if (string.IsNullOrEmpty(UserNametextBox.Text) && string.IsNullOrEmpty(PasstextBox.Text)) { UsererrorProvider.SetError(UserNametextBox, "Favor ingresar el nombre de Usuario"); PasserrorProvider.SetError(PasstextBox, "Favor ingresar la contraseña del usuario"); MessageBox.Show("Favor llenar todos los campos obligatorios"); } if (string.IsNullOrEmpty(UserNametextBox.Text)) { UsererrorProvider.SetError(UserNametextBox, "Favor ingresar el nombre de Usuario"); return(false); } if (string.IsNullOrEmpty(PasstextBox.Text)) { UsererrorProvider.Clear(); PasserrorProvider.SetError(PasstextBox, "Favor ingresar la contraseña del usuario"); return(false); } return(true); }
private bool validarId() { if (string.IsNullOrEmpty(userIdTextBox.Text)) { UsererrorProvider.SetError(userIdTextBox, "Ingresar el ID"); return(false); } else { return(true); } }
private bool ValidarTextbox() { if (string.IsNullOrEmpty(usuarioTextBox.Text)) { UsererrorProvider.SetError(usuarioTextBox, "Username"); return(false); } if (string.IsNullOrEmpty(passwordTextBox.Text)) { UsererrorProvider.SetError(passwordTextBox, "Password"); return(false); } if (string.IsNullOrEmpty(nameTextBox.Text)) { UsererrorProvider.SetError(nameTextBox, "Name"); return(false); } if (string.IsNullOrEmpty(apellidoTextBox.Text)) { UsererrorProvider.SetError(apellidoTextBox, "LastName"); return(false); } return(true); }