示例#1
0
        private void InitModel(UserFileVM model)
        {
            var employeeTC = User.Employee_TC;
            var week       = DateTime.Today.AddDays(14);
            var pastWeek   = DateTime.Today.AddDays(-14);
            var groups     = EmployeeVMService.GetTrainerGroups(employeeTC)
                             .Where(x => x.LectureType_TC != LectureTypes.OpenLearning)
                             .Where(x =>
                                    (pastWeek <= x.DateBeg && x.DateBeg <= week) ||
                                    (pastWeek <= x.DateEnd && x.DateEnd <= week)).ToList()
                             .OrderBy(x => x.DateBeg).ToList();
            var courses = EmployeeVMService.GetCourses().CourseHasVideos.Select(x => x.Item1).ToList();

            model.Groups  = groups;
            model.Courses = courses;
        }
示例#2
0
 public ActionResult Courses()
 {
     return(View(EmployeeVMService.GetCourses()));
 }