Esempio n. 1
0
        public ActionResult OrderHistory()
        {
            ViewBag.Message = "Order History";

            PizzaStoreDataServiceClient psDataClient = new PizzaStoreDataServiceClient();
            List <OrderDAO>             orderHistory = psDataClient.GetOrders().ToList();

            ViewBag.Orders(orderHistory);

            return(View());
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        public static bool SubmitOrder(OrderDAO newOrder)
        {
            PizzaStoreDataServiceClient psDataClient = new PizzaStoreDataServiceClient();

            return(psDataClient.postOrder(newOrder));
        }