Exemplo n.º 1
0
 private void GetActivityViewModelList(List <Activity> activityList)
 {
     foreach (var activity in activityList)
     {
         ActivityViewModel activityViewModel = new ActivityViewModel(activity);
         RawActivityList.Add(activityViewModel);
     }
 }
 private void GetActivityViewModelList(List <Activity> activityList, string courseId, string courseName)
 {
     foreach (var activity in activityList)
     {
         ActivityViewModel activityViewModel = new ActivityViewModel(activity);
         activityViewModel.CourseId   = courseId;
         activityViewModel.CourseName = courseName;
         RawActivityList.Add(activityViewModel);
     }
 }
Exemplo n.º 3
0
 private void GetCourseViewModelList(List <Course> courseList)
 {
     foreach (var course in courseList)
     {
         CourseViewModel courseViewModel = new CourseViewModel(course);
         if (courseViewModel.Status.Contains("Ongoing"))
         {
             RawTodayCourseList.Add(courseViewModel);
             RawActivityList.Add(courseViewModel);
         }
         else
         {
             RawCourseList.Add(courseViewModel);
         }
     }
     CourseList      = new ObservableCollection <CourseViewModel> (RawCourseList);
     ActivityList    = new ObservableCollection <CourseViewModel> (RawActivityList);
     TodayCourseList = new ObservableCollection <CourseViewModel> (RawTodayCourseList);
 }