public ActionResult CompleteOrder() { try { int userId = (int)Session["UserId"]; int customer = facade.GetCustomerGateway().Read(userId).Id; ShoppingCart cart = Session["ShoppingCart"] as ShoppingCart; Order order = new Order() { CustomerId = customer, Date = DateTime.Now, OrderLines = cart.OrderLines }; facade.GetOrderGateway().Add(order); return View(cart.OrderLines); } catch { return View("OrderFail"); } }
public ActionResult DeleteConfirmed(Order order) { return RedirectToAction("Index"); }
public ActionResult Edit(Order order) { facade.GetOrderGateway().Update(order); return RedirectToAction("Index"); }
public ActionResult Create(Order order) { facade.GetOrderGateway().Add(order); return RedirectToAction("Index"); }