// // GET: /Weixin/WeCar/ /// <summary> /// 租赁车辆 /// add by fruitchan /// 2017-2-14 20:43:30 /// </summary> /// <returns>View</returns> public ActionResult CarListView() { Model.Entites.Region currentCity = OperateContext.Current.CurrentCity; IList <Model.Entites.CarInfo> carList = OperateContext.Current.BLLSession.ICarInfoBLL.GetListBy(m => m.ID > 0 && m.CityId == currentCity.Id, m => m.ID, true).ToList(); return(View(carList)); }
// // GET: /Weixin/WeMain/ /// <summary> /// 微信首页 /// add by fruitchan /// 2017-2-7 19:53:33 /// </summary> /// <returns>View</returns> public ActionResult Index() { Model.Entites.Region currentCity = OperateContext.Current.CurrentCity; // Banner ViewBag.BannerList = OperateContext.Current.BLLSession.IHomeDataBLL.GetListBy(m => m.Type == 2).OrderByDescending(m => m.ID).ToList(); // 热门景点 // ViewBag.SpotInfoList = OperateContext.Current.BLLSession.ISpotInfoBLL.GetPagedList(1, 6, m => m.IsHomeShow == true && m.CityId == currentCity.Id, m => m.Sort, true); ViewBag.SpotInfoList = OperateContext.Current.BLLSession.ISpotInfoBLL.GetListBy(h => h.IsHomeShow == true && h.CityId == currentCity.Id, h => h.Sort, true); // 热门度假房 // 房源图片 //IList<HouseInfoView> houseList = OperateContext.Current.BLLSession.IHouseInfoViewBLL.GetPagedList(1, 4, m => m.State == 0 && m.CityId == currentCity.Id, m => m.BuyNum, false); //// 房源图片 //if (houseList != null && houseList.Count > 0) //{ // foreach (var house in houseList) // { // house.HouseImgList = OperateContext.Current.BLLSession.IHouseImgBLL.GetListBy(m => m.HouseInfoID == house.ID, m => m.CreateTime, true); // } //} //ViewBag.HouseList = houseList; //热门店铺 ViewBag.ShopList = OperateContext.Current.BLLSession.IShopInfoBLL.GetListBy(h => h.IsCheck == 1 && h.State == 1, h => h.SortBy, true); //建筑 List <buildInfo> buildlist = new List <buildInfo>(); for (int i = 0; i < 4; i++) { buildInfo buildInfos = new buildInfo(); if (i < 3) { buildInfos.buildName = String.Format("房源{0}", i + 1); } else { buildInfos.buildName = String.Format("更多"); } buildlist.Add(buildInfos); } ViewBag.buildInfos = buildlist; // 地方特产 ViewBag.ProductList = OperateContext.Current.BLLSession.IProductInfoBLL.GetPagedList(1, 4, m => m.IsHomeShow == true && m.CityId == currentCity.Id, m => m.Sort, true); // 租赁车辆 ViewBag.CarList = OperateContext.Current.BLLSession.ICarInfoBLL.GetPagedList(1, 4, m => m.ID > 0 && m.CityId == currentCity.Id, m => m.ID, true).ToList(); return(View()); }
// // GET: /Home/ /// <summary> /// 我要去度假网首页 /// add by fruitchan /// 2016-11-22 19:01:58 /// </summary> /// <returns>View</returns> public ActionResult Index() { Model.Entites.Region currentCity = OperateContext.Current.CurrentCity; // Banner ViewBag.BannerList = OperateContext.Current.BLLSession.IHomeDataBLL.GetListBy(m => m.Type == 2).OrderByDescending(m => m.ID).ToList(); // 广告 ViewBag.AD = OperateContext.Current.BLLSession.IHomeDataBLL.GetListBy(m => m.Type == 1).FirstOrDefault(); // 热门景点 ViewBag.SpotInfoList = OperateContext.Current.BLLSession.ISpotInfoBLL.GetPagedList(1, 9, m => m.IsHomeShow == true && m.CityId == currentCity.Id, m => m.Sort, true); // 热门度假房 // IList<HouseInfoView> houseList = OperateContext.Current.BLLSession.IHouseInfoViewBLL.GetPagedList(1, 4, m => m.State == 0 && m.CityId == currentCity.Id, m => m.BuyNum, false); // 房源图片 //if (houseList != null && houseList.Count > 0) //{ // foreach (var house in houseList) // { // house.HouseImgList = OperateContext.Current.BLLSession.IHouseImgBLL.GetListBy(m => m.HouseInfoID == house.ID, m => m.CreateTime, true); // } //} //ViewBag.HouseList = houseList; //热门店铺 ViewBag.ShopList = OperateContext.Current.BLLSession.IShopInfoBLL.GetListBy(h => h.IsCheck == 1 && h.State == 1, h => h.SortBy, true); // 地方特产 ViewBag.ProductList = OperateContext.Current.BLLSession.IProductInfoBLL.GetPagedList(1, 4, m => m.IsHomeShow == true && m.CityId == currentCity.Id, m => m.Sort, true); // 租赁车辆 ViewBag.CarList = OperateContext.Current.BLLSession.ICarInfoBLL.GetListBy(m => m.ID > 0 && m.CityId == currentCity.Id).ToList(); return(View()); }