Quản lý điểm sinh viên CNTT
177.557 lượt xem;
- QuanLyDiemDataSet3.Designer.cs
- Quản lý điểm sinh vien CNTT /
- project /
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:2.0.50727.1433
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 Quản_lý_điểm_sinh_vien_CNTT {
14
15
16 /// <summary>
17 ///Represents a strongly typed in-memory cache of data.
18 ///</summary>
19 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
20 [global::System.Serializable()]
21 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
22 [global::System.ComponentModel.ToolboxItem(true)]
23 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
24 [global::System.Xml.Serialization.XmlRootAttribute("QuanLyDiemDataSet3")]
25 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
26 public partial class QuanLyDiemDataSet3 : global::System.Data.DataSet {
27
28 private tblSINH_VIENDataTable tabletblSINH_VIEN;
29
30 private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
31
32 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
33 public QuanLyDiemDataSet3() {
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 protected QuanLyDiemDataSet3(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
44 base(info, context, false) {
45 if ((this.IsBinarySerialized(info, context) == true)) {
46 this.InitVars(false);
47 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
48 this.Tables.CollectionChanged += schemaChangedHandler1;
49 this.Relations.CollectionChanged += schemaChangedHandler1;
50 return;
51 }
52 string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
53 if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
54 global::System.Data.DataSet ds = new global::System.Data.DataSet();
55 ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
56 if ((ds.Tables["tblSINH_VIEN"] != null)) {
57 base.Tables.Add(new tblSINH_VIENDataTable(ds.Tables["tblSINH_VIEN"]));
58 }
59 this.DataSetName = ds.DataSetName;
60 this.Prefix = ds.Prefix;
61 this.Namespace = ds.Namespace;
62 this.Locale = ds.Locale;
63 this.CaseSensitive = ds.CaseSensitive;
64 this.EnforceConstraints = ds.EnforceConstraints;
65 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
66 this.InitVars();
67 }
68 else {
69 this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
70 }
71 this.GetSerializationData(info, context);
72 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
73 base.Tables.CollectionChanged += schemaChangedHandler;
74 this.Relations.CollectionChanged += schemaChangedHandler;
75 }
76
77 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
78 [global::System.ComponentModel.Browsable(false)]
79 [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
80 public tblSINH_VIENDataTable tblSINH_VIEN {
81 get {
82 return this.tabletblSINH_VIEN;
83 }
84 }
85
86 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
87 [global::System.ComponentModel.BrowsableAttribute(true)]
88 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
89 public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
90 get {
91 return this._schemaSerializationMode;
92 }
93 set {
94 this._schemaSerializationMode = value;
95 }
96 }
97
98 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
99 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
100 public new global::System.Data.DataTableCollection Tables {
101 get {
102 return base.Tables;
103 }
104 }
105
106 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
107 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
108 public new global::System.Data.DataRelationCollection Relations {
109 get {
110 return base.Relations;
111 }
112 }
113
114 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
115 protected override void InitializeDerivedDataSet() {
116 this.BeginInit();
117 this.InitClass();
118 this.EndInit();
119 }
120
121 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
122 public override global::System.Data.DataSet Clone() {
123 QuanLyDiemDataSet3 cln = ((QuanLyDiemDataSet3)(base.Clone()));
124 cln.InitVars();
125 cln.SchemaSerializationMode = this.SchemaSerializationMode;
126 return cln;
127 }
128
129 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
130 protected override bool ShouldSerializeTables() {
131 return false;
132 }
133
134 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
135 protected override bool ShouldSerializeRelations() {
136 return false;
137 }
138
139 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
140 protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
141 if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
142 this.Reset();
143 global::System.Data.DataSet ds = new global::System.Data.DataSet();
144 ds.ReadXml(reader);
145 if ((ds.Tables["tblSINH_VIEN"] != null)) {
146 base.Tables.Add(new tblSINH_VIENDataTable(ds.Tables["tblSINH_VIEN"]));
147 }
148 this.DataSetName = ds.DataSetName;
149 this.Prefix = ds.Prefix;
150 this.Namespace = ds.Namespace;
151 this.Locale = ds.Locale;
152 this.CaseSensitive = ds.CaseSensitive;
153 this.EnforceConstraints = ds.EnforceConstraints;
154 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
155 this.InitVars();
156 }
157 else {
158 this.ReadXml(reader);
159 this.InitVars();
160 }
161 }
162
163 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
164 protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
165 global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
166 this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
167 stream.Position = 0;
168 return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
169 }
170
171 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
172 internal void InitVars() {
173 this.InitVars(true);
174 }
175
176 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
177 internal void InitVars(bool initTable) {
178 this.tabletblSINH_VIEN = ((tblSINH_VIENDataTable)(base.Tables["tblSINH_VIEN"]));
179 if ((initTable == true)) {
180 if ((this.tabletblSINH_VIEN != null)) {
181 this.tabletblSINH_VIEN.InitVars();
182 }
183 }
184 }
185
186 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
187 private void InitClass() {
188 this.DataSetName = "QuanLyDiemDataSet3";
189 this.Prefix = "";
190 this.Namespace = "http://tempuri.org/QuanLyDiemDataSet3.xsd";
191 this.EnforceConstraints = true;
192 this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
193 this.tabletblSINH_VIEN = new tblSINH_VIENDataTable();
194 base.Tables.Add(this.tabletblSINH_VIEN);
195 }
196
197 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
198 private bool ShouldSerializetblSINH_VIEN() {
199 return false;
200 }
201
202 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
203 private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
204 if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
205 this.InitVars();
206 }
207 }
208
209 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
210 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
211 QuanLyDiemDataSet3 ds = new QuanLyDiemDataSet3();
212 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
213 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
214 global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
215 any.Namespace = ds.Namespace;
216 sequence.Items.Add(any);
217 type.Particle = sequence;
218 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
219 if (xs.Contains(dsSchema.TargetNamespace)) {
220 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
221 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
222 try {
223 global::System.Xml.Schema.XmlSchema schema = null;
224 dsSchema.Write(s1);
225 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
226 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
227 s2.SetLength(0);
228 schema.Write(s2);
229 if ((s1.Length == s2.Length)) {
230 s1.Position = 0;
231 s2.Position = 0;
232 for (; ((s1.Position != s1.Length)
233 && (s1.ReadByte() == s2.ReadByte())); ) {
234 ;
235 }
236 if ((s1.Position == s1.Length)) {
237 return type;
238 }
239 }
240 }
241 }
242 finally {
243 if ((s1 != null)) {
244 s1.Close();
245 }
246 if ((s2 != null)) {
247 s2.Close();
248 }
249 }
250 }
251 xs.Add(dsSchema);
252 return type;
253 }
254
255 public delegate void tblSINH_VIENRowChangeEventHandler(object sender, tblSINH_VIENRowChangeEvent e);
256
257 /// <summary>
258 ///Represents the strongly named DataTable class.
259 ///</summary>
260 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
261 [global::System.Serializable()]
262 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
263 public partial class tblSINH_VIENDataTable : global::System.Data.TypedTableBase<tblSINH_VIENRow> {
264
265 private global::System.Data.DataColumn columnMaSv;
266
267 private global::System.Data.DataColumn columnHoTen;
268
269 private global::System.Data.DataColumn columnNgaySinh;
270
271 private global::System.Data.DataColumn columnGioiTinh;
272
273 private global::System.Data.DataColumn columnDiaChi;
274
275 private global::System.Data.DataColumn columnMaLop;
276
277 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
278 public tblSINH_VIENDataTable() {
279 this.TableName = "tblSINH_VIEN";
280 this.BeginInit();
281 this.InitClass();
282 this.EndInit();
283 }
284
285 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
286 internal tblSINH_VIENDataTable(global::System.Data.DataTable table) {
287 this.TableName = table.TableName;
288 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
289 this.CaseSensitive = table.CaseSensitive;
290 }
291 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
292 this.Locale = table.Locale;
293 }
294 if ((table.Namespace != table.DataSet.Namespace)) {
295 this.Namespace = table.Namespace;
296 }
297 this.Prefix = table.Prefix;
298 this.MinimumCapacity = table.MinimumCapacity;
299 }
300
301 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
302 protected tblSINH_VIENDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
303 base(info, context) {
304 this.InitVars();
305 }
306
307 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
308 public global::System.Data.DataColumn MaSvColumn {
309 get {
310 return this.columnMaSv;
311 }
312 }
313
314 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
315 public global::System.Data.DataColumn HoTenColumn {
316 get {
317 return this.columnHoTen;
318 }
319 }
320
321 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
322 public global::System.Data.DataColumn NgaySinhColumn {
323 get {
324 return this.columnNgaySinh;
325 }
326 }
327
328 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
329 public global::System.Data.DataColumn GioiTinhColumn {
330 get {
331 return this.columnGioiTinh;
332 }
333 }
334
335 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
336 public global::System.Data.DataColumn DiaChiColumn {
337 get {
338 return this.columnDiaChi;
339 }
340 }
341
342 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
343 public global::System.Data.DataColumn MaLopColumn {
344 get {
345 return this.columnMaLop;
346 }
347 }
348
349 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
350 [global::System.ComponentModel.Browsable(false)]
351 public int Count {
352 get {
353 return this.Rows.Count;
354 }
355 }
356
357 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
358 public tblSINH_VIENRow this[int index] {
359 get {
360 return ((tblSINH_VIENRow)(this.Rows[index]));
361 }
362 }
363
364 public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowChanging;
365
366 public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowChanged;
367
368 public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowDeleting;
369
370 public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowDeleted;
371
372 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
373 public void AddtblSINH_VIENRow(tblSINH_VIENRow row) {
374 this.Rows.Add(row);
375 }
376
377 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
378 public tblSINH_VIENRow AddtblSINH_VIENRow(string MaSv, string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop) {
379 tblSINH_VIENRow rowtblSINH_VIENRow = ((tblSINH_VIENRow)(this.NewRow()));
380 object[] columnValuesArray = new object[] {
381 MaSv,
382 HoTen,
383 NgaySinh,
384 GioiTinh,
385 DiaChi,
386 MaLop};
387 rowtblSINH_VIENRow.ItemArray = columnValuesArray;
388 this.Rows.Add(rowtblSINH_VIENRow);
389 return rowtblSINH_VIENRow;
390 }
391
392 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
393 public tblSINH_VIENRow FindByMaSv(string MaSv) {
394 return ((tblSINH_VIENRow)(this.Rows.Find(new object[] {
395 MaSv})));
396 }
397
398 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
399 public override global::System.Data.DataTable Clone() {
400 tblSINH_VIENDataTable cln = ((tblSINH_VIENDataTable)(base.Clone()));
401 cln.InitVars();
402 return cln;
403 }
404
405 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
406 protected override global::System.Data.DataTable CreateInstance() {
407 return new tblSINH_VIENDataTable();
408 }
409
410 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
411 internal void InitVars() {
412 this.columnMaSv = base.Columns["MaSv"];
413 this.columnHoTen = base.Columns["HoTen"];
414 this.columnNgaySinh = base.Columns["NgaySinh"];
415 this.columnGioiTinh = base.Columns["GioiTinh"];
416 this.columnDiaChi = base.Columns["DiaChi"];
417 this.columnMaLop = base.Columns["MaLop"];
418 }
419
420 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
421 private void InitClass() {
422 this.columnMaSv = new global::System.Data.DataColumn("MaSv", typeof(string), null, global::System.Data.MappingType.Element);
423 base.Columns.Add(this.columnMaSv);
424 this.columnHoTen = new global::System.Data.DataColumn("HoTen", typeof(string), null, global::System.Data.MappingType.Element);
425 base.Columns.Add(this.columnHoTen);
426 this.columnNgaySinh = new global::System.Data.DataColumn("NgaySinh", typeof(string), null, global::System.Data.MappingType.Element);
427 base.Columns.Add(this.columnNgaySinh);
428 this.columnGioiTinh = new global::System.Data.DataColumn("GioiTinh", typeof(string), null, global::System.Data.MappingType.Element);
429 base.Columns.Add(this.columnGioiTinh);
430 this.columnDiaChi = new global::System.Data.DataColumn("DiaChi", typeof(string), null, global::System.Data.MappingType.Element);
431 base.Columns.Add(this.columnDiaChi);
432 this.columnMaLop = new global::System.Data.DataColumn("MaLop", typeof(string), null, global::System.Data.MappingType.Element);
433 base.Columns.Add(this.columnMaLop);
434 this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
435 this.columnMaSv}, true));
436 this.columnMaSv.AllowDBNull = false;
437 this.columnMaSv.Unique = true;
438 this.columnMaSv.MaxLength = 10;
439 this.columnHoTen.MaxLength = 30;
440 this.columnNgaySinh.MaxLength = 10;
441 this.columnGioiTinh.MaxLength = 3;
442 this.columnDiaChi.MaxLength = 30;
443 this.columnMaLop.MaxLength = 5;
444 }
445
446 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
447 public tblSINH_VIENRow NewtblSINH_VIENRow() {
448 return ((tblSINH_VIENRow)(this.NewRow()));
449 }
450
451 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
452 protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
453 return new tblSINH_VIENRow(builder);
454 }
455
456 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
457 protected override global::System.Type GetRowType() {
458 return typeof(tblSINH_VIENRow);
459 }
460
461 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
462 protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
463 base.OnRowChanged(e);
464 if ((this.tblSINH_VIENRowChanged != null)) {
465 this.tblSINH_VIENRowChanged(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
466 }
467 }
468
469 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
470 protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
471 base.OnRowChanging(e);
472 if ((this.tblSINH_VIENRowChanging != null)) {
473 this.tblSINH_VIENRowChanging(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
474 }
475 }
476
477 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
478 protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
479 base.OnRowDeleted(e);
480 if ((this.tblSINH_VIENRowDeleted != null)) {
481 this.tblSINH_VIENRowDeleted(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
482 }
483 }
484
485 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
486 protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
487 base.OnRowDeleting(e);
488 if ((this.tblSINH_VIENRowDeleting != null)) {
489 this.tblSINH_VIENRowDeleting(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
490 }
491 }
492
493 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
494 public void RemovetblSINH_VIENRow(tblSINH_VIENRow row) {
495 this.Rows.Remove(row);
496 }
497
498 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
499 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
500 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
501 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
502 QuanLyDiemDataSet3 ds = new QuanLyDiemDataSet3();
503 global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
504 any1.Namespace = "http://www.w3.org/2001/XMLSchema";
505 any1.MinOccurs = new decimal(0);
506 any1.MaxOccurs = decimal.MaxValue;
507 any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
508 sequence.Items.Add(any1);
509 global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
510 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
511 any2.MinOccurs = new decimal(1);
512 any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
513 sequence.Items.Add(any2);
514 global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
515 attribute1.Name = "namespace";
516 attribute1.FixedValue = ds.Namespace;
517 type.Attributes.Add(attribute1);
518 global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
519 attribute2.Name = "tableTypeName";
520 attribute2.FixedValue = "tblSINH_VIENDataTable";
521 type.Attributes.Add(attribute2);
522 type.Particle = sequence;
523 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
524 if (xs.Contains(dsSchema.TargetNamespace)) {
525 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
526 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
527 try {
528 global::System.Xml.Schema.XmlSchema schema = null;
529 dsSchema.Write(s1);
530 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
531 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
532 s2.SetLength(0);
533 schema.Write(s2);
534 if ((s1.Length == s2.Length)) {
535 s1.Position = 0;
536 s2.Position = 0;
537 for (; ((s1.Position != s1.Length)
538 && (s1.ReadByte() == s2.ReadByte())); ) {
539 ;
540 }
541 if ((s1.Position == s1.Length)) {
542 return type;
543 }
544 }
545 }
546 }
547 finally {
548 if ((s1 != null)) {
549 s1.Close();
550 }
551 if ((s2 != null)) {
552 s2.Close();
553 }
554 }
555 }
556 xs.Add(dsSchema);
557 return type;
558 }
559 }
560
561 /// <summary>
562 ///Represents strongly named DataRow class.
563 ///</summary>
564 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
565 public partial class tblSINH_VIENRow : global::System.Data.DataRow {
566
567 private tblSINH_VIENDataTable tabletblSINH_VIEN;
568
569 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
570 internal tblSINH_VIENRow(global::System.Data.DataRowBuilder rb) :
571 base(rb) {
572 this.tabletblSINH_VIEN = ((tblSINH_VIENDataTable)(this.Table));
573 }
574
575 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
576 public string MaSv {
577 get {
578 return ((string)(this[this.tabletblSINH_VIEN.MaSvColumn]));
579 }
580 set {
581 this[this.tabletblSINH_VIEN.MaSvColumn] = value;
582 }
583 }
584
585 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
586 public string HoTen {
587 get {
588 try {
589 return ((string)(this[this.tabletblSINH_VIEN.HoTenColumn]));
590 }
591 catch (global::System.InvalidCastException e) {
592 throw new global::System.Data.StrongTypingException("The value for column \'HoTen\' in table \'tblSINH_VIEN\' is DBNull.", e);
593 }
594 }
595 set {
596 this[this.tabletblSINH_VIEN.HoTenColumn] = value;
597 }
598 }
599
600 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
601 public string NgaySinh {
602 get {
603 try {
604 return ((string)(this[this.tabletblSINH_VIEN.NgaySinhColumn]));
605 }
606 catch (global::System.InvalidCastException e) {
607 throw new global::System.Data.StrongTypingException("The value for column \'NgaySinh\' in table \'tblSINH_VIEN\' is DBNull.", e);
608 }
609 }
610 set {
611 this[this.tabletblSINH_VIEN.NgaySinhColumn] = value;
612 }
613 }
614
615 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
616 public string GioiTinh {
617 get {
618 try {
619 return ((string)(this[this.tabletblSINH_VIEN.GioiTinhColumn]));
620 }
621 catch (global::System.InvalidCastException e) {
622 throw new global::System.Data.StrongTypingException("The value for column \'GioiTinh\' in table \'tblSINH_VIEN\' is DBNull.", e);
623 }
624 }
625 set {
626 this[this.tabletblSINH_VIEN.GioiTinhColumn] = value;
627 }
628 }
629
630 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
631 public string DiaChi {
632 get {
633 try {
634 return ((string)(this[this.tabletblSINH_VIEN.DiaChiColumn]));
635 }
636 catch (global::System.InvalidCastException e) {
637 throw new global::System.Data.StrongTypingException("The value for column \'DiaChi\' in table \'tblSINH_VIEN\' is DBNull.", e);
638 }
639 }
640 set {
641 this[this.tabletblSINH_VIEN.DiaChiColumn] = value;
642 }
643 }
644
645 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
646 public string MaLop {
647 get {
648 try {
649 return ((string)(this[this.tabletblSINH_VIEN.MaLopColumn]));
650 }
651 catch (global::System.InvalidCastException e) {
652 throw new global::System.Data.StrongTypingException("The value for column \'MaLop\' in table \'tblSINH_VIEN\' is DBNull.", e);
653 }
654 }
655 set {
656 this[this.tabletblSINH_VIEN.MaLopColumn] = value;
657 }
658 }
659
660 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
661 public bool IsHoTenNull() {
662 return this.IsNull(this.tabletblSINH_VIEN.HoTenColumn);
663 }
664
665 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
666 public void SetHoTenNull() {
667 this[this.tabletblSINH_VIEN.HoTenColumn] = global::System.Convert.DBNull;
668 }
669
670 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
671 public bool IsNgaySinhNull() {
672 return this.IsNull(this.tabletblSINH_VIEN.NgaySinhColumn);
673 }
674
675 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
676 public void SetNgaySinhNull() {
677 this[this.tabletblSINH_VIEN.NgaySinhColumn] = global::System.Convert.DBNull;
678 }
679
680 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
681 public bool IsGioiTinhNull() {
682 return this.IsNull(this.tabletblSINH_VIEN.GioiTinhColumn);
683 }
684
685 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
686 public void SetGioiTinhNull() {
687 this[this.tabletblSINH_VIEN.GioiTinhColumn] = global::System.Convert.DBNull;
688 }
689
690 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
691 public bool IsDiaChiNull() {
692 return this.IsNull(this.tabletblSINH_VIEN.DiaChiColumn);
693 }
694
695 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
696 public void SetDiaChiNull() {
697 this[this.tabletblSINH_VIEN.DiaChiColumn] = global::System.Convert.DBNull;
698 }
699
700 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
701 public bool IsMaLopNull() {
702 return this.IsNull(this.tabletblSINH_VIEN.MaLopColumn);
703 }
704
705 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
706 public void SetMaLopNull() {
707 this[this.tabletblSINH_VIEN.MaLopColumn] = global::System.Convert.DBNull;
708 }
709 }
710
711 /// <summary>
712 ///Row event argument class
713 ///</summary>
714 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
715 public class tblSINH_VIENRowChangeEvent : global::System.EventArgs {
716
717 private tblSINH_VIENRow eventRow;
718
719 private global::System.Data.DataRowAction eventAction;
720
721 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
722 public tblSINH_VIENRowChangeEvent(tblSINH_VIENRow row, global::System.Data.DataRowAction action) {
723 this.eventRow = row;
724 this.eventAction = action;
725 }
726
727 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
728 public tblSINH_VIENRow Row {
729 get {
730 return this.eventRow;
731 }
732 }
733
734 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
735 public global::System.Data.DataRowAction Action {
736 get {
737 return this.eventAction;
738 }
739 }
740 }
741 }
742 }
743 namespace Quản_lý_điểm_sinh_vien_CNTT.QuanLyDiemDataSet3TableAdapters {
744
745
746 /// <summary>
747 ///Represents the connection and commands used to retrieve and save data.
748 ///</summary>
749 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
750 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
751 [global::System.ComponentModel.ToolboxItem(true)]
752 [global::System.ComponentModel.DataObjectAttribute(true)]
753 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
754 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
755 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
756 public partial class tblSINH_VIENTableAdapter : global::System.ComponentModel.Component {
757
758 private global::System.Data.SqlClient.SqlDataAdapter _adapter;
759
760 private global::System.Data.SqlClient.SqlConnection _connection;
761
762 private global::System.Data.SqlClient.SqlTransaction _transaction;
763
764 private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
765
766 private bool _clearBeforeFill;
767
768 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
769 public tblSINH_VIENTableAdapter() {
770 this.ClearBeforeFill = true;
771 }
772
773 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
774 protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
775 get {
776 if ((this._adapter == null)) {
777 this.InitAdapter();
778 }
779 return this._adapter;
780 }
781 }
782
783 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
784 internal global::System.Data.SqlClient.SqlConnection Connection {
785 get {
786 if ((this._connection == null)) {
787 this.InitConnection();
788 }
789 return this._connection;
790 }
791 set {
792 this._connection = value;
793 if ((this.Adapter.InsertCommand != null)) {
794 this.Adapter.InsertCommand.Connection = value;
795 }
796 if ((this.Adapter.DeleteCommand != null)) {
797 this.Adapter.DeleteCommand.Connection = value;
798 }
799 if ((this.Adapter.UpdateCommand != null)) {
800 this.Adapter.UpdateCommand.Connection = value;
801 }
802 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
803 if ((this.CommandCollection[i] != null)) {
804 ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
805 }
806 }
807 }
808 }
809
810 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
811 internal global::System.Data.SqlClient.SqlTransaction Transaction {
812 get {
813 return this._transaction;
814 }
815 set {
816 this._transaction = value;
817 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
818 this.CommandCollection[i].Transaction = this._transaction;
819 }
820 if (((this.Adapter != null)
821 && (this.Adapter.DeleteCommand != null))) {
822 this.Adapter.DeleteCommand.Transaction = this._transaction;
823 }
824 if (((this.Adapter != null)
825 && (this.Adapter.InsertCommand != null))) {
826 this.Adapter.InsertCommand.Transaction = this._transaction;
827 }
828 if (((this.Adapter != null)
829 && (this.Adapter.UpdateCommand != null))) {
830 this.Adapter.UpdateCommand.Transaction = this._transaction;
831 }
832 }
833 }
834
835 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
836 protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
837 get {
838 if ((this._commandCollection == null)) {
839 this.InitCommandCollection();
840 }
841 return this._commandCollection;
842 }
843 }
844
845 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
846 public bool ClearBeforeFill {
847 get {
848 return this._clearBeforeFill;
849 }
850 set {
851 this._clearBeforeFill = value;
852 }
853 }
854
855 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
856 private void InitAdapter() {
857 this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
858 global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
859 tableMapping.SourceTable = "Table";
860 tableMapping.DataSetTable = "tblSINH_VIEN";
861 tableMapping.ColumnMappings.Add("MaSv", "MaSv");
862 tableMapping.ColumnMappings.Add("HoTen", "HoTen");
863 tableMapping.ColumnMappings.Add("NgaySinh", "NgaySinh");
864 tableMapping.ColumnMappings.Add("GioiTinh", "GioiTinh");
865 tableMapping.ColumnMappings.Add("DiaChi", "DiaChi");
866 tableMapping.ColumnMappings.Add("MaLop", "MaLop");
867 this._adapter.TableMappings.Add(tableMapping);
868 this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
869 this._adapter.DeleteCommand.Connection = this.Connection;
870 this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[tblSINH_VIEN] WHERE (([MaSv] = @Original_MaSv) AND ((@IsNull_HoTen = 1 AND [HoTen] IS NULL) OR ([HoTen] = @Original_HoTen)) AND ((@IsNull_NgaySinh = 1 AND [NgaySinh] IS NULL) OR ([NgaySinh] = @Original_NgaySinh)) AND ((@IsNull_GioiTinh = 1 AND [GioiTinh] IS NULL) OR ([GioiTinh] = @Original_GioiTinh)) AND ((@IsNull_DiaChi = 1 AND [DiaChi] IS NULL) OR ([DiaChi] = @Original_DiaChi)) AND ((@IsNull_MaLop = 1 AND [MaLop] IS NULL) OR ([MaLop] = @Original_MaLop)))";
871 this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
872 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSv", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
873 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HoTen", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
874 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HoTen", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
875 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_NgaySinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
876 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NgaySinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
877 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_GioiTinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
878 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_GioiTinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
879 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiaChi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
880 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiaChi", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
881 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_MaLop", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
882 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaLop", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
883 this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
884 this._adapter.InsertCommand.Connection = this.Connection;
885 this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tblSINH_VIEN] ([MaSv], [HoTen], [NgaySinh], [GioiTinh], [DiaCh" +
886 "i], [MaLop]) VALUES (@MaSv, @HoTen, @NgaySinh, @GioiTinh, @DiaChi, @MaLop);\r\nSEL" +
887 "ECT MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop FROM tblSINH_VIEN WHERE (MaSv" +
888 " = @MaSv)";
889 this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
890 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSv", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
891 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HoTen", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
892 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NgaySinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
893 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GioiTinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
894 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiaChi", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
895 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaLop", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
896 this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
897 this._adapter.UpdateCommand.Connection = this.Connection;
898 this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[tblSINH_VIEN] SET [MaSv] = @MaSv, [HoTen] = @HoTen, [NgaySinh] = @NgaySinh, [GioiTinh] = @GioiTinh, [DiaChi] = @DiaChi, [MaLop] = @MaLop WHERE (([MaSv] = @Original_MaSv) AND ((@IsNull_HoTen = 1 AND [HoTen] IS NULL) OR ([HoTen] = @Original_HoTen)) AND ((@IsNull_NgaySinh = 1 AND [NgaySinh] IS NULL) OR ([NgaySinh] = @Original_NgaySinh)) AND ((@IsNull_GioiTinh = 1 AND [GioiTinh] IS NULL) OR ([GioiTinh] = @Original_GioiTinh)) AND ((@IsNull_DiaChi = 1 AND [DiaChi] IS NULL) OR ([DiaChi] = @Original_DiaChi)) AND ((@IsNull_MaLop = 1 AND [MaLop] IS NULL) OR ([MaLop] = @Original_MaLop)));
899 SELECT MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop FROM tblSINH_VIEN WHERE (MaSv = @MaSv)";
900 this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
901 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSv", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
902 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HoTen", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
903 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NgaySinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
904 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GioiTinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
905 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiaChi", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
906 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaLop", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
907 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSv", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
908 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HoTen", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
909 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HoTen", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
910 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_NgaySinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
911 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NgaySinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
912 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_GioiTinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
913 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_GioiTinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
914 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiaChi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
915 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiaChi", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
916 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_MaLop", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
917 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaLop", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
918 }
919
920 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
921 private void InitConnection() {
922 this._connection = new global::System.Data.SqlClient.SqlConnection();
923 this._connection.ConnectionString = global::Quản_lý_điểm_sinh_vien_CNTT.Properties.Settings.Default.QuanLyDiemConnectionString1;
924 }
925
926 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
927 private void InitCommandCollection() {
928 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
929 this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
930 this._commandCollection[0].Connection = this.Connection;
931 this._commandCollection[0].CommandText = "SELECT MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop FROM dbo.tblSINH_VIEN";
932 this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
933 }
934
935 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
936 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
937 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
938 public virtual int Fill(QuanLyDiemDataSet3.tblSINH_VIENDataTable dataTable) {
939 this.Adapter.SelectCommand = this.CommandCollection[0];
940 if ((this.ClearBeforeFill == true)) {
941 dataTable.Clear();
942 }
943 int returnValue = this.Adapter.Fill(dataTable);
944 return returnValue;
945 }
946
947 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
948 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
949 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
950 public virtual QuanLyDiemDataSet3.tblSINH_VIENDataTable GetData() {
951 this.Adapter.SelectCommand = this.CommandCollection[0];
952 QuanLyDiemDataSet3.tblSINH_VIENDataTable dataTable = new QuanLyDiemDataSet3.tblSINH_VIENDataTable();
953 this.Adapter.Fill(dataTable);
954 return dataTable;
955 }
956
957 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
958 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
959 public virtual int Update(QuanLyDiemDataSet3.tblSINH_VIENDataTable dataTable) {
960 return this.Adapter.Update(dataTable);
961 }
962
963 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
964 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
965 public virtual int Update(QuanLyDiemDataSet3 dataSet) {
966 return this.Adapter.Update(dataSet, "tblSINH_VIEN");
967 }
968
969 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
970 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
971 public virtual int Update(global::System.Data.DataRow dataRow) {
972 return this.Adapter.Update(new global::System.Data.DataRow[] {
973 dataRow});
974 }
975
976 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
977 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
978 public virtual int Update(global::System.Data.DataRow[] dataRows) {
979 return this.Adapter.Update(dataRows);
980 }
981
982 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
983 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
984 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
985 public virtual int Delete(string Original_MaSv, string Original_HoTen, string Original_NgaySinh, string Original_GioiTinh, string Original_DiaChi, string Original_MaLop) {
986 if ((Original_MaSv == null)) {
987 throw new global::System.ArgumentNullException("Original_MaSv");
988 }
989 else {
990 this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_MaSv));
991 }
992 if ((Original_HoTen == null)) {
993 this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
994 this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
995 }
996 else {
997 this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
998 this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_HoTen));
999 }
1000 if ((Original_NgaySinh == null)) {
1001 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
1002 this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
1003 }
1004 else {
1005 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
1006 this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_NgaySinh));
1007 }
1008 if ((Original_GioiTinh == null)) {
1009 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
1010 this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
1011 }
1012 else {
1013 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
1014 this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_GioiTinh));
1015 }
1016 if ((Original_DiaChi == null)) {
1017 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
1018 this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
1019 }
1020 else {
1021 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
1022 this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_DiaChi));
1023 }
1024 if ((Original_MaLop == null)) {
1025 this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1));
1026 this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value;
1027 }
1028 else {
1029 this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0));
1030 this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_MaLop));
1031 }
1032 global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
1033 if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
1034 != global::System.Data.ConnectionState.Open)) {
1035 this.Adapter.DeleteCommand.Connection.Open();
1036 }
1037 try {
1038 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
1039 return returnValue;
1040 }
1041 finally {
1042 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1043 this.Adapter.DeleteCommand.Connection.Close();
1044 }
1045 }
1046 }
1047
1048 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1049 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1050 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1051 public virtual int Insert(string MaSv, string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop) {
1052 if ((MaSv == null)) {
1053 throw new global::System.ArgumentNullException("MaSv");
1054 }
1055 else {
1056 this.Adapter.InsertCommand.Parameters[0].Value = ((string)(MaSv));
1057 }
1058 if ((HoTen == null)) {
1059 this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
1060 }
1061 else {
1062 this.Adapter.InsertCommand.Parameters[1].Value = ((string)(HoTen));
1063 }
1064 if ((NgaySinh == null)) {
1065 this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1066 }
1067 else {
1068 this.Adapter.InsertCommand.Parameters[2].Value = ((string)(NgaySinh));
1069 }
1070 if ((GioiTinh == null)) {
1071 this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1072 }
1073 else {
1074 this.Adapter.InsertCommand.Parameters[3].Value = ((string)(GioiTinh));
1075 }
1076 if ((DiaChi == null)) {
1077 this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
1078 }
1079 else {
1080 this.Adapter.InsertCommand.Parameters[4].Value = ((string)(DiaChi));
1081 }
1082 if ((MaLop == null)) {
1083 this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
1084 }
1085 else {
1086 this.Adapter.InsertCommand.Parameters[5].Value = ((string)(MaLop));
1087 }
1088 global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1089 if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1090 != global::System.Data.ConnectionState.Open)) {
1091 this.Adapter.InsertCommand.Connection.Open();
1092 }
1093 try {
1094 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1095 return returnValue;
1096 }
1097 finally {
1098 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1099 this.Adapter.InsertCommand.Connection.Close();
1100 }
1101 }
1102 }
1103
1104 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1105 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1106 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1107 public virtual int Update(string MaSv, string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop, string Original_MaSv, string Original_HoTen, string Original_NgaySinh, string Original_GioiTinh, string Original_DiaChi, string Original_MaLop) {
1108 if ((MaSv == null)) {
1109 throw new global::System.ArgumentNullException("MaSv");
1110 }
1111 else {
1112 this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(MaSv));
1113 }
1114 if ((HoTen == null)) {
1115 this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
1116 }
1117 else {
1118 this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(HoTen));
1119 }
1120 if ((NgaySinh == null)) {
1121 this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1122 }
1123 else {
1124 this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(NgaySinh));
1125 }
1126 if ((GioiTinh == null)) {
1127 this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
1128 }
1129 else {
1130 this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(GioiTinh));
1131 }
1132 if ((DiaChi == null)) {
1133 this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
1134 }
1135 else {
1136 this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(DiaChi));
1137 }
1138 if ((MaLop == null)) {
1139 this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
1140 }
1141 else {
1142 this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(MaLop));
1143 }
1144 if ((Original_MaSv == null)) {
1145 throw new global::System.ArgumentNullException("Original_MaSv");
1146 }
1147 else {
1148 this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_MaSv));
1149 }
1150 if ((Original_HoTen == null)) {
1151 this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1));
1152 this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value;
1153 }
1154 else {
1155 this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0));
1156 this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_HoTen));
1157 }
1158 if ((Original_NgaySinh == null)) {
1159 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1));
1160 this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value;
1161 }
1162 else {
1163 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0));
1164 this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_NgaySinh));
1165 }
1166 if ((Original_GioiTinh == null)) {
1167 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
1168 this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
1169 }
1170 else {
1171 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
1172 this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_GioiTinh));
1173 }
1174 if ((Original_DiaChi == null)) {
1175 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
1176 this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
1177 }
1178 else {
1179 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
1180 this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_DiaChi));
1181 }
1182 if ((Original_MaLop == null)) {
1183 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
1184 this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value;
1185 }
1186 else {
1187 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
1188 this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_MaLop));
1189 }
1190 global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
1191 if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
1192 != global::System.Data.ConnectionState.Open)) {
1193 this.Adapter.UpdateCommand.Connection.Open();
1194 }
1195 try {
1196 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
1197 return returnValue;
1198 }
1199 finally {
1200 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1201 this.Adapter.UpdateCommand.Connection.Close();
1202 }
1203 }
1204 }
1205
1206 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1207 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1208 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1209 public virtual int Update(string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop, string Original_MaSv, string Original_HoTen, string Original_NgaySinh, string Original_GioiTinh, string Original_DiaChi, string Original_MaLop) {
1210 return this.Update(Original_MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop, Original_MaSv, Original_HoTen, Original_NgaySinh, Original_GioiTinh, Original_DiaChi, Original_MaLop);
1211 }
1212 }
1213
1214 /// <summary>
1215 ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
1216 ///</summary>
1217 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1218 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
1219 [global::System.ComponentModel.ToolboxItem(true)]
1220 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
1221 "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1222 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
1223 public partial class TableAdapterManager : global::System.ComponentModel.Component {
1224
1225 private UpdateOrderOption _updateOrder;
1226
1227 private tblSINH_VIENTableAdapter _tblSINH_VIENTableAdapter;
1228
1229 private bool _backupDataSetBeforeUpdate;
1230
1231 private global::System.Data.IDbConnection _connection;
1232
1233 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1234 public UpdateOrderOption UpdateOrder {
1235 get {
1236 return this._updateOrder;
1237 }
1238 set {
1239 this._updateOrder = value;
1240 }
1241 }
1242
1243 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1244 [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
1245 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
1246 "", "System.Drawing.Design.UITypeEditor")]
1247 public tblSINH_VIENTableAdapter tblSINH_VIENTableAdapter {
1248 get {
1249 return this._tblSINH_VIENTableAdapter;
1250 }
1251 set {
1252 if (((this._tblSINH_VIENTableAdapter != null)
1253 && (this.TableAdapterInstanceCount == 1))) {
1254 this._tblSINH_VIENTableAdapter = value;
1255 return;
1256 }
1257 if (((value != null)
1258 && (this.MatchTableAdapterConnection(value.Connection) == false))) {
1259 throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
1260 "tring.");
1261 }
1262 this._tblSINH_VIENTableAdapter = value;
1263 }
1264 }
1265
1266 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1267 public bool BackupDataSetBeforeUpdate {
1268 get {
1269 return this._backupDataSetBeforeUpdate;
1270 }
1271 set {
1272 this._backupDataSetBeforeUpdate = value;
1273 }
1274 }
1275
1276 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1277 [global::System.ComponentModel.Browsable(false)]
1278 public global::System.Data.IDbConnection Connection {
1279 get {
1280 if ((this._connection != null)) {
1281 return this._connection;
1282 }
1283 if (((this._tblSINH_VIENTableAdapter != null)
1284 && (this._tblSINH_VIENTableAdapter.Connection != null))) {
1285 return this._tblSINH_VIENTableAdapter.Connection;
1286 }
1287 return null;
1288 }
1289 set {
1290 this._connection = value;
1291 }
1292 }
1293
1294 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1295 [global::System.ComponentModel.Browsable(false)]
1296 public int TableAdapterInstanceCount {
1297 get {
1298 int count = 0;
1299 if ((this._tblSINH_VIENTableAdapter != null)) {
1300 count = (count + 1);
1301 }
1302 return count;
1303 }
1304 }
1305
1306 /// <summary>
1307 ///Update rows in top-down order.
1308 ///</summary>
1309 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1310 private int UpdateUpdatedRows(QuanLyDiemDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1311 int result = 0;
1312 if ((this._tblSINH_VIENTableAdapter != null)) {
1313 global::System.Data.DataRow[] updatedRows = dataSet.tblSINH_VIEN.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
1314 updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
1315 if (((updatedRows != null)
1316 && (0 < updatedRows.Length))) {
1317 result = (result + this._tblSINH_VIENTableAdapter.Update(updatedRows));
1318 allChangedRows.AddRange(updatedRows);
1319 }
1320 }
1321 return result;
1322 }
1323
1324 /// <summary>
1325 ///Insert rows in top-down order.
1326 ///</summary>
1327 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1328 private int UpdateInsertedRows(QuanLyDiemDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1329 int result = 0;
1330 if ((this._tblSINH_VIENTableAdapter != null)) {
1331 global::System.Data.DataRow[] addedRows = dataSet.tblSINH_VIEN.Select(null, null, global::System.Data.DataViewRowState.Added);
1332 if (((addedRows != null)
1333 && (0 < addedRows.Length))) {
1334 result = (result + this._tblSINH_VIENTableAdapter.Update(addedRows));
1335 allAddedRows.AddRange(addedRows);
1336 }
1337 }
1338 return result;
1339 }
1340
1341 /// <summary>
1342 ///Delete rows in bottom-up order.
1343 ///</summary>
1344 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1345 private int UpdateDeletedRows(QuanLyDiemDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
1346 int result = 0;
1347 if ((this._tblSINH_VIENTableAdapter != null)) {
1348 global::System.Data.DataRow[] deletedRows = dataSet.tblSINH_VIEN.Select(null, null, global::System.Data.DataViewRowState.Deleted);
1349 if (((deletedRows != null)
1350 && (0 < deletedRows.Length))) {
1351 result = (result + this._tblSINH_VIENTableAdapter.Update(deletedRows));
1352 allChangedRows.AddRange(deletedRows);
1353 }
1354 }
1355 return result;
1356 }
1357
1358 /// <summary>
1359 ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1360 ///</summary>
1361 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1362 private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1363 if (((updatedRows == null)
1364 || (updatedRows.Length < 1))) {
1365 return updatedRows;
1366 }
1367 if (((allAddedRows == null)
1368 || (allAddedRows.Count < 1))) {
1369 return updatedRows;
1370 }
1371 global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1372 for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
1373 global::System.Data.DataRow row = updatedRows[i];
1374 if ((allAddedRows.Contains(row) == false)) {
1375 realUpdatedRows.Add(row);
1376 }
1377 }
1378 return realUpdatedRows.ToArray();
1379 }
1380
1381 /// <summary>
1382 ///Update all changes to the dataset.
1383 ///</summary>
1384 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1385 public virtual int UpdateAll(QuanLyDiemDataSet3 dataSet) {
1386 if ((dataSet == null)) {
1387 throw new global::System.ArgumentNullException("dataSet");
1388 }
1389 if ((dataSet.HasChanges() == false)) {
1390 return 0;
1391 }
1392 global::System.Data.IDbConnection workConnection = this.Connection;
1393 if ((workConnection == null)) {
1394 throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
1395 "ger TableAdapter property to a valid TableAdapter instance.");
1396 }
1397 bool workConnOpened = false;
1398 if (((workConnection.State & global::System.Data.ConnectionState.Closed)
1399 == global::System.Data.ConnectionState.Closed)) {
1400 workConnection.Open();
1401 workConnOpened = true;
1402 }
1403 global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
1404 if ((workTransaction == null)) {
1405 throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
1406 "ctions or the current state is not allowing the transaction to begin.");
1407 }
1408 global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1409 global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1410 global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
1411 global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
1412 int result = 0;
1413 global::System.Data.DataSet backupDataSet = null;
1414 if (this.BackupDataSetBeforeUpdate) {
1415 backupDataSet = new global::System.Data.DataSet();
1416 backupDataSet.Merge(dataSet);
1417 }
1418 try {
1419 // ---- Prepare for update -----------
1420 //
1421 if ((this._tblSINH_VIENTableAdapter != null)) {
1422 revertConnections.Add(this._tblSINH_VIENTableAdapter, this._tblSINH_VIENTableAdapter.Connection);
1423 this._tblSINH_VIENTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
1424 this._tblSINH_VIENTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
1425 if (this._tblSINH_VIENTableAdapter.Adapter.AcceptChangesDuringUpdate) {
1426 this._tblSINH_VIENTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
1427 adaptersWithAcceptChangesDuringUpdate.Add(this._tblSINH_VIENTableAdapter.Adapter);
1428 }
1429 }
1430 //
1431 //---- Perform updates -----------
1432 //
1433 if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
1434 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1435 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1436 }
1437 else {
1438 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1439 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1440 }
1441 result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
1442 //
1443 //---- Commit updates -----------
1444 //
1445 workTransaction.Commit();
1446 if ((0 < allAddedRows.Count)) {
1447 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1448 allAddedRows.CopyTo(rows);
1449 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1450 global::System.Data.DataRow row = rows[i];
1451 row.AcceptChanges();
1452 }
1453 }
1454 if ((0 < allChangedRows.Count)) {
1455 global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
1456 allChangedRows.CopyTo(rows);
1457 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1458 global::System.Data.DataRow row = rows[i];
1459 row.AcceptChanges();
1460 }
1461 }
1462 }
1463 catch (global::System.Exception ex) {
1464 workTransaction.Rollback();
1465 // ---- Restore the dataset -----------
1466 if (this.BackupDataSetBeforeUpdate) {
1467 global::System.Diagnostics.Debug.Assert((backupDataSet != null));
1468 dataSet.Clear();
1469 dataSet.Merge(backupDataSet);
1470 }
1471 else {
1472 if ((0 < allAddedRows.Count)) {
1473 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1474 allAddedRows.CopyTo(rows);
1475 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1476 global::System.Data.DataRow row = rows[i];
1477 row.AcceptChanges();
1478 row.SetAdded();
1479 }
1480 }
1481 }
1482 throw ex;
1483 }
1484 finally {
1485 if (workConnOpened) {
1486 workConnection.Close();
1487 }
1488 if ((this._tblSINH_VIENTableAdapter != null)) {
1489 this._tblSINH_VIENTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tblSINH_VIENTableAdapter]));
1490 this._tblSINH_VIENTableAdapter.Transaction = null;
1491 }
1492 if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
1493 global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
1494 adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
1495 for (int i = 0; (i < adapters.Length); i = (i + 1)) {
1496 global::System.Data.Common.DataAdapter adapter = adapters[i];
1497 adapter.AcceptChangesDuringUpdate = true;
1498 }
1499 }
1500 }
1501 return result;
1502 }
1503
1504 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1505 protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
1506 global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
1507 }
1508
1509 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1510 protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
1511 if ((this._connection != null)) {
1512 return true;
1513 }
1514 if (((this.Connection == null)
1515 || (inputConnection == null))) {
1516 return true;
1517 }
1518 if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
1519 return true;
1520 }
1521 return false;
1522 }
1523
1524 /// <summary>
1525 ///Update Order Option
1526 ///</summary>
1527 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1528 public enum UpdateOrderOption {
1529
1530 InsertUpdateDelete = 0,
1531
1532 UpdateInsertDelete = 1,
1533 }
1534
1535 /// <summary>
1536 ///Used to sort self-referenced table's rows
1537 ///</summary>
1538 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1539 private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
1540
1541 private global::System.Data.DataRelation _relation;
1542
1543 private int _childFirst;
1544
1545 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1546 internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
1547 this._relation = relation;
1548 if (childFirst) {
1549 this._childFirst = -1;
1550 }
1551 else {
1552 this._childFirst = 1;
1553 }
1554 }
1555
1556 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1557 private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) {
1558 global::System.Diagnostics.Debug.Assert((child != null));
1559 global::System.Diagnostics.Debug.Assert((parent != null));
1560 global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1561 for (
1562 ; ((newParent != null)
1563 && ((object.ReferenceEquals(newParent, child) == false)
1564 && (object.ReferenceEquals(newParent, parent) == false)));
1565 ) {
1566 newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1567 }
1568 if ((newParent == null)) {
1569 for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null)
1570 && ((object.ReferenceEquals(newParent, child) == false)
1571 && (object.ReferenceEquals(newParent, parent) == false)));
1572 ) {
1573 newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
1574 }
1575 }
1576 if (object.ReferenceEquals(newParent, parent)) {
1577 return true;
1578 }
1579 return false;
1580 }
1581
1582 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1583 public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
1584 if (object.ReferenceEquals(row1, row2)) {
1585 return 0;
1586 }
1587 if ((row1 == null)) {
1588 return -1;
1589 }
1590 if ((row2 == null)) {
1591 return 1;
1592 }
1593
1594 // Is row1 the child or grandchild of row2
1595 if (this.IsChildAndParent(row1, row2)) {
1596 return this._childFirst;
1597 }
1598
1599 // Is row2 the child or grandchild of row1
1600 if (this.IsChildAndParent(row2, row1)) {
1601 return (-1 * this._childFirst);
1602 }
1603 return 0;
1604 }
1605 }
1606 }
1607 }
1608
1609 #pragma warning restore 1591
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:2.0.50727.1433
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 Quản_lý_điểm_sinh_vien_CNTT {
14
15
16 /// <summary>
17 ///Represents a strongly typed in-memory cache of data.
18 ///</summary>
19 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
20 [global::System.Serializable()]
21 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
22 [global::System.ComponentModel.ToolboxItem(true)]
23 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
24 [global::System.Xml.Serialization.XmlRootAttribute("QuanLyDiemDataSet3")]
25 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
26 public partial class QuanLyDiemDataSet3 : global::System.Data.DataSet {
27
28 private tblSINH_VIENDataTable tabletblSINH_VIEN;
29
30 private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
31
32 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
33 public QuanLyDiemDataSet3() {
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 protected QuanLyDiemDataSet3(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
44 base(info, context, false) {
45 if ((this.IsBinarySerialized(info, context) == true)) {
46 this.InitVars(false);
47 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
48 this.Tables.CollectionChanged += schemaChangedHandler1;
49 this.Relations.CollectionChanged += schemaChangedHandler1;
50 return;
51 }
52 string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
53 if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
54 global::System.Data.DataSet ds = new global::System.Data.DataSet();
55 ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
56 if ((ds.Tables["tblSINH_VIEN"] != null)) {
57 base.Tables.Add(new tblSINH_VIENDataTable(ds.Tables["tblSINH_VIEN"]));
58 }
59 this.DataSetName = ds.DataSetName;
60 this.Prefix = ds.Prefix;
61 this.Namespace = ds.Namespace;
62 this.Locale = ds.Locale;
63 this.CaseSensitive = ds.CaseSensitive;
64 this.EnforceConstraints = ds.EnforceConstraints;
65 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
66 this.InitVars();
67 }
68 else {
69 this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
70 }
71 this.GetSerializationData(info, context);
72 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
73 base.Tables.CollectionChanged += schemaChangedHandler;
74 this.Relations.CollectionChanged += schemaChangedHandler;
75 }
76
77 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
78 [global::System.ComponentModel.Browsable(false)]
79 [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
80 public tblSINH_VIENDataTable tblSINH_VIEN {
81 get {
82 return this.tabletblSINH_VIEN;
83 }
84 }
85
86 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
87 [global::System.ComponentModel.BrowsableAttribute(true)]
88 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
89 public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
90 get {
91 return this._schemaSerializationMode;
92 }
93 set {
94 this._schemaSerializationMode = value;
95 }
96 }
97
98 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
99 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
100 public new global::System.Data.DataTableCollection Tables {
101 get {
102 return base.Tables;
103 }
104 }
105
106 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
107 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
108 public new global::System.Data.DataRelationCollection Relations {
109 get {
110 return base.Relations;
111 }
112 }
113
114 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
115 protected override void InitializeDerivedDataSet() {
116 this.BeginInit();
117 this.InitClass();
118 this.EndInit();
119 }
120
121 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
122 public override global::System.Data.DataSet Clone() {
123 QuanLyDiemDataSet3 cln = ((QuanLyDiemDataSet3)(base.Clone()));
124 cln.InitVars();
125 cln.SchemaSerializationMode = this.SchemaSerializationMode;
126 return cln;
127 }
128
129 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
130 protected override bool ShouldSerializeTables() {
131 return false;
132 }
133
134 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
135 protected override bool ShouldSerializeRelations() {
136 return false;
137 }
138
139 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
140 protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
141 if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
142 this.Reset();
143 global::System.Data.DataSet ds = new global::System.Data.DataSet();
144 ds.ReadXml(reader);
145 if ((ds.Tables["tblSINH_VIEN"] != null)) {
146 base.Tables.Add(new tblSINH_VIENDataTable(ds.Tables["tblSINH_VIEN"]));
147 }
148 this.DataSetName = ds.DataSetName;
149 this.Prefix = ds.Prefix;
150 this.Namespace = ds.Namespace;
151 this.Locale = ds.Locale;
152 this.CaseSensitive = ds.CaseSensitive;
153 this.EnforceConstraints = ds.EnforceConstraints;
154 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
155 this.InitVars();
156 }
157 else {
158 this.ReadXml(reader);
159 this.InitVars();
160 }
161 }
162
163 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
164 protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
165 global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
166 this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
167 stream.Position = 0;
168 return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
169 }
170
171 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
172 internal void InitVars() {
173 this.InitVars(true);
174 }
175
176 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
177 internal void InitVars(bool initTable) {
178 this.tabletblSINH_VIEN = ((tblSINH_VIENDataTable)(base.Tables["tblSINH_VIEN"]));
179 if ((initTable == true)) {
180 if ((this.tabletblSINH_VIEN != null)) {
181 this.tabletblSINH_VIEN.InitVars();
182 }
183 }
184 }
185
186 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
187 private void InitClass() {
188 this.DataSetName = "QuanLyDiemDataSet3";
189 this.Prefix = "";
190 this.Namespace = "http://tempuri.org/QuanLyDiemDataSet3.xsd";
191 this.EnforceConstraints = true;
192 this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
193 this.tabletblSINH_VIEN = new tblSINH_VIENDataTable();
194 base.Tables.Add(this.tabletblSINH_VIEN);
195 }
196
197 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
198 private bool ShouldSerializetblSINH_VIEN() {
199 return false;
200 }
201
202 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
203 private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
204 if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
205 this.InitVars();
206 }
207 }
208
209 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
210 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
211 QuanLyDiemDataSet3 ds = new QuanLyDiemDataSet3();
212 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
213 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
214 global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
215 any.Namespace = ds.Namespace;
216 sequence.Items.Add(any);
217 type.Particle = sequence;
218 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
219 if (xs.Contains(dsSchema.TargetNamespace)) {
220 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
221 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
222 try {
223 global::System.Xml.Schema.XmlSchema schema = null;
224 dsSchema.Write(s1);
225 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
226 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
227 s2.SetLength(0);
228 schema.Write(s2);
229 if ((s1.Length == s2.Length)) {
230 s1.Position = 0;
231 s2.Position = 0;
232 for (; ((s1.Position != s1.Length)
233 && (s1.ReadByte() == s2.ReadByte())); ) {
234 ;
235 }
236 if ((s1.Position == s1.Length)) {
237 return type;
238 }
239 }
240 }
241 }
242 finally {
243 if ((s1 != null)) {
244 s1.Close();
245 }
246 if ((s2 != null)) {
247 s2.Close();
248 }
249 }
250 }
251 xs.Add(dsSchema);
252 return type;
253 }
254
255 public delegate void tblSINH_VIENRowChangeEventHandler(object sender, tblSINH_VIENRowChangeEvent e);
256
257 /// <summary>
258 ///Represents the strongly named DataTable class.
259 ///</summary>
260 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
261 [global::System.Serializable()]
262 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
263 public partial class tblSINH_VIENDataTable : global::System.Data.TypedTableBase<tblSINH_VIENRow> {
264
265 private global::System.Data.DataColumn columnMaSv;
266
267 private global::System.Data.DataColumn columnHoTen;
268
269 private global::System.Data.DataColumn columnNgaySinh;
270
271 private global::System.Data.DataColumn columnGioiTinh;
272
273 private global::System.Data.DataColumn columnDiaChi;
274
275 private global::System.Data.DataColumn columnMaLop;
276
277 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
278 public tblSINH_VIENDataTable() {
279 this.TableName = "tblSINH_VIEN";
280 this.BeginInit();
281 this.InitClass();
282 this.EndInit();
283 }
284
285 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
286 internal tblSINH_VIENDataTable(global::System.Data.DataTable table) {
287 this.TableName = table.TableName;
288 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
289 this.CaseSensitive = table.CaseSensitive;
290 }
291 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
292 this.Locale = table.Locale;
293 }
294 if ((table.Namespace != table.DataSet.Namespace)) {
295 this.Namespace = table.Namespace;
296 }
297 this.Prefix = table.Prefix;
298 this.MinimumCapacity = table.MinimumCapacity;
299 }
300
301 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
302 protected tblSINH_VIENDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
303 base(info, context) {
304 this.InitVars();
305 }
306
307 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
308 public global::System.Data.DataColumn MaSvColumn {
309 get {
310 return this.columnMaSv;
311 }
312 }
313
314 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
315 public global::System.Data.DataColumn HoTenColumn {
316 get {
317 return this.columnHoTen;
318 }
319 }
320
321 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
322 public global::System.Data.DataColumn NgaySinhColumn {
323 get {
324 return this.columnNgaySinh;
325 }
326 }
327
328 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
329 public global::System.Data.DataColumn GioiTinhColumn {
330 get {
331 return this.columnGioiTinh;
332 }
333 }
334
335 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
336 public global::System.Data.DataColumn DiaChiColumn {
337 get {
338 return this.columnDiaChi;
339 }
340 }
341
342 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
343 public global::System.Data.DataColumn MaLopColumn {
344 get {
345 return this.columnMaLop;
346 }
347 }
348
349 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
350 [global::System.ComponentModel.Browsable(false)]
351 public int Count {
352 get {
353 return this.Rows.Count;
354 }
355 }
356
357 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
358 public tblSINH_VIENRow this[int index] {
359 get {
360 return ((tblSINH_VIENRow)(this.Rows[index]));
361 }
362 }
363
364 public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowChanging;
365
366 public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowChanged;
367
368 public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowDeleting;
369
370 public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowDeleted;
371
372 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
373 public void AddtblSINH_VIENRow(tblSINH_VIENRow row) {
374 this.Rows.Add(row);
375 }
376
377 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
378 public tblSINH_VIENRow AddtblSINH_VIENRow(string MaSv, string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop) {
379 tblSINH_VIENRow rowtblSINH_VIENRow = ((tblSINH_VIENRow)(this.NewRow()));
380 object[] columnValuesArray = new object[] {
381 MaSv,
382 HoTen,
383 NgaySinh,
384 GioiTinh,
385 DiaChi,
386 MaLop};
387 rowtblSINH_VIENRow.ItemArray = columnValuesArray;
388 this.Rows.Add(rowtblSINH_VIENRow);
389 return rowtblSINH_VIENRow;
390 }
391
392 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
393 public tblSINH_VIENRow FindByMaSv(string MaSv) {
394 return ((tblSINH_VIENRow)(this.Rows.Find(new object[] {
395 MaSv})));
396 }
397
398 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
399 public override global::System.Data.DataTable Clone() {
400 tblSINH_VIENDataTable cln = ((tblSINH_VIENDataTable)(base.Clone()));
401 cln.InitVars();
402 return cln;
403 }
404
405 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
406 protected override global::System.Data.DataTable CreateInstance() {
407 return new tblSINH_VIENDataTable();
408 }
409
410 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
411 internal void InitVars() {
412 this.columnMaSv = base.Columns["MaSv"];
413 this.columnHoTen = base.Columns["HoTen"];
414 this.columnNgaySinh = base.Columns["NgaySinh"];
415 this.columnGioiTinh = base.Columns["GioiTinh"];
416 this.columnDiaChi = base.Columns["DiaChi"];
417 this.columnMaLop = base.Columns["MaLop"];
418 }
419
420 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
421 private void InitClass() {
422 this.columnMaSv = new global::System.Data.DataColumn("MaSv", typeof(string), null, global::System.Data.MappingType.Element);
423 base.Columns.Add(this.columnMaSv);
424 this.columnHoTen = new global::System.Data.DataColumn("HoTen", typeof(string), null, global::System.Data.MappingType.Element);
425 base.Columns.Add(this.columnHoTen);
426 this.columnNgaySinh = new global::System.Data.DataColumn("NgaySinh", typeof(string), null, global::System.Data.MappingType.Element);
427 base.Columns.Add(this.columnNgaySinh);
428 this.columnGioiTinh = new global::System.Data.DataColumn("GioiTinh", typeof(string), null, global::System.Data.MappingType.Element);
429 base.Columns.Add(this.columnGioiTinh);
430 this.columnDiaChi = new global::System.Data.DataColumn("DiaChi", typeof(string), null, global::System.Data.MappingType.Element);
431 base.Columns.Add(this.columnDiaChi);
432 this.columnMaLop = new global::System.Data.DataColumn("MaLop", typeof(string), null, global::System.Data.MappingType.Element);
433 base.Columns.Add(this.columnMaLop);
434 this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
435 this.columnMaSv}, true));
436 this.columnMaSv.AllowDBNull = false;
437 this.columnMaSv.Unique = true;
438 this.columnMaSv.MaxLength = 10;
439 this.columnHoTen.MaxLength = 30;
440 this.columnNgaySinh.MaxLength = 10;
441 this.columnGioiTinh.MaxLength = 3;
442 this.columnDiaChi.MaxLength = 30;
443 this.columnMaLop.MaxLength = 5;
444 }
445
446 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
447 public tblSINH_VIENRow NewtblSINH_VIENRow() {
448 return ((tblSINH_VIENRow)(this.NewRow()));
449 }
450
451 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
452 protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
453 return new tblSINH_VIENRow(builder);
454 }
455
456 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
457 protected override global::System.Type GetRowType() {
458 return typeof(tblSINH_VIENRow);
459 }
460
461 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
462 protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
463 base.OnRowChanged(e);
464 if ((this.tblSINH_VIENRowChanged != null)) {
465 this.tblSINH_VIENRowChanged(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
466 }
467 }
468
469 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
470 protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
471 base.OnRowChanging(e);
472 if ((this.tblSINH_VIENRowChanging != null)) {
473 this.tblSINH_VIENRowChanging(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
474 }
475 }
476
477 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
478 protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
479 base.OnRowDeleted(e);
480 if ((this.tblSINH_VIENRowDeleted != null)) {
481 this.tblSINH_VIENRowDeleted(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
482 }
483 }
484
485 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
486 protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
487 base.OnRowDeleting(e);
488 if ((this.tblSINH_VIENRowDeleting != null)) {
489 this.tblSINH_VIENRowDeleting(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
490 }
491 }
492
493 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
494 public void RemovetblSINH_VIENRow(tblSINH_VIENRow row) {
495 this.Rows.Remove(row);
496 }
497
498 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
499 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
500 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
501 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
502 QuanLyDiemDataSet3 ds = new QuanLyDiemDataSet3();
503 global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
504 any1.Namespace = "http://www.w3.org/2001/XMLSchema";
505 any1.MinOccurs = new decimal(0);
506 any1.MaxOccurs = decimal.MaxValue;
507 any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
508 sequence.Items.Add(any1);
509 global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
510 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
511 any2.MinOccurs = new decimal(1);
512 any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
513 sequence.Items.Add(any2);
514 global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
515 attribute1.Name = "namespace";
516 attribute1.FixedValue = ds.Namespace;
517 type.Attributes.Add(attribute1);
518 global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
519 attribute2.Name = "tableTypeName";
520 attribute2.FixedValue = "tblSINH_VIENDataTable";
521 type.Attributes.Add(attribute2);
522 type.Particle = sequence;
523 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
524 if (xs.Contains(dsSchema.TargetNamespace)) {
525 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
526 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
527 try {
528 global::System.Xml.Schema.XmlSchema schema = null;
529 dsSchema.Write(s1);
530 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
531 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
532 s2.SetLength(0);
533 schema.Write(s2);
534 if ((s1.Length == s2.Length)) {
535 s1.Position = 0;
536 s2.Position = 0;
537 for (; ((s1.Position != s1.Length)
538 && (s1.ReadByte() == s2.ReadByte())); ) {
539 ;
540 }
541 if ((s1.Position == s1.Length)) {
542 return type;
543 }
544 }
545 }
546 }
547 finally {
548 if ((s1 != null)) {
549 s1.Close();
550 }
551 if ((s2 != null)) {
552 s2.Close();
553 }
554 }
555 }
556 xs.Add(dsSchema);
557 return type;
558 }
559 }
560
561 /// <summary>
562 ///Represents strongly named DataRow class.
563 ///</summary>
564 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
565 public partial class tblSINH_VIENRow : global::System.Data.DataRow {
566
567 private tblSINH_VIENDataTable tabletblSINH_VIEN;
568
569 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
570 internal tblSINH_VIENRow(global::System.Data.DataRowBuilder rb) :
571 base(rb) {
572 this.tabletblSINH_VIEN = ((tblSINH_VIENDataTable)(this.Table));
573 }
574
575 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
576 public string MaSv {
577 get {
578 return ((string)(this[this.tabletblSINH_VIEN.MaSvColumn]));
579 }
580 set {
581 this[this.tabletblSINH_VIEN.MaSvColumn] = value;
582 }
583 }
584
585 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
586 public string HoTen {
587 get {
588 try {
589 return ((string)(this[this.tabletblSINH_VIEN.HoTenColumn]));
590 }
591 catch (global::System.InvalidCastException e) {
592 throw new global::System.Data.StrongTypingException("The value for column \'HoTen\' in table \'tblSINH_VIEN\' is DBNull.", e);
593 }
594 }
595 set {
596 this[this.tabletblSINH_VIEN.HoTenColumn] = value;
597 }
598 }
599
600 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
601 public string NgaySinh {
602 get {
603 try {
604 return ((string)(this[this.tabletblSINH_VIEN.NgaySinhColumn]));
605 }
606 catch (global::System.InvalidCastException e) {
607 throw new global::System.Data.StrongTypingException("The value for column \'NgaySinh\' in table \'tblSINH_VIEN\' is DBNull.", e);
608 }
609 }
610 set {
611 this[this.tabletblSINH_VIEN.NgaySinhColumn] = value;
612 }
613 }
614
615 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
616 public string GioiTinh {
617 get {
618 try {
619 return ((string)(this[this.tabletblSINH_VIEN.GioiTinhColumn]));
620 }
621 catch (global::System.InvalidCastException e) {
622 throw new global::System.Data.StrongTypingException("The value for column \'GioiTinh\' in table \'tblSINH_VIEN\' is DBNull.", e);
623 }
624 }
625 set {
626 this[this.tabletblSINH_VIEN.GioiTinhColumn] = value;
627 }
628 }
629
630 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
631 public string DiaChi {
632 get {
633 try {
634 return ((string)(this[this.tabletblSINH_VIEN.DiaChiColumn]));
635 }
636 catch (global::System.InvalidCastException e) {
637 throw new global::System.Data.StrongTypingException("The value for column \'DiaChi\' in table \'tblSINH_VIEN\' is DBNull.", e);
638 }
639 }
640 set {
641 this[this.tabletblSINH_VIEN.DiaChiColumn] = value;
642 }
643 }
644
645 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
646 public string MaLop {
647 get {
648 try {
649 return ((string)(this[this.tabletblSINH_VIEN.MaLopColumn]));
650 }
651 catch (global::System.InvalidCastException e) {
652 throw new global::System.Data.StrongTypingException("The value for column \'MaLop\' in table \'tblSINH_VIEN\' is DBNull.", e);
653 }
654 }
655 set {
656 this[this.tabletblSINH_VIEN.MaLopColumn] = value;
657 }
658 }
659
660 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
661 public bool IsHoTenNull() {
662 return this.IsNull(this.tabletblSINH_VIEN.HoTenColumn);
663 }
664
665 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
666 public void SetHoTenNull() {
667 this[this.tabletblSINH_VIEN.HoTenColumn] = global::System.Convert.DBNull;
668 }
669
670 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
671 public bool IsNgaySinhNull() {
672 return this.IsNull(this.tabletblSINH_VIEN.NgaySinhColumn);
673 }
674
675 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
676 public void SetNgaySinhNull() {
677 this[this.tabletblSINH_VIEN.NgaySinhColumn] = global::System.Convert.DBNull;
678 }
679
680 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
681 public bool IsGioiTinhNull() {
682 return this.IsNull(this.tabletblSINH_VIEN.GioiTinhColumn);
683 }
684
685 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
686 public void SetGioiTinhNull() {
687 this[this.tabletblSINH_VIEN.GioiTinhColumn] = global::System.Convert.DBNull;
688 }
689
690 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
691 public bool IsDiaChiNull() {
692 return this.IsNull(this.tabletblSINH_VIEN.DiaChiColumn);
693 }
694
695 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
696 public void SetDiaChiNull() {
697 this[this.tabletblSINH_VIEN.DiaChiColumn] = global::System.Convert.DBNull;
698 }
699
700 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
701 public bool IsMaLopNull() {
702 return this.IsNull(this.tabletblSINH_VIEN.MaLopColumn);
703 }
704
705 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
706 public void SetMaLopNull() {
707 this[this.tabletblSINH_VIEN.MaLopColumn] = global::System.Convert.DBNull;
708 }
709 }
710
711 /// <summary>
712 ///Row event argument class
713 ///</summary>
714 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
715 public class tblSINH_VIENRowChangeEvent : global::System.EventArgs {
716
717 private tblSINH_VIENRow eventRow;
718
719 private global::System.Data.DataRowAction eventAction;
720
721 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
722 public tblSINH_VIENRowChangeEvent(tblSINH_VIENRow row, global::System.Data.DataRowAction action) {
723 this.eventRow = row;
724 this.eventAction = action;
725 }
726
727 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
728 public tblSINH_VIENRow Row {
729 get {
730 return this.eventRow;
731 }
732 }
733
734 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
735 public global::System.Data.DataRowAction Action {
736 get {
737 return this.eventAction;
738 }
739 }
740 }
741 }
742 }
743 namespace Quản_lý_điểm_sinh_vien_CNTT.QuanLyDiemDataSet3TableAdapters {
744
745
746 /// <summary>
747 ///Represents the connection and commands used to retrieve and save data.
748 ///</summary>
749 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
750 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
751 [global::System.ComponentModel.ToolboxItem(true)]
752 [global::System.ComponentModel.DataObjectAttribute(true)]
753 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
754 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
755 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
756 public partial class tblSINH_VIENTableAdapter : global::System.ComponentModel.Component {
757
758 private global::System.Data.SqlClient.SqlDataAdapter _adapter;
759
760 private global::System.Data.SqlClient.SqlConnection _connection;
761
762 private global::System.Data.SqlClient.SqlTransaction _transaction;
763
764 private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
765
766 private bool _clearBeforeFill;
767
768 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
769 public tblSINH_VIENTableAdapter() {
770 this.ClearBeforeFill = true;
771 }
772
773 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
774 protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
775 get {
776 if ((this._adapter == null)) {
777 this.InitAdapter();
778 }
779 return this._adapter;
780 }
781 }
782
783 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
784 internal global::System.Data.SqlClient.SqlConnection Connection {
785 get {
786 if ((this._connection == null)) {
787 this.InitConnection();
788 }
789 return this._connection;
790 }
791 set {
792 this._connection = value;
793 if ((this.Adapter.InsertCommand != null)) {
794 this.Adapter.InsertCommand.Connection = value;
795 }
796 if ((this.Adapter.DeleteCommand != null)) {
797 this.Adapter.DeleteCommand.Connection = value;
798 }
799 if ((this.Adapter.UpdateCommand != null)) {
800 this.Adapter.UpdateCommand.Connection = value;
801 }
802 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
803 if ((this.CommandCollection[i] != null)) {
804 ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
805 }
806 }
807 }
808 }
809
810 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
811 internal global::System.Data.SqlClient.SqlTransaction Transaction {
812 get {
813 return this._transaction;
814 }
815 set {
816 this._transaction = value;
817 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
818 this.CommandCollection[i].Transaction = this._transaction;
819 }
820 if (((this.Adapter != null)
821 && (this.Adapter.DeleteCommand != null))) {
822 this.Adapter.DeleteCommand.Transaction = this._transaction;
823 }
824 if (((this.Adapter != null)
825 && (this.Adapter.InsertCommand != null))) {
826 this.Adapter.InsertCommand.Transaction = this._transaction;
827 }
828 if (((this.Adapter != null)
829 && (this.Adapter.UpdateCommand != null))) {
830 this.Adapter.UpdateCommand.Transaction = this._transaction;
831 }
832 }
833 }
834
835 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
836 protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
837 get {
838 if ((this._commandCollection == null)) {
839 this.InitCommandCollection();
840 }
841 return this._commandCollection;
842 }
843 }
844
845 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
846 public bool ClearBeforeFill {
847 get {
848 return this._clearBeforeFill;
849 }
850 set {
851 this._clearBeforeFill = value;
852 }
853 }
854
855 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
856 private void InitAdapter() {
857 this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
858 global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
859 tableMapping.SourceTable = "Table";
860 tableMapping.DataSetTable = "tblSINH_VIEN";
861 tableMapping.ColumnMappings.Add("MaSv", "MaSv");
862 tableMapping.ColumnMappings.Add("HoTen", "HoTen");
863 tableMapping.ColumnMappings.Add("NgaySinh", "NgaySinh");
864 tableMapping.ColumnMappings.Add("GioiTinh", "GioiTinh");
865 tableMapping.ColumnMappings.Add("DiaChi", "DiaChi");
866 tableMapping.ColumnMappings.Add("MaLop", "MaLop");
867 this._adapter.TableMappings.Add(tableMapping);
868 this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
869 this._adapter.DeleteCommand.Connection = this.Connection;
870 this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[tblSINH_VIEN] WHERE (([MaSv] = @Original_MaSv) AND ((@IsNull_HoTen = 1 AND [HoTen] IS NULL) OR ([HoTen] = @Original_HoTen)) AND ((@IsNull_NgaySinh = 1 AND [NgaySinh] IS NULL) OR ([NgaySinh] = @Original_NgaySinh)) AND ((@IsNull_GioiTinh = 1 AND [GioiTinh] IS NULL) OR ([GioiTinh] = @Original_GioiTinh)) AND ((@IsNull_DiaChi = 1 AND [DiaChi] IS NULL) OR ([DiaChi] = @Original_DiaChi)) AND ((@IsNull_MaLop = 1 AND [MaLop] IS NULL) OR ([MaLop] = @Original_MaLop)))";
871 this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
872 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSv", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
873 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HoTen", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
874 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HoTen", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
875 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_NgaySinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
876 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NgaySinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
877 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_GioiTinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
878 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_GioiTinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
879 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiaChi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
880 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiaChi", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
881 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_MaLop", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
882 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaLop", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
883 this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
884 this._adapter.InsertCommand.Connection = this.Connection;
885 this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tblSINH_VIEN] ([MaSv], [HoTen], [NgaySinh], [GioiTinh], [DiaCh" +
886 "i], [MaLop]) VALUES (@MaSv, @HoTen, @NgaySinh, @GioiTinh, @DiaChi, @MaLop);\r\nSEL" +
887 "ECT MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop FROM tblSINH_VIEN WHERE (MaSv" +
888 " = @MaSv)";
889 this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
890 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSv", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
891 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HoTen", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
892 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NgaySinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
893 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GioiTinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
894 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiaChi", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
895 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaLop", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
896 this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
897 this._adapter.UpdateCommand.Connection = this.Connection;
898 this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[tblSINH_VIEN] SET [MaSv] = @MaSv, [HoTen] = @HoTen, [NgaySinh] = @NgaySinh, [GioiTinh] = @GioiTinh, [DiaChi] = @DiaChi, [MaLop] = @MaLop WHERE (([MaSv] = @Original_MaSv) AND ((@IsNull_HoTen = 1 AND [HoTen] IS NULL) OR ([HoTen] = @Original_HoTen)) AND ((@IsNull_NgaySinh = 1 AND [NgaySinh] IS NULL) OR ([NgaySinh] = @Original_NgaySinh)) AND ((@IsNull_GioiTinh = 1 AND [GioiTinh] IS NULL) OR ([GioiTinh] = @Original_GioiTinh)) AND ((@IsNull_DiaChi = 1 AND [DiaChi] IS NULL) OR ([DiaChi] = @Original_DiaChi)) AND ((@IsNull_MaLop = 1 AND [MaLop] IS NULL) OR ([MaLop] = @Original_MaLop)));
899 SELECT MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop FROM tblSINH_VIEN WHERE (MaSv = @MaSv)";
900 this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
901 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSv", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
902 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HoTen", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
903 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NgaySinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
904 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GioiTinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
905 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiaChi", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
906 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaLop", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
907 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSv", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
908 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HoTen", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
909 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HoTen", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
910 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_NgaySinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
911 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NgaySinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
912 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_GioiTinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
913 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_GioiTinh", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
914 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiaChi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
915 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiaChi", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
916 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_MaLop", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
917 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaLop", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
918 }
919
920 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
921 private void InitConnection() {
922 this._connection = new global::System.Data.SqlClient.SqlConnection();
923 this._connection.ConnectionString = global::Quản_lý_điểm_sinh_vien_CNTT.Properties.Settings.Default.QuanLyDiemConnectionString1;
924 }
925
926 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
927 private void InitCommandCollection() {
928 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
929 this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
930 this._commandCollection[0].Connection = this.Connection;
931 this._commandCollection[0].CommandText = "SELECT MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop FROM dbo.tblSINH_VIEN";
932 this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
933 }
934
935 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
936 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
937 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
938 public virtual int Fill(QuanLyDiemDataSet3.tblSINH_VIENDataTable dataTable) {
939 this.Adapter.SelectCommand = this.CommandCollection[0];
940 if ((this.ClearBeforeFill == true)) {
941 dataTable.Clear();
942 }
943 int returnValue = this.Adapter.Fill(dataTable);
944 return returnValue;
945 }
946
947 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
948 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
949 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
950 public virtual QuanLyDiemDataSet3.tblSINH_VIENDataTable GetData() {
951 this.Adapter.SelectCommand = this.CommandCollection[0];
952 QuanLyDiemDataSet3.tblSINH_VIENDataTable dataTable = new QuanLyDiemDataSet3.tblSINH_VIENDataTable();
953 this.Adapter.Fill(dataTable);
954 return dataTable;
955 }
956
957 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
958 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
959 public virtual int Update(QuanLyDiemDataSet3.tblSINH_VIENDataTable dataTable) {
960 return this.Adapter.Update(dataTable);
961 }
962
963 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
964 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
965 public virtual int Update(QuanLyDiemDataSet3 dataSet) {
966 return this.Adapter.Update(dataSet, "tblSINH_VIEN");
967 }
968
969 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
970 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
971 public virtual int Update(global::System.Data.DataRow dataRow) {
972 return this.Adapter.Update(new global::System.Data.DataRow[] {
973 dataRow});
974 }
975
976 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
977 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
978 public virtual int Update(global::System.Data.DataRow[] dataRows) {
979 return this.Adapter.Update(dataRows);
980 }
981
982 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
983 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
984 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
985 public virtual int Delete(string Original_MaSv, string Original_HoTen, string Original_NgaySinh, string Original_GioiTinh, string Original_DiaChi, string Original_MaLop) {
986 if ((Original_MaSv == null)) {
987 throw new global::System.ArgumentNullException("Original_MaSv");
988 }
989 else {
990 this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_MaSv));
991 }
992 if ((Original_HoTen == null)) {
993 this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
994 this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
995 }
996 else {
997 this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
998 this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_HoTen));
999 }
1000 if ((Original_NgaySinh == null)) {
1001 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
1002 this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
1003 }
1004 else {
1005 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
1006 this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_NgaySinh));
1007 }
1008 if ((Original_GioiTinh == null)) {
1009 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
1010 this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
1011 }
1012 else {
1013 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
1014 this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_GioiTinh));
1015 }
1016 if ((Original_DiaChi == null)) {
1017 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
1018 this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
1019 }
1020 else {
1021 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
1022 this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_DiaChi));
1023 }
1024 if ((Original_MaLop == null)) {
1025 this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1));
1026 this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value;
1027 }
1028 else {
1029 this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0));
1030 this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_MaLop));
1031 }
1032 global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
1033 if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
1034 != global::System.Data.ConnectionState.Open)) {
1035 this.Adapter.DeleteCommand.Connection.Open();
1036 }
1037 try {
1038 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
1039 return returnValue;
1040 }
1041 finally {
1042 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1043 this.Adapter.DeleteCommand.Connection.Close();
1044 }
1045 }
1046 }
1047
1048 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1049 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1050 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1051 public virtual int Insert(string MaSv, string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop) {
1052 if ((MaSv == null)) {
1053 throw new global::System.ArgumentNullException("MaSv");
1054 }
1055 else {
1056 this.Adapter.InsertCommand.Parameters[0].Value = ((string)(MaSv));
1057 }
1058 if ((HoTen == null)) {
1059 this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
1060 }
1061 else {
1062 this.Adapter.InsertCommand.Parameters[1].Value = ((string)(HoTen));
1063 }
1064 if ((NgaySinh == null)) {
1065 this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1066 }
1067 else {
1068 this.Adapter.InsertCommand.Parameters[2].Value = ((string)(NgaySinh));
1069 }
1070 if ((GioiTinh == null)) {
1071 this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1072 }
1073 else {
1074 this.Adapter.InsertCommand.Parameters[3].Value = ((string)(GioiTinh));
1075 }
1076 if ((DiaChi == null)) {
1077 this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
1078 }
1079 else {
1080 this.Adapter.InsertCommand.Parameters[4].Value = ((string)(DiaChi));
1081 }
1082 if ((MaLop == null)) {
1083 this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
1084 }
1085 else {
1086 this.Adapter.InsertCommand.Parameters[5].Value = ((string)(MaLop));
1087 }
1088 global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1089 if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1090 != global::System.Data.ConnectionState.Open)) {
1091 this.Adapter.InsertCommand.Connection.Open();
1092 }
1093 try {
1094 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1095 return returnValue;
1096 }
1097 finally {
1098 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1099 this.Adapter.InsertCommand.Connection.Close();
1100 }
1101 }
1102 }
1103
1104 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1105 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1106 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1107 public virtual int Update(string MaSv, string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop, string Original_MaSv, string Original_HoTen, string Original_NgaySinh, string Original_GioiTinh, string Original_DiaChi, string Original_MaLop) {
1108 if ((MaSv == null)) {
1109 throw new global::System.ArgumentNullException("MaSv");
1110 }
1111 else {
1112 this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(MaSv));
1113 }
1114 if ((HoTen == null)) {
1115 this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
1116 }
1117 else {
1118 this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(HoTen));
1119 }
1120 if ((NgaySinh == null)) {
1121 this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1122 }
1123 else {
1124 this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(NgaySinh));
1125 }
1126 if ((GioiTinh == null)) {
1127 this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
1128 }
1129 else {
1130 this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(GioiTinh));
1131 }
1132 if ((DiaChi == null)) {
1133 this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
1134 }
1135 else {
1136 this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(DiaChi));
1137 }
1138 if ((MaLop == null)) {
1139 this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
1140 }
1141 else {
1142 this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(MaLop));
1143 }
1144 if ((Original_MaSv == null)) {
1145 throw new global::System.ArgumentNullException("Original_MaSv");
1146 }
1147 else {
1148 this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_MaSv));
1149 }
1150 if ((Original_HoTen == null)) {
1151 this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1));
1152 this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value;
1153 }
1154 else {
1155 this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0));
1156 this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_HoTen));
1157 }
1158 if ((Original_NgaySinh == null)) {
1159 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1));
1160 this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value;
1161 }
1162 else {
1163 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0));
1164 this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_NgaySinh));
1165 }
1166 if ((Original_GioiTinh == null)) {
1167 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
1168 this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
1169 }
1170 else {
1171 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
1172 this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_GioiTinh));
1173 }
1174 if ((Original_DiaChi == null)) {
1175 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
1176 this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
1177 }
1178 else {
1179 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
1180 this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_DiaChi));
1181 }
1182 if ((Original_MaLop == null)) {
1183 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
1184 this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value;
1185 }
1186 else {
1187 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
1188 this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_MaLop));
1189 }
1190 global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
1191 if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
1192 != global::System.Data.ConnectionState.Open)) {
1193 this.Adapter.UpdateCommand.Connection.Open();
1194 }
1195 try {
1196 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
1197 return returnValue;
1198 }
1199 finally {
1200 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1201 this.Adapter.UpdateCommand.Connection.Close();
1202 }
1203 }
1204 }
1205
1206 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1207 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1208 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1209 public virtual int Update(string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop, string Original_MaSv, string Original_HoTen, string Original_NgaySinh, string Original_GioiTinh, string Original_DiaChi, string Original_MaLop) {
1210 return this.Update(Original_MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop, Original_MaSv, Original_HoTen, Original_NgaySinh, Original_GioiTinh, Original_DiaChi, Original_MaLop);
1211 }
1212 }
1213
1214 /// <summary>
1215 ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
1216 ///</summary>
1217 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1218 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
1219 [global::System.ComponentModel.ToolboxItem(true)]
1220 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
1221 "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1222 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
1223 public partial class TableAdapterManager : global::System.ComponentModel.Component {
1224
1225 private UpdateOrderOption _updateOrder;
1226
1227 private tblSINH_VIENTableAdapter _tblSINH_VIENTableAdapter;
1228
1229 private bool _backupDataSetBeforeUpdate;
1230
1231 private global::System.Data.IDbConnection _connection;
1232
1233 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1234 public UpdateOrderOption UpdateOrder {
1235 get {
1236 return this._updateOrder;
1237 }
1238 set {
1239 this._updateOrder = value;
1240 }
1241 }
1242
1243 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1244 [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
1245 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
1246 "", "System.Drawing.Design.UITypeEditor")]
1247 public tblSINH_VIENTableAdapter tblSINH_VIENTableAdapter {
1248 get {
1249 return this._tblSINH_VIENTableAdapter;
1250 }
1251 set {
1252 if (((this._tblSINH_VIENTableAdapter != null)
1253 && (this.TableAdapterInstanceCount == 1))) {
1254 this._tblSINH_VIENTableAdapter = value;
1255 return;
1256 }
1257 if (((value != null)
1258 && (this.MatchTableAdapterConnection(value.Connection) == false))) {
1259 throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
1260 "tring.");
1261 }
1262 this._tblSINH_VIENTableAdapter = value;
1263 }
1264 }
1265
1266 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1267 public bool BackupDataSetBeforeUpdate {
1268 get {
1269 return this._backupDataSetBeforeUpdate;
1270 }
1271 set {
1272 this._backupDataSetBeforeUpdate = value;
1273 }
1274 }
1275
1276 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1277 [global::System.ComponentModel.Browsable(false)]
1278 public global::System.Data.IDbConnection Connection {
1279 get {
1280 if ((this._connection != null)) {
1281 return this._connection;
1282 }
1283 if (((this._tblSINH_VIENTableAdapter != null)
1284 && (this._tblSINH_VIENTableAdapter.Connection != null))) {
1285 return this._tblSINH_VIENTableAdapter.Connection;
1286 }
1287 return null;
1288 }
1289 set {
1290 this._connection = value;
1291 }
1292 }
1293
1294 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1295 [global::System.ComponentModel.Browsable(false)]
1296 public int TableAdapterInstanceCount {
1297 get {
1298 int count = 0;
1299 if ((this._tblSINH_VIENTableAdapter != null)) {
1300 count = (count + 1);
1301 }
1302 return count;
1303 }
1304 }
1305
1306 /// <summary>
1307 ///Update rows in top-down order.
1308 ///</summary>
1309 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1310 private int UpdateUpdatedRows(QuanLyDiemDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1311 int result = 0;
1312 if ((this._tblSINH_VIENTableAdapter != null)) {
1313 global::System.Data.DataRow[] updatedRows = dataSet.tblSINH_VIEN.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
1314 updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
1315 if (((updatedRows != null)
1316 && (0 < updatedRows.Length))) {
1317 result = (result + this._tblSINH_VIENTableAdapter.Update(updatedRows));
1318 allChangedRows.AddRange(updatedRows);
1319 }
1320 }
1321 return result;
1322 }
1323
1324 /// <summary>
1325 ///Insert rows in top-down order.
1326 ///</summary>
1327 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1328 private int UpdateInsertedRows(QuanLyDiemDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1329 int result = 0;
1330 if ((this._tblSINH_VIENTableAdapter != null)) {
1331 global::System.Data.DataRow[] addedRows = dataSet.tblSINH_VIEN.Select(null, null, global::System.Data.DataViewRowState.Added);
1332 if (((addedRows != null)
1333 && (0 < addedRows.Length))) {
1334 result = (result + this._tblSINH_VIENTableAdapter.Update(addedRows));
1335 allAddedRows.AddRange(addedRows);
1336 }
1337 }
1338 return result;
1339 }
1340
1341 /// <summary>
1342 ///Delete rows in bottom-up order.
1343 ///</summary>
1344 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1345 private int UpdateDeletedRows(QuanLyDiemDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
1346 int result = 0;
1347 if ((this._tblSINH_VIENTableAdapter != null)) {
1348 global::System.Data.DataRow[] deletedRows = dataSet.tblSINH_VIEN.Select(null, null, global::System.Data.DataViewRowState.Deleted);
1349 if (((deletedRows != null)
1350 && (0 < deletedRows.Length))) {
1351 result = (result + this._tblSINH_VIENTableAdapter.Update(deletedRows));
1352 allChangedRows.AddRange(deletedRows);
1353 }
1354 }
1355 return result;
1356 }
1357
1358 /// <summary>
1359 ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1360 ///</summary>
1361 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1362 private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1363 if (((updatedRows == null)
1364 || (updatedRows.Length < 1))) {
1365 return updatedRows;
1366 }
1367 if (((allAddedRows == null)
1368 || (allAddedRows.Count < 1))) {
1369 return updatedRows;
1370 }
1371 global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1372 for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
1373 global::System.Data.DataRow row = updatedRows[i];
1374 if ((allAddedRows.Contains(row) == false)) {
1375 realUpdatedRows.Add(row);
1376 }
1377 }
1378 return realUpdatedRows.ToArray();
1379 }
1380
1381 /// <summary>
1382 ///Update all changes to the dataset.
1383 ///</summary>
1384 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1385 public virtual int UpdateAll(QuanLyDiemDataSet3 dataSet) {
1386 if ((dataSet == null)) {
1387 throw new global::System.ArgumentNullException("dataSet");
1388 }
1389 if ((dataSet.HasChanges() == false)) {
1390 return 0;
1391 }
1392 global::System.Data.IDbConnection workConnection = this.Connection;
1393 if ((workConnection == null)) {
1394 throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
1395 "ger TableAdapter property to a valid TableAdapter instance.");
1396 }
1397 bool workConnOpened = false;
1398 if (((workConnection.State & global::System.Data.ConnectionState.Closed)
1399 == global::System.Data.ConnectionState.Closed)) {
1400 workConnection.Open();
1401 workConnOpened = true;
1402 }
1403 global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
1404 if ((workTransaction == null)) {
1405 throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
1406 "ctions or the current state is not allowing the transaction to begin.");
1407 }
1408 global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1409 global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1410 global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
1411 global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
1412 int result = 0;
1413 global::System.Data.DataSet backupDataSet = null;
1414 if (this.BackupDataSetBeforeUpdate) {
1415 backupDataSet = new global::System.Data.DataSet();
1416 backupDataSet.Merge(dataSet);
1417 }
1418 try {
1419 // ---- Prepare for update -----------
1420 //
1421 if ((this._tblSINH_VIENTableAdapter != null)) {
1422 revertConnections.Add(this._tblSINH_VIENTableAdapter, this._tblSINH_VIENTableAdapter.Connection);
1423 this._tblSINH_VIENTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
1424 this._tblSINH_VIENTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
1425 if (this._tblSINH_VIENTableAdapter.Adapter.AcceptChangesDuringUpdate) {
1426 this._tblSINH_VIENTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
1427 adaptersWithAcceptChangesDuringUpdate.Add(this._tblSINH_VIENTableAdapter.Adapter);
1428 }
1429 }
1430 //
1431 //---- Perform updates -----------
1432 //
1433 if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
1434 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1435 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1436 }
1437 else {
1438 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1439 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1440 }
1441 result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
1442 //
1443 //---- Commit updates -----------
1444 //
1445 workTransaction.Commit();
1446 if ((0 < allAddedRows.Count)) {
1447 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1448 allAddedRows.CopyTo(rows);
1449 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1450 global::System.Data.DataRow row = rows[i];
1451 row.AcceptChanges();
1452 }
1453 }
1454 if ((0 < allChangedRows.Count)) {
1455 global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
1456 allChangedRows.CopyTo(rows);
1457 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1458 global::System.Data.DataRow row = rows[i];
1459 row.AcceptChanges();
1460 }
1461 }
1462 }
1463 catch (global::System.Exception ex) {
1464 workTransaction.Rollback();
1465 // ---- Restore the dataset -----------
1466 if (this.BackupDataSetBeforeUpdate) {
1467 global::System.Diagnostics.Debug.Assert((backupDataSet != null));
1468 dataSet.Clear();
1469 dataSet.Merge(backupDataSet);
1470 }
1471 else {
1472 if ((0 < allAddedRows.Count)) {
1473 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1474 allAddedRows.CopyTo(rows);
1475 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1476 global::System.Data.DataRow row = rows[i];
1477 row.AcceptChanges();
1478 row.SetAdded();
1479 }
1480 }
1481 }
1482 throw ex;
1483 }
1484 finally {
1485 if (workConnOpened) {
1486 workConnection.Close();
1487 }
1488 if ((this._tblSINH_VIENTableAdapter != null)) {
1489 this._tblSINH_VIENTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tblSINH_VIENTableAdapter]));
1490 this._tblSINH_VIENTableAdapter.Transaction = null;
1491 }
1492 if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
1493 global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
1494 adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
1495 for (int i = 0; (i < adapters.Length); i = (i + 1)) {
1496 global::System.Data.Common.DataAdapter adapter = adapters[i];
1497 adapter.AcceptChangesDuringUpdate = true;
1498 }
1499 }
1500 }
1501 return result;
1502 }
1503
1504 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1505 protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
1506 global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
1507 }
1508
1509 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1510 protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
1511 if ((this._connection != null)) {
1512 return true;
1513 }
1514 if (((this.Connection == null)
1515 || (inputConnection == null))) {
1516 return true;
1517 }
1518 if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
1519 return true;
1520 }
1521 return false;
1522 }
1523
1524 /// <summary>
1525 ///Update Order Option
1526 ///</summary>
1527 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1528 public enum UpdateOrderOption {
1529
1530 InsertUpdateDelete = 0,
1531
1532 UpdateInsertDelete = 1,
1533 }
1534
1535 /// <summary>
1536 ///Used to sort self-referenced table's rows
1537 ///</summary>
1538 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1539 private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
1540
1541 private global::System.Data.DataRelation _relation;
1542
1543 private int _childFirst;
1544
1545 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1546 internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
1547 this._relation = relation;
1548 if (childFirst) {
1549 this._childFirst = -1;
1550 }
1551 else {
1552 this._childFirst = 1;
1553 }
1554 }
1555
1556 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1557 private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) {
1558 global::System.Diagnostics.Debug.Assert((child != null));
1559 global::System.Diagnostics.Debug.Assert((parent != null));
1560 global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1561 for (
1562 ; ((newParent != null)
1563 && ((object.ReferenceEquals(newParent, child) == false)
1564 && (object.ReferenceEquals(newParent, parent) == false)));
1565 ) {
1566 newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1567 }
1568 if ((newParent == null)) {
1569 for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null)
1570 && ((object.ReferenceEquals(newParent, child) == false)
1571 && (object.ReferenceEquals(newParent, parent) == false)));
1572 ) {
1573 newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
1574 }
1575 }
1576 if (object.ReferenceEquals(newParent, parent)) {
1577 return true;
1578 }
1579 return false;
1580 }
1581
1582 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1583 public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
1584 if (object.ReferenceEquals(row1, row2)) {
1585 return 0;
1586 }
1587 if ((row1 == null)) {
1588 return -1;
1589 }
1590 if ((row2 == null)) {
1591 return 1;
1592 }
1593
1594 // Is row1 the child or grandchild of row2
1595 if (this.IsChildAndParent(row1, row2)) {
1596 return this._childFirst;
1597 }
1598
1599 // Is row2 the child or grandchild of row1
1600 if (this.IsChildAndParent(row2, row1)) {
1601 return (-1 * this._childFirst);
1602 }
1603 return 0;
1604 }
1605 }
1606 }
1607 }
1608
1609 #pragma warning restore 1591