comparison UnitTests/CS/DataAccess/PersonDataSet2.Designer.cs @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:4.0.30319.1
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10
11 #pragma warning disable 1591
12
13 namespace DataAccessTest {
14
15
16 /// <summary>
17 ///Represents a strongly typed in-memory cache of data.
18 ///</summary>
19 [global::System.Serializable()]
20 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
21 [global::System.ComponentModel.ToolboxItem(true)]
22 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
23 [global::System.Xml.Serialization.XmlRootAttribute("PersonDataSet2")]
24 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
25 public partial class PersonDataSet2 : global::System.Data.DataSet {
26
27 private PersonDataTable tablePerson;
28
29 private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
30
31 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
32 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
33 public PersonDataSet2() {
34 this.BeginInit();
35 this.InitClass();
36 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
37 base.Tables.CollectionChanged += schemaChangedHandler;
38 base.Relations.CollectionChanged += schemaChangedHandler;
39 this.EndInit();
40 }
41
42 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
43 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
44 protected PersonDataSet2(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
45 base(info, context, false) {
46 if ((this.IsBinarySerialized(info, context) == true)) {
47 this.InitVars(false);
48 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
49 this.Tables.CollectionChanged += schemaChangedHandler1;
50 this.Relations.CollectionChanged += schemaChangedHandler1;
51 return;
52 }
53 string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
54 if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
55 global::System.Data.DataSet ds = new global::System.Data.DataSet();
56 ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
57 if ((ds.Tables["Person"] != null)) {
58 base.Tables.Add(new PersonDataTable(ds.Tables["Person"]));
59 }
60 this.DataSetName = ds.DataSetName;
61 this.Prefix = ds.Prefix;
62 this.Namespace = ds.Namespace;
63 this.Locale = ds.Locale;
64 this.CaseSensitive = ds.CaseSensitive;
65 this.EnforceConstraints = ds.EnforceConstraints;
66 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
67 this.InitVars();
68 }
69 else {
70 this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
71 }
72 this.GetSerializationData(info, context);
73 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
74 base.Tables.CollectionChanged += schemaChangedHandler;
75 this.Relations.CollectionChanged += schemaChangedHandler;
76 }
77
78 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
79 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
80 [global::System.ComponentModel.Browsable(false)]
81 [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
82 public PersonDataTable Person {
83 get {
84 return this.tablePerson;
85 }
86 }
87
88 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
89 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
90 [global::System.ComponentModel.BrowsableAttribute(true)]
91 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
92 public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
93 get {
94 return this._schemaSerializationMode;
95 }
96 set {
97 this._schemaSerializationMode = value;
98 }
99 }
100
101 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
102 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
103 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
104 public new global::System.Data.DataTableCollection Tables {
105 get {
106 return base.Tables;
107 }
108 }
109
110 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
111 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
112 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
113 public new global::System.Data.DataRelationCollection Relations {
114 get {
115 return base.Relations;
116 }
117 }
118
119 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
120 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
121 protected override void InitializeDerivedDataSet() {
122 this.BeginInit();
123 this.InitClass();
124 this.EndInit();
125 }
126
127 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
128 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
129 public override global::System.Data.DataSet Clone() {
130 PersonDataSet2 cln = ((PersonDataSet2)(base.Clone()));
131 cln.InitVars();
132 cln.SchemaSerializationMode = this.SchemaSerializationMode;
133 return cln;
134 }
135
136 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
137 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
138 protected override bool ShouldSerializeTables() {
139 return false;
140 }
141
142 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
143 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
144 protected override bool ShouldSerializeRelations() {
145 return false;
146 }
147
148 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
149 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
150 protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
151 if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
152 this.Reset();
153 global::System.Data.DataSet ds = new global::System.Data.DataSet();
154 ds.ReadXml(reader);
155 if ((ds.Tables["Person"] != null)) {
156 base.Tables.Add(new PersonDataTable(ds.Tables["Person"]));
157 }
158 this.DataSetName = ds.DataSetName;
159 this.Prefix = ds.Prefix;
160 this.Namespace = ds.Namespace;
161 this.Locale = ds.Locale;
162 this.CaseSensitive = ds.CaseSensitive;
163 this.EnforceConstraints = ds.EnforceConstraints;
164 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
165 this.InitVars();
166 }
167 else {
168 this.ReadXml(reader);
169 this.InitVars();
170 }
171 }
172
173 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
174 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
175 protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
176 global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
177 this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
178 stream.Position = 0;
179 return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
180 }
181
182 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
183 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
184 internal void InitVars() {
185 this.InitVars(true);
186 }
187
188 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
189 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
190 internal void InitVars(bool initTable) {
191 this.tablePerson = ((PersonDataTable)(base.Tables["Person"]));
192 if ((initTable == true)) {
193 if ((this.tablePerson != null)) {
194 this.tablePerson.InitVars();
195 }
196 }
197 }
198
199 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
200 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
201 private void InitClass() {
202 this.DataSetName = "PersonDataSet2";
203 this.Prefix = "";
204 this.Namespace = "http://tempuri.org/PersonDataSet2.xsd";
205 this.EnforceConstraints = true;
206 this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
207 this.tablePerson = new PersonDataTable();
208 base.Tables.Add(this.tablePerson);
209 }
210
211 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
212 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
213 private bool ShouldSerializePerson() {
214 return false;
215 }
216
217 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
218 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
219 private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
220 if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
221 this.InitVars();
222 }
223 }
224
225 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
226 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
227 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
228 PersonDataSet2 ds = new PersonDataSet2();
229 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
230 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
231 global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
232 any.Namespace = ds.Namespace;
233 sequence.Items.Add(any);
234 type.Particle = sequence;
235 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
236 if (xs.Contains(dsSchema.TargetNamespace)) {
237 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
238 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
239 try {
240 global::System.Xml.Schema.XmlSchema schema = null;
241 dsSchema.Write(s1);
242 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
243 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
244 s2.SetLength(0);
245 schema.Write(s2);
246 if ((s1.Length == s2.Length)) {
247 s1.Position = 0;
248 s2.Position = 0;
249 for (; ((s1.Position != s1.Length)
250 && (s1.ReadByte() == s2.ReadByte())); ) {
251 ;
252 }
253 if ((s1.Position == s1.Length)) {
254 return type;
255 }
256 }
257 }
258 }
259 finally {
260 if ((s1 != null)) {
261 s1.Close();
262 }
263 if ((s2 != null)) {
264 s2.Close();
265 }
266 }
267 }
268 xs.Add(dsSchema);
269 return type;
270 }
271
272 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
273 public delegate void PersonRowChangeEventHandler(object sender, PersonRowChangeEvent e);
274
275 /// <summary>
276 ///Represents the strongly named DataTable class.
277 ///</summary>
278 [global::System.Serializable()]
279 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
280 public partial class PersonDataTable : global::System.Data.TypedTableBase<PersonRow> {
281
282 private global::System.Data.DataColumn columnPersonID;
283
284 private global::System.Data.DataColumn columnFirstName;
285
286 private global::System.Data.DataColumn columnLastName;
287
288 private global::System.Data.DataColumn columnMiddleName;
289
290 private global::System.Data.DataColumn columnGender;
291
292 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
293 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
294 public PersonDataTable() {
295 this.TableName = "Person";
296 this.BeginInit();
297 this.InitClass();
298 this.EndInit();
299 }
300
301 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
302 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
303 internal PersonDataTable(global::System.Data.DataTable table) {
304 this.TableName = table.TableName;
305 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
306 this.CaseSensitive = table.CaseSensitive;
307 }
308 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
309 this.Locale = table.Locale;
310 }
311 if ((table.Namespace != table.DataSet.Namespace)) {
312 this.Namespace = table.Namespace;
313 }
314 this.Prefix = table.Prefix;
315 this.MinimumCapacity = table.MinimumCapacity;
316 }
317
318 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
319 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
320 protected PersonDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
321 base(info, context) {
322 this.InitVars();
323 }
324
325 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
326 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
327 public global::System.Data.DataColumn PersonIDColumn {
328 get {
329 return this.columnPersonID;
330 }
331 }
332
333 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
334 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
335 public global::System.Data.DataColumn FirstNameColumn {
336 get {
337 return this.columnFirstName;
338 }
339 }
340
341 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
342 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
343 public global::System.Data.DataColumn LastNameColumn {
344 get {
345 return this.columnLastName;
346 }
347 }
348
349 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
350 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
351 public global::System.Data.DataColumn MiddleNameColumn {
352 get {
353 return this.columnMiddleName;
354 }
355 }
356
357 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
358 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
359 public global::System.Data.DataColumn GenderColumn {
360 get {
361 return this.columnGender;
362 }
363 }
364
365 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
366 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
367 [global::System.ComponentModel.Browsable(false)]
368 public int Count {
369 get {
370 return this.Rows.Count;
371 }
372 }
373
374 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
375 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
376 public PersonRow this[int index] {
377 get {
378 return ((PersonRow)(this.Rows[index]));
379 }
380 }
381
382 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
383 public event PersonRowChangeEventHandler PersonRowChanging;
384
385 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
386 public event PersonRowChangeEventHandler PersonRowChanged;
387
388 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
389 public event PersonRowChangeEventHandler PersonRowDeleting;
390
391 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
392 public event PersonRowChangeEventHandler PersonRowDeleted;
393
394 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
395 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
396 public void AddPersonRow(PersonRow row) {
397 this.Rows.Add(row);
398 }
399
400 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
401 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
402 public PersonRow AddPersonRow(string FirstName, string LastName, string MiddleName, string Gender) {
403 PersonRow rowPersonRow = ((PersonRow)(this.NewRow()));
404 object[] columnValuesArray = new object[] {
405 null,
406 FirstName,
407 LastName,
408 MiddleName,
409 Gender};
410 rowPersonRow.ItemArray = columnValuesArray;
411 this.Rows.Add(rowPersonRow);
412 return rowPersonRow;
413 }
414
415 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
416 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
417 public PersonRow FindByPersonID(int PersonID) {
418 return ((PersonRow)(this.Rows.Find(new object[] {
419 PersonID})));
420 }
421
422 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
423 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
424 public override global::System.Data.DataTable Clone() {
425 PersonDataTable cln = ((PersonDataTable)(base.Clone()));
426 cln.InitVars();
427 return cln;
428 }
429
430 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
431 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
432 protected override global::System.Data.DataTable CreateInstance() {
433 return new PersonDataTable();
434 }
435
436 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
437 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
438 internal void InitVars() {
439 this.columnPersonID = base.Columns["PersonID"];
440 this.columnFirstName = base.Columns["FirstName"];
441 this.columnLastName = base.Columns["LastName"];
442 this.columnMiddleName = base.Columns["MiddleName"];
443 this.columnGender = base.Columns["Gender"];
444 }
445
446 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
447 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
448 private void InitClass() {
449 this.columnPersonID = new global::System.Data.DataColumn("PersonID", typeof(int), null, global::System.Data.MappingType.Element);
450 base.Columns.Add(this.columnPersonID);
451 this.columnFirstName = new global::System.Data.DataColumn("FirstName", typeof(string), null, global::System.Data.MappingType.Element);
452 base.Columns.Add(this.columnFirstName);
453 this.columnLastName = new global::System.Data.DataColumn("LastName", typeof(string), null, global::System.Data.MappingType.Element);
454 base.Columns.Add(this.columnLastName);
455 this.columnMiddleName = new global::System.Data.DataColumn("MiddleName", typeof(string), null, global::System.Data.MappingType.Element);
456 base.Columns.Add(this.columnMiddleName);
457 this.columnGender = new global::System.Data.DataColumn("Gender", typeof(string), null, global::System.Data.MappingType.Element);
458 base.Columns.Add(this.columnGender);
459 this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
460 this.columnPersonID}, true));
461 this.columnPersonID.AutoIncrement = true;
462 this.columnPersonID.AllowDBNull = false;
463 this.columnPersonID.ReadOnly = true;
464 this.columnPersonID.Unique = true;
465 this.columnFirstName.AllowDBNull = false;
466 this.columnFirstName.MaxLength = 50;
467 this.columnLastName.AllowDBNull = false;
468 this.columnLastName.MaxLength = 50;
469 this.columnMiddleName.MaxLength = 50;
470 this.columnGender.AllowDBNull = false;
471 this.columnGender.MaxLength = 1;
472 }
473
474 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
475 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
476 public PersonRow NewPersonRow() {
477 return ((PersonRow)(this.NewRow()));
478 }
479
480 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
481 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
482 protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
483 return new PersonRow(builder);
484 }
485
486 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
487 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
488 protected override global::System.Type GetRowType() {
489 return typeof(PersonRow);
490 }
491
492 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
493 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
494 protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
495 base.OnRowChanged(e);
496 if ((this.PersonRowChanged != null)) {
497 this.PersonRowChanged(this, new PersonRowChangeEvent(((PersonRow)(e.Row)), e.Action));
498 }
499 }
500
501 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
502 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
503 protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
504 base.OnRowChanging(e);
505 if ((this.PersonRowChanging != null)) {
506 this.PersonRowChanging(this, new PersonRowChangeEvent(((PersonRow)(e.Row)), e.Action));
507 }
508 }
509
510 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
511 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
512 protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
513 base.OnRowDeleted(e);
514 if ((this.PersonRowDeleted != null)) {
515 this.PersonRowDeleted(this, new PersonRowChangeEvent(((PersonRow)(e.Row)), e.Action));
516 }
517 }
518
519 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
520 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
521 protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
522 base.OnRowDeleting(e);
523 if ((this.PersonRowDeleting != null)) {
524 this.PersonRowDeleting(this, new PersonRowChangeEvent(((PersonRow)(e.Row)), e.Action));
525 }
526 }
527
528 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
529 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
530 public void RemovePersonRow(PersonRow row) {
531 this.Rows.Remove(row);
532 }
533
534 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
535 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
536 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
537 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
538 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
539 PersonDataSet2 ds = new PersonDataSet2();
540 global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
541 any1.Namespace = "http://www.w3.org/2001/XMLSchema";
542 any1.MinOccurs = new decimal(0);
543 any1.MaxOccurs = decimal.MaxValue;
544 any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
545 sequence.Items.Add(any1);
546 global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
547 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
548 any2.MinOccurs = new decimal(1);
549 any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
550 sequence.Items.Add(any2);
551 global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
552 attribute1.Name = "namespace";
553 attribute1.FixedValue = ds.Namespace;
554 type.Attributes.Add(attribute1);
555 global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
556 attribute2.Name = "tableTypeName";
557 attribute2.FixedValue = "PersonDataTable";
558 type.Attributes.Add(attribute2);
559 type.Particle = sequence;
560 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
561 if (xs.Contains(dsSchema.TargetNamespace)) {
562 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
563 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
564 try {
565 global::System.Xml.Schema.XmlSchema schema = null;
566 dsSchema.Write(s1);
567 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
568 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
569 s2.SetLength(0);
570 schema.Write(s2);
571 if ((s1.Length == s2.Length)) {
572 s1.Position = 0;
573 s2.Position = 0;
574 for (; ((s1.Position != s1.Length)
575 && (s1.ReadByte() == s2.ReadByte())); ) {
576 ;
577 }
578 if ((s1.Position == s1.Length)) {
579 return type;
580 }
581 }
582 }
583 }
584 finally {
585 if ((s1 != null)) {
586 s1.Close();
587 }
588 if ((s2 != null)) {
589 s2.Close();
590 }
591 }
592 }
593 xs.Add(dsSchema);
594 return type;
595 }
596 }
597
598 /// <summary>
599 ///Represents strongly named DataRow class.
600 ///</summary>
601 public partial class PersonRow : global::System.Data.DataRow {
602
603 private PersonDataTable tablePerson;
604
605 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
606 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
607 internal PersonRow(global::System.Data.DataRowBuilder rb) :
608 base(rb) {
609 this.tablePerson = ((PersonDataTable)(this.Table));
610 }
611
612 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
613 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
614 public int PersonID {
615 get {
616 return ((int)(this[this.tablePerson.PersonIDColumn]));
617 }
618 set {
619 this[this.tablePerson.PersonIDColumn] = value;
620 }
621 }
622
623 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
624 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
625 public string FirstName {
626 get {
627 return ((string)(this[this.tablePerson.FirstNameColumn]));
628 }
629 set {
630 this[this.tablePerson.FirstNameColumn] = value;
631 }
632 }
633
634 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
635 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
636 public string LastName {
637 get {
638 return ((string)(this[this.tablePerson.LastNameColumn]));
639 }
640 set {
641 this[this.tablePerson.LastNameColumn] = value;
642 }
643 }
644
645 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
646 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
647 public string MiddleName {
648 get {
649 try {
650 return ((string)(this[this.tablePerson.MiddleNameColumn]));
651 }
652 catch (global::System.InvalidCastException e) {
653 throw new global::System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'Person\' is DBNull.", e);
654 }
655 }
656 set {
657 this[this.tablePerson.MiddleNameColumn] = value;
658 }
659 }
660
661 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
662 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
663 public string Gender {
664 get {
665 return ((string)(this[this.tablePerson.GenderColumn]));
666 }
667 set {
668 this[this.tablePerson.GenderColumn] = value;
669 }
670 }
671
672 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
673 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
674 public bool IsMiddleNameNull() {
675 return this.IsNull(this.tablePerson.MiddleNameColumn);
676 }
677
678 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
679 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
680 public void SetMiddleNameNull() {
681 this[this.tablePerson.MiddleNameColumn] = global::System.Convert.DBNull;
682 }
683 }
684
685 /// <summary>
686 ///Row event argument class
687 ///</summary>
688 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
689 public class PersonRowChangeEvent : global::System.EventArgs {
690
691 private PersonRow eventRow;
692
693 private global::System.Data.DataRowAction eventAction;
694
695 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
696 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
697 public PersonRowChangeEvent(PersonRow row, global::System.Data.DataRowAction action) {
698 this.eventRow = row;
699 this.eventAction = action;
700 }
701
702 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
703 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
704 public PersonRow Row {
705 get {
706 return this.eventRow;
707 }
708 }
709
710 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
711 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
712 public global::System.Data.DataRowAction Action {
713 get {
714 return this.eventAction;
715 }
716 }
717 }
718 }
719 }
720 namespace DataAccessTest.PersonDataSet2TableAdapters {
721
722
723 /// <summary>
724 ///Represents the connection and commands used to retrieve and save data.
725 ///</summary>
726 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
727 [global::System.ComponentModel.ToolboxItem(true)]
728 [global::System.ComponentModel.DataObjectAttribute(true)]
729 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
730 ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
731 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
732 public partial class PersonTableAdapter : global::System.ComponentModel.Component {
733
734 private global::System.Data.SqlClient.SqlDataAdapter _adapter;
735
736 private global::System.Data.SqlClient.SqlConnection _connection;
737
738 private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
739
740 private bool _clearBeforeFill;
741
742 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
743 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
744 public PersonTableAdapter() {
745 this.ClearBeforeFill = true;
746 }
747
748 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
749 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
750 private global::System.Data.SqlClient.SqlDataAdapter Adapter {
751 get {
752 if ((this._adapter == null)) {
753 this.InitAdapter();
754 }
755 return this._adapter;
756 }
757 }
758
759 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
760 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
761 internal global::System.Data.SqlClient.SqlConnection Connection {
762 get {
763 if ((this._connection == null)) {
764 this.InitConnection();
765 }
766 return this._connection;
767 }
768 set {
769 this._connection = value;
770 if ((this.Adapter.InsertCommand != null)) {
771 this.Adapter.InsertCommand.Connection = value;
772 }
773 if ((this.Adapter.DeleteCommand != null)) {
774 this.Adapter.DeleteCommand.Connection = value;
775 }
776 if ((this.Adapter.UpdateCommand != null)) {
777 this.Adapter.UpdateCommand.Connection = value;
778 }
779 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
780 if ((this.CommandCollection[i] != null)) {
781 ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
782 }
783 }
784 }
785 }
786
787 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
788 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
789 protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
790 get {
791 if ((this._commandCollection == null)) {
792 this.InitCommandCollection();
793 }
794 return this._commandCollection;
795 }
796 }
797
798 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
799 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
800 public bool ClearBeforeFill {
801 get {
802 return this._clearBeforeFill;
803 }
804 set {
805 this._clearBeforeFill = value;
806 }
807 }
808
809 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
810 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
811 private void InitAdapter() {
812 this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
813 global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
814 tableMapping.SourceTable = "Table";
815 tableMapping.DataSetTable = "Person";
816 tableMapping.ColumnMappings.Add("PersonID", "PersonID");
817 tableMapping.ColumnMappings.Add("FirstName", "FirstName");
818 tableMapping.ColumnMappings.Add("LastName", "LastName");
819 tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
820 tableMapping.ColumnMappings.Add("Gender", "Gender");
821 this._adapter.TableMappings.Add(tableMapping);
822 this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
823 this._adapter.DeleteCommand.Connection = this.Connection;
824 this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Person] WHERE (([PersonID] = @Original_PersonID) AND ([FirstName] = @Original_FirstName) AND ([LastName] = @Original_LastName) AND ((@IsNull_MiddleName = 1 AND [MiddleName] IS NULL) OR ([MiddleName] = @Original_MiddleName)) AND ([Gender] = @Original_Gender))";
825 this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
826 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PersonID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PersonID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
827 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_FirstName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
828 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LastName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LastName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
829 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_MiddleName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MiddleName", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
830 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MiddleName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MiddleName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
831 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Gender", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Gender", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
832 this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
833 this._adapter.InsertCommand.Connection = this.Connection;
834 this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Person] ([FirstName], [LastName], [MiddleName], [Gender]) VALU" +
835 "ES (@FirstName, @LastName, @MiddleName, @Gender);\r\nSELECT PersonID, FirstName, L" +
836 "astName, MiddleName, Gender FROM Person WHERE (PersonID = SCOPE_IDENTITY())";
837 this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
838 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FirstName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
839 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LastName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LastName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
840 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MiddleName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MiddleName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
841 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Gender", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Gender", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
842 this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
843 this._adapter.UpdateCommand.Connection = this.Connection;
844 this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Person] SET [FirstName] = @FirstName, [LastName] = @LastName, [MiddleName] = @MiddleName, [Gender] = @Gender WHERE (([PersonID] = @Original_PersonID) AND ([FirstName] = @Original_FirstName) AND ([LastName] = @Original_LastName) AND ((@IsNull_MiddleName = 1 AND [MiddleName] IS NULL) OR ([MiddleName] = @Original_MiddleName)) AND ([Gender] = @Original_Gender));
845 SELECT PersonID, FirstName, LastName, MiddleName, Gender FROM Person WHERE (PersonID = @PersonID)";
846 this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
847 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FirstName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
848 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LastName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LastName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
849 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MiddleName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MiddleName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
850 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Gender", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Gender", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
851 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PersonID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PersonID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
852 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_FirstName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
853 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LastName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LastName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
854 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_MiddleName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MiddleName", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
855 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MiddleName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MiddleName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
856 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Gender", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Gender", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
857 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PersonID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "PersonID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
858 }
859
860 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
861 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
862 private void InitConnection() {
863 this._connection = new global::System.Data.SqlClient.SqlConnection();
864 this._connection.ConnectionString = global::UnitTests.CS.Properties.Settings.Default.BLToolkitDataConnectionString;
865 }
866
867 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
868 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
869 private void InitCommandCollection() {
870 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
871 this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
872 this._commandCollection[0].Connection = this.Connection;
873 this._commandCollection[0].CommandText = "SELECT PersonID, FirstName, LastName, MiddleName, Gender FROM dbo.Person";
874 this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
875 }
876
877 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
878 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
879 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
880 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
881 public virtual int Fill(PersonDataSet2.PersonDataTable dataTable) {
882 this.Adapter.SelectCommand = this.CommandCollection[0];
883 if ((this.ClearBeforeFill == true)) {
884 dataTable.Clear();
885 }
886 int returnValue = this.Adapter.Fill(dataTable);
887 return returnValue;
888 }
889
890 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
891 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
892 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
893 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
894 public virtual PersonDataSet2.PersonDataTable GetData() {
895 this.Adapter.SelectCommand = this.CommandCollection[0];
896 PersonDataSet2.PersonDataTable dataTable = new PersonDataSet2.PersonDataTable();
897 this.Adapter.Fill(dataTable);
898 return dataTable;
899 }
900
901 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
902 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
903 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
904 public virtual int Update(PersonDataSet2.PersonDataTable dataTable) {
905 return this.Adapter.Update(dataTable);
906 }
907
908 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
909 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
910 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
911 public virtual int Update(PersonDataSet2 dataSet) {
912 return this.Adapter.Update(dataSet, "Person");
913 }
914
915 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
916 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
917 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
918 public virtual int Update(global::System.Data.DataRow dataRow) {
919 return this.Adapter.Update(new global::System.Data.DataRow[] {
920 dataRow});
921 }
922
923 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
924 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
925 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
926 public virtual int Update(global::System.Data.DataRow[] dataRows) {
927 return this.Adapter.Update(dataRows);
928 }
929
930 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
931 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
932 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
933 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
934 public virtual int Delete(int Original_PersonID, string Original_FirstName, string Original_LastName, string Original_MiddleName, string Original_Gender) {
935 this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_PersonID));
936 if ((Original_FirstName == null)) {
937 throw new global::System.ArgumentNullException("Original_FirstName");
938 }
939 else {
940 this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_FirstName));
941 }
942 if ((Original_LastName == null)) {
943 throw new global::System.ArgumentNullException("Original_LastName");
944 }
945 else {
946 this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_LastName));
947 }
948 if ((Original_MiddleName == null)) {
949 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
950 this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
951 }
952 else {
953 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
954 this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_MiddleName));
955 }
956 if ((Original_Gender == null)) {
957 throw new global::System.ArgumentNullException("Original_Gender");
958 }
959 else {
960 this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_Gender));
961 }
962 global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
963 if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
964 != global::System.Data.ConnectionState.Open)) {
965 this.Adapter.DeleteCommand.Connection.Open();
966 }
967 try {
968 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
969 return returnValue;
970 }
971 finally {
972 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
973 this.Adapter.DeleteCommand.Connection.Close();
974 }
975 }
976 }
977
978 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
979 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
980 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
981 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
982 public virtual int Insert(string FirstName, string LastName, string MiddleName, string Gender) {
983 if ((FirstName == null)) {
984 throw new global::System.ArgumentNullException("FirstName");
985 }
986 else {
987 this.Adapter.InsertCommand.Parameters[0].Value = ((string)(FirstName));
988 }
989 if ((LastName == null)) {
990 throw new global::System.ArgumentNullException("LastName");
991 }
992 else {
993 this.Adapter.InsertCommand.Parameters[1].Value = ((string)(LastName));
994 }
995 if ((MiddleName == null)) {
996 this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
997 }
998 else {
999 this.Adapter.InsertCommand.Parameters[2].Value = ((string)(MiddleName));
1000 }
1001 if ((Gender == null)) {
1002 throw new global::System.ArgumentNullException("Gender");
1003 }
1004 else {
1005 this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Gender));
1006 }
1007 global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1008 if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1009 != global::System.Data.ConnectionState.Open)) {
1010 this.Adapter.InsertCommand.Connection.Open();
1011 }
1012 try {
1013 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1014 return returnValue;
1015 }
1016 finally {
1017 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1018 this.Adapter.InsertCommand.Connection.Close();
1019 }
1020 }
1021 }
1022
1023 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1024 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1025 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1026 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1027 public virtual int Update(string FirstName, string LastName, string MiddleName, string Gender, int Original_PersonID, string Original_FirstName, string Original_LastName, string Original_MiddleName, string Original_Gender, int PersonID) {
1028 if ((FirstName == null)) {
1029 throw new global::System.ArgumentNullException("FirstName");
1030 }
1031 else {
1032 this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(FirstName));
1033 }
1034 if ((LastName == null)) {
1035 throw new global::System.ArgumentNullException("LastName");
1036 }
1037 else {
1038 this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(LastName));
1039 }
1040 if ((MiddleName == null)) {
1041 this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1042 }
1043 else {
1044 this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(MiddleName));
1045 }
1046 if ((Gender == null)) {
1047 throw new global::System.ArgumentNullException("Gender");
1048 }
1049 else {
1050 this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Gender));
1051 }
1052 this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_PersonID));
1053 if ((Original_FirstName == null)) {
1054 throw new global::System.ArgumentNullException("Original_FirstName");
1055 }
1056 else {
1057 this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_FirstName));
1058 }
1059 if ((Original_LastName == null)) {
1060 throw new global::System.ArgumentNullException("Original_LastName");
1061 }
1062 else {
1063 this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_LastName));
1064 }
1065 if ((Original_MiddleName == null)) {
1066 this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1));
1067 this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value;
1068 }
1069 else {
1070 this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0));
1071 this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_MiddleName));
1072 }
1073 if ((Original_Gender == null)) {
1074 throw new global::System.ArgumentNullException("Original_Gender");
1075 }
1076 else {
1077 this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Gender));
1078 }
1079 this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(PersonID));
1080 global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
1081 if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
1082 != global::System.Data.ConnectionState.Open)) {
1083 this.Adapter.UpdateCommand.Connection.Open();
1084 }
1085 try {
1086 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
1087 return returnValue;
1088 }
1089 finally {
1090 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1091 this.Adapter.UpdateCommand.Connection.Close();
1092 }
1093 }
1094 }
1095
1096 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1097 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1098 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1099 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1100 public virtual int Update(string FirstName, string LastName, string MiddleName, string Gender, int Original_PersonID, string Original_FirstName, string Original_LastName, string Original_MiddleName, string Original_Gender) {
1101 return this.Update(FirstName, LastName, MiddleName, Gender, Original_PersonID, Original_FirstName, Original_LastName, Original_MiddleName, Original_Gender, Original_PersonID);
1102 }
1103 }
1104 }
1105
1106 #pragma warning restore 1591