private void button1_Click(object sender, EventArgs e) { PL.listCurrentSeasons frm = new listCurrentSeasons(); frm.ShowDialog(); this.txtSeasonName.Text = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString(); this.txtSeasonID.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString(); }
private void button1_Click(object sender, EventArgs e) { PL.listCurrentSeasons frm = new listCurrentSeasons(); //this.textBox1.Text = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString(); frm.ShowDialog(); try { this.txtSeasonName.Text = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString(); this.seasonID = Convert.ToInt32(frm.dataGridView1.CurrentRow.Cells[0].Value); this.name = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString(); } catch { return; } }