/// <summary> /// 获取分页器的最大页数 /// </summary> /// <param name="pagingData">数据分页器</param> /// <returns></returns> public static int MaxPages(this IPagingData pagingData) { int count = pagingData.Count(); int pageSize = pagingData.PageSize; return(count / pageSize + ((count % pageSize) == 0 ? 0 : 1)); }
public int Count() { return(_dataSource.Count()); }