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)); }
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)); }