Exemplo n.º 1
0
        // GET: Order
        public ActionResult Orders()
        {
            if (Session["CustomerId"] != null)
            {
                int CustomerId = Convert.ToInt32(Session["CustomerId"]);
                ViewBag.OrderList = balOrder.DisplayOrder(CustomerId, "DisplayOrder");

                ViewBag.Countries = BLOrder.PopulateDropDown("StoredProcCountries", 0);

                ViewBag.States         = balOrder.CSCList("StoredProcStates");
                ViewBag.Cities         = balOrder.CSCList("StoredProcCities");
                ViewBag.TotalOrderList = balOrder.DisplayOrder(CustomerId, "OrderList");

                List <DLAddresses> list = balOrder.AddressExist(CustomerId);
                if (list.Count != 0)
                {
                    return(View(list[0]));
                }
            }
            else
            {
                TempData["Error"] = "Please SignIn first";
                return(Redirect("/Customer/Home"));
            }

            return(View());
        }