public ActionResult Packs() { var model = new PacksViewModel(); if (ShoppingCart.Items.Where(c => c.Type == ShoppingCartItemType.EnrollmentPack).Count() > 0) { model.SelectedOrderItem = ShoppingCart.Items.Where(c => c.Type == ShoppingCartItemType.EnrollmentPack).FirstOrDefault(); } model.CustomerTypeID = (PropertyBag.Customer != null) ? PropertyBag.Customer.CustomerTypeID : 1; model.OrderItems = ExigoDAL.GetItems(new ExigoService.GetItemsRequest { Configuration = OrderPacksConfiguration, IncludeAllChildCategories = true, IncludeLongDescriptions = true }).ToList(); foreach (var item in model.OrderItems) { item.Type = ShoppingCartItemType.EnrollmentPack; } return(View(model)); }
public async Task <IActionResult> IndexPack(PackFilteringData filteringData) { var vm = new PacksViewModel { Packs = await deliveryService.GetPacks(filteringData ?? new PackFilteringData()) }; return(View(vm)); }