ScientificReport
PageModel.cs
Go to the documentation of this file.
1 using System;
2 
3 namespace ScientificReport.DTO.Models
4 {
5  public abstract class PageModel
6  {
7  public int CurrentPage { get; set; } = 1;
8  public int Count { get; set; }
9  public virtual int PageSize { get; set; } = 5;
10  public int TotalPages => (int)Math.Ceiling(decimal.Divide(Count, PageSize));
11  public bool ShowPrevious => CurrentPage > 1;
12  public bool ShowNext => CurrentPage < TotalPages;
13  }
14 }