Example #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     FnametextBox4.Clear();
     SnametextBox3.Clear();
     listBox1.Items.Clear();
     FirsttextBox1.Clear();
     fnamelabel3.Text = string.Empty;
     Snamelabel3.Text = string.Empty;
     SecondtextBox2.Clear();
     FnametextBox4.Focus();
     FirsttextBox1.Enabled  = false;
     SecondtextBox2.Enabled = false;
     FnametextBox4.Enabled  = true;
     SnametextBox3.Enabled  = true;
 }
Example #2
0
 private bool isEmpty()
 {
     if (FnametextBox4.Text == string.Empty)
     {
         MessageBox.Show("First Name is Required", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
         FnametextBox4.Focus();
         return(false);
     }
     if (SnametextBox3.Text == string.Empty)
     {
         MessageBox.Show("Second Name is Required", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
         SnametextBox3.Focus();
         return(false);
     }
     return(true);
 }