private void ExecuteEditView(object p)
        {
            if (p != null && p is Course)
            {
                var course = p as Course;

                AddCourseView courseView = new AddCourseView(course);
                courseView.ShowDialog();
            }
        }
Beispiel #2
0
        public AddCourseViewModel(AddCourseView view, Course editCourse, IEventAggregator eventAggregator)
        {
            this.view            = view;
            this.editCourse      = editCourse;
            this.eventAggregator = eventAggregator;

            if (editCourse != null)
            {
                Name           = editCourse.Name;
                StudyProgramId = editCourse.StudyProgramId;
                ProfessorId    = editCourse.ProfessorId;
                Assistant      = editCourse.Assistant;
                ETCS           = editCourse.ETCS;
            }

            StudyPrograms = new ObservableCollection <StudyProgram>(ServiceDataProvider.GetAllStudyPrograms());
            Professors    = new ObservableCollection <Professor>(ServiceDataProvider.GetAllProfessors());
        }
        private void ExecuteOpeningView(object p)
        {
            AddCourseView courseView = new AddCourseView();

            courseView.ShowDialog();
        }
Beispiel #4
0
        private void BtnAddCourse(object sender, RoutedEventArgs e)
        {
            var addCourseView = new AddCourseView(_courseService, _courseListViewModel);

            addCourseView.Show();
        }