private void button4_Click(object sender, EventArgs e)
        {
            ManageEmployees mngEmployee = new ManageEmployees();

            mngEmployee.InsertOrUpdate = "update";
            if (employeesDataGridView.SelectedRows[0].Cells[1].Value != null)
            {
                mngEmployee.EmployeeID  = Convert.ToInt32(employeesDataGridView.SelectedRows[0].Cells[0].Value);
                mngEmployee.Fname       = employeesDataGridView.SelectedRows[0].Cells[1].Value.ToString();
                mngEmployee.Mname       = employeesDataGridView.SelectedRows[0].Cells[2].Value.ToString();
                mngEmployee.Lname       = employeesDataGridView.SelectedRows[0].Cells[3].Value.ToString();
                mngEmployee.EmpSex      = employeesDataGridView.SelectedRows[0].Cells[4].Value.ToString();
                mngEmployee.Bday        = employeesDataGridView.SelectedRows[0].Cells[5].Value.ToString();
                mngEmployee.EmpAddress  = employeesDataGridView.SelectedRows[0].Cells[6].Value.ToString();
                mngEmployee.EmpEmail    = employeesDataGridView.SelectedRows[0].Cells[7].Value.ToString();
                mngEmployee.EmpContact  = employeesDataGridView.SelectedRows[0].Cells[8].Value.ToString();
                mngEmployee.EmpUsertype = employeesDataGridView.SelectedRows[0].Cells[10].Value.ToString();
                mngEmployee.EmpUsername = employeesDataGridView.SelectedRows[0].Cells[11].Value.ToString();
                mngEmployee.EmpPassword = employeesDataGridView.SelectedRows[0].Cells[12].Value.ToString();
                if (!Convert.IsDBNull(employeesDataGridView.SelectedRows[0].Cells[6].Value))
                {
                    byte[]               photoBytes = (byte[])employeesDataGridView.SelectedRows[0].Cells[9].Value;
                    MemoryStream         ms         = new MemoryStream(photoBytes);
                    System.Drawing.Image img        = System.Drawing.Image.FromStream(ms);
                    mngEmployee.EmpPhoto = img;
                }
            }
            else
            {
                MessageBox.Show("Please select a product to be updated", "Select", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            mngEmployee.ShowDialog();
            GetEmployeesRecord();
        }
        private void Insert_Click(object sender, EventArgs e)
        {
            ManageEmployees mngEmployee = new ManageEmployees();

            mngEmployee.InsertOrUpdate = "insert";
            mngEmployee.ShowDialog();
            GetEmployeesRecord();
        }