Ejemplo n.º 1
0
        private void ExecuteEditView(object p)
        {
            if (p != null && p is Course)
            {
                var course = p as Course;

                AddCourseView courseView = new AddCourseView(course);
                courseView.ShowDialog();
            }
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 3
0
        private void ExecuteOpeningView(object p)
        {
            AddCourseView courseView = new AddCourseView();

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

            addCourseView.Show();
        }