private void toolStripStatus_Sua_Click_1(object sender, EventArgs e)
        {
            if (!frmDangNhap.User.Administrator && !CheckQuyen(this.Name, 2))
            {
                MessageBox.Show("Bạn Không có quyền vào chức năng này.");
                return;
            }
            frmXuly_PhongBan fr = new frmXuly_PhongBan("Sua", dataGridView1.CurrentRow);

            fr.StartPosition = FormStartPosition.CenterScreen;
            fr.ShowDialog();
            hienthi();
        }
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex > -1)
            {
                if (!frmDangNhap.User.Administrator && !CheckQuyen("frmQuanlyphongban", 2))
                {
                    MessageBox.Show(" Không có quyền vào chức năng này.");
                    return;
                }
                frmXuly_PhongBan fr = new frmXuly_PhongBan("Sua", dataGridView1.Rows[e.RowIndex]);
                fr.StartPosition = FormStartPosition.CenterScreen;
                fr.ShowDialog();

                hienthi();
            }
        }
 private void toolStripStatus_ThemMoi_Click_1(object sender, EventArgs e)
 {
     KiemTra = "insert";
     if (!frmDangNhap.User.Administrator && !CheckQuyen(this.Name, 4))
     {
         MessageBox.Show("Bạn Không có quyền vào chức năng này.");
         return;
     }
     while (KiemTra == "insert")
     {
         frmXuly_PhongBan fr = new frmXuly_PhongBan("Them", dataGridView1.CurrentRow);
         fr.StartPosition = FormStartPosition.CenterScreen;
         fr.ShowDialog();
         hienthi();
     }
 }
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex > -1)
            {
                if (!frmDangNhap.User.Administrator && !CheckQuyen("frmQuanlyphongban", 2))
                {
                    MessageBox.Show(" Không có quyền vào chức năng này.");
                    return;
                }
                frmXuly_PhongBan fr = new frmXuly_PhongBan("Sua", dataGridView1.Rows[e.RowIndex]);
                fr.StartPosition = FormStartPosition.CenterScreen;
                fr.ShowDialog();

                hienthi();
            }
        }