예제 #1
0
        public string GetPriceTypeForGroup(Group group,
                                           bool isBusiness, string customerType)
        {
            if (PriceService.DopUslCourses().Contains(group.Course_TC))
            {
                return(PriceTypes.DopUsl);
            }
            var cityPrefix = PriceTypes.GetPrefix(
                CityService.GetCityPrefix(group.BranchOffice.TrueCity_TC));

            return(cityPrefix + PriceTypes.GetForGroup(group, isBusiness, customerType));
        }
예제 #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);
        }