コード例 #1
0
 private void ChangeInformationForm_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (String.IsNullOrEmpty(AtributeTextBox.Text))
     {
         EmptyFieldError.SetError(AtributeTextBox, "This field cant be empty!");
     }
 }
コード例 #2
0
 private void AtributeTextBox_Validated(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(AtributeTextBox.Text))
     {
         EmptyFieldError.SetError(AtributeTextBox, "This field cant be empty!");
     }
 }
コード例 #3
0
 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();
     }
 }
コード例 #4
0
 private void PhoneTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (!PhoneTextBox.MaskCompleted)
     {
         EmptyFieldError.SetError(PhoneTextBox, "Check phone number");
     }
     else
     {
         EmptyFieldError.Clear();
     }
 }
コード例 #5
0
 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();
     }
 }
コード例 #6
0
 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();
     }
 }