Skip to content

Class PagerSet

Namespace: Tool.SqlCore
Assembly: Tool.Net.dll

分页数据对象

csharp
[Serializable]
public class PagerSet

Inheritance

objectPagerSet

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Extension Methods

ObjectExtension.Add<T>(object, object, object), ObjectExtension.CopyEntity(object, object, params string[]), ObjectExtension.EntityToJson(object), ObjectExtension.EntityToJson(object, bool), ObjectExtension.EntityToJson(object, bool, string), DictionaryExtension.GetDictionary(object), TypeExtension.GetFieldKey(object, string, out bool), TypeExtension.GetFieldKey<T>(object, string, out bool), TypeExtension.GetFieldKey(object, Type, string, out bool), ObjectExtension.GetIntPtr(object), ObjectExtension.GetIntPtrInt(object), TypeExtension.GetPropertieFind(object, string, bool), TypeExtension.GetProperties(object), TypeExtension.GetPropertyKey(object, string, out bool), TypeExtension.GetPropertyKey<T>(object, string, out bool), TypeExtension.GetPropertyKey(object, Type, string, out bool), TypeExtension.GetValue(object, PropertyDescriptor), TypeExtension.GetValue(object, string, bool), TypeExtension.GetValue(object, string), ObjectExtension.Read<T>(object, object, int, int), ObjectExtension.Read<T>(object, int, object, int, int), DictionaryExtension.SetDictionary(object, IDictionary<string, object>), TypeExtension.SetFieldKey(object, string, object), TypeExtension.SetFieldKey<T>(object, string, object), TypeExtension.SetFieldKey(object, Type, string, object), TypeExtension.SetPropertyKey(object, string, object), TypeExtension.SetPropertyKey<T>(object, string, object), TypeExtension.SetPropertyKey(object, Type, string, object), TypeExtension.SetValue(object, PropertyDescriptor, object), TypeExtension.SetValue(object, string, object, bool), TypeExtension.SetValue(object, string, object), ObjectExtension.ToBase64String(object), ObjectExtension.ToBytes(object), ObjectExtension.ToBytes(object, out Type), DictionaryExtension.ToDictionary(object), DictionaryExtension.ToDictionary<T>(object), DictionaryExtension.ToIDictionary(object), DictionaryExtension.ToIDictionary<T>(object), ObjectExtension.ToJson(object), ObjectExtension.ToJson(object, JsonSerializerOptions), ObjectExtension.ToJsonWeb(object), ObjectExtension.ToJsonWeb(object, Action<JsonSerializerOptions>), ObjectExtension.ToTryVar<T>(object, T), ObjectExtension.ToVar<T>(object), ObjectExtension.ToVar(object, Type, bool), ObjectExtension.ToVar(object, string), ObjectExtension.ToXml(object)

Remarks

代码由逆血提供支持

Constructors

PagerSet()

实例化,无参构造

csharp
public PagerSet()

PagerSet(int, int, int, int, DataSet)

实例化,对象

csharp
public PagerSet(int pageIndex, int pageSize, int pageCount, int recordCount, DataSet pageSet)

Parameters

pageIndex int

页索引

pageSize int

页大小

pageCount int

可分为多少页

recordCount int

SQL数据表总行数

pageSet DataSet

数据对象

Properties

PageCount

可分为多少页(页数)

csharp
public int PageCount { get; set; }

Property Value

int

PageEntitys

获取时加载的实体类

csharp
public object PageEntitys { get; }

Property Value

object

PageIndex

页索引

csharp
public int PageIndex { get; set; }

Property Value

int

PageSet

源数据集合

csharp
public DataSet PageSet { get; set; }

Property Value

DataSet

PageSize

页大小

csharp
public int PageSize { get; set; }

Property Value

int

PageTable

源数据集合第一条

csharp
public DataTable PageTable { get; set; }

Property Value

DataTable

RecordCount

SQL数据表总行数

csharp
public int RecordCount { get; set; }

Property Value

int

Methods

CheckedPageSet()

可用于验证当前,PageSet 是否非空

csharp
public bool CheckedPageSet()

Returns

bool

返回状态

PageSetJson()

返回当前,PageTable 的JSON格式字符串数组

csharp
public string[] PageSetJson()

Returns

string[]

JSON格式字符串数组

PageSetJson(bool)

返回当前,PageTable 的JSON格式字符串数组

csharp
public string[] PageSetJson(bool IsDate)

Parameters

IsDate bool

ToJson格式时间,启用转字符串

Returns

string[]

JSON格式字符串数组

PageSetJson(bool, string)

返回当前,PageTable 的JSON格式字符串数组

csharp
public string[] PageSetJson(bool IsDate, string ToDateString)

Parameters

IsDate bool

ToJson格式时间,启用转字符串

ToDateString string

Date.ToString()的写法。

Returns

string[]

JSON格式字符串数组

PageTableJson()

返回当前,PageTable 的JSON格式字符串

csharp
public string PageTableJson()

Returns

string

JSON格式字符串

PageTableJson(bool)

返回当前,PageTable 的JSON格式字符串

csharp
public string PageTableJson(bool IsDate)

Parameters

IsDate bool

ToJson格式时间,启用转字符串

Returns

string

JSON格式字符串

PageTableJson(bool, string)

返回当前,PageTable 的JSON格式字符串

csharp
public string PageTableJson(bool IsDate, string ToDateString)

Parameters

IsDate bool

ToJson格式时间,启用转字符串

ToDateString string

Date.ToString()的写法。

Returns

string

JSON格式字符串

PageToEntityList<T>()

对象 转换为 实体对象数组 (优化版)

csharp
public void PageToEntityList<T>() where T : new()

Type Parameters

T

实体对象

基于Apache-2.0协议开源