private void addToolStripMenuItem_Click(object sender, EventArgs e) { Frm_POS_Issuance_Detail a = new Frm_POS_Issuance_Detail(); a.type = "0"; a.ShowDialog(); LoadData(); }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { if (dataGridView1.Rows.Count == 0) { MessageBox.Show("Please choose 1 row for editing"); return; } if (dataGridView1.Rows.Count > 0) { Frm_POS_Issuance_Detail a = new Frm_POS_Issuance_Detail(); a.type = "1"; a.Ref_no = dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value.ToString(); a.ShowDialog(); LoadData(); } else return; }