Пример #1
0
        public ActionResult Edit(int id)
        {
            var model = new CreateEditViewModel();
            var area  = areaProvider.GetArea(id);

            model.Id       = area.Id;
            model.Name     = area.Name;
            model.IsActive = area.IsActive;
            return(View(model));
        }
Пример #2
0
        public ActionResult CheckOut()
        {
            var viewModel = new CheckOutViewModel();

            if (cartManager.CountItemsInCart() == 0)
            {
                return(RedirectToAction("ViewCart"));
            }
            viewModel.AddressTypes   = addressTypeProvider.GetAddressTypes();
            viewModel.PaymentMethods = paymentMethodProvider.GetPaymentMethods();
            viewModel.Cart           = cartManager.MyCart;
            var deliveryArea = areaProvider.GetArea(cartManager.MyCart.OrderAreaId);

            viewModel.DeliveryArea = deliveryArea.Name;
            return(View(viewModel));
        }