예제 #1
0
        ///查看更多 切换显示Ajax
        public JsonResult SeeAjaxIndex(string ActivityType, int pagings = 0)
        {
            ServiceTemplate service = new ServiceTemplate();
            ActivityModels  model   = new ActivityModels();

            model.Condition.PageSize   = 3;
            model.Condition.ActityType = new Guid(ActivityType);
            Paging paging = new Paging(model.Condition);
            var    ser    = service.SearchActivity(model.Condition, ref paging);
            ActivityModelsListModel models = new ActivityModelsListModel(ser);

            models.Paging = paging;
            models.Total  = paging.Total.ToString();
            models.Index  = paging.PageIndex.ToString();
            models.Size   = paging.PageSize.ToString();
            return(Json(models, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult FenyeSeeMoreNew(string type = "", int pagings = 0)
        {
            ActivityModels  model   = new ActivityModels();
            ServiceTemplate service = new ServiceTemplate();

            model.Condition.PageSize   = 3;
            model.Condition.ActityType = new Guid(type);
            Paging paging = new Paging(model.Condition);

            paging.PageIndex = pagings;
            var activity = service.SearchActivity(model.Condition, ref paging);
            ActivityModelsListModel models = new ActivityModelsListModel(activity);

            models.Paging = paging;
            models.Total  = paging.Total.ToString();
            models.Index  = paging.PageIndex.ToString();
            models.Size   = paging.PageSize.ToString();
            return(Json(models, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public ActionResult SeeMore(int pagings = 0)
        {
            ActivityModels  model   = new ActivityModels();
            ServiceTemplate service = new ServiceTemplate();

            model.Condition.PageSize   = 3;
            model.Condition.ActityType = service.GetActivityTypeList("活动类型").Where(n => n.Name == "公益活动").FirstOrDefault().Id;
            Paging paging = new Paging(model.Condition);

            paging.PageIndex = pagings;
            var activity = service.SearchActivity(model.Condition, ref paging);
            ActivityModelsListModel models = new ActivityModelsListModel(activity);

            models.Paging         = paging;
            models.Total          = paging.Total.ToString();
            models.Index          = paging.PageIndex.ToString();
            models.Size           = paging.PageSize.ToString();
            models.DataDictionary = service.GetActivityTypeList("活动类型");
            return(View(models));
        }