private void addToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //Add
     Frm_POS_ActivityDetails a = new Frm_POS_ActivityDetails();
     a.type = "0";
     a.ShowDialog();
     LoadData();
 }
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     //Edit
     if (dataGridView1.Rows.Count == 0)
     {
         MessageBox.Show("Please choose 1 row for editing");
         return;
     }
     Frm_POS_ActivityDetails a = new Frm_POS_ActivityDetails();
     a.type = "1";
     a.ref_no = dataGridView1[0, dataGridView1.CurrentCell.RowIndex].Value.ToString();
     a.ShowDialog();
     LoadData();
 }