public ActionResult OrderHistory() { ViewBag.Message = "Order History"; PizzaStoreDataServiceClient psDataClient = new PizzaStoreDataServiceClient(); List <OrderDAO> orderHistory = psDataClient.GetOrders().ToList(); ViewBag.Orders(orderHistory); return(View()); }
public static bool SubmitOrder(OrderDTO newOrder) { PizzaStoreDataServiceClient pizzaStoreData = new PizzaStoreDataServiceClient(); OrderDAO orderToDAO = new OrderDAO(); orderToDAO.Subtotal = newOrder.Subtotal; orderToDAO.Taxes = newOrder.Taxes; orderToDAO.Total = newOrder.Total; orderToDAO.Timestamp = newOrder.Timestamp; orderToDAO.Customer = newOrder.Customer; orderToDAO.PaymentMethod = newOrder.PaymentMethod; return(pizzaStoreData.PostNewOrder(orderToDAO)); }
public static bool SubmitOrder(OrderDAO newOrder) { PizzaStoreDataServiceClient psDataClient = new PizzaStoreDataServiceClient(); return(psDataClient.postOrder(newOrder)); }