eList数据列表类
| 属性 |
数据类型 |
描述 |
| TableName |
string |
表名 |
| Fields |
Dictionary |
字段集合 |
| Where |
Dictionary |
条件集合 |
| OrderBy |
Dictionary |
排序集合 |
| GroupBy |
Dictionary |
合组集合 |
| SQL |
string |
自定义SQL语句 |
| primaryKey |
string |
主键 |
| Rows |
int |
提取前几行 |
| Paging |
bool |
是否分页 |
| Page |
int |
当前页 |
| PageSize |
int |
分页大小 |
| PageCount |
int |
总页数 |
| RecordsCount |
int |
记录数 |
| Bind() |
|
绑定数据到控件 |
| getDataTable() |
|
返回DataTable数据 |
| ToJson() |
|
将结果转成JSON格式 |
使用示例
eList elist1 = new eList("Demo_Persons");
elist1.Fields.Add("ID");//不添加则是取所有字段
elist1.Fields.Add("FullName,Height,addTime");
elist1.Rows = 3;//取前3行,不设置则取所有符合条件
elist1.Where.Add("delTag=0");//设置条件
elist1.OrderBy.Add("id desc");//设置排序
elist1.Bind(Repeater1); //绑定到Repeater控件
或
DataTable dt=elist1.getDataTable();