Example #1
0
        public ActionResult ListPointRecords(string spaceKey, int?pageIndex, int pageSize = 20)
        {
            IUser user = userService.GetUser(spaceKey);

            if (user == null)
            {
                return(HttpNotFound());
            }

            pageResourceManager.InsertTitlePart("我的积分记录");
            PagingDataSet <PointRecord> pointRecords    = pointService.GetPointRecords(user.UserId, null, "", null, null, pageSize, pageIndex ?? 1);
            IEnumerable <PointCategory> pointCategories = pointService.GetPointCategories();

            ViewData["traPoint"] = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("TradePoints")).CategoryName;
            ViewData["expPoint"] = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("ExperiencePoints")).CategoryName;
            ViewData["prePoint"] = pointCategories.FirstOrDefault(n => n.CategoryKey.Equals("ReputationPoints")).CategoryName;

            return(View(pointRecords));
        }