public ActionResult Checkout()
        {
            GetShoppingCart();

            ShoppingCartManager.Checkout(cart);
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult Checkout(int customerId)
        {
            GetShoppingCart();
            User user = (User)Session["user"];

            ShoppingCartManager.Checkout(cart, user, customerId);
            return(View());
        }
        public ActionResult CheckOut()
        {
            GetShoppingCart();
            UserModel userModel = (UserModel)Session["User"];

            ShoppingCartManager.Checkout(cart, userModel.UserID);
            return(View());
        }
Exemplo n.º 4
0
 public ActionResult Details(int ID, MenuSectionMenuItems msmi)
 {
     if (Authenticate.IsAuthenticated())
     {
         UserModel user = (UserModel)HttpContext.Session["User"];
         ShoppingCartManager.Checkout((Cart)HttpContext.Session["Cart"], user.UserID);
         return(RedirectToAction("Confirmed", "Menu"));
     }
     return(RedirectToAction("Login", "User", new { returnurl = HttpContext.Request.Url.AbsolutePath }));
 }
Exemplo n.º 5
0
 public ActionResult Checkout()
 {
     RetrieveCart();
     using (manager = new ShoppingCartManager())
     {
         manager.Cart = cart;
         manager.Checkout(Security.Identity.GetCurrentUser());
         PersistCart(manager.Cart);
     }
     return(View());
 }
Exemplo n.º 6
0
        public ActionResult Assign(CartCustomers cc)
        {
            GetShoppingCart();
            User user = (User)Session["user"];

            cc.Cart = cart;
            ShoppingCartManager.Checkout(cc.Cart, user.Id, cc.CustomerId);
            Session["cc"]   = null;
            Session["cart"] = null;
            return(RedirectToAction("Thanks"));
        }
Exemplo n.º 7
0
        public ActionResult Checkout()
        {
            try
            {
                CustomerOrders co = new CustomerOrders();
                co.CustomerList = CustomerManager.Load();
                User currentUser = (User)Session["user"];

                GetShoppingCart();

                // We need to get the CustomerId from the user with a sql join
                cart.CustomerId = UserManager.GetCustomerId(currentUser.UserId);

                ShoppingCartManager.Checkout(cart, currentUser);
                Session["cart"] = null;
                return(RedirectToAction("ThankYou"));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }