Exemplo n.º 1
0
        //public ActionResult BackToBrowse()
        //{
        //    return RedirectToAction("Events/Index");
        //}

        /*
         * public ActionResult OrderReview()
         * {
         *  OrderSummary thesummary = new OrderSummary();
         *  thesummary = OrderSummary.GetOrder(this.HttpContext);
         *
         *  OrderSummaryViewModel vm = new OrderSummaryViewModel()
         *  {
         *      OrderItems = singleOrder.GetSingleOrder()
         *  };
         *
         *  return View(vm);
         * }
         */



        //Register was moved back to home again

        /*
         * public ActionResult Register (int id)
         * {
         *  OrderSummary order = OrderSummary.GetOrder(this.HttpContext);
         *  order.AddOrder(id);
         *
         *
         *  OrderSummary thesummary = new OrderSummary();
         *  thesummary = OrderSummary.GetOrder(this.HttpContext);
         *  OrderSummaryViewModel vm = new OrderSummaryViewModel()
         *  {
         *      OrderItems = thesummary.GetOrderItems()
         *  };
         *
         *  return View();
         * }
         */


        // GET: Order/AddOrder ---ORIGINAL--Will need one that take in int for Count, too
        public ActionResult AddOrder(int id)
        {
            OrderSummary order = OrderSummary.GetOrder(this.HttpContext);

            order.AddOrder(id);
            //return RedirectToAction("OrderSummary");
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        //GET Checkout
        //receives int id only at this point

        public ActionResult Checkout(int id)
        {
            OrderSummary order = OrderSummary.GetOrder(this.HttpContext);

            order.AddOrder(id);

            /*
             * SingleOrderViewModel vm = new SingleOrderViewModel()
             * {
             *  SingleOrder = order.GetSingleOrder()
             * };
             */
            OrderSummaryViewModel vm = new OrderSummaryViewModel()
            {
                OrderItems = order.GetOrderItems()
            };

            return(View(vm));
        }