Пример #1
0
        public ActionResult MainPageSections()
        {
            var sections = SectionService.AllActiveSections().Where(x => x.ForMainPage)
                           .OrderBy(x => x.WebSortOrder).ToList();

            return(Content(Htmls2.MarkArrow(sections.Select(x =>
                                                            Html.SectionLink(x))).ToString()));
        }
Пример #2
0
        public XElement Categories()
        {
            _allSections = SectionService.AllActiveSections().ToList();
            var tree    = SectionService.GetSectionsTree();
            var vendors = ExamService.GetAll(e => e.Available && e.ExamPrice > 0)
                          .Select(e => e.Vendor).Distinct().ToList();


            return(X("categories",
                     GetCategory(_otherCategoryId, null, "Другое"),
                     _allSections.Select(s => GetCategory(s.Section_ID, null, s.Name)),
                     GetCategory(VendorOffset, null, "Вендоры"),
                     vendors.Select(v => GetCategory(VendorOffset + v.Vendor_ID, VendorOffset, v.Name))
                     ));
        }