private void button1_Click(object sender, EventArgs e) { AddUpdateSection frm = new AddUpdateSection(); frm.ShowDialog(); refreshGrid(); }
private void button2_Click(object sender, EventArgs e) { if (dataGridView1.Rows.Count > 0) { AddUpdateSection frm = new AddUpdateSection(int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString()), dataGridView1.SelectedRows[0].Cells[3].Value.ToString(), dataGridView1.SelectedRows[0].Cells[2].Value.ToString(), dataGridView1.SelectedRows[0].Cells[1].Value.ToString(), int.Parse(dataGridView1.SelectedRows[0].Cells[4].Value.ToString())); frm.ShowDialog(); refreshGrid(); } }