public bool Delete(IList <int> idList, iPow.Infrastructure.Data.DataSys.Sys_AdminUser operUser) { var res = false; if (idList != null && idList.Count > 0) { var delete = sightInfoCirHotelRepository.GetList(e => idList.Contains(e.Id)).ToList(); if (delete != null && delete.Count > 0) { res = Delete(delete, operUser); } } return(res); }
/// <summary> /// 获得周边酒店ID /// 目前以为 酒店的数据库信息不全 所以前台搁置为空 /// </summary> /// <param name="Id"></param> /// <returns></returns> public IEnumerable <PartSightInfoCirHotelDto> GetCirHotalIDByID(int Id) { var res = sightInfoCirHotelRepository.GetList(e => e.SightId == Id).Where(e => e.State == true) .Select(e => new PartSightInfoCirHotelDto { HotelId = e.HotelId }); return(res); }
/// <summary> /// Inits the cir hotel info. /// 初始化当前景区附近的酒店信息列表 /// 前10条 /// </summary> /// <param name="sight">The sight.</param> /// <param name="take">The take.</param> /// <returns></returns> public List <iPow.Domain.Dto.Sys_HotelPropertyInfoDto> GetCirHotelListBySight(iPow.Domain.Dto.Sys_SightInfoDto sight, int take) { var sightCirHotelIdList = sightInfoCirHotelRepository.GetList(e => e.SightId == sight.ParkID).Select(e => e.HotelId); var hi = (from e in hotelPropertyInfoRepository.GetList() where sightCirHotelIdList.Contains(e.ID) && !string.IsNullOrEmpty(e.latitude) && !string.IsNullOrEmpty(e.longitude) orderby e.VisitCount descending select e).Take(take).ToList(); #region modified by yjihrp 2012.3.28.16.05 //景区表添加 //var cir = sight.CirHotelID; //List<iPow.Infrastructure.Data.DataSys.Sys_HotelPropertyInfo> hi = null; //if (!string.IsNullOrEmpty(cir)) //{ // cir = (cir.Length > 1 && (cir.LastIndexOf(',') == 0)) ? cir.Substring(0, cir.Length - 1) : cir; // string[] cirStrArray = cir.Split(','); // List<int?> cirList = new List<int?>(); // for (int i = 0; i < cirStrArray.Length; i++) // { // int temp = 0; // int.TryParse(cirStrArray[i], out temp); // if (temp != 0) // { cirList.Add(temp); } // } // hi = (from e in hotelPropertyInfoRepository.GetList() // where cirList.Contains(e.ID) && // !string.IsNullOrEmpty(e.latitude) && // !string.IsNullOrEmpty(e.longitude) // orderby e.VisitCount descending // select e).Take(take).ToList(); //} #endregion return(hi.ToDto().ToList()); }