예제 #1
0
        public Paging List(int pageSize, int currentPage)
        {
            if (currentPage > GetTotalPage(pageSize))
            {
                currentPage = GetTotalPage(pageSize);
            }

            Paging.TotalPage   = GetTotalPage(pageSize);
            Paging.CurrentPage = currentPage;
            Paging.PageSize    = pageSize;
            int skip = pageSize * (currentPage - 1);

            Paging.People = PersonDAO.ListAll(pageSize, skip);

            return(Paging);
        }