public SelectCompletedCoursesViewModel(ISqlData sqlData, IEventAggregator eventAggregator)
 {
     _sqlData          = sqlData;
     _eventAggregator  = eventAggregator;
     _allCourses       = new BindableCollection <CourseModel>(_sqlData.GetAllCourses());
     _completedCourses = new List <CompletedCourseModel>(_sqlData.GetAllCompletedCourses(UserName));
 }
示例#2
0
        public SelectFutureCoursesViewModel(ISqlData sqlData, IEventAggregator eventAggregator)
        {
            _sqlData          = sqlData;
            _eventAggregator  = eventAggregator;
            _yearOneCourses   = new BindableCollection <CourseModel>(_sqlData.GetCoursesByYear(1));
            _yearTwoCourses   = new BindableCollection <CourseModel>(_sqlData.GetCoursesByYear(2));
            _yearThreeCourses = new BindableCollection <CourseModel>(_sqlData.GetCoursesByYear(3));

            _completedCourses = new List <CompletedCourseModel>(_sqlData.GetAllCompletedCourses(UserName));

            Majors = new BindableCollection <MajorModel>(_sqlData.GetAllMajors());
        }
示例#3
0
        public SelectElectivesViewModel(ISqlData sqlData, IEventAggregator eventAggregator, MajorModel major)
        {
            _sqlData         = sqlData;
            _eventAggregator = eventAggregator;
            _major           = major;

            if (major != null)
            {
                _electiveCourses  = new BindableCollection <CourseModel>(_sqlData.GetAllElectiveCourses(UserName, major.MajorId));
                _completedCourses = new List <CompletedCourseModel>(_sqlData.GetAllCompletedCourses(UserName));

                _creditsCompleted = _sqlData.GetCreditsCompleted(UserName, major.MajorId).FirstOrDefault();
                _creditsDue       = 360;
                MajorName         = _major.Name;
            }
        }