1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated
by a tool.
4 // Runtime Version:
2.0.50727.4952
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("DataSettongket")]
25     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
26     
public partial class DataSettongket : global::System.Data.DataSet {
27         
28         
private tblKET_QUADataTable tabletblKET_QUA;
29         
30         
private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
31         
32         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
33         
public DataSettongket() {
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 DataSettongket(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["tblKET_QUA"] != null)) {
57                     
base.Tables.Add(new tblKET_QUADataTable(ds.Tables["tblKET_QUA"]));
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 tblKET_QUADataTable tblKET_QUA {
81             
get {
82                 
return this.tabletblKET_QUA;
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             DataSettongket cln = ((DataSettongket)(
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["tblKET_QUA"] != null)) {
146                     
base.Tables.Add(new tblKET_QUADataTable(ds.Tables["tblKET_QUA"]));
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.tabletblKET_QUA = ((tblKET_QUADataTable)(base.Tables["tblKET_QUA"]));
179             
if ((initTable == true)) {
180                 
if ((this.tabletblKET_QUA != null)) {
181                     
this.tabletblKET_QUA.InitVars();
182                 }
183             }
184         }
185         
186         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
187         
private void InitClass() {
188             
this.DataSetName = "DataSettongket";
189             
this.Prefix = "";
190             
this.Namespace = "http://tempuri.org/DataSettongket.xsd";
191             
this.EnforceConstraints = true;
192             
this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
193             
this.tabletblKET_QUA = new tblKET_QUADataTable();
194             
base.Tables.Add(this.tabletblKET_QUA);
195         }
196         
197         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
198         
private bool ShouldSerializetblKET_QUA() {
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             DataSettongket ds =
new DataSettongket();
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 tblKET_QUARowChangeEventHandler(object sender, tblKET_QUARowChangeEvent 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 tblKET_QUADataTable : global::System.Data.TypedTableBase<tblKET_QUARow> {
264             
265             
private global::System.Data.DataColumn columnMaSV;
266             
267             
private global::System.Data.DataColumn columnHoTen;
268             
269             
private global::System.Data.DataColumn columnMaLop;
270             
271             
private global::System.Data.DataColumn columnMaMon;
272             
273             
private global::System.Data.DataColumn columnDiemTB;
274             
275             
private global::System.Data.DataColumn columnDiemThiLan1;
276             
277             
private global::System.Data.DataColumn columnDiemThiLan2;
278             
279             
private global::System.Data.DataColumn columnDiemTongKet;
280             
281             
private global::System.Data.DataColumn columnHanhKiem;
282             
283             
private global::System.Data.DataColumn columnHocKi;
284             
285             
private global::System.Data.DataColumn columnGhiChu;
286             
287             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
288             
public tblKET_QUADataTable() {
289                 
this.TableName = "tblKET_QUA";
290                 
this.BeginInit();
291                 
this.InitClass();
292                 
this.EndInit();
293             }
294             
295             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
296             
internal tblKET_QUADataTable(global::System.Data.DataTable table) {
297                 
this.TableName = table.TableName;
298                 
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
299                     
this.CaseSensitive = table.CaseSensitive;
300                 }
301                 
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
302                     
this.Locale = table.Locale;
303                 }
304                 
if ((table.Namespace != table.DataSet.Namespace)) {
305                     
this.Namespace = table.Namespace;
306                 }
307                 
this.Prefix = table.Prefix;
308                 
this.MinimumCapacity = table.MinimumCapacity;
309             }
310             
311             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
312             
protected tblKET_QUADataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
313                     
base(info, context) {
314                 
this.InitVars();
315             }
316             
317             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
318             
public global::System.Data.DataColumn MaSVColumn {
319                 
get {
320                     
return this.columnMaSV;
321                 }
322             }
323             
324             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
325             
public global::System.Data.DataColumn HoTenColumn {
326                 
get {
327                     
return this.columnHoTen;
328                 }
329             }
330             
331             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
332             
public global::System.Data.DataColumn MaLopColumn {
333                 
get {
334                     
return this.columnMaLop;
335                 }
336             }
337             
338             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
339             
public global::System.Data.DataColumn MaMonColumn {
340                 
get {
341                     
return this.columnMaMon;
342                 }
343             }
344             
345             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
346             
public global::System.Data.DataColumn DiemTBColumn {
347                 
get {
348                     
return this.columnDiemTB;
349                 }
350             }
351             
352             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
353             
public global::System.Data.DataColumn DiemThiLan1Column {
354                 
get {
355                     
return this.columnDiemThiLan1;
356                 }
357             }
358             
359             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
360             
public global::System.Data.DataColumn DiemThiLan2Column {
361                 
get {
362                     
return this.columnDiemThiLan2;
363                 }
364             }
365             
366             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
367             
public global::System.Data.DataColumn DiemTongKetColumn {
368                 
get {
369                     
return this.columnDiemTongKet;
370                 }
371             }
372             
373             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
374             
public global::System.Data.DataColumn HanhKiemColumn {
375                 
get {
376                     
return this.columnHanhKiem;
377                 }
378             }
379             
380             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
381             
public global::System.Data.DataColumn HocKiColumn {
382                 
get {
383                     
return this.columnHocKi;
384                 }
385             }
386             
387             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
388             
public global::System.Data.DataColumn GhiChuColumn {
389                 
get {
390                     
return this.columnGhiChu;
391                 }
392             }
393             
394             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
395             
[global::System.ComponentModel.Browsable(false)]
396             
public int Count {
397                 
get {
398                     
return this.Rows.Count;
399                 }
400             }
401             
402             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
403             
public tblKET_QUARow this[int index] {
404                 
get {
405                     
return ((tblKET_QUARow)(this.Rows[index]));
406                 }
407             }
408             
409             
public event tblKET_QUARowChangeEventHandler tblKET_QUARowChanging;
410             
411             
public event tblKET_QUARowChangeEventHandler tblKET_QUARowChanged;
412             
413             
public event tblKET_QUARowChangeEventHandler tblKET_QUARowDeleting;
414             
415             
public event tblKET_QUARowChangeEventHandler tblKET_QUARowDeleted;
416             
417             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
418             
public void AddtblKET_QUARow(tblKET_QUARow row) {
419                 
this.Rows.Add(row);
420             }
421             
422             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
423             
public tblKET_QUARow AddtblKET_QUARow(string MaSV, string HoTen, string MaLop, string MaMon, double DiemTB, double DiemThiLan1, double DiemThiLan2, double DiemTongKet, string HanhKiem, int HocKi, string GhiChu) {
424                 tblKET_QUARow rowtblKET_QUARow = ((tblKET_QUARow)(
this.NewRow()));
425                 
object[] columnValuesArray = new object[] {
426                         MaSV,
427                         HoTen,
428                         MaLop,
429                         MaMon,
430                         DiemTB,
431                         DiemThiLan1,
432                         DiemThiLan2,
433                         DiemTongKet,
434                         HanhKiem,
435                         HocKi,
436                         GhiChu};
437                 rowtblKET_QUARow.ItemArray = columnValuesArray;
438                 
this.Rows.Add(rowtblKET_QUARow);
439                 
return rowtblKET_QUARow;
440             }
441             
442             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
443             
public override global::System.Data.DataTable Clone() {
444                 tblKET_QUADataTable cln = ((tblKET_QUADataTable)(
base.Clone()));
445                 cln.InitVars();
446                 
return cln;
447             }
448             
449             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
450             
protected override global::System.Data.DataTable CreateInstance() {
451                 
return new tblKET_QUADataTable();
452             }
453             
454             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
455             
internal void InitVars() {
456                 
this.columnMaSV = base.Columns["MaSV"];
457                 
this.columnHoTen = base.Columns["HoTen"];
458                 
this.columnMaLop = base.Columns["MaLop"];
459                 
this.columnMaMon = base.Columns["MaMon"];
460                 
this.columnDiemTB = base.Columns["DiemTB"];
461                 
this.columnDiemThiLan1 = base.Columns["DiemThiLan1"];
462                 
this.columnDiemThiLan2 = base.Columns["DiemThiLan2"];
463                 
this.columnDiemTongKet = base.Columns["DiemTongKet"];
464                 
this.columnHanhKiem = base.Columns["HanhKiem"];
465                 
this.columnHocKi = base.Columns["HocKi"];
466                 
this.columnGhiChu = base.Columns["GhiChu"];
467             }
468             
469             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
470             
private void InitClass() {
471                 
this.columnMaSV = new global::System.Data.DataColumn("MaSV", typeof(string), null, global::System.Data.MappingType.Element);
472                 
base.Columns.Add(this.columnMaSV);
473                 
this.columnHoTen = new global::System.Data.DataColumn("HoTen", typeof(string), null, global::System.Data.MappingType.Element);
474                 
base.Columns.Add(this.columnHoTen);
475                 
this.columnMaLop = new global::System.Data.DataColumn("MaLop", typeof(string), null, global::System.Data.MappingType.Element);
476                 
base.Columns.Add(this.columnMaLop);
477                 
this.columnMaMon = new global::System.Data.DataColumn("MaMon", typeof(string), null, global::System.Data.MappingType.Element);
478                 
base.Columns.Add(this.columnMaMon);
479                 
this.columnDiemTB = new global::System.Data.DataColumn("DiemTB", typeof(double), null, global::System.Data.MappingType.Element);
480                 
base.Columns.Add(this.columnDiemTB);
481                 
this.columnDiemThiLan1 = new global::System.Data.DataColumn("DiemThiLan1", typeof(double), null, global::System.Data.MappingType.Element);
482                 
base.Columns.Add(this.columnDiemThiLan1);
483                 
this.columnDiemThiLan2 = new global::System.Data.DataColumn("DiemThiLan2", typeof(double), null, global::System.Data.MappingType.Element);
484                 
base.Columns.Add(this.columnDiemThiLan2);
485                 
this.columnDiemTongKet = new global::System.Data.DataColumn("DiemTongKet", typeof(double), null, global::System.Data.MappingType.Element);
486                 
base.Columns.Add(this.columnDiemTongKet);
487                 
this.columnHanhKiem = new global::System.Data.DataColumn("HanhKiem", typeof(string), null, global::System.Data.MappingType.Element);
488                 
base.Columns.Add(this.columnHanhKiem);
489                 
this.columnHocKi = new global::System.Data.DataColumn("HocKi", typeof(int), null, global::System.Data.MappingType.Element);
490                 
base.Columns.Add(this.columnHocKi);
491                 
this.columnGhiChu = new global::System.Data.DataColumn("GhiChu", typeof(string), null, global::System.Data.MappingType.Element);
492                 
base.Columns.Add(this.columnGhiChu);
493                 
this.columnMaSV.AllowDBNull = false;
494                 
this.columnMaSV.MaxLength = 10;
495                 
this.columnHoTen.MaxLength = 50;
496                 
this.columnMaLop.MaxLength = 10;
497                 
this.columnMaMon.MaxLength = 10;
498                 
this.columnHanhKiem.MaxLength = 20;
499                 
this.columnGhiChu.MaxLength = 50;
500             }
501             
502             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
503             
public tblKET_QUARow NewtblKET_QUARow() {
504                 
return ((tblKET_QUARow)(this.NewRow()));
505             }
506             
507             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
508             
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
509                 
return new tblKET_QUARow(builder);
510             }
511             
512             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
513             
protected override global::System.Type GetRowType() {
514                 
return typeof(tblKET_QUARow);
515             }
516             
517             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
518             
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
519                 
base.OnRowChanged(e);
520                 
if ((this.tblKET_QUARowChanged != null)) {
521                     
this.tblKET_QUARowChanged(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
522                 }
523             }
524             
525             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
526             
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
527                 
base.OnRowChanging(e);
528                 
if ((this.tblKET_QUARowChanging != null)) {
529                     
this.tblKET_QUARowChanging(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
530                 }
531             }
532             
533             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
534             
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
535                 
base.OnRowDeleted(e);
536                 
if ((this.tblKET_QUARowDeleted != null)) {
537                     
this.tblKET_QUARowDeleted(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
538                 }
539             }
540             
541             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
542             
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
543                 
base.OnRowDeleting(e);
544                 
if ((this.tblKET_QUARowDeleting != null)) {
545                     
this.tblKET_QUARowDeleting(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
546                 }
547             }
548             
549             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
550             
public void RemovetblKET_QUARow(tblKET_QUARow row) {
551                 
this.Rows.Remove(row);
552             }
553             
554             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
555             
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
556                 
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
557                 
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
558                 DataSettongket ds =
new DataSettongket();
559                 
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
560                 any1.Namespace =
"http://www.w3.org/2001/XMLSchema";
561                 any1.MinOccurs =
new decimal(0);
562                 any1.MaxOccurs =
decimal.MaxValue;
563                 any1.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
564                 sequence.Items.Add(any1);
565                 
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
566                 any2.Namespace =
"urn:schemas-microsoft-com:xml-diffgram-v1";
567                 any2.MinOccurs =
new decimal(1);
568                 any2.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
569                 sequence.Items.Add(any2);
570                 
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
571                 attribute1.Name =
"namespace";
572                 attribute1.FixedValue = ds.Namespace;
573                 type.Attributes.Add(attribute1);
574                 
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
575                 attribute2.Name =
"tableTypeName";
576                 attribute2.FixedValue =
"tblKET_QUADataTable";
577                 type.Attributes.Add(attribute2);
578                 type.Particle = sequence;
579                 
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
580                 
if (xs.Contains(dsSchema.TargetNamespace)) {
581                     
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
582                     
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
583                     
try {
584                         
global::System.Xml.Schema.XmlSchema schema = null;
585                         dsSchema.Write(s1);
586                         
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
587                             schema = ((
global::System.Xml.Schema.XmlSchema)(schemas.Current));
588                             s2.SetLength(
0);
589                             schema.Write(s2);
590                             
if ((s1.Length == s2.Length)) {
591                                 s1.Position =
0;
592                                 s2.Position =
0;
593                                 
for (; ((s1.Position != s1.Length)
594                                             && (s1.ReadByte() == s2.ReadByte())); ) {
595                                     ;
596                                 }
597                                 
if ((s1.Position == s1.Length)) {
598                                     
return type;
599                                 }
600                             }
601                         }
602                     }
603                     
finally {
604                         
if ((s1 != null)) {
605                             s1.Close();
606                         }
607                         
if ((s2 != null)) {
608                             s2.Close();
609                         }
610                     }
611                 }
612                 xs.Add(dsSchema);
613                 
return type;
614             }
615         }

616         
617         ///
<summary>
618         ///
Represents strongly named DataRow class.
619         ///</summary>

620         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
621         
public partial class tblKET_QUARow : global::System.Data.DataRow {
622             
623             
private tblKET_QUADataTable tabletblKET_QUA;
624             
625             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
626             
internal tblKET_QUARow(global::System.Data.DataRowBuilder rb) :
627                     
base(rb) {
628                 
this.tabletblKET_QUA = ((tblKET_QUADataTable)(this.Table));
629             }
630             
631             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
632             
public string MaSV {
633                 
get {
634                     
return ((string)(this[this.tabletblKET_QUA.MaSVColumn]));
635                 }
636                 
set {
637                     
this[this.tabletblKET_QUA.MaSVColumn] = value;
638                 }
639             }
640             
641             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
642             
public string HoTen {
643                 
get {
644                     
try {
645                         
return ((string)(this[this.tabletblKET_QUA.HoTenColumn]));
646                     }
647                     
catch (global::System.InvalidCastException e) {
648                         
throw new global::System.Data.StrongTypingException("The value for column \'HoTen\' in table \'tblKET_QUA\' is DBNull.", e);
649                     }
650                 }
651                 
set {
652                     
this[this.tabletblKET_QUA.HoTenColumn] = value;
653                 }
654             }
655             
656             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
657             
public string MaLop {
658                 
get {
659                     
try {
660                         
return ((string)(this[this.tabletblKET_QUA.MaLopColumn]));
661                     }
662                     
catch (global::System.InvalidCastException e) {
663                         
throw new global::System.Data.StrongTypingException("The value for column \'MaLop\' in table \'tblKET_QUA\' is DBNull.", e);
664                     }
665                 }
666                 
set {
667                     
this[this.tabletblKET_QUA.MaLopColumn] = value;
668                 }
669             }
670             
671             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
672             
public string MaMon {
673                 
get {
674                     
try {
675                         
return ((string)(this[this.tabletblKET_QUA.MaMonColumn]));
676                     }
677                     
catch (global::System.InvalidCastException e) {
678                         
throw new global::System.Data.StrongTypingException("The value for column \'MaMon\' in table \'tblKET_QUA\' is DBNull.", e);
679                     }
680                 }
681                 
set {
682                     
this[this.tabletblKET_QUA.MaMonColumn] = value;
683                 }
684             }
685             
686             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
687             
public double DiemTB {
688                 
get {
689                     
try {
690                         
return ((double)(this[this.tabletblKET_QUA.DiemTBColumn]));
691                     }
692                     
catch (global::System.InvalidCastException e) {
693                         
throw new global::System.Data.StrongTypingException("The value for column \'DiemTB\' in table \'tblKET_QUA\' is DBNull.", e);
694                     }
695                 }
696                 
set {
697                     
this[this.tabletblKET_QUA.DiemTBColumn] = value;
698                 }
699             }
700             
701             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
702             
public double DiemThiLan1 {
703                 
get {
704                     
try {
705                         
return ((double)(this[this.tabletblKET_QUA.DiemThiLan1Column]));
706                     }
707                     
catch (global::System.InvalidCastException e) {
708                         
throw new global::System.Data.StrongTypingException("The value for column \'DiemThiLan1\' in table \'tblKET_QUA\' is DBNull.", e);
709                     }
710                 }
711                 
set {
712                     
this[this.tabletblKET_QUA.DiemThiLan1Column] = value;
713                 }
714             }
715             
716             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
717             
public double DiemThiLan2 {
718                 
get {
719                     
try {
720                         
return ((double)(this[this.tabletblKET_QUA.DiemThiLan2Column]));
721                     }
722                     
catch (global::System.InvalidCastException e) {
723                         
throw new global::System.Data.StrongTypingException("The value for column \'DiemThiLan2\' in table \'tblKET_QUA\' is DBNull.", e);
724                     }
725                 }
726                 
set {
727                     
this[this.tabletblKET_QUA.DiemThiLan2Column] = value;
728                 }
729             }
730             
731             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
732             
public double DiemTongKet {
733                 
get {
734                     
try {
735                         
return ((double)(this[this.tabletblKET_QUA.DiemTongKetColumn]));
736                     }
737                     
catch (global::System.InvalidCastException e) {
738                         
throw new global::System.Data.StrongTypingException("The value for column \'DiemTongKet\' in table \'tblKET_QUA\' is DBNull.", e);
739                     }
740                 }
741                 
set {
742                     
this[this.tabletblKET_QUA.DiemTongKetColumn] = value;
743                 }
744             }
745             
746             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
747             
public string HanhKiem {
748                 
get {
749                     
try {
750                         
return ((string)(this[this.tabletblKET_QUA.HanhKiemColumn]));
751                     }
752                     
catch (global::System.InvalidCastException e) {
753                         
throw new global::System.Data.StrongTypingException("The value for column \'HanhKiem\' in table \'tblKET_QUA\' is DBNull.", e);
754                     }
755                 }
756                 
set {
757                     
this[this.tabletblKET_QUA.HanhKiemColumn] = value;
758                 }
759             }
760             
761             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
762             
public int HocKi {
763                 
get {
764                     
try {
765                         
return ((int)(this[this.tabletblKET_QUA.HocKiColumn]));
766                     }
767                     
catch (global::System.InvalidCastException e) {
768                         
throw new global::System.Data.StrongTypingException("The value for column \'HocKi\' in table \'tblKET_QUA\' is DBNull.", e);
769                     }
770                 }
771                 
set {
772                     
this[this.tabletblKET_QUA.HocKiColumn] = value;
773                 }
774             }
775             
776             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
777             
public string GhiChu {
778                 
get {
779                     
try {
780                         
return ((string)(this[this.tabletblKET_QUA.GhiChuColumn]));
781                     }
782                     
catch (global::System.InvalidCastException e) {
783                         
throw new global::System.Data.StrongTypingException("The value for column \'GhiChu\' in table \'tblKET_QUA\' is DBNull.", e);
784                     }
785                 }
786                 
set {
787                     
this[this.tabletblKET_QUA.GhiChuColumn] = value;
788                 }
789             }
790             
791             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
792             
public bool IsHoTenNull() {
793                 
return this.IsNull(this.tabletblKET_QUA.HoTenColumn);
794             }
795             
796             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
797             
public void SetHoTenNull() {
798                 
this[this.tabletblKET_QUA.HoTenColumn] = global::System.Convert.DBNull;
799             }
800             
801             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
802             
public bool IsMaLopNull() {
803                 
return this.IsNull(this.tabletblKET_QUA.MaLopColumn);
804             }
805             
806             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
807             
public void SetMaLopNull() {
808                 
this[this.tabletblKET_QUA.MaLopColumn] = global::System.Convert.DBNull;
809             }
810             
811             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
812             
public bool IsMaMonNull() {
813                 
return this.IsNull(this.tabletblKET_QUA.MaMonColumn);
814             }
815             
816             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
817             
public void SetMaMonNull() {
818                 
this[this.tabletblKET_QUA.MaMonColumn] = global::System.Convert.DBNull;
819             }
820             
821             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
822             
public bool IsDiemTBNull() {
823                 
return this.IsNull(this.tabletblKET_QUA.DiemTBColumn);
824             }
825             
826             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
827             
public void SetDiemTBNull() {
828                 
this[this.tabletblKET_QUA.DiemTBColumn] = global::System.Convert.DBNull;
829             }
830             
831             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
832             
public bool IsDiemThiLan1Null() {
833                 
return this.IsNull(this.tabletblKET_QUA.DiemThiLan1Column);
834             }
835             
836             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
837             
public void SetDiemThiLan1Null() {
838                 
this[this.tabletblKET_QUA.DiemThiLan1Column] = global::System.Convert.DBNull;
839             }
840             
841             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
842             
public bool IsDiemThiLan2Null() {
843                 
return this.IsNull(this.tabletblKET_QUA.DiemThiLan2Column);
844             }
845             
846             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
847             
public void SetDiemThiLan2Null() {
848                 
this[this.tabletblKET_QUA.DiemThiLan2Column] = global::System.Convert.DBNull;
849             }
850             
851             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
852             
public bool IsDiemTongKetNull() {
853                 
return this.IsNull(this.tabletblKET_QUA.DiemTongKetColumn);
854             }
855             
856             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
857             
public void SetDiemTongKetNull() {
858                 
this[this.tabletblKET_QUA.DiemTongKetColumn] = global::System.Convert.DBNull;
859             }
860             
861             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
862             
public bool IsHanhKiemNull() {
863                 
return this.IsNull(this.tabletblKET_QUA.HanhKiemColumn);
864             }
865             
866             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
867             
public void SetHanhKiemNull() {
868                 
this[this.tabletblKET_QUA.HanhKiemColumn] = global::System.Convert.DBNull;
869             }
870             
871             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
872             
public bool IsHocKiNull() {
873                 
return this.IsNull(this.tabletblKET_QUA.HocKiColumn);
874             }
875             
876             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
877             
public void SetHocKiNull() {
878                 
this[this.tabletblKET_QUA.HocKiColumn] = global::System.Convert.DBNull;
879             }
880             
881             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
882             
public bool IsGhiChuNull() {
883                 
return this.IsNull(this.tabletblKET_QUA.GhiChuColumn);
884             }
885             
886             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
887             
public void SetGhiChuNull() {
888                 
this[this.tabletblKET_QUA.GhiChuColumn] = global::System.Convert.DBNull;
889             }
890         }

891         
892         ///
<summary>
893         ///
Row event argument class
894         ///</summary>

895         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
896         
public class tblKET_QUARowChangeEvent : global::System.EventArgs {
897             
898             
private tblKET_QUARow eventRow;
899             
900             
private global::System.Data.DataRowAction eventAction;
901             
902             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
903             
public tblKET_QUARowChangeEvent(tblKET_QUARow row, global::System.Data.DataRowAction action) {
904                 
this.eventRow = row;
905                 
this.eventAction = action;
906             }
907             
908             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
909             
public tblKET_QUARow Row {
910                 
get {
911                     
return this.eventRow;
912                 }
913             }
914             
915             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
916             
public global::System.Data.DataRowAction Action {
917                 
get {
918                     
return this.eventAction;
919                 }
920             }
921         }
922     }
923 }

924 namespace
Quản_lý_điểm_sinh_vien_CNTT.DataSettongketTableAdapters {
925     
926     
927     ///
<summary>
928     ///
Represents the connection and commands used to retrieve and save data.
929     ///</summary>

930     
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
931     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
932     
[global::System.ComponentModel.ToolboxItem(true)]
933     
[global::System.ComponentModel.DataObjectAttribute(true)]
934     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
935         
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
936     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
937     
public partial class tblKET_QUATableAdapter : global::System.ComponentModel.Component {
938         
939         
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
940         
941         
private global::System.Data.SqlClient.SqlConnection _connection;
942         
943         
private global::System.Data.SqlClient.SqlTransaction _transaction;
944         
945         
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
946         
947         
private bool _clearBeforeFill;
948         
949         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
950         
public tblKET_QUATableAdapter() {
951             
this.ClearBeforeFill = true;
952         }
953         
954         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
955         
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
956             
get {
957                 
if ((this._adapter == null)) {
958                     
this.InitAdapter();
959                 }
960                 
return this._adapter;
961             }
962         }
963         
964         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
965         
internal global::System.Data.SqlClient.SqlConnection Connection {
966             
get {
967                 
if ((this._connection == null)) {
968                     
this.InitConnection();
969                 }
970                 
return this._connection;
971             }
972             
set {
973                 
this._connection = value;
974                 
if ((this.Adapter.InsertCommand != null)) {
975                     
this.Adapter.InsertCommand.Connection = value;
976                 }
977                 
if ((this.Adapter.DeleteCommand != null)) {
978                     
this.Adapter.DeleteCommand.Connection = value;
979                 }
980                 
if ((this.Adapter.UpdateCommand != null)) {
981                     
this.Adapter.UpdateCommand.Connection = value;
982                 }
983                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
984                     
if ((this.CommandCollection[i] != null)) {
985                         ((
global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
986                     }
987                 }
988             }
989         }
990         
991         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
992         
internal global::System.Data.SqlClient.SqlTransaction Transaction {
993             
get {
994                 
return this._transaction;
995             }
996             
set {
997                 
this._transaction = value;
998                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
999                     
this.CommandCollection[i].Transaction = this._transaction;
1000                 }
1001                 
if (((this.Adapter != null)
1002                             && (
this.Adapter.DeleteCommand != null))) {
1003                     
this.Adapter.DeleteCommand.Transaction = this._transaction;
1004                 }
1005                 
if (((this.Adapter != null)
1006                             && (
this.Adapter.InsertCommand != null))) {
1007                     
this.Adapter.InsertCommand.Transaction = this._transaction;
1008                 }
1009                 
if (((this.Adapter != null)
1010                             && (
this.Adapter.UpdateCommand != null))) {
1011                     
this.Adapter.UpdateCommand.Transaction = this._transaction;
1012                 }
1013             }
1014         }
1015         
1016         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1017         
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
1018             
get {
1019                 
if ((this._commandCollection == null)) {
1020                     
this.InitCommandCollection();
1021                 }
1022                 
return this._commandCollection;
1023             }
1024         }
1025         
1026         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1027         
public bool ClearBeforeFill {
1028             
get {
1029                 
return this._clearBeforeFill;
1030             }
1031             
set {
1032                 
this._clearBeforeFill = value;
1033             }
1034         }
1035         
1036         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1037         
private void InitAdapter() {
1038             
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
1039             
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
1040             tableMapping.SourceTable =
"Table";
1041             tableMapping.DataSetTable =
"tblKET_QUA";
1042             tableMapping.ColumnMappings.Add(
"MaSV", "MaSV");
1043             tableMapping.ColumnMappings.Add(
"HoTen", "HoTen");
1044             tableMapping.ColumnMappings.Add(
"MaLop", "MaLop");
1045             tableMapping.ColumnMappings.Add(
"MaMon", "MaMon");
1046             tableMapping.ColumnMappings.Add(
"DiemTB", "DiemTB");
1047             tableMapping.ColumnMappings.Add(
"DiemThiLan1", "DiemThiLan1");
1048             tableMapping.ColumnMappings.Add(
"DiemThiLan2", "DiemThiLan2");
1049             tableMapping.ColumnMappings.Add(
"DiemTongKet", "DiemTongKet");
1050             tableMapping.ColumnMappings.Add(
"HanhKiem", "HanhKiem");
1051             tableMapping.ColumnMappings.Add(
"HocKi", "HocKi");
1052             tableMapping.ColumnMappings.Add(
"GhiChu", "GhiChu");
1053             
this._adapter.TableMappings.Add(tableMapping);
1054             
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
1055             
this._adapter.InsertCommand.Connection = this.Connection;
1056             
this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[tblKET_QUA] ([MaSV], [HoTen], [MaLop], [MaMon], [DiemTB], [DiemThiLan1], [DiemThiLan2], [DiemTongKet], [HanhKiem], [HocKi], [GhiChu]) VALUES (@MaSV, @HoTen, @MaLop, @MaMon, @DiemTB, @DiemThiLan1, @DiemThiLan2, @DiemTongKet, @HanhKiem, @HocKi, @GhiChu)";
1057             
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
1058             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSV", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSV", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1059             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HoTen", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1060             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaLop", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1061             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaMon", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaMon", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1062             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiemTB", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTB", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1063             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiemThiLan1", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThiLan1", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1064             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiemThiLan2", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThiLan2", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1065             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiemTongKet", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTongKet", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1066             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HanhKiem", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HanhKiem", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1067             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HocKi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HocKi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1068             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GhiChu", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GhiChu", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1069         }
1070         
1071         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1072         
private void InitConnection() {
1073             
this._connection = new global::System.Data.SqlClient.SqlConnection();
1074             
this._connection.ConnectionString = global::Quản_lý_điểm_sinh_vien_CNTT.Properties.Settings.Default.QuanlydiemConnectionString2;
1075         }
1076         
1077         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1078         
private void InitCommandCollection() {
1079             
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
1080             
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
1081             
this._commandCollection[0].Connection = this.Connection;
1082             
this._commandCollection[0].CommandText = "SELECT MaSV, HoTen, MaLop, MaMon, DiemTB, DiemThiLan1, DiemThiLan2, DiemTongKet, " +
1083                 
"HanhKiem, HocKi, GhiChu FROM dbo.tblKET_QUA";
1084             
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
1085         }
1086         
1087         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1088         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1089         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
1090         
public virtual int Fill(DataSettongket.tblKET_QUADataTable dataTable) {
1091             
this.Adapter.SelectCommand = this.CommandCollection[0];
1092             
if ((this.ClearBeforeFill == true)) {
1093                 dataTable.Clear();
1094             }
1095             
int returnValue = this.Adapter.Fill(dataTable);
1096             
return returnValue;
1097         }
1098         
1099         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1100         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1101         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
1102         
public virtual DataSettongket.tblKET_QUADataTable GetData() {
1103             
this.Adapter.SelectCommand = this.CommandCollection[0];
1104             DataSettongket.tblKET_QUADataTable dataTable =
new DataSettongket.tblKET_QUADataTable();
1105             
this.Adapter.Fill(dataTable);
1106             
return dataTable;
1107         }
1108         
1109         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1110         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1111         
public virtual int Update(DataSettongket.tblKET_QUADataTable dataTable) {
1112             
return this.Adapter.Update(dataTable);
1113         }
1114         
1115         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1116         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1117         
public virtual int Update(DataSettongket dataSet) {
1118             
return this.Adapter.Update(dataSet, "tblKET_QUA");
1119         }
1120         
1121         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1122         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1123         
public virtual int Update(global::System.Data.DataRow dataRow) {
1124             
return this.Adapter.Update(new global::System.Data.DataRow[] {
1125                         dataRow});
1126         }
1127         
1128         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1129         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1130         
public virtual int Update(global::System.Data.DataRow[] dataRows) {
1131             
return this.Adapter.Update(dataRows);
1132         }
1133         
1134         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1135         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1136         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1137         
public virtual int Insert(string MaSV, string HoTen, string MaLop, string MaMon, global::System.Nullable<double> DiemTB, global::System.Nullable<double> DiemThiLan1, global::System.Nullable<double> DiemThiLan2, global::System.Nullable<double> DiemTongKet, string HanhKiem, global::System.Nullable<int> HocKi, string GhiChu) {
1138             
if ((MaSV == null)) {
1139                 
throw new global::System.ArgumentNullException("MaSV");
1140             }
1141             
else {
1142                 
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(MaSV));
1143             }
1144             
if ((HoTen == null)) {
1145                 
this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
1146             }
1147             
else {
1148                 
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(HoTen));
1149             }
1150             
if ((MaLop == null)) {
1151                 
this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1152             }
1153             
else {
1154                 
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(MaLop));
1155             }
1156             
if ((MaMon == null)) {
1157                 
this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1158             }
1159             
else {
1160                 
this.Adapter.InsertCommand.Parameters[3].Value = ((string)(MaMon));
1161             }
1162             
if ((DiemTB.HasValue == true)) {
1163                 
this.Adapter.InsertCommand.Parameters[4].Value = ((double)(DiemTB.Value));
1164             }
1165             
else {
1166                 
this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
1167             }
1168             
if ((DiemThiLan1.HasValue == true)) {
1169                 
this.Adapter.InsertCommand.Parameters[5].Value = ((double)(DiemThiLan1.Value));
1170             }
1171             
else {
1172                 
this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
1173             }
1174             
if ((DiemThiLan2.HasValue == true)) {
1175                 
this.Adapter.InsertCommand.Parameters[6].Value = ((double)(DiemThiLan2.Value));
1176             }
1177             
else {
1178                 
this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value;
1179             }
1180             
if ((DiemTongKet.HasValue == true)) {
1181                 
this.Adapter.InsertCommand.Parameters[7].Value = ((double)(DiemTongKet.Value));
1182             }
1183             
else {
1184                 
this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value;
1185             }
1186             
if ((HanhKiem == null)) {
1187                 
this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value;
1188             }
1189             
else {
1190                 
this.Adapter.InsertCommand.Parameters[8].Value = ((string)(HanhKiem));
1191             }
1192             
if ((HocKi.HasValue == true)) {
1193                 
this.Adapter.InsertCommand.Parameters[9].Value = ((int)(HocKi.Value));
1194             }
1195             
else {
1196                 
this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value;
1197             }
1198             
if ((GhiChu == null)) {
1199                 
this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value;
1200             }
1201             
else {
1202                 
this.Adapter.InsertCommand.Parameters[10].Value = ((string)(GhiChu));
1203             }
1204             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1205             
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1206                         !=
global::System.Data.ConnectionState.Open)) {
1207                 
this.Adapter.InsertCommand.Connection.Open();
1208             }
1209             
try {
1210                 
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1211                 
return returnValue;
1212             }
1213             
finally {
1214                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1215                     
this.Adapter.InsertCommand.Connection.Close();
1216                 }
1217             }
1218         }
1219     }

1220     
1221     ///
<summary>
1222     ///
TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
1223     ///</summary>

1224     
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1225     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
1226     
[global::System.ComponentModel.ToolboxItem(true)]
1227     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
1228         
"esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1229     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
1230     
public partial class TableAdapterManager : global::System.ComponentModel.Component {
1231         
1232         
private UpdateOrderOption _updateOrder;
1233         
1234         
private tblKET_QUATableAdapter _tblKET_QUATableAdapter;
1235         
1236         
private bool _backupDataSetBeforeUpdate;
1237         
1238         
private global::System.Data.IDbConnection _connection;
1239         
1240         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1241         
public UpdateOrderOption UpdateOrder {
1242             
get {
1243                 
return this._updateOrder;
1244             }
1245             
set {
1246                 
this._updateOrder = value;
1247             }
1248         }
1249         
1250         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1251         [
global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
1252             
"ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
1253             
"", "System.Drawing.Design.UITypeEditor")]
1254         
public tblKET_QUATableAdapter tblKET_QUATableAdapter {
1255             
get {
1256                 
return this._tblKET_QUATableAdapter;
1257             }
1258             
set {
1259                 
this._tblKET_QUATableAdapter = value;
1260             }
1261         }
1262         
1263         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1264         
public bool BackupDataSetBeforeUpdate {
1265             
get {
1266                 
return this._backupDataSetBeforeUpdate;
1267             }
1268             
set {
1269                 
this._backupDataSetBeforeUpdate = value;
1270             }
1271         }
1272         
1273         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1274         
[global::System.ComponentModel.Browsable(false)]
1275         
public global::System.Data.IDbConnection Connection {
1276             
get {
1277                 
if ((this._connection != null)) {
1278                     
return this._connection;
1279                 }
1280                 
if (((this._tblKET_QUATableAdapter != null)
1281                             && (
this._tblKET_QUATableAdapter.Connection != null))) {
1282                     
return this._tblKET_QUATableAdapter.Connection;
1283                 }
1284                 
return null;
1285             }
1286             
set {
1287                 
this._connection = value;
1288             }
1289         }
1290         
1291         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1292         
[global::System.ComponentModel.Browsable(false)]
1293         
public int TableAdapterInstanceCount {
1294             
get {
1295                 
int count = 0;
1296                 
if ((this._tblKET_QUATableAdapter != null)) {
1297                     count = (count +
1);
1298                 }
1299                 
return count;
1300             }
1301         }

1302         
1303         ///
<summary>
1304         ///
Update rows in top-down order.
1305         ///</summary>

1306         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1307         
private int UpdateUpdatedRows(DataSettongket dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1308             
int result = 0;
1309             
if ((this._tblKET_QUATableAdapter != null)) {
1310                 
global::System.Data.DataRow[] updatedRows = dataSet.tblKET_QUA.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
1311                 updatedRows =
this.GetRealUpdatedRows(updatedRows, allAddedRows);
1312                 
if (((updatedRows != null)
1313                             && (
0 < updatedRows.Length))) {
1314                     result = (result +
this._tblKET_QUATableAdapter.Update(updatedRows));
1315                     allChangedRows.AddRange(updatedRows);
1316                 }
1317             }
1318             
return result;
1319         }

1320         
1321         ///
<summary>
1322         ///
Insert rows in top-down order.
1323         ///</summary>

1324         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1325         
private int UpdateInsertedRows(DataSettongket dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1326             
int result = 0;
1327             
if ((this._tblKET_QUATableAdapter != null)) {
1328                 
global::System.Data.DataRow[] addedRows = dataSet.tblKET_QUA.Select(null, null, global::System.Data.DataViewRowState.Added);
1329                 
if (((addedRows != null)
1330                             && (
0 < addedRows.Length))) {
1331                     result = (result +
this._tblKET_QUATableAdapter.Update(addedRows));
1332                     allAddedRows.AddRange(addedRows);
1333                 }
1334             }
1335             
return result;
1336         }

1337         
1338         ///
<summary>
1339         ///
Delete rows in bottom-up order.
1340         ///</summary>

1341         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1342         
private int UpdateDeletedRows(DataSettongket dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
1343             
int result = 0;
1344             
if ((this._tblKET_QUATableAdapter != null)) {
1345                 
global::System.Data.DataRow[] deletedRows = dataSet.tblKET_QUA.Select(null, null, global::System.Data.DataViewRowState.Deleted);
1346                 
if (((deletedRows != null)
1347                             && (
0 < deletedRows.Length))) {
1348                     result = (result +
this._tblKET_QUATableAdapter.Update(deletedRows));
1349                     allChangedRows.AddRange(deletedRows);
1350                 }
1351             }
1352             
return result;
1353         }

1354         
1355         ///
<summary>
1356         ///
Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1357         ///</summary>

1358         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1359         
private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1360             
if (((updatedRows == null)
1361                         || (updatedRows.Length <
1))) {
1362                 
return updatedRows;
1363             }
1364             
if (((allAddedRows == null)
1365                         || (allAddedRows.Count <
1))) {
1366                 
return updatedRows;
1367             }
1368             
global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1369             
for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
1370                 
global::System.Data.DataRow row = updatedRows[i];
1371                 
if ((allAddedRows.Contains(row) == false)) {
1372                     realUpdatedRows.Add(row);
1373                 }
1374             }
1375             
return realUpdatedRows.ToArray();
1376         }

1377         
1378         ///
<summary>
1379         ///
Update all changes to the dataset.
1380         ///</summary>

1381         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1382         
public virtual int UpdateAll(DataSettongket dataSet) {
1383             
if ((dataSet == null)) {
1384                 
throw new global::System.ArgumentNullException("dataSet");
1385             }
1386             
if ((dataSet.HasChanges() == false)) {
1387                 
return 0;
1388             }
1389             
if (((this._tblKET_QUATableAdapter != null)
1390                         && (
this.MatchTableAdapterConnection(this._tblKET_QUATableAdapter.Connection) == false))) {
1391                 
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
1392                         
"tring.");
1393             }
1394             
global::System.Data.IDbConnection workConnection = this.Connection;
1395             
if ((workConnection == null)) {
1396                 
throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
1397                         
"ger TableAdapter property to a valid TableAdapter instance.");
1398             }
1399             
bool workConnOpened = false;
1400             
if (((workConnection.State & global::System.Data.ConnectionState.Broken)
1401                         ==
global::System.Data.ConnectionState.Broken)) {
1402                 workConnection.Close();
1403             }
1404             
if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
1405                 workConnection.Open();
1406                 workConnOpened =
true;
1407             }
1408             
global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
1409             
if ((workTransaction == null)) {
1410                 
throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
1411                         
"ctions or the current state is not allowing the transaction to begin.");
1412             }
1413             
global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1414             
global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1415             
global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
1416             
global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
1417             
int result = 0;
1418             
global::System.Data.DataSet backupDataSet = null;
1419             
if (this.BackupDataSetBeforeUpdate) {
1420                 backupDataSet =
new global::System.Data.DataSet();
1421                 backupDataSet.Merge(dataSet);
1422             }
1423             
try {
1424                 
// ---- Prepare for update -----------
1425                 
//
1426                 
if ((this._tblKET_QUATableAdapter != null)) {
1427                     revertConnections.Add(
this._tblKET_QUATableAdapter, this._tblKET_QUATableAdapter.Connection);
1428                     
this._tblKET_QUATableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
1429                     
this._tblKET_QUATableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
1430                     
if (this._tblKET_QUATableAdapter.Adapter.AcceptChangesDuringUpdate) {
1431                         
this._tblKET_QUATableAdapter.Adapter.AcceptChangesDuringUpdate = false;
1432                         adaptersWithAcceptChangesDuringUpdate.Add(
this._tblKET_QUATableAdapter.Adapter);
1433                     }
1434                 }
1435                 
//
1436                 
//---- Perform updates -----------
1437                 
//
1438                 
if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
1439                     result = (result +
this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1440                     result = (result +
this.UpdateInsertedRows(dataSet, allAddedRows));
1441                 }
1442                 
else {
1443                     result = (result +
this.UpdateInsertedRows(dataSet, allAddedRows));
1444                     result = (result +
this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1445                 }
1446                 result = (result +
this.UpdateDeletedRows(dataSet, allChangedRows));
1447                 
//
1448                 
//---- Commit updates -----------
1449                 
//
1450                 workTransaction.Commit();
1451                 
if ((0 < allAddedRows.Count)) {
1452                     
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1453                     allAddedRows.CopyTo(rows);
1454                     
for (int i = 0; (i < rows.Length); i = (i + 1)) {
1455                         
global::System.Data.DataRow row = rows[i];
1456                         row.AcceptChanges();
1457                     }
1458                 }
1459                 
if ((0 < allChangedRows.Count)) {
1460                     
global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
1461                     allChangedRows.CopyTo(rows);
1462                     
for (int i = 0; (i < rows.Length); i = (i + 1)) {
1463                         
global::System.Data.DataRow row = rows[i];
1464                         row.AcceptChanges();
1465                     }
1466                 }
1467             }
1468             
catch (global::System.Exception ex) {
1469                 workTransaction.Rollback();
1470                 
// ---- Restore the dataset -----------
1471                 
if (this.BackupDataSetBeforeUpdate) {
1472                     
global::System.Diagnostics.Debug.Assert((backupDataSet != null));
1473                     dataSet.Clear();
1474                     dataSet.Merge(backupDataSet);
1475                 }
1476                 
else {
1477                     
if ((0 < allAddedRows.Count)) {
1478                         
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1479                         allAddedRows.CopyTo(rows);
1480                         
for (int i = 0; (i < rows.Length); i = (i + 1)) {
1481                             
global::System.Data.DataRow row = rows[i];
1482                             row.AcceptChanges();
1483                             row.SetAdded();
1484                         }
1485                     }
1486                 }
1487                 
throw ex;
1488             }
1489             
finally {
1490                 
if (workConnOpened) {
1491                     workConnection.Close();
1492                 }
1493                 
if ((this._tblKET_QUATableAdapter != null)) {
1494                     
this._tblKET_QUATableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tblKET_QUATableAdapter]));
1495                     
this._tblKET_QUATableAdapter.Transaction = null;
1496                 }
1497                 
if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
1498                     
global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
1499                     adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
1500                     
for (int i = 0; (i < adapters.Length); i = (i + 1)) {
1501                         
global::System.Data.Common.DataAdapter adapter = adapters[i];
1502                         adapter.AcceptChangesDuringUpdate =
true;
1503                     }
1504                 }
1505             }
1506             
return result;
1507         }
1508         
1509         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1510         
protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
1511             
global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
1512         }
1513         
1514         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1515         
protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
1516             
if ((this._connection != null)) {
1517                 
return true;
1518             }
1519             
if (((this.Connection == null)
1520                         || (inputConnection ==
null))) {
1521                 
return true;
1522             }
1523             
if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
1524                 
return true;
1525             }
1526             
return false;
1527         }

1528         
1529         ///
<summary>
1530         ///
Update Order Option
1531         ///</summary>

1532         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1533         
public enum UpdateOrderOption {
1534             
1535             InsertUpdateDelete =
0,
1536             
1537             UpdateInsertDelete =
1,
1538         }

1539         
1540         ///
<summary>
1541         ///
Used to sort self-referenced table's rows
1542         ///</summary>

1543         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1544         
private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
1545             
1546             
private global::System.Data.DataRelation _relation;
1547             
1548             
private int _childFirst;
1549             
1550             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1551             
internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
1552                 
this._relation = relation;
1553                 
if (childFirst) {
1554                     
this._childFirst = -1;
1555                 }
1556                 
else {
1557                     
this._childFirst = 1;
1558                 }
1559             }
1560             
1561             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1562             
private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) {
1563                 
global::System.Diagnostics.Debug.Assert((child != null));
1564                 
global::System.Diagnostics.Debug.Assert((parent != null));
1565                 
global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1566                 
for (
1567                 ; ((newParent !=
null)
1568                             && ((
object.ReferenceEquals(newParent, child) == false)
1569                             && (
object.ReferenceEquals(newParent, parent) == false)));
1570                 ) {
1571                     newParent = newParent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Default);
1572                 }
1573                 
if ((newParent == null)) {
1574                     
for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null)
1575                                 && ((
object.ReferenceEquals(newParent, child) == false)
1576                                 && (
object.ReferenceEquals(newParent, parent) == false)));
1577                     ) {
1578                         newParent = newParent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Original);
1579                     }
1580                 }
1581                 
if (object.ReferenceEquals(newParent, parent)) {
1582                     
return true;
1583                 }
1584                 
return false;
1585             }
1586             
1587             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1588             
public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
1589                 
if (object.ReferenceEquals(row1, row2)) {
1590                     
return 0;
1591                 }
1592                 
if ((row1 == null)) {
1593                     
return -1;
1594                 }
1595                 
if ((row2 == null)) {
1596                     
return 1;
1597                 }
1598
1599                 
// Is row1 the child or grandchild of row2
1600                 
if (this.IsChildAndParent(row1, row2)) {
1601                     
return this._childFirst;
1602                 }
1603
1604                 
// Is row2 the child or grandchild of row1
1605                 
if (this.IsChildAndParent(row2, row1)) {
1606                     
return (-1 * this._childFirst);
1607                 }
1608                 
return 0;
1609             }
1610         }
1611     }
1612 }
1613
1614 #pragma warning restore
1591



Quản lý điểm sinh viên CNTT 180.098 lượt xem

Gõ tìm kiếm nhanh...