/// <summary> ///创建成功后页面 plus Pager /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Plan(int PlanID, int?id, bool?modal, bool?scrolling, bool?animation, bool?resizable, bool?movable) { var res = tourPlanService.GetTourPlanByID(PlanID); var data = res.ToDto(); var sightInfoService = iPow.Presentation.account.iPowPreAccountEngine.Current.Resolve < iPow.Application.account.Service.ISightInfoService>(); Application.account.Dto.TourPlanDto dto = new Application.account.Dto.TourPlanDto(); dto.CurrentCityInfo = cityInfoService.GetCityInfoSingleByName(res.Destination); var pi = id == null ? 1 : (int)id; int take = pageSize; dto.SightInfo = sightInfoService.GetAllSightByCity(dto.CurrentCityInfo.city, pi, take); dto.TourPlan = data; var result = tourPlanDetailService.GetTourPlanByID(PlanID); if (result != null) { List <iPow.Domain.Dto.Sys_SightInfoDto> LSIF = new List <Sys_SightInfoDto>(); foreach (var item in result) { iPow.Domain.Dto.Sys_SightInfoDto SIF = new Sys_SightInfoDto(); SIF = sightInfoService.GetSightByPlanID(item.SightIDOrHotelID.HasValue ? (int)item.SightIDOrHotelID : 0); LSIF.Add(SIF); } dto.sightInfoDto = LSIF; } ViewData["modal"] = modal ?? false; ViewData["scrolling"] = scrolling ?? true; ViewData["resizable"] = resizable ?? true; ViewData["movable"] = movable ?? true; return(View(dto)); }
protected Sys_SightInfoDto GetSightByID(int Id) { Sys_SightInfoDto data = SightInfo.GetSightByParkID(Id); return(data); }
/// <summary> ///创建成功后页面 plus Pager /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Plan(int PlanID, int? id, bool? modal, bool? scrolling, bool? animation, bool? resizable, bool? movable) { var res = tourPlanService.GetTourPlanByID(PlanID); var data = res.ToDto(); var sightInfoService = Miaow.Presentation.account.MiaowPreAccountEngine.Current.Resolve< Miaow.Application.account.Service.ISightInfoService>(); Miaow.Application.account.Dto.TourPlanDto dto = new Miaow.Application.account.Dto.TourPlanDto(); dto.CurrentCityInfo = cityInfoService.GetCityInfoSingleByName(res.Destination); var pi = id == null ? 1 : (int)id; int take = pageSize; dto.SightInfo = sightInfoService.GetAllSightByCity(dto.CurrentCityInfo.city, pi, take); dto.TourPlan = data; var result = tourPlanDetailService.GetTourPlanByID(PlanID); if (result != null) { List<Miaow.Domain.Dto.Sys_SightInfoDto> LSIF = new List<Sys_SightInfoDto>(); foreach (var item in result) { Miaow.Domain.Dto.Sys_SightInfoDto SIF = new Sys_SightInfoDto(); SIF = sightInfoService.GetSightByPlanID(item.SightIDOrHotelID.HasValue ? (int)item.SightIDOrHotelID : 0); LSIF.Add(SIF); } dto.sightInfoDto = LSIF; } ViewData["modal"] = modal ?? false; ViewData["scrolling"] = scrolling ?? true; ViewData["resizable"] = resizable ?? true; ViewData["movable"] = movable ?? true; return View(dto); }