private void addStudentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddStudent newStudent = new AddStudent();

            newStudent.MdiParent = this;
            newStudent.Show();
        }
Exemple #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            var selectedId = getSelectedId();

            if (selectedId < 0)
            {
                MessageBox.Show("Please select a student record.");
                return;
            }

            var        student          = studentTable.GetStudent(selectedId);
            AddStudent addStudentWindow = new AddStudent(student);

            addStudentWindow.MdiParent = this.MdiParent;
            addStudentWindow.Show();
        }