コード例 #1
0
        public ActionResult ShowAllCities()
        {
            BizInfoModel   bim = new BizInfoModel();
            List <BizInfo> lbi = BizInfoRepository.GetAllBizInfos(true);
            int            n   = BizInfoRepository.GetNumberOfCityInBizInfos(lbi, true);

            // bim.ShowCities = AllCitiesView.ShowAllCities(lbi, n, null, 4);
            bim.ShowCities            = AllCitiesView.ShowAllCities_Bootstrap(lbi, n, null);
            bim.ShowCuisines          = AllCuisinesView.ShowCuisinesView(BizCuisineRepository.GetAllBizCuisines(true), null, null);
            bim.ShowMostPopularCities = AllCitiesView.ShowMostPopularCities(BizInfoRepository.GetBizInfoInMostPopularCities(true), 4);
            return(PartialView(bim));
        }
コード例 #2
0
        //[OutputCache(Duration = 600, VaryByParam = "id")]
        public ActionResult Cuisine(string id, ShoppingCart cart, BrowseHistory bh)
        {
            string cuisine = string.IsNullOrEmpty(id) ? string.Empty : DecodeString(id);

            ViewBag.delivery = bh.IsDelivery;
            BizInfoModel bim = new BizInfoModel();

            bim.CuisineName = cuisine;
            // bim.ShowCities = AllCitiesView.ShowAllCities(BizInfoRepository.GetAllBizInfos(true), 4);
            List <BizInfo> lbc = BizInfoRepository.GetBizInfosByCuisineType(cuisine, true);
            int            n   = BizInfoRepository.GetNumberOfCityInBizInfos(lbc, true);

            bim.ShowCities      = AllCitiesView.ShowAllCities_Bootstrap(lbc, n, cuisine);
            bim.CitiesInCuisine = BizInfoRepository.GetCitiesInCuisine(cuisine);
            ViewBag.bagitems    = GetCartItems(cart);
            return(View(bim));
        }