public void RegisterPaginationInfo(PagintaionType pageType, int pageIndex, int prePage) { if (this.PageControlList == null) { this.PageControlList = new List <PaginationInfo>(); } PaginationInfo pageInfo = new PaginationInfo() { PageType = pageType, PrePageCount = prePage, CurrentIndex = pageIndex }; if (this.PageControlList.Count > 0) { this.PageControlList.ForEach(queryEntity => { if (queryEntity.PageType.Equals(pageType)) { queryEntity = pageInfo; return; } else { this.PageControlList.Add(pageInfo); } }); } else { this.PageControlList.Add(pageInfo); } }
public void UpdateTotalPage(PagintaionType pageType, int totalCount) { if (this.PageControlList == null) { return; } if (PageControlList.Count > 0) { PageControlList.ForEach(queryEntity => { if (queryEntity.PageType.Equals(pageType)) { queryEntity.TotalPage = totalCount; return; } }); } }
public int GetTotalPages(PagintaionType pageType) { if (this.PageControlList == null) { return(0); } int totalPages = 0; if (this.PageControlList.Count > 0) { PageControlList.ForEach(queryEntity => { if (queryEntity.PageType.Equals(pageType)) { totalPages = queryEntity.TotalPage; return; } }); } return(totalPages); }
public int GetCurrentPageIndex(PagintaionType pageType) { if (this.PageControlList == null) { return(0); } int currentIndex = 0; if (this.PageControlList.Count > 0) { PageControlList.ForEach(queryEntity => { if (queryEntity.PageType.Equals(pageType)) { currentIndex = queryEntity.CurrentIndex; return; } }); } return(currentIndex); }
public int GetTotalPages(PagintaionType pageType) { if (this.PageControlList == null) return 0; int totalPages = 0; if (this.PageControlList.Count > 0) { PageControlList.ForEach(queryEntity => { if (queryEntity.PageType.Equals(pageType)) { totalPages = queryEntity.TotalPage; return; } }); } return totalPages; }
public void UpdateTotalPage(PagintaionType pageType,int totalCount) { if (this.PageControlList == null) return; if (PageControlList.Count > 0) { PageControlList.ForEach(queryEntity => { if (queryEntity.PageType.Equals(pageType)) { queryEntity.TotalPage = totalCount; return; } }); } }
public int GetCurrentPageIndex(PagintaionType pageType) { if (this.PageControlList == null) return 0; int currentIndex = 0; if (this.PageControlList.Count > 0) { PageControlList.ForEach(queryEntity => { if (queryEntity.PageType.Equals(pageType)) { currentIndex = queryEntity.CurrentIndex; return; } }); } return currentIndex; }
public void RegisterPaginationInfo(PagintaionType pageType, int pageIndex, int prePage) { if (this.PageControlList == null) this.PageControlList = new List<PaginationInfo>(); PaginationInfo pageInfo = new PaginationInfo() { PageType=pageType, PrePageCount=prePage, CurrentIndex=pageIndex }; if (this.PageControlList.Count > 0) { this.PageControlList.ForEach(queryEntity => { if (queryEntity.PageType.Equals(pageType)) { queryEntity = pageInfo; return; } else this.PageControlList.Add(pageInfo); }); } else this.PageControlList.Add(pageInfo); }