PageInfoVM.cs
1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HHECS.ViewModel
{
public class PageInfoVM: INotifyPropertyChanged
{
private int pageIndex;
public int PageIndex
{
get { return pageIndex; }
set { pageIndex = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("PageIndex")); }
}
private int pageSize;
public int PageSize
{
get { return pageSize; }
set { pageSize = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("PageSize")); }
}
private int totalCount;
public int TotalCount
{
get { return totalCount; }
set { totalCount = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TotalCount")); }
}
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// 设置分页默认值
/// </summary>
public PageInfoVM()
{
PageIndex = 1;
PageSize = 30;
TotalCount = 0;
}
}
}