private void button3_Click(object sender, EventArgs e) { try { int rowindex = dataGridView1.CurrentCell.RowIndex; string memberId = dataGridView1.Rows[rowindex].Cells[0].Value.ToString(); addEditMember a = new addEditMember(1, memberId); a.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Please choose the data first!"); } }
private void button2_Click(object sender, EventArgs e) { addEditMember a = new addEditMember(0, ""); a.ShowDialog(); }