Exemplo n.º 1
0
        public JsonResult fillstate(int id)
        {
            DLAddresses model = new DLAddresses();

            model.States = BLOrder.PopulateDropDown("StoredProcStates", id);
            return(Json(model.States));
        }
Exemplo n.º 2
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());
        }
Exemplo n.º 3
0
        public JsonResult AjaxMethod(string type, int value)
        {
            DLAddresses model = new DLAddresses();

            switch (type)
            {
            case "CountryId":
                model.States = BLOrder.PopulateDropDown("StoredProcStates", value);
                break;

            case "StateId":
                model.Cities = BLOrder.PopulateDropDown("StoredProcCities", value);
                break;
            }
            return(Json(model));
        }