public void NextPage() { if (total != null) { nextPage = page + 1; return; } if (string.IsNullOrEmpty(nextPageId)) { throw new Exception(); } pageDiraction = PageDiraction.Next; }
public void PreviousPage() { if (IsFirstPage()) { throw new Exception(); } if (total != null) { nextPage = page - 1; return; } pageDiraction = PageDiraction.Previous; }
public void SetLimit(byte limit) { if (limit < 1) { this.limit = 1; } else { if (limit > 99) { this.limit = 99; } else { this.limit = limit; } } nextPageId = null; previousPages.Clear(); pageDiraction = PageDiraction.Same; currentPageId = string.Empty; total = null; }