/// <summary>
        /// 房屋列表首页
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            var model = new HouseListModel();

            model.CommercialProperties = houseCache.GetHouseCommercialPropertiesList();
            model.Properties           = houseCache.GetHousePropertiesList();
            return(View(model));
        }
Exemple #2
0
        // GET: House
        public ActionResult List(long typeId)
        {
            HouseListModel house = new HouseListModel();
            long           id    = (long)AdminHelper.AdminUserId(HttpContext);

            house.CityId = AdminUserService.GetById(id).CityId;
            house.TypeId = typeId;
            if (house.CityId == null)
            {
                return(View("ERROR", "总部不能进行房源管理"));
            }
            return(View(house));
        }
Exemple #3
0
        public ActionResult List()
        {
            long userId = (long)HttpContext.Session["AdminUserId"];
            long?cityId = userService.GetById(userId).CityId;

            if (cityId == null)
            {
                return(View("Error", (object)"总部的人不能进行房源管理"));
            }
            HouseListModel model = new HouseListModel();

            model.Houses         = houseService.GetAll((long)cityId);
            model.Cities         = cityService.GetAll();
            model.SelectedCityId = (long)cityId;
            return(View(model));
        }
Exemple #4
0
        public ActionResult HouseList(long cityId, int pageIndex)
        {
            HouseListModel model  = new HouseListModel();
            var            houses = houseService.GetAll(cityId);

            foreach (var house in houses)
            {
                CreateStaticPage(house.Id);
            }
            model.Houses         = houses;
            model.Cities         = cityService.GetAll();
            model.SelectedCityId = cityId;
            DataPaging pager = new DataPaging();

            pager.PageIndex  = pageIndex;
            pager.TotalCount = houseService.GetAll(cityId).Count();
            pager.UrlPattern = "/House/HouseList?cityId=" + cityId + "&pageIndex={pn}";
            ViewBag.pager    = pager.GetPager();
            return(View(model));
        }