/// <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)); }
/// <summary> /// Show 所有的线路 /// </summary> /// <param name="Id"></param> /// <returns></returns> public ViewResult AllPlan(int?Id) { List <iPow.Domain.Dto.Sys_SightInfoDto> LSID = new List <Sys_SightInfoDto>(); Application.account.Dto.TourPlanDto dto = new Application.account.Dto.TourPlanDto(); int take = pageSize; var pi = (Id.HasValue && Id.Value > 0) ? (int)Id : 1; dto.TourPlanList = tourPlanService.GetTourPlanList(pi, take); #region MyRegion //foreach (var item in dto.TourPlanList) //{ // //验证是否为空路线 // var res = tourPlanDetailService.CheckTourPlanIsExistByID(item.PlanID); // if (res != false) // { // var tourPlanDetail = tourPlanDetailService.GetTourPlanDetailByID(item.PlanID); //线路详情 // foreach (var tourplan in tourPlanDetail) // { // if (tourplan.SightIDOrHotelID != 0) // { // iPow.Domain.Dto.Sys_SightInfoDto SID = new Sys_SightInfoDto(); // var sight = SightInfo.GetSightByParkID(tourplan.SightIDOrHotelID); // SID.ParkID = sight.ParkID; // SID.Title = sight.Title; // LSID.Add(SID); // } // } // } //} #endregion return(View(dto)); }
/// <summary> /// 这里显示所有的线路 By UserID /// 并以分页 /// </summary> /// <param name="Id"></param> /// <returns></returns> public ViewResult PlanList(int userId, int?Id) { Application.account.Dto.TourPlanDto dto = new Application.account.Dto.TourPlanDto(); if (userId != 0 || userId != null) { int take = pageSize; var pi = Id == null ? 1 : (int)Id; dto.TourPlanList = tourPlanService.GetTourPlanListByUserId(userId, pi, take); } if (userId != 0) { int take = pageSize; var pi = Id == null ? 1 : (int)Id; dto.TourPlanList = tourPlanService.GetTourPlanListByUserId(userId, pi, take); } return(View(dto)); }
/// <summary> /// Show 所有的线路 /// </summary> /// <param name="Id"></param> /// <returns></returns> public ViewResult AllPlan(int? Id) { List<iPow.Domain.Dto.Sys_SightInfoDto> LSID = new List<Sys_SightInfoDto>(); Application.account.Dto.TourPlanDto dto = new Application.account.Dto.TourPlanDto(); int take = pageSize; var pi = (Id.HasValue && Id.Value > 0) ? (int)Id : 1; dto.TourPlanList = tourPlanService.GetTourPlanList(pi, take); #region MyRegion //foreach (var item in dto.TourPlanList) //{ // //验证是否为空路线 // var res = tourPlanDetailService.CheckTourPlanIsExistByID(item.PlanID); // if (res != false) // { // var tourPlanDetail = tourPlanDetailService.GetTourPlanDetailByID(item.PlanID); //线路详情 // foreach (var tourplan in tourPlanDetail) // { // if (tourplan.SightIDOrHotelID != 0) // { // iPow.Domain.Dto.Sys_SightInfoDto SID = new Sys_SightInfoDto(); // var sight = SightInfo.GetSightByParkID(tourplan.SightIDOrHotelID); // SID.ParkID = sight.ParkID; // SID.Title = sight.Title; // LSID.Add(SID); // } // } // } //} #endregion return View(dto); }
/// <summary> /// 这里显示所有的线路 By UserID /// 并以分页 /// </summary> /// <param name="Id"></param> /// <returns></returns> public ViewResult PlanList(int userId, int? Id) { Application.account.Dto.TourPlanDto dto = new Application.account.Dto.TourPlanDto(); if (userId != 0 || userId != null) { int take = pageSize; var pi = Id == null ? 1 : (int)Id; dto.TourPlanList = tourPlanService.GetTourPlanListByUserId(userId, pi, take); } if (userId != 0) { int take = pageSize; var pi = Id == null ? 1 : (int)Id; dto.TourPlanList = tourPlanService.GetTourPlanListByUserId(userId, pi, take); } return View(dto); }
/// <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); }