private void addToolStripMenuItem_Click(object sender, EventArgs e) { Frm_Card_Issuance_Detail a = new Frm_Card_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_Card_Issuance_Detail a = new Frm_Card_Issuance_Detail(); a.type = "1"; a.makh = dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value.ToString(); a.ShowDialog(); LoadData(); } else return; }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { //Edit if (dataGridView1.Rows.Count == 0) { MessageBox.Show("Please choose 1 row for editing"); return; } else { Frm_Card_Issuance_Detail a = new Frm_Card_Issuance_Detail(); a.type = "1"; a.makh = dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value.ToString(); a.ShowDialog(); LoadData(); } }