private void editToolStripMenuItem_Click(object sender, EventArgs e)
 {
     string insert = "", update = "", delete = "", select = "", err = "";
     bool kq = Businessbp.executedb.CheckPRIVILEGES("CF39", ref insert, ref delete, ref update, ref select, ref err);
     if (err != "")
     {
         MessageBox.Show(err);
         return;
     }
     else
     {
         if (kq == false)
         {
             MessageBox.Show("No privililege to run the form");
             return;
         }
         else
         {
             if (select != "Y")
             {
                 MessageBox.Show("No privililege to run the form");
                 return;
             }
         }
     }
     if (dataGridView1.Rows.Count == 0)
     {
         MessageBox.Show("Please choose 1 row for editing");
         return;
     }
     if (dataGridView1.Rows.Count > 0)
     {
         Frm_KD_ChuongTrinh_UuDai_Details a = new Frm_KD_ChuongTrinh_UuDai_Details();
         a.type = "1";
         a.ref_no = dataGridView1["ref_no", dataGridView1.CurrentCell.RowIndex].Value.ToString();
         a.ShowDialog();
         LoadData();
     }
     else
         return;
 }
 private void addToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Frm_KD_ChuongTrinh_UuDai_Details a = new Frm_KD_ChuongTrinh_UuDai_Details();
     a.type = "0";
     a.ref_no = "";
     a.ShowDialog();
     LoadData();
 }