public ActionResult NewOrder() { OrderStartViewModel orderStartViewModel = new OrderStartViewModel(); orderStartViewModel.RecentOrders = _orderService.GetRecentOrders(); return(View(orderStartViewModel)); }
public ActionResult DeleteOrder(int orderId = 0) { OrderStartViewModel orderStartViewModel = new OrderStartViewModel(); orderStartViewModel.RecentOrders = _orderService.DeleteOrder(orderId); return(PartialView("_RecentOrders", orderStartViewModel)); }
public ActionResult NewOrder(OrderStartViewModel orderStartViewModel) { OrderViewModel order = new OrderViewModel(); order.OrderCustomerId = orderStartViewModel.CustomerID; order.OrderDate = orderStartViewModel.OrderDate; if (ModelState.IsValid) { return(RedirectToAction("ShoppingCart", order)); } return(View(orderStartViewModel)); }