public ActionResult ConfirmOrder()
        {
            //require login
            CurrentCustomer currentCustomer = (CurrentCustomer)Session[SessionBox.CUSTOMER_SESSION];

            if (currentCustomer == null)
            {
                return(RedirectToAction("Login", "Account"));
            }
            else
            {
                Customer customer = AccountDao.FindCustomer(currentCustomer.GetCustomerID());
                if (customer != null)
                {
                    ViewBag.Customer = customer;
                }
                return(PartialView("_ConfirmOrder", GetCart()));
            }
        }
Beispiel #2
0
        // GET: Admin/Profile
        public ActionResult Index()
        {
            CurrentCustomer currentCustomer = (CurrentCustomer)Session[SessionBox.CUSTOMER_SESSION];

            if (currentCustomer == null)
            {
                return(RedirectToAction("Login", "Account"));
            }
            else
            {
                Customer customer = AccountDao.FindCustomer(currentCustomer.GetCustomerID());
                if (customer != null)
                {
                    ViewBag.Customer = customer;
                    List <Order> orders = OrderDAO.GetOrder(customer.AccountID);
                    return(PartialView("_IndexProfile", orders));
                }
                else
                {
                    return(RedirectToAction("Login", "Account"));
                }
            }
        }