Ejemplo n.º 1
0
        public ActionResult NewOrder()
        {
            OrderStartViewModel orderStartViewModel = new OrderStartViewModel();

            orderStartViewModel.RecentOrders = _orderService.GetRecentOrders();
            return(View(orderStartViewModel));
        }
Ejemplo n.º 2
0
        public ActionResult DeleteOrder(int orderId = 0)
        {
            OrderStartViewModel orderStartViewModel = new OrderStartViewModel();

            orderStartViewModel.RecentOrders = _orderService.DeleteOrder(orderId);
            return(PartialView("_RecentOrders", orderStartViewModel));
        }
Ejemplo n.º 3
0
        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));
        }