Пример #1
0
        private void создатьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int course = int.Parse(comboBox1.Text);

            NewStudentWorkForm form = new NewStudentWorkForm(student, course);

            if (form.ShowDialog() == DialogResult.OK)
            {
                UpdateGrid();
            }
        }
Пример #2
0
        private void OpenStudentWork()
        {
            int course = int.Parse(comboBox1.Text);

            if (dataGridView1.SelectedRows.Count > 0)
            {
                StudentWork studentWork = dataGridView1.SelectedRows[0].DataBoundItem as StudentWork;

                NewStudentWorkForm form = new NewStudentWorkForm(student, course, studentWork);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    UpdateGrid();
                }
            }
        }