예제 #1
0
        private void newSubjectButton_Click(object sender, EventArgs e)
        {
            var newSubjectController = new NewSubjectFormController(_controller.SubjectType);
            var newSubjectForm       = new NewSubjectForm(newSubjectController);

            if (newSubjectForm.ShowDialog() == DialogResult.OK)
            {
                ISubject newSubject = newSubjectController.Subject;
                _controller.AddSuject(newSubject);
            }
            ShowSubjects();
        }
예제 #2
0
        private void newSubjectBbutton_Click(object sender, EventArgs e)
        {
            if (_controller.SelectedSubject == null)
            {
                return;
            }
            var newSubjectController = new NewSubjectFormController(_controller.SubjectType);
            var newSubjectForm       = new NewSubjectForm(newSubjectController);

            if (newSubjectForm.ShowDialog() == DialogResult.OK)
            {
                ISubject newSubject = newSubjectController.Subject;
                _controller.AddSubject(newSubject);
            }
            ShowSessions();
        }