Esempio n. 1
0
 public ActionResult WaterfallStarListData(int StartIndex, int StarType = 0)
 {
     ((dynamic) base.ViewBag).BasePageSize = this._basePageSize;
     StartIndex = (StartIndex > 1) ? (StartIndex + 1) : 0;
     int endIndex = (StartIndex > 1) ? ((StartIndex + this._waterfallDetailCount) - 1) : this._waterfallDetailCount;
     int countByType = 0;
     countByType = this.starBll.GetCountByType(StarType);
     int currentUserId = (base.currentUser != null) ? base.currentUser.UserID : 0;
     if (countByType < 1)
     {
         return new EmptyResult();
     }
     Stars model = new Stars {
         StarList = this.starBll.GetListForPage(StarType, "", StartIndex, endIndex, currentUserId)
     };
     return base.View("StarListWaterfall", model);
 }
Esempio n. 2
0
 public ActionResult Pioneer(int pageIndex = 1, int StarType = 0)
 {
     ((dynamic) base.ViewBag).Title = "达人排行";
     Maticsoft.BLL.SNS.StarType type = new Maticsoft.BLL.SNS.StarType();
     Stars model = new Stars();
     if (StarType == 0)
     {
         ((dynamic) base.ViewBag).Type = "Index";
         ((dynamic) base.ViewBag).TypeName = "综合推荐";
         model.HotStarList = this.starRankBll.HotStarList(4);
     }
     else
     {
         Maticsoft.Model.SNS.StarType type2 = type.GetModel(StarType);
         ((dynamic) base.ViewBag).TypeName = type2.TypeName;
     }
     IPageSetting pageSetting = PageSetting.GetPageSetting("Star", ApplicationKeyType.SNS);
     ((dynamic) base.ViewBag).Title = pageSetting.Title;
     ((dynamic) base.ViewBag).Keywords = pageSetting.Keywords;
     ((dynamic) base.ViewBag).Description = pageSetting.Description;
     model.StarNewList = this.starBll.GetStarNewList(StarType, 10);
     model.StarRankList = this.starRankBll.GetStarRankList(StarType, 10);
     int pageSize = this._basePageSize + this._waterfallSize;
     ((dynamic) base.ViewBag).BasePageSize = this._basePageSize;
     pageIndex = (pageIndex > 1) ? pageIndex : 1;
     int startIndex = (pageIndex > 1) ? (((pageIndex - 1) * pageSize) + 1) : 0;
     int endIndex = (pageIndex > 1) ? ((startIndex + this._basePageSize) - 1) : this._basePageSize;
     int countByType = 0;
     countByType = this.starBll.GetCountByType(StarType);
     ((dynamic) base.ViewBag).CurrentPageAjaxStartIndex = endIndex;
     int num5 = pageIndex * pageSize;
     ((dynamic) base.ViewBag).CurrentPageAjaxEndIndex = (num5 > countByType) ? countByType : num5;
     int currentUserId = (base.currentUser != null) ? base.currentUser.UserID : 0;
     if ((countByType < 1) && (StarType != 0))
     {
         return base.RedirectToAction("Pioneer");
     }
     model.StarPagedList = this.starBll.GetListForPage(StarType, "", startIndex, endIndex, currentUserId).ToPagedList<ViewStar>(pageIndex, pageSize, new int?(countByType));
     if (base.Request.IsAjaxRequest())
     {
         return this.PartialView("StarList", model);
     }
     return base.View(model);
 }