private void toolStripMenuItem3_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0 && status == 4) { Bank.AddAccountPrison b = new AddAccountPrison(dataGridView1.CurrentRow.Cells[2].Value.ToString() , dataGridView1.CurrentRow.Cells[0].Value.ToString() , dataGridView1.CurrentRow.Cells[1].Value.ToString() , dataGridView1.CurrentRow.Cells[3].Value.ToString() , dataGridView1.CurrentRow.Cells[4].Value.ToString() , dataGridView1.CurrentRow.Cells[5].Value.ToString() , dataGridView1.CurrentRow.Cells[6].Value.ToString() , dataGridView1.CurrentRow.Cells[7].Value.ToString()); b.ShowDialog(); if (b.DialogResult == DialogResult.OK) { ShowDgvAccountPrison(); } } else { MessageBox.Show("กรุณาเลือกรายการที่ต้องการแก้ไข"); } }
private void toolStripMenuItem2_Click(object sender, EventArgs e) { Bank.AddAccountPrison Bank = new AddAccountPrison(); Bank.ShowDialog(); if (Bank.DialogResult == DialogResult.OK) { ShowDgvAccountPrison(); } }