示例#1
0
        public virtual ActionResult Details(string urlName)
        {
            var model =
                SectionVMService.GetBy(urlName);

            if (model != null)
            {
                model.Announces = AnnounceService.GetHotGroupsForSection(model.Section);
            }

            return(MView(ViewNames.RootSection, model));
        }
示例#2
0
        public ActionResult SectionResponses(string urlName)
        {
            var section = SectionService.GetAll().ByUrlName(urlName);

            if (section == null)
            {
                return(null);
            }
            var responses = SectionVMService
                            .GetResponses(section.Section_ID)
                            .Where(rr => rr.Type == RawQuestionnaireType.CourseComment)
                            .OrderByDescending(r => r.UpdateDate)
                            .Take(20).ToList();

            var title = "Отзывы по направлению  \"" + section.Name + "\"";

            return(View(ViewNames.Responses, CommonVM.New(responses, title)));
        }
示例#3
0
        public ActionResult InvoicePayment(decimal orderID)
        {
            var order = OrderService.GetByPKAndUserID(orderID,
                                                      AuthService.CurrentUser.UserID);

            if (order == null)
            {
                return(RedirectToCart());
            }
            var model   = new CartVM(order);
            var orgBank = GetOrgBank(order);

            model.OurOrg = orgBank.Item1;
            model.Bank   = orgBank.Item2;
            var courseTCs = SectionVMService.CoursesForInvoice();

            model.NearestGroups = GroupService
                                  .GetGroupsForCourses(courseTCs, true, true)
                                  .Where(x => x.DateBeg > DateTime.Today.AddDays(3)).OrderBy(x => x.DateBeg).Take(5).ToList();
            model.BossFullName      = GetFullName(model.OurOrg.Boss_TC);
            model.AccounterFullName = GetFullName(model.OurOrg.ChiefAccountant_TC);
            return(View(model));
        }
示例#4
0
        public ActionResult Responses(int sectionId)
        {
            var responses = SectionVMService.GetResponses(sectionId).Take(4);

            return(Content(H.l(Html.Site().OpinionTwo(responses)).ToString()));
        }
示例#5
0
        public ActionResult CourseListsForSection(int sectionId)
        {
            var model = SectionVMService.GetBy(null, sectionId);

            return(View(PartialViewNames.CourseLists, model.EntityWithTags));
        }