public JsonResult GetUserDIYTourByID(int Id) { List<Miaow.Domain.Dto.Sys_SightInfoDto> LSID = new List<Sys_SightInfoDto>(); var res = tourPlanDetailService.GetSightTitleByID(Id); foreach (var item in res) { Miaow.Domain.Dto.Sys_SightInfoDto SID = new Miaow.Domain.Dto.Sys_SightInfoDto(); SID = SightInfo.GetSightByID(item.SightIDOrHotelID.HasValue ? (int)item.SightIDOrHotelID : 0); SID.ParkID = item.SightIDOrHotelID.HasValue ? (int)item.SightIDOrHotelID : 0; LSID.Add(SID); } var count = LSID.Count(); var data = new { List = LSID, Count = count }; return Json(data, JsonRequestBehavior.AllowGet); }
public JsonResult GetCirSightInfoByID(int Id) { List<Miaow.Domain.Dto.Sys_SightInfoDto> LSID = new List<Sys_SightInfoDto>(); var res = SightInfo.GetCirSightIDByID(Id); foreach (var item in res) { Miaow.Domain.Dto.Sys_SightInfoDto SID = new Miaow.Domain.Dto.Sys_SightInfoDto(); SID = SightInfo.GetSightByID(item.CirId.HasValue ? (int)item.CirId : 0); LSID.Add(SID); } var count = LSID.Count(); var data = new { List = LSID, Count = count }; return Json(data, JsonRequestBehavior.AllowGet); }