private void button2_Click(object sender, EventArgs e) { if (dataGridViewSCat.CurrentRow != null) { int id = Convert.ToInt32(dataGridViewSCat.CurrentRow.Cells[0].Value); CRUScholCat plForm = new CRUScholCat(id); plForm.Show(); } }
private void button1_Click(object sender, EventArgs e) { CRUScholCat plForm = new CRUScholCat(); DialogResult result = plForm.ShowDialog(this); }