private void IDTextBox_TextChanged(object sender, EventArgs e) { if (IDTextBox.Text != string.Empty) { IDErrorProvider.Clear(); } else { IDErrorProvider.SetError(IDTextBox, "Admin ID Required"); } }
private void errorprovider() { if (AdminImagePictureEdit.Image == HandVeinPattern.Properties.Resources.noprofile) { ImageErrorProvider.SetError(AdminImagePictureEdit, "Admin Image Required"); } if (IDTextBox.Text == string.Empty) { IDErrorProvider.SetError(IDTextBox, "Admin ID Required"); } if (UsernameTextBox.Text == string.Empty) { UsernameErrorProvider.SetError(UsernameTextBox, "Username Required"); } if (PasswordTextBox.Text == string.Empty) { PasswordErrorProvider.SetError(PasswordTextBox, "Password Required"); } if (FirstNameTextBox.Text == string.Empty) { FirstNameErrorProvider.SetError(FirstNameTextBox, "First Name Required"); } if (LastNameTextBox.Text == string.Empty) { LastNameErrorProvider.SetError(LastNameTextBox, "Last Name Required"); } if (GenderComboBoxEdit.SelectedIndex == 0) { GenderErrorProvider.SetError(GenderComboBoxEdit, "Gender Required"); } if (EmailButtonEdit.Text == string.Empty) { EmailErrorProvider.SetError(EmailButtonEdit, "Email Required"); } }