private void создатьToolStripMenuItem_Click(object sender, EventArgs e) { int course = int.Parse(comboBox2.Text); int semestr = int.Parse(comboBox1.Text); NewMarkForm form = new NewMarkForm(student, course, semestr); if (form.ShowDialog() == DialogResult.OK) { UpdateMarks(); } }
private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e) { int course = int.Parse(comboBox2.Text); int semestr = int.Parse(comboBox1.Text); if (dataGridView1.SelectedRows.Count > 0) { StudentMark studentMark = dataGridView1.SelectedRows[0].DataBoundItem as StudentMark; NewMarkForm form = new NewMarkForm(student, course, semestr, studentMark); if (form.ShowDialog() == DialogResult.OK) { UpdateMarks(); } } }