Browse Source
Merge pull request #3954 from abpframework/liangshiwei/abptaghelper
Fix PageModel.cs
pull/3961/head
Yunus Emre Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/PagerModel.cs
|
|
|
@ -54,8 +54,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination |
|
|
|
CurrentPage = currentPage; |
|
|
|
} |
|
|
|
|
|
|
|
ShowingFrom = totalCount == 0 ? 0 : CurrentPage * PageSize; |
|
|
|
ShowingTo = totalCount == 0 ? 0 : ShowingFrom + PageSize; |
|
|
|
ShowingFrom = totalCount == 0 ? 0 : (CurrentPage - 1) * PageSize + 1; |
|
|
|
ShowingTo = totalCount == 0 ? 0 : (int)Math.Min(ShowingFrom + PageSize - 1 , totalCount); |
|
|
|
PreviousPage = CurrentPage <= 1 ? 1 : CurrentPage - 1; |
|
|
|
NextPage = CurrentPage >= TotalPageCount ? CurrentPage : CurrentPage + 1; |
|
|
|
Pages = CalculatePageNumbers(); |
|
|
|
|