1
1、处理脱机数据,在多层应用程序中很有用。
2
2、可以在任何时候查看DataSet中任意行的内容,允许修改查询结果的方法。
3![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
4
3、处理分级数据
5![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
6
4、缓存更改
7![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
8
5、XML的完整性:DataSet对象和XML文档几乎是可互换的。
9![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
10
二、使用介绍
11![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
12
1、创建DataSet对象:DataSet ds = new DataSet("DataSetName");
13![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
14
2、查看调用SqlDataAdapter.Fill创建的结构
15![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
16
da.Fill(ds,"Orders");
17![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
18
DataTable tbl = ds.Table[0];
19![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
20
foreach(DataColumn col in tbl.Columns)
21![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
22
Console.WriteLine(col.ColumnName);
23![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
24
3、查看SqlDataAdapter返回的数据
25![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
26
①、DataRow对象
27![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
28
DataTable tbl = ds.Table[0];
29![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
30
DataRow row = tbl.Row[0];
31![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
32
Console.WriteLine(ros["OrderID"]);
33![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
34
②、检查存储在DataRow中的数据
35![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
36
DataTable tbl = row.Table;
37![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
38
foreach(DataColumn col in tbl.Columns)
39![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
40
Console.WriteLine(row[col]);
41![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
42
③、检查DatTable中的DataRow对象
43![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
44
foreach(DataRow row in tbl.Rows)
45![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
46
DisplayRow(row);
47![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
48
4、校验DataSet中的数据
49![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
50
①、校验DataColumn的属性:ReadOnly,AllowDBNull,MaxLength,Unique
51![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
52
②、DataTable对象的Constrains集合:UiqueConstraints,Primarykey,ForeignkeyConstraints
53![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
54
通常不必刻意去创建ForeignkeyConstraints,因为当在DataSet的两个DataTable对象之间创建关系时会创建一个。
55![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
56
③、用SqlDataAdapter.Fill模式来检索模式信息
57![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
58
5、编写代码创建DataTable对象
59![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
60
①、创建DataTable对象:DataTable tbl = new DataTable("TableName");
61![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
62
②、将DataTable添加到DataSet对象的Table集合
63![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
64
DataSet ds = new DataSet();
65![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
66
DataTable tbl = new DataTable("Customers");
67![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
68
ds.Tables.Add(tbl);
69![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
70
71![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
72
DataSet ds = new DataSet();
73![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
74
DataTable tbl = ds.Tables.Add("Customers");
75![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
76
DataTable对象只能存在于至多一个DataSet对象中。如果希望将DataTable添加到多个DataSet中,就必须使用Copy方法或Clone方法。Copy方法创建一个与原DataTable结构相同并且包含相同行的新DataTable;Clone方法创建一个与原DataTable结构相同,但没有包含任何行的新DataTable。
77![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
78
③、为DataTable添加列
79![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
80
DataTable tbl = ds.Tables.Add("Orders");
81![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
82
DataColumn col =tbl.Columns.Add("OrderID",typeof(int));
83![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
84
col.AllowDBNull = false;
85![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
86
col.MaxLength = 5;
87![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
88
col.Unique = true;
89![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
90
tbl.PrimaryKey = new DataColumn[]{tbl.Columns["CustomersID"]};
91![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
92
当设置主键时,AllowDBNull自动设置为False;
93![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
94
④、处理自动增量列
95![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
96
DataSet ds = new DataSet();
97![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
98
DataTable tbl = ds.Tables.Add("Orders");
99![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
100
DataColumn col = tbl.Columns.Add("OrderID",typeof(int));
101![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
102
col.AutoIncrement = true;
103![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
104
col.AutoIncrementSeed = -1;
105![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
106
col.AutoIncrementStep = -1;
107![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
108
col.ReadOnly = true;
109![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
110
⑤、添加基于表达式的列
111![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
112
tbl.Columns.Add("ItemTotal",typeof(Decimal),"Quantity*UnitPrice");
113![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
114
6、修改DataTable内容
115![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
116
①、添加新DataRow
117![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
118
DataRow row = ds.Tables["Customers"].NewRow();
119![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
120
row["CustomerID"] = "ALFKI";
121![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
122
ds.Tables["Customers"].Rows.Add(row);
123![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
124
125![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
126
object[] aValues ={"ALFKI","Alfreds","Anders","030-22222"};
127![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
128
da.Tables["Customers"].LoadDataRow(aValues,false);
129![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
130
②、修改当前行
131![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
132
修改行的内容逼供内不会自动修改数据库中相应的内容,对行所做的修改被视为是随后将使用SqlDataAdapter对象来提交交给数据库的待定的更改。
133![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
134
DataRow rowCustomer;
135![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
136
rowCustomer = ds.Tables["Custoemrs"].Rows.Find("ANTON");
137![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
138
if(rowCustomer == null)
139![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
140
//没有查找客户
141![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
142
else
143![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
144
{
145![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
146
rowCustomer["CompanyName"] ="NewCompanyName";
147![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
148
rowCustomer["ContactName"] ="NewContactName";
149![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
150
}
151![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
152
153![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
154
//推荐使用这种方式
155![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
156
DataRow rowCustomer;
157![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
158
rowCustomer = ds.Tables["Custoemrs"].Rows.Find("ANTON");
159![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
160
if(rowCustomer == null)
161![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
162
//没有查找客户
163![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
164
else
165![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
166
{
167![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
168
rowCustomer.BeginEdit();
169![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
170
rowCustomer["CompanyName"] ="NewCompanyName";
171![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
172
rowCustomer["ContactName"] ="NewContactName";
173![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
174
rowCustomer.EndEdit();
175![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
176
}
177![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
178
179![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
180
//null表示不修改该列的数据
181![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
182
obejct[] aCustomer ={null,"NewCompanyName","NewContactName",null}
183![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
184
DataRow rowCustomer;
185![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
186
rowCustomer = ds.Tables["Customers"].Rows.Find("ALFKI");
187![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
188
rowCustomer.ItemArray = aCustomer;
189![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
190
③、处理DataRow的空值
191![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
192
//查看是否为空
193![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
194
DataRow rowCustomer;
195![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
196
rowCustomer = ds.Tables["Customers"].Rows.Find("ALFKI");
197![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
198
if(rowCustomer.IsNull("Phone"))
199![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
200
Console.WriteLine("It's Null");
201![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
202
else
203![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
204
Console.WriteLine("It's not Null");
205![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
206
207![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
208
//赋予空值
209![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
210
rowCustomer["Phone"] = DBNull.Value;
211![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
212
④、删除DataRow
213![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
214
DataRow rowCustomer;
215![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
216
rowCustomer = ds.Tables["Customers"].Rows.Find("ALFKI");
217![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
218
rowCustomer.Delete();
219![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
220
⑤、清除DataRow
221![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
222
DataRow rowCustomer = ds.Tables["Customers"].Rows.Find("ALFKI");
223![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
224
rowCustomer.ItemArray = aCustomer;
225![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
226
da.Tables["Customers"].Remove(rowCustomer);
227![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
228
或者
229![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
230
ds.Tables["Customers"].RemoveAt(intIndex);
231![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
232
⑥、使用DataRow.RowState属性 :Unchanged,Detached,Added,Modified,Deleted
233![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
234
private void DemonstrateRowState()
235![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
236
{
237
// Run a function to create a DataTable with one column.
238
DataTable myTable = MakeTable();
239
DataRow myRow;
240![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
241
// Create a new DataRow.
242
myRow = myTable.NewRow();
243
// Detached row.
244
Console.WriteLine("New Row " + myRow.RowState);
245![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
246
myTable.Rows.Add(myRow);
247
// New row.
248
Console.WriteLine("AddRow " + myRow.RowState);
249![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
250
myTable.AcceptChanges();
251
// Unchanged row.
252
Console.WriteLine("AcceptChanges " + myRow.RowState);
253![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
254
myRow["FirstName"] = "Scott";
255
// Modified row.
256
Console.WriteLine("Modified " + myRow.RowState);
257![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
258
myRow.Delete();
259
// Deleted row.
260
Console.WriteLine("Deleted " + myRow.RowState);
261
}
262![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
263
⑦、检查DataRow中的挂起更改
264![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
265
DataRow rowCustomer;
266![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
267
rowCustomer = ds.Tables["Customers"].Rows.Find("ALFKI");
268![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
269
rowCustomer["CompanyName"] = "NewCompanyName";
270![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
271
string strNewCompanyName,strOldCompanyName;
272![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
273
Console.WriteLine(rowCustomer["CompanyName",DataRowVersion.Current]);
274![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
275
Console.WriteLine(rowCustomer["CompanyName",DataRowVersion.Original]);
276![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
277
三、属性方法事件介绍
278![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
279
1、DataSet
280![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
281
①、属性
282![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
283
CaseSensitive:用于控制DataTable中的字符串比较是否区分大小写。
284![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
285
DataSetName:当前DataSet的名称。如果不指定,则该属性值设置为"NewDataSet"。如果将DataSet内容写入XML文件,DataSetName是XML文件的根节点名称。
286![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
287
DesignMode:如果在设计时使用组件中的DataSet,DesignMode返回True,否则返回False。
288![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
289
HasErrors:表示DataSet中的DataRow对象是否包含错误。如果将一批更改提交给数据库并将DataAdapter对象的ContinueUpdateOnError属性设置为True,则在提交更改后必须检查DataSet的HasErrors属性,以确定是否有更新失败。
290![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
291
NameSpace和Prefix:指定XML命名空间和前缀
292![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
293
Relations:返回一个DataRelationCollection对象。
294![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
295
Tables:检查现有的DataTable对象。通过索引访问DataTable有更好的性能。
296![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
297
②、方法
298![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
299
AcceptChanges和RejectChanges:接受或放弃DataSet中所有挂起更改。调用AcceptChanges时,RowState属性值为Added或Modified的所有行的RowState属性都将被设置为UnChanged.任何标记为Deleted的DataRow对象将从DataSet中删除。调用RejectChanges时,任何标记为Added的DataRow对象将会被从DataSet中删除,其他修改过的DatRow对象将返回前一状态。
300![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
301
Clear:清除DataSet中所有DataRow对象。该方法比释放一个DataSet然后再创建一个相同结构的新DataSet要快。
302![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
303
Clone和Copy:使用Copy方法会创建与原DataSet具有相同结构和相同行的新DataSet。使用Clone方法会创建具有相同结构的新DataSet,但不包含任何行。
304![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
305
GetChanges:返回与原DataSet对象具有相同结构的新DataSet,并且还包含原DataSet中所有挂起更改的行。
306![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
307
GetXml和GetXmlSchema:使用GetXml方法得到由DataSet的内容与她的架构信息转换为XML格式后的字符串。如果只希望返回架构信息,可以使用GetXmlSchema。
308![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
309
HasChange:表示DataSet中是否包含挂起更改的DataRow对象。
310![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
311
Merge:从另一个DataSet、DataTable或现有DataSet中的一组DataRow对象载入数据。
312![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
313
ReadXml和WriteXml:使用ReadXml方法从文件、TextReader、数据流或者XmlReader中将XML数据载入DataSet中。
314![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
315
Reset:将DataSet返回为未初始化状态。如果想放弃现有DataSet并且开始处理新的DataSet,使用Reset方法比创建一个DataSet的新实例好。
316![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
317
③、事件
318![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
319
MergeFailed:在DataSet的Merge方法发生一个异常时触发。
320![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
321
2、DataTable
322![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
323
①、属性
324![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
325
②、方法
326![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
327
③、事件
328![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
329
ColumnChanged:在列的内容被改变之后触发
330![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
331
ColumnChangding:在列的内容被改变之前触发
332![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
333
RowChanged,RowChanging,RowDeleted,RowDeleting。
334![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
335
3、DataColumn
336![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
337
①、属性
338![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
339
4、DataRow
340![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
341
①、属性
342![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
343
HasError:确定行是否包含错误。
344![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
345
Item:通过指定行的列数,列的名称或DataColumn对象本身,访问列的内容。
346![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
347
ItemArray:获取或设置行中所有列的值。
348![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
349
RowError:返回一个包含行错误信息的字符串。
350![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
351
RowState:返回DataRowState枚举中的值来表示行的当前状态。
352![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
353
Table:返回DataRow对象所在的DataTable。
354![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
355
②、方法
356![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
357
AcceptChanges和RejectChanges:提交和放弃挂起更改。
358![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
359
BeginEdit、CancelEdit、EndEdit
360![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
361
ClearErrors:清除DataRow中所有的错误。
362![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
363
Delete:Delete方法实际上并不从DataRow表的Row集合中删除该DataRow。当调用DataRow对象的Delete方法时,ADO.NET将该行标记为删除,之后调用SqlDataAdapter对象的Update方法来删除其在数据库中对应的行。
364![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
365
如果希望彻底删除DataRow,可以调用Delete方法,接着再调用它的AccepteChanges方法,还可以使用DataRowCollection对象的Remove方法完成相同的任务。
366![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
367
浅谈DataSet 的用法
368
DataSet是ADO.NET开发人员为方便数据处理开发出来的,是数据的集合,是为解决DataReader的缺陷设计的,DataReader数据处理速度快,但它是只读的, 而且一旦移到下一行,就不能查看上一行的数据,DataSet则可以自由移动指针。DataSet的数据是与数据库断开的。DataSet还可用于多层应用程序中,如果应用程序运行在中间层的业务对象中来访问数据库,则业务对象需将脱机数据结构传递给客户应用程序。
369![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
370
DataSet的功能:浏览、排序、搜索、过滤、处理分级数据、缓存更改等。还可以与XML数据互换。DataSet中可包括多个DataTable,可将多个查询结构存到一个DataSet中,方便操作,而DataTable中又包括多个DataRow、DataColumn,可通过这些DataRow、DataColumn来查看、操作其中的数据,而需将操作结果返回给数据库的话,则可以调用DataAdapter的Update方法。
371![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
372
DataSet的操作:
373![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
374
DataSet ds=new DataSet();
375
DataTable dt=new DataTable("newTable");
376
ds.Tables.Add(dt);DataSet ds=new DataSet();
377
DataTable dt=ds.Tables.Add("newTable");
378
上述两种方法都可以在DataSet中添加一个DataTable,看需要而进行选择。添加DataTable后,需向其中添加行和列。
379![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
380
DataSet ds=new DataSet();
381
DataTable dt=ds.Tables.Add("newTables");
382
DataColumn col=dt.Columns.Add("newColumn",typeof(int));
383
col.AllowDBNull=false;
384
col.MaxLength=4;
385
col.Unique=true;
386![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
387
上述代码向DataSet中的DataTable中添加名为”newColumn”,类型为int且不为空,最大长度为4和唯一性为真的列。
388![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
389
dt.PrimaryKey=new DataColumn[]{dt.Columns["ID"]}
390
这段代码是继续上面代码的,为一个DataTable中添加一个主键列,主键列是一个数据组,如有多个主键,只需在数组中添加一个列即可。如下:
391![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
392
dt.PrimaryKey=new DataColumns[]{dt.Columns["OrderID"],dt.Columns["ProductID"]}
393
添加外键:
394![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
395
ForeignKeyConstraint fk;
396
fk=new ForeignKeyConstraint(ds.Tables["Customers"].Columns["CustomerID"],ds.Tables["Orders"].Columns["CustomerID"]);
397
ds.Tables["Orders"].Constraints.Add(fk);
398
//上述代码假如已经为Cusomers表和Orders创建了主键,此句为添加外键约束。
399
上述是根据Customers表和Orders表的CustomerID来创建约束。
400![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
401
下面介绍修改DataRow中的内容:
402![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
403
DataRow dr=ds.Tables["Customer"].Rows.Find("ANTON");
404
if(dr==null)
405![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
406
else
407
{
408
dr.BeginEdit();
409
dr["CompanyName"]="newValue";
410
dr["ContactName"]="newValue2";
411
dr.EndEdit();
412
}
413
//上面代码通过Row集合的Find方法来在DataTable中的行进行定位,找到"ANTON"行,再修改"ANTON"行中CompanyName列和ContactName列的值。通过BeginEdit和EndEdit来缓存对行的修改,还可调用 CancelEdit为取消修改。
414
判断某列是否为空值:
415![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
416
417![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
418
DataRow dr=ds.Tables["Customers"].Rows.Find("aaa");
419
if(dr.IsNull("ContactName");
420
..
421
else
422
dr["ContactName"]=DBNull.Value
423
//这里判断ContactName列是否为空,如果不是则为其赋空值,呵,很无厘头的做法,这里只为演示为列赋空值的做法。
424
删除DataRow:
425![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
426
有两种方法可以删除DataRow,Delete方法和Remove方法和RemoveAt方法。其区别是Delete方法实际上不是从DataTable中删除掉一行,而是将其标志为删除,仅仅是做个记号,而Remove方法则是真正的从DataRow中删除一行,RemoveAt方法是根本行的索引来删除。列:
427![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
428
DataRow dr=ds.Tables["table"].Rows.Find("a");
429
ds.Tables["table"].Remove(dr);
430
或
431
ds.Tables["table"].Remove(index);
432
//dr 为"a"所在的行,查出后将其删除,index为 "a"所在的索引号。关于DataSet中的其用法,参照MSDN
433![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
434
435![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
436
DataRow dr=ds.Tables["Customers"].Rows.Find("aaa");
437
if(dr.IsNull("ContactName");
438
..
439
else
440
dr["ContactName"]=DBNull.Value
441
//这里判断ContactName列是否为空,如果不是则为其赋空值,呵,很无厘头的做法,这里只为演示为列赋空值的做法。
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
4
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
5
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
6
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
7
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
8
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
9
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
10
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
11
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
12
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
13
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
14
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
15
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
16
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
17
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
18
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
19
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
20
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
21
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
22
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
23
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
24
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
25
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
26
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
27
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
28
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
29
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
30
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
31
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
32
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
33
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
34
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
35
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
36
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
37
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
38
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
39
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
40
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
41
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
42
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
43
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
44
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
45
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
46
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
47
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
48
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
49
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
50
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
51
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
52
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
53
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
54
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
55
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
56
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
57
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
58
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
59
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
60
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
61
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
62
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
63
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
64
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
65
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
66
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
67
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
68
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
69
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
70
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
71
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
72
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
73
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
74
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
75
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
76
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
77
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
78
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
79
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
80
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
81
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
82
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
83
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
84
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
85
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
86
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
87
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
88
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
89
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
90
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
91
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
92
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
93
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
94
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
95
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
96
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
97
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
98
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
99
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
100
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
101
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
102
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
103
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
104
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
105
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
106
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
107
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
108
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
109
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
110
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
111
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
112
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
113
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
114
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
115
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
116
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
117
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
118
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
119
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
120
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
121
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
122
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
123
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
124
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
125
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
126
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
127
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
128
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
129
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
130
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
131
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
132
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
133
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
134
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
135
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
136
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
137
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
138
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
139
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
140
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
141
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
142
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
143
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
144
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
145
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
146
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
147
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
148
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
149
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
150
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
151
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
152
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
153
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
154
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
155
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
156
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
157
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
158
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
159
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
160
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
161
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
162
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
163
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
164
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
165
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
166
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
167
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
168
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
169
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
170
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
171
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
172
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
173
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
174
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
175
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
176
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
177
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
178
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
179
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
180
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
181
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
182
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
183
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
184
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
185
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
186
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
187
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
188
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
189
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
190
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
191
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
192
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
193
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
194
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
195
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
196
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
197
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
198
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
199
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
200
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
201
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
202
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
203
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
204
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
205
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
206
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
207
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
208
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
209
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
210
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
211
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
212
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
213
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
214
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
215
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
216
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
217
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
218
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
219
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
220
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
221
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
222
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
223
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
224
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
225
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
226
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
227
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
228
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
229
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
230
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
231
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
232
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
233
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
234
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
235
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
236
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
237
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
238
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
239
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
240
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
241
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
242
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
243
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
244
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
245
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
246
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
247
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
248
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
249
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
250
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
251
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
252
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
253
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
254
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
255
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
256
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
257
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
258
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
259
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
260
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
261
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
262
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
263
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
264
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
265
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
266
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
267
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
268
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
269
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
270
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
271
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
272
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
273
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
274
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
275
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
276
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
277
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
278
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
279
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
280
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
281
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
282
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
283
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
284
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
285
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
286
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
287
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
288
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
289
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
290
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
291
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
292
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
293
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
294
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
295
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
296
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
297
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
298
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
299
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
300
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
301
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
302
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
303
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
304
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
305
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
306
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
307
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
308
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
309
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
310
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
311
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
312
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
313
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
314
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
315
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
316
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
317
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
318
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
319
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
320
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
321
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
322
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
323
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
324
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
325
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
326
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
327
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
328
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
329
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
330
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
331
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
332
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
333
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
334
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
335
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
336
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
337
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
338
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
339
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
340
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
341
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
342
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
343
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
344
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
345
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
346
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
347
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
348
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
349
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
350
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
351
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
352
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
353
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
354
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
355
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
356
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
357
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
358
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
359
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
360
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
361
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
362
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
363
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
364
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
365
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
366
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
367
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
368
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
369
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
370
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
371
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
372
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
373
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
374
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
375
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
376
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
377
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
378
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
379
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
380
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
381
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
382
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
383
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
384
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
385
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
386
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
387
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
388
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
389
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
390
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
391
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
392
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
393
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
394
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
395
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
396
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
397
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
398
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
399
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
400
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
401
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
402
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
403
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
404
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
405
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
406
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
407
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
408
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
409
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
410
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
411
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
412
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
413
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
414
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
415
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
416
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
417
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
418
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
419
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
420
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
421
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
422
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
423
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
424
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
425
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
426
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
427
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
428
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
429
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
430
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
431
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
432
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
433
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
434
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
435
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
436
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
437
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
438
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
439
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
440
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
441
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)