private void button1_Click_1(object sender, EventArgs e) { Form3Clo h = new Form3Clo(); this.Hide(); h.Show(); }
private void button2_Click(object sender, EventArgs e) { int index = dataGridView1.SelectedRows[0].Index; DataGridViewRow selectedRow = dataGridView1.Rows[index]; string Id = Convert.ToString(selectedRow.Cells["Id"].Value); string Name = Convert.ToString(selectedRow.Cells["Name"].Value); Form3Clo h = new Form3Clo(Name, Id); this.Hide(); h.Show(); }