Exemplo n.º 1
0
        public JsonResult GetCirSightInfoByID(int Id)
        {
            List <iPow.Domain.Dto.Sys_SightInfoDto> LSID = new List <Sys_SightInfoDto>();
            var res = SightInfo.GetCirSightIDByID(Id);

            foreach (var item in res)
            {
                iPow.Domain.Dto.Sys_SightInfoDto SID = new iPow.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));
        }
Exemplo n.º 2
0
        public JsonResult GetUserDIYTourByID(int Id)
        {
            List <iPow.Domain.Dto.Sys_SightInfoDto> LSID = new List <Sys_SightInfoDto>();
            var res = tourPlanDetailService.GetSightTitleByID(Id);

            foreach (var item in res)
            {
                iPow.Domain.Dto.Sys_SightInfoDto SID = new iPow.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));
        }
Exemplo n.º 3
0
 public JsonResult GetUserDIYTourByID(int Id)
 {
     List<iPow.Domain.Dto.Sys_SightInfoDto> LSID = new List<Sys_SightInfoDto>();
     var res = tourPlanDetailService.GetSightTitleByID(Id);
     foreach (var item in res)
     {
         iPow.Domain.Dto.Sys_SightInfoDto SID = new iPow.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);
 }
Exemplo n.º 4
0
 /// <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);
 }
Exemplo n.º 5
0
 public JsonResult GetCirSightInfoByID(int Id)
 {
     List<iPow.Domain.Dto.Sys_SightInfoDto> LSID = new List<Sys_SightInfoDto>();
     var res = SightInfo.GetCirSightIDByID(Id);
     foreach (var item in res)
     {
         iPow.Domain.Dto.Sys_SightInfoDto SID = new iPow.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);
 }