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; }
public ActionResult Courses() { return(View(EmployeeVMService.GetCourses())); }