private void ChangeInformationForm_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if (String.IsNullOrEmpty(AtributeTextBox.Text)) { EmptyFieldError.SetError(AtributeTextBox, "This field cant be empty!"); } }
private void AtributeTextBox_Validated(object sender, EventArgs e) { if (String.IsNullOrEmpty(AtributeTextBox.Text)) { EmptyFieldError.SetError(AtributeTextBox, "This field cant be empty!"); } }
private void AuthorTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if (string.IsNullOrEmpty(AuthorTextBox.Text)) { EmptyFieldError.SetError(AuthorTextBox, "This field cant be empty"); } else { EmptyFieldError.Clear(); } }
private void PhoneTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if (!PhoneTextBox.MaskCompleted) { EmptyFieldError.SetError(PhoneTextBox, "Check phone number"); } else { EmptyFieldError.Clear(); } }
private void ConfirmPassTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if (String.IsNullOrEmpty(ConfirmPassTextBox.Text)) { EmptyFieldError.SetError(ConfirmPassTextBox, "This field cant be empty!"); } else if (NewPasswordTextBox.Text != ConfirmPassTextBox.Text) { WrongConfirmPassError.SetError(ConfirmPassTextBox, "Password does not match new"); } else { WrongConfirmPassError.Clear(); } }
private void LoginTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if (String.IsNullOrEmpty(LoginTextBox.Text)) { EmptyFieldError.SetError(LoginTextBox, "This field cant be empty!"); } else if (!authorization.IsLoginExist(LoginTextBox.Text) && LoginTextBox.Text != "Admin") { EmptyFieldError.SetError(LoginTextBox, "Login is not exists"); } else { EmptyFieldError.Clear(); } }