protected IEnumerable <CommonCourseListItemVM> GetCourses() { var courses = CourseListVMService.GetAll(null) .Common.Items.Where(x => x.Prices.Any(z => !PriceTypes.IsIndividual(z.PriceType_TC)) && !CourseTC.HalfTrackCourses.Contains(x.Course.Course_TC)); return(courses); }
public void AddControlForAboutDiplom(SimplePageVM model) { var diploms = CourseService.DiplomTracks().ToList(); var sections = UniqCourseInSection(GroupVMService.GetSectionCourseTCs(diploms)); var data = sections.Select(x => Tuple.Create(x.Key, CourseListVMService.GetAll(new TrackListVM { IsDiplomPage = true, Courses = x.ToList() }).FluentUpdate(y => y.EntityName = x.Key.Name))).ToList(); var list = new DiplomProgramListVM { List = data }; model.Controls.Add(new SimplePageVM.Control(Views.Page.DiplomProgramList, list)); }
public virtual ActionResult CourseList(string typeName, object pk, string name) { var entity = SiteObject.GetEntity(typeName, pk); if (entity == null) { return(null); } var model = CourseListVMService.GetAll(entity); model.EntityName = name; model.EntityType = entity.GetType(); return(MView(PartialViewNames.AllCourseListPart, model)); }
public void AddControlForMicrosoftSeminars(SimplePageVM model) { var groups = CourseListVMService.GetSeminars(false) .GroupSeminars.Where(x => x.Group.IsMicrosoftseminar).ToList(); var msSeminars = GroupService.GetPlannedAndNotBegin().Where( x => CourseTC.MsSeminars.Contains(x.Course_TC)) .Select(x => new GroupSeminar(x)).ToList(); model.Controls.Add( new SimplePageVM.Control(Views.Shared.Education.SeminarList, groups)); if (msSeminars.Any()) { model.Controls.Add( new SimplePageVM.Control(Views.Shared.Education.SeminarList, msSeminars, "Расписание семинаров First Look")); } }
private DiplomProgramListVM GetTrainingPrograms(PageController page) { return(MethodBase.GetCurrentMethod().CacheDay(() => { var programs = CourseService.GetAllHitTracks() .Select(x => x.Course_TC).Except(CourseTC.HalfTracks.Keys).ToList(); var sectionCourseTCs = GroupVMService.GetSectionCourseTCs(programs); var sections = UniqCourseInSection(sectionCourseTCs); var data = sections.Select(x => Tuple.Create(x.Key, CourseListVMService.GetAll(new TrackListVM { IsTrainingProgramsPage = true, Courses = x.ToList() }).FluentUpdate(y => { y.EntityName = x.Key.Name; y.EntityUrl = page.Html.Url().Section().Urls.Details(x.Key.UrlName); }))).ToList(); var list = new DiplomProgramListVM { List = data }; return list; })); }
public virtual ActionResult ElearningList(string name) { var model = CourseListVMService.ElearningCourses(name); return(View(model)); }
public virtual ActionResult CourseListForModel(object model) { var courses = CourseListVMService.GetAll(model); return(View(PartialViewNames.AllCourseListPart, courses)); }
public ActionResult Consultations() { var model = CourseListVMService.GetSeminars(true); return(View(ViewNames.Seminars, model)); }
public ActionResult Seminars() { var model = CourseListVMService.GetSeminars(false); return(View(model)); }