Esempio n. 1
0
        public ActionResult AddGroup(decimal groupID)
        {
            var gr = GroupService.GetByPK(groupID);

            if (gr != null)
            {
                if (!AddIfHalfTrack(gr.Course_TC))
                {
                    CartService.AddGroup(groupID);
                }
            }
            return(BackOrDetails());
        }
Esempio n. 2
0
        public ActionResult Buy(decimal id)
        {
            if (User.IsCompany)
            {
                return(BaseViewWithTitle("Заказ юридическим лицом",
                                         new PagePart("Для заказа свяжитесь с " + H.Anchor(SimplePages.FullUrls.CorpManagers, "корпоративным отделом"))));
            }
            var gr = GroupService.GetByPK(id);

            if (gr != null && PriceService.DopUslCourses().Contains(gr.Course_TC))
            {
                OrderService.CreateCurrentOrder(false);
                CartService.AddGroup(id);
                return(RedirectToAction <OrderController>(x => x.Register()));
            }
            return(null);
        }