public async Task <ActionResult> Index(string q = "", string tags = null, int minPrice = 0, int maxPrice = 50000, int?page = null)
        {
            ViewBag.category      = "Vehicles";
            ViewBag.subcategories = new string[] { "Cars", "Bikes", "Commercial Vehicles", "Other Vehicles", "Spare Parts" };
            var result = await StudyController.searchResults("Vehicles", "", q, tags, minPrice, maxPrice, Session["City"] == null || Session["City"].ToString() == "All Pakistan"?null : Session["City"].ToString());

            var pager = new Pager(result.Count(), page);

            var viewModel = new ListViewModel
            {
                ItemsCount = result.Count(),
                Items      = result.Skip((pager.CurrentPage - 1) * pager.PageSize).Take(pager.PageSize),
                Pager      = pager
            };

            return(View("../Study/Index", viewModel));
        }
示例#2
0
        public async Task <ActionResult> Categories1(string q = "", string tags = null, int minPrice = 0, int maxPrice = 50000, int?page = null)
        {
            ViewBag.category      = "Electronics";
            ViewBag.subcategories = new string[] { "Laptops & Computers", "Cameras", "TV-Video-Audio", "Games", "Home Appliances", "Other Electronics" };
            var result = await StudyController.searchResults("Electronics", "", q, tags, minPrice, maxPrice, Session["City"] == null || Session["City"].ToString() == "All Pakistan"?null : Session["City"].ToString());

            var pager = new Pager(result.Count(), page);

            var viewModel = new ListViewModel
            {
                ItemsCount = result.Count(),
                Items      = result.Skip((pager.CurrentPage - 1) * pager.PageSize).Take(pager.PageSize),
                Pager      = pager
            };

            return(View("../Study/Index", viewModel));
        }
示例#3
0
        //public ActionResult abc4()
        //{
        //    ViewBag.category = "Education-Learning";
        //    ViewBag.subcategory = "Musical Instruments";

        //    return View("Index");
        //}
        public async Task <ActionResult> abc4(string q = "", string tags = null, int minPrice = 0, int maxPrice = 50000, bool accessories = false, string condition = null, int?page = null)
        {
            ViewBag.category    = "Education-Learning";
            ViewBag.subcategory = "Musical Instruments";
            string city   = Session["City"] == null || Session["City"].ToString() == "All Pakistan" ? null : Session["City"].ToString();
            var    result = await StudyController.searchResults("Animals", null, q, tags, minPrice, maxPrice, city, null, 50000, condition);

            var pager = new Pager(result.Count(), page);

            var viewModel = new ListViewModel
            {
                ItemsCount = result.Count(),
                Items      = result.Skip((pager.CurrentPage - 1) * pager.PageSize).Take(pager.PageSize),
                Pager      = pager
            };

            return(View("Index", viewModel));
        }
        public async Task <ActionResult> Bakra(string q = "", string category = null, string tags = null, int minPrice = 0, int maxPrice = 50000, bool accessories = false, string condition = null, int?page = null)
        {
            ViewBag.category = "Bakra for qurbani";
            // ViewBag.subcategory = "Bakra for Qurbani";
            ViewBag.subcategory = "Bakra for qurbani";
            string city   = Session["City"] == null || Session["City"].ToString() == "All Pakistan" ? null : Session["City"].ToString();
            var    result = await StudyController.searchResults("Animals", category, q, tags, minPrice, maxPrice, city, null, 50000, condition, "Qurbani");

            var pager = new Pager(result.Count(), page);

            var viewModel = new ListViewModel
            {
                ItemsCount = result.Count(),
                Items      = result.Skip((pager.CurrentPage - 1) * pager.PageSize).Take(pager.PageSize),
                Pager      = pager
            };

            //return View("Index", viewModel);
            return(View("../Study/Bakra", viewModel));
        }
示例#5
0
        public async Task <ActionResult> homeL(string q = "", string tags = null, int minPrice = 0, int maxPrice = 50000, bool accessories = false, string condition = null, int?page = null)
        {
            ViewBag.category = "Fashion";
            // ViewBag.subcategory = "Beauty products";
            var subcategories = new string[] { "Watches", "Clothes", "Footwear", /* "Jewellery", "Beauty Products",*/ "Others in Fashion" };

            ViewBag.subcategories = subcategories;
            string city   = Session["City"] == null || Session["City"].ToString() == "All Pakistan" ? null : Session["City"].ToString();
            var    result = await StudyController.searchResults("Fashion", null, q, tags, minPrice, maxPrice, city, null, 50000, condition);

            var pager = new Pager(result.Count(), page);

            var viewModel = new ListViewModel
            {
                ItemsCount = result.Count(),
                Items      = result.Skip((pager.CurrentPage - 1) * pager.PageSize).Take(pager.PageSize),
                Pager      = pager
            };

            return(View("../Study/Index", viewModel));
        }