private void button3_Click(object sender, EventArgs e) { Form s = new select_teacher(); s.ShowDialog(); button3.Text = select_teacher.t_num; }
private void dataGridView3_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 9)//添加课程时选择老师 { Form g = new select_teacher(); g.ShowDialog(); dataGridView3.CurrentRow.Cells[9].Value = teacher_num; teacher_nums.Add(teacher_num); } }