Example #1
0
        /// <summary>
        ///     Move the paged list to the next page.
        /// </summary>
        /// <param name="pagedList">The paged list to be moving.</param>
        /// <returns>
        ///     If the operation is successful, returns <c>true</c>; If the paged list is already in the last page, return
        ///     <c>false</c>.
        /// </returns>
        /// <exception cref="ArgumentNullException"><paramref name="pagedList" /> is null.</exception>
        public static bool GoToNextPage(this IDynamicPagedList pagedList)
        {
            CheckArgument(pagedList);

            if (pagedList.IsLastPage())
            {
                return(false);
            }

            pagedList.PageIndex++;
            return(true);
        }