コード例 #1
0
ファイル: XmlShopGenerator.cs プロジェクト: dKluev/Site
        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);
        }
コード例 #2
0
ファイル: SimplePageVMService.cs プロジェクト: dKluev/Site
        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));
        }
コード例 #3
0
ファイル: CourseController.cs プロジェクト: dKluev/Site
        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));
        }
コード例 #4
0
ファイル: SimplePageVMService.cs プロジェクト: dKluev/Site
        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"));
            }
        }
コード例 #5
0
ファイル: SimplePageVMService.cs プロジェクト: dKluev/Site
 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;
     }));
 }
コード例 #6
0
ファイル: CourseController.cs プロジェクト: dKluev/Site
        public virtual ActionResult ElearningList(string name)
        {
            var model = CourseListVMService.ElearningCourses(name);

            return(View(model));
        }
コード例 #7
0
ファイル: CourseController.cs プロジェクト: dKluev/Site
        public virtual ActionResult CourseListForModel(object model)
        {
            var courses = CourseListVMService.GetAll(model);

            return(View(PartialViewNames.AllCourseListPart, courses));
        }
コード例 #8
0
ファイル: CourseController.cs プロジェクト: dKluev/Site
        public ActionResult Consultations()
        {
            var model = CourseListVMService.GetSeminars(true);

            return(View(ViewNames.Seminars, model));
        }
コード例 #9
0
ファイル: CourseController.cs プロジェクト: dKluev/Site
        public ActionResult Seminars()
        {
            var model = CourseListVMService.GetSeminars(false);

            return(View(model));
        }