private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != null || textBox3.Text != null || textBox4.Text != null)
            {
                uc = new updatingClass();
                OleDbDataReader reader = uc.selecting();

                if (textBox3.Text == textBox4.Text)
                {
                    if (textBox2.Text == Program.oldPass)
                    {
                        string query = "update employeeBoxData set passwordGiven ='" + textBox3.Text + "' where Id = " + textBox1.Text + " and worksFor='" + Program.depart + "'";
                        uc.update(query);
                        MessageBox.Show("Password Updated!!");
                    }
                    else
                    {
                        label6.Show();
                    }
                }
                else
                {
                    label7.Show();
                }
            }
        }
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         updatingClass cp    = new updatingClass();
         string        query = "update facultyData set fistName='" + textBox1.Text + "', lastName = '" + textBox2.Text + "',phone = '" + textBox3.Text + "',email = '" + textBox4.Text + "',address = '" + richTextBox1.Text + "' where facultyID=" + textBox5.Text;
         cp.update(query);
         dataGridView1.DataSource = sd.tableData("select facultyID,fistName,lastName,phone,email,address from facultyData");
     }
     catch (FormatException)
     {
         MessageBox.Show("Insert All Values!!");
     }
 }