Exemple #1
0
 /// <summary>
 /// Gets the home model.
 /// </summary>
 /// <param name="pi">The pi.</param>
 /// <param name="take">The take.</param>
 /// <returns></returns>
 public Dto.HomeDto GetHomeModel(int?pi, int?take)
 {
     Dto.HomeDto data = new Dto.HomeDto();
     data.TopTourCitys = tourPlanService.GetTopTourPlanCity(10).ToList();
     #region TopTourPlans
     if (data.TopTourCitys.Count() > 0)
     {
         foreach (var item in data.TopTourCitys)
         {
             data.TopTourPlans = tourPlanService.GetTourPlanListByCity(item.CityName, 3).ToPagedList(pi ?? 1, take ?? 10);
             break;
         }
     }
     else
     {
         data.TopTourPlans = tourPlanService.GetTourPlanListByCity("上海", 3).ToPagedList(pi ?? 1, take ?? 10);
     }
     #endregion
     return(data);
 }
Exemple #2
0
        public PartialViewResult GetTopTourPlanCity(string id)
        {
            var model = tourPlanService.GetTourPlanListByCity(id, 3);

            return(PartialView("TopTourPlanPartial", model));
        }