VS Studio可以帮助我们通过简单的拖拽生成Typed DataSet。同时自动生成了DataAdapter,更加简化了数据的访问操作。
下面是我基于VS 2005编写的一个类,为基于Typed DataSet的数据访问提供了比较简单的方法。
基类使用泛型,反射等方法实现了数据访问的封装。在定义实体类时,只需要继承该基类就可以实现数据的读取、保存和删除操作。
1
using
System;
2
using
System.Collections.Generic;
3
using
System.Text;
4
using
System.Reflection;
5
using
System.Data;
6![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
7
namespace
SimpleCode.Core.Model
8![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
{
9
public class ModelBase<TAdapter, TDataTable, TRow> : SimpleCode.Core.Interface.IModel
10![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
11![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
12![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
Variable define#region Variable define
13![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
14
private object m_Adapter;
15
private Type m_TypeAdpt;
16![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
17![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
18
private object m_Table;
19
private Type m_TypeTable;
20![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
21![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
22
private object m_Row;
23
private Type m_TypeRow;
24![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
25![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
26
private TRow m_CurrentItem;
27![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
28![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
29
private TDataTable m_Items;
30![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
31
private string m_ItemId;
32![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
33
private string m_TableName;
34![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
35
#endregion
36![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
37![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
Property define#region Property define
38![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
39![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
40
/// 适配器
41
/// </summary>
42
public TAdapter Apapter
43![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
44![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
get
{ return (TAdapter)m_Adapter; }
45
}
46![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
47![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
48
/// 数据表
49
/// </summary>
50
public TDataTable Table
51![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
52![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
get
{ return (TDataTable)m_Table; }
53
}
54![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
55![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
56
/// 数据表中的所有数据
57
/// </summary>
58
public TDataTable Items
59![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
60
get
61![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
62
if (m_Items == null)
63![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
64
this.m_Items = GetItems();
65
}
66
return m_Items;
67
}
68
}
69![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
70![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
71
/// 当前的数据项
72
/// </summary>
73
public TRow CurrentItem
74![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
75![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
get
{ if (this.m_CurrentItem != null) return this.m_CurrentItem; else return this.m_CurrentItem = NewRow(); }
76![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
set
{ this.m_CurrentItem = value; }
77
}
78![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
79
#endregion
80![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
81![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
Constructor#region Constructor
82![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
83
public ModelBase()
84![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
85
Initialize();
86
}
87![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
88
public ModelBase(string id)
89
: this()
90![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
91
this.m_ItemId = id;
92
m_CurrentItem = GetItemById(this.m_ItemId);
93
}
94![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
95![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
96
/// 初始化
97
/// </summary>
98
private void Initialize()
99![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
100
//初始化适配器
101
m_TypeAdpt = typeof(TAdapter);
102
m_Adapter = Activator.CreateInstance<TAdapter>();
103![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
104
//初始化数据表
105
m_TypeTable = typeof(TDataTable);
106
m_Table = Activator.CreateInstance<TDataTable>();
107![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
108
//初始化数据行
109
m_TypeRow = typeof(TRow);
110![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
111
this.m_TableName = ((DataTable)this.m_Table).TableName;
112
}
113![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
114
#endregion
115![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
116![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
Private Method#region Private Method
117![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
118![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
119
/// 获取所有数据
120
/// </summary>
121
/// <returns></returns>
122
private TDataTable GetItems()
123![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
124
MethodInfo method = this.m_TypeAdpt.GetMethod("GetData");
125
return (TDataTable)method.Invoke(this.m_Adapter, null);
126
}
127![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
128![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
129
/// 删除数据
130
/// </summary>
131
/// <param name="rows"></param>
132
private void DeleteRow(TRow[] rows)
133![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
134
foreach (TRow row in rows)
135![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
136
DataRow dr = row as DataRow;
137
dr.Delete();
138
}
139![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MethodInfo methodUpdate = this.m_TypeAdpt.GetMethod("Update", new Type[]
{ typeof(System.Data.DataRow[]) });
140![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
object[] parameters =
{ rows };
141
methodUpdate.Invoke(this.m_Adapter, parameters);
142
}
143![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
144![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
145
/// 删除当前数据
146
/// </summary>
147
private void DeleteRow()
148![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
149
DataRow dr = this.m_CurrentItem as DataRow;
150
dr.Delete();
151![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
152![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MethodInfo methodUpdate = this.m_TypeAdpt.GetMethod("Update", new Type[]
{ typeof(System.Data.DataRow) });
153![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
object[] parameters =
{ this.m_CurrentItem };
154
methodUpdate.Invoke(this.m_Adapter, parameters);
155
}
156![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
157![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
158
/// 新建数据项
159
/// </summary>
160
/// <returns></returns>
161
private TRow NewRow()
162![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
163
MethodInfo method = this.m_TypeTable.GetMethod(string.Format("New{0}Row", this.m_TableName));
164
return (TRow)method.Invoke(this.m_Table, null);
165
}
166![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
167![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
168
/// 保存当前数据
169
/// </summary>
170
/// <returns></returns>
171
private void SaveItem()
172![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
173
DataRow dr = this.m_CurrentItem as DataRow;
174![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
175
//如果DataRowState为Detached,则为新增数据
176
if (dr.RowState == DataRowState.Detached)
177![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
178
((DataTable)this.m_Table).Rows.Add(dr);
179![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
180![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MethodInfo methodUpdate = this.m_TypeAdpt.GetMethod("Update", new Type[]
{ typeof(TDataTable) });
181![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
methodUpdate.Invoke(this.m_Adapter, new object[]
{ (TDataTable)this.m_Table });
182
}
183
else
184![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
185![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MethodInfo methodUpdate = this.m_TypeAdpt.GetMethod("Update", new Type[]
{ typeof(DataRow) });
186![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
methodUpdate.Invoke(this.m_Adapter, new object[]
{ this.m_CurrentItem });
187
}
188
}
189![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
190
#endregion
191![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
192![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
Public Method#region Public Method
193![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
194![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
195
/// 获取复合条件的数据
196
/// </summary>
197
/// <param name="filter">筛选条件</param>
198
/// <returns></returns>
199
public TRow[] GetItems(string filter)
200![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
201
DataTable dt = this.Items as DataTable;
202
TRow[] rows = dt.Select(filter) as TRow[];
203![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
204
if (rows.Length > 0)
205![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
206
return rows;
207
}
208
return default(TRow[]);
209
}
210![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
211![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
212
/// 获取制定Id的数据行
213
/// </summary>
214
/// <param name="id"></param>
215
/// <returns></returns>
216
public TRow GetItemById(string id)
217![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
218![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
219
DataTable dt = this.Items as DataTable;
220
//获取表的主键
221
DataColumn[] cols = dt.PrimaryKey;
222![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
223
//ToDo:考虑多主键的情况
224![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
225
string filter = string.Format("{0} = '{1}'", cols[0].ColumnName, id);
226![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
227
TRow[] rows = dt.Select(filter) as TRow[];
228
if (rows.Length > 0)
229![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
230
return rows[0];
231
}
232
return default(TRow);
233
}
234![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
235![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
IModel Members#region IModel Members
236![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
237
public bool Delete()
238![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
239
try
240![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
241
//如果数据有主外键关系,则删除不成功。
242
DeleteRow();
243
return true;
244
}
245
catch (Exception ex)
246![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
247
throw new Exception(ex.StackTrace);
248
}
249
}
250![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
251
public bool Save()
252![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
253
try
254![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
255
SaveItem();
256
return true;
257
}
258
catch (Exception ex)
259![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
260
throw new Exception(ex.StackTrace);
261
}
262
}
263![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
264
#endregion
265![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
266
#endregion
267![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
268
}
269
}
270
在数据层中创建Typed DataSet
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
4
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
5
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
6
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
7
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
8
![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![ContractedBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
9
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
10
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
11
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
12
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
13
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
14
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
15
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
16
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
17
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
18
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
19
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
20
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
21
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
22
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
23
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
24
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
25
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
26
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
27
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
28
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
29
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
30
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
31
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
32
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
33
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
34
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
35
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
36
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
37
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
38
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
39
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
40
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
41
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
42
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
43
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
44
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
45
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
46
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
47
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
48
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
49
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
50
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
51
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
52
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
53
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
54
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
55
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
56
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
57
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
58
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
59
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
60
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
61
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
62
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
63
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
64
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
65
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
66
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
67
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
68
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
69
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
70
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
71
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
72
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
73
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
74
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
75
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
76
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
77
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
78
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
79
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
80
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
81
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
82
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
83
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
84
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
85
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
86
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
87
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
88
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
89
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
90
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
91
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
92
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
93
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
94
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
95
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
96
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
97
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
98
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
99
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
100
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
101
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
102
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
103
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
104
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
105
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
106
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
107
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
108
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
109
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
110
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
111
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
112
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
113
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
114
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
115
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
116
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
117
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
118
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
119
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
120
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
121
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
122
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
123
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
124
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
125
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
126
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
127
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
128
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
129
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
130
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
131
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
132
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
133
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
134
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
135
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
136
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
137
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
138
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
139
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
140
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
141
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
142
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
143
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
144
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
145
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
146
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
147
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
148
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
149
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
150
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
151
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
152
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
153
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
154
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
155
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
156
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
157
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
158
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
159
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
160
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
161
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
162
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
163
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
164
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
165
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
166
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
167
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
168
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
169
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
170
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
171
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
172
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
173
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
174
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
175
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
176
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
177
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
178
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
179
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
180
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
181
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
182
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
183
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
184
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
185
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
186
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
187
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
188
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
189
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
190
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
191
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
192
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
193
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
194
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
195
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
196
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
197
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
198
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
199
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
200
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
201
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
202
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
203
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
204
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
205
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
206
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
207
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
208
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
209
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
210
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
211
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
212
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
213
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
214
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
215
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
216
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
217
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
218
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
219
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
220
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
221
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
222
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
223
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
224
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
225
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
226
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
227
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
228
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
229
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
230
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
231
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
232
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
233
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
234
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
235
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
236
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
237
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
238
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
239
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
240
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
241
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
242
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
243
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
244
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
245
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
246
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
247
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
248
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
249
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
250
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
251
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
252
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
253
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
254
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
255
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
256
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
257
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
258
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
259
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
260
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
261
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
262
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
263
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
264
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
265
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
266
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
267
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
268
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
269
![ExpandedBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
270
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/images/cnblogs_com/wenjielee/DataModel.jpg)
在业务层中定义Customer类
1
using
System;
2
using
System.Collections.Generic;
3
using
System.Text;
4
using
SimpleCode.Demo.DataModel;
5
using
SimpleCode.Demo.DataModel.DemoDataTableAdapters;
6
using
SimpleCode.Core.Model;
7![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
8
namespace
SimpleCode.Demo.BL
9![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
{
10
public class Customer : ModelBase<CustomerTableAdapter,DemoData.CustomerDataTable,DemoData.CustomerRow>
11![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
12![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
public Customer()
{ }
13![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
14![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
public Customer(string id):base(id)
{}
15
}
16
}
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
4
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
5
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
6
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
7
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
8
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
9
![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![ContractedBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
10
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
11
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
12
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
13
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
14
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
15
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
16
![ExpandedBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
在应用层中可以通过以下方式访问
1
using
System;
2
using
System.Collections.Generic;
3
using
System.Text;
4
using
SimpleCode.Demo.BL;
5![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
6
namespace
SimpleCode.Demo.Test
7![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
{
8
class Program
9![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
10
static void Main(string[] args)
11![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
12
Customer myCustomer = new Customer();
13
myCustomer.CurrentItem.CustomerID = "00125";
14
myCustomer.CurrentItem.Name = "Jason Lee";
15
myCustomer.CurrentItem.Address = "Shanghai";
16
//Add Customer Informations
17
myCustomer.Save();
18![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
19
Customer myCustomer2 = new Customer("00125");
20![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
21
Console.WriteLine("Customer Name is " + myCustomer2.CurrentItem.Name);
22
}
23
}
24
}
25
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
4
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
5
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
6
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
7
![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![ContractedBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
8
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
9
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
10
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
11
![ExpandedSubBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![ContractedSubBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![dot.gif](https://www.cnblogs.com/Images/dot.gif)
12
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
13
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
14
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
15
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
16
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
17
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
18
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
19
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
20
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
21
![InBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
22
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
23
![ExpandedSubBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
24
![ExpandedBlockEnd.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
25
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)