Beispiel #1
0
        public ActionResult shopping_cart()
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(RedirectToAction("Login", "Account"));
            }

            var model     = (ShopingCartViewModel)TempData["model"];
            var service   = new Shopping_Cart_Service();
            var user_name = HttpContext.User.Identity.Name;

            //Product_Price_list
            if (!model.ReserveItem.Contains(','))
            {
                ViewBag.Services = model.ReserveItem;
            }
            var get_service_price_model = service.GetService(model.ReserveItem);



            //coupon
            var Account   = new AccountDetailService();
            var viewmodel = Account.get_account_detail(user_name);
            var _Coupon   = service.GetCoupon(viewmodel.Cust_id);

            //Designer
            var get_designer_model = service.GetDesigners();

            ViewBag.Designers = get_designer_model;

            //Session
            var get_session = service.Get_Session_list();

            ViewBag.Session = get_session;


            ViewBag.Origin = service.Calculate_Original_Price(get_service_price_model.Shop_list);

            ViewBag.Store = model.Store;


            ViewBag.Services = model.ReserveItem.Split(',');
            ViewBag.Coupons  = _Coupon;
            return(View(get_service_price_model));
        }