private IPagedList <PlayerModel> GetPagedList(string playerName, int?page)
        {
            IList <PlayerModel> playerModelList;

            playerModelList = _playerModelList.GetPlayerModelList(playerName);

            if (playerModelList != null && playerModelList.Count > 0)
            {
                int pageSize   = 8;
                int pageNumber = (page ?? 1);
                return(playerModelList.ToPagedList(pageNumber, pageSize));
            }
            return(null);
        }
示例#2
0
        public IPagedList <PlayerModel> GetPageList(int teamID, int?page, int?pageSize = 6)
        {
            int pageNumber = page ?? 1;
            IList <PlayerModel> playerModelList = _playerModelListLogic.GetPlayerModelList(teamID);

            if (playerModelList != null)
            {
                return(playerModelList.ToPagedList(pageNumber, (int)pageSize));
            }
            return(null);
        }