Exemple #1
0
        private void errorprovider()
        {
            if (FirstNameTextBox.Text == string.Empty)
            {
                FirstNameErrorProvider.SetError(FirstNameTextBox, "First Name Required");
            }

            if (LastNameTextBox.Text == string.Empty)
            {
                LastNameErrorProvider.SetError(LastNameTextBox, "Last Name Required");
            }

            if (TitleTextBox.Text == string.Empty)
            {
                TitleErrorProvider.SetError(TitleTextBox, "Title Required");
            }

            if (GenderComboBoxEdit.SelectedIndex == 0)
            {
                GenderErrorProvider.SetError(GenderComboBoxEdit, "Gender Required");
            }

            if (DOBDateEdit.DateTime.ToString() == string.Empty)
            {
                DOBErrorProvider.SetError(DOBDateEdit, "DOB Required");
            }
        }
Exemple #2
0
 private void GenderComboBoxEdit_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (GenderComboBoxEdit.SelectedIndex != 0)
     {
         GenderErrorProvider.Clear();
     }
     else
     {
         GenderErrorProvider.SetError(GenderComboBoxEdit, "Gender Required");
     }
 }
Exemple #3
0
        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");
            }
        }