1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated
by a tool.
4 // Runtime Version:
2.0.50727.4927
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("QuanlydiemDataSet36")]
25     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
26     
public partial class QuanlydiemDataSet36 : global::System.Data.DataSet {
27         
28         
private tblKHOA_LOPDataTable tabletblKHOA_LOP;
29         
30         
private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
31         
32         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
33         
public QuanlydiemDataSet36() {
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 QuanlydiemDataSet36(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["tblKHOA_LOP"] != null)) {
57                     
base.Tables.Add(new tblKHOA_LOPDataTable(ds.Tables["tblKHOA_LOP"]));
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 tblKHOA_LOPDataTable tblKHOA_LOP {
81             
get {
82                 
return this.tabletblKHOA_LOP;
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             QuanlydiemDataSet36 cln = ((QuanlydiemDataSet36)(
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["tblKHOA_LOP"] != null)) {
146                     
base.Tables.Add(new tblKHOA_LOPDataTable(ds.Tables["tblKHOA_LOP"]));
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.tabletblKHOA_LOP = ((tblKHOA_LOPDataTable)(base.Tables["tblKHOA_LOP"]));
179             
if ((initTable == true)) {
180                 
if ((this.tabletblKHOA_LOP != null)) {
181                     
this.tabletblKHOA_LOP.InitVars();
182                 }
183             }
184         }
185         
186         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
187         
private void InitClass() {
188             
this.DataSetName = "QuanlydiemDataSet36";
189             
this.Prefix = "";
190             
this.Namespace = "http://tempuri.org/QuanlydiemDataSet36.xsd";
191             
this.EnforceConstraints = true;
192             
this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
193             
this.tabletblKHOA_LOP = new tblKHOA_LOPDataTable();
194             
base.Tables.Add(this.tabletblKHOA_LOP);
195         }
196         
197         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
198         
private bool ShouldSerializetblKHOA_LOP() {
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             QuanlydiemDataSet36 ds =
new QuanlydiemDataSet36();
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 tblKHOA_LOPRowChangeEventHandler(object sender, tblKHOA_LOPRowChangeEvent 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 tblKHOA_LOPDataTable : global::System.Data.TypedTableBase<tblKHOA_LOPRow> {
264             
265             
private global::System.Data.DataColumn columnMaKhoa;
266             
267             
private global::System.Data.DataColumn columnMaLop;
268             
269             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
270             
public tblKHOA_LOPDataTable() {
271                 
this.TableName = "tblKHOA_LOP";
272                 
this.BeginInit();
273                 
this.InitClass();
274                 
this.EndInit();
275             }
276             
277             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
278             
internal tblKHOA_LOPDataTable(global::System.Data.DataTable table) {
279                 
this.TableName = table.TableName;
280                 
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
281                     
this.CaseSensitive = table.CaseSensitive;
282                 }
283                 
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
284                     
this.Locale = table.Locale;
285                 }
286                 
if ((table.Namespace != table.DataSet.Namespace)) {
287                     
this.Namespace = table.Namespace;
288                 }
289                 
this.Prefix = table.Prefix;
290                 
this.MinimumCapacity = table.MinimumCapacity;
291             }
292             
293             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
294             
protected tblKHOA_LOPDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
295                     
base(info, context) {
296                 
this.InitVars();
297             }
298             
299             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
300             
public global::System.Data.DataColumn MaKhoaColumn {
301                 
get {
302                     
return this.columnMaKhoa;
303                 }
304             }
305             
306             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
307             
public global::System.Data.DataColumn MaLopColumn {
308                 
get {
309                     
return this.columnMaLop;
310                 }
311             }
312             
313             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
314             
[global::System.ComponentModel.Browsable(false)]
315             
public int Count {
316                 
get {
317                     
return this.Rows.Count;
318                 }
319             }
320             
321             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
322             
public tblKHOA_LOPRow this[int index] {
323                 
get {
324                     
return ((tblKHOA_LOPRow)(this.Rows[index]));
325                 }
326             }
327             
328             
public event tblKHOA_LOPRowChangeEventHandler tblKHOA_LOPRowChanging;
329             
330             
public event tblKHOA_LOPRowChangeEventHandler tblKHOA_LOPRowChanged;
331             
332             
public event tblKHOA_LOPRowChangeEventHandler tblKHOA_LOPRowDeleting;
333             
334             
public event tblKHOA_LOPRowChangeEventHandler tblKHOA_LOPRowDeleted;
335             
336             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
337             
public void AddtblKHOA_LOPRow(tblKHOA_LOPRow row) {
338                 
this.Rows.Add(row);
339             }
340             
341             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
342             
public tblKHOA_LOPRow AddtblKHOA_LOPRow(string MaKhoa, string MaLop) {
343                 tblKHOA_LOPRow rowtblKHOA_LOPRow = ((tblKHOA_LOPRow)(
this.NewRow()));
344                 
object[] columnValuesArray = new object[] {
345                         MaKhoa,
346                         MaLop};
347                 rowtblKHOA_LOPRow.ItemArray = columnValuesArray;
348                 
this.Rows.Add(rowtblKHOA_LOPRow);
349                 
return rowtblKHOA_LOPRow;
350             }
351             
352             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
353             
public tblKHOA_LOPRow FindByMaKhoaMaLop(string MaKhoa, string MaLop) {
354                 
return ((tblKHOA_LOPRow)(this.Rows.Find(new object[] {
355                             MaKhoa,
356                             MaLop})));
357             }
358             
359             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
360             
public override global::System.Data.DataTable Clone() {
361                 tblKHOA_LOPDataTable cln = ((tblKHOA_LOPDataTable)(
base.Clone()));
362                 cln.InitVars();
363                 
return cln;
364             }
365             
366             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
367             
protected override global::System.Data.DataTable CreateInstance() {
368                 
return new tblKHOA_LOPDataTable();
369             }
370             
371             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
372             
internal void InitVars() {
373                 
this.columnMaKhoa = base.Columns["MaKhoa"];
374                 
this.columnMaLop = base.Columns["MaLop"];
375             }
376             
377             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
378             
private void InitClass() {
379                 
this.columnMaKhoa = new global::System.Data.DataColumn("MaKhoa", typeof(string), null, global::System.Data.MappingType.Element);
380                 
base.Columns.Add(this.columnMaKhoa);
381                 
this.columnMaLop = new global::System.Data.DataColumn("MaLop", typeof(string), null, global::System.Data.MappingType.Element);
382                 
base.Columns.Add(this.columnMaLop);
383                 
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
384                                 
this.columnMaKhoa,
385                                 
this.columnMaLop}, true));
386                 
this.columnMaKhoa.AllowDBNull = false;
387                 
this.columnMaKhoa.MaxLength = 10;
388                 
this.columnMaLop.AllowDBNull = false;
389                 
this.columnMaLop.MaxLength = 10;
390             }
391             
392             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
393             
public tblKHOA_LOPRow NewtblKHOA_LOPRow() {
394                 
return ((tblKHOA_LOPRow)(this.NewRow()));
395             }
396             
397             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
398             
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
399                 
return new tblKHOA_LOPRow(builder);
400             }
401             
402             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
403             
protected override global::System.Type GetRowType() {
404                 
return typeof(tblKHOA_LOPRow);
405             }
406             
407             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
408             
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
409                 
base.OnRowChanged(e);
410                 
if ((this.tblKHOA_LOPRowChanged != null)) {
411                     
this.tblKHOA_LOPRowChanged(this, new tblKHOA_LOPRowChangeEvent(((tblKHOA_LOPRow)(e.Row)), e.Action));
412                 }
413             }
414             
415             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
416             
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
417                 
base.OnRowChanging(e);
418                 
if ((this.tblKHOA_LOPRowChanging != null)) {
419                     
this.tblKHOA_LOPRowChanging(this, new tblKHOA_LOPRowChangeEvent(((tblKHOA_LOPRow)(e.Row)), e.Action));
420                 }
421             }
422             
423             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
424             
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
425                 
base.OnRowDeleted(e);
426                 
if ((this.tblKHOA_LOPRowDeleted != null)) {
427                     
this.tblKHOA_LOPRowDeleted(this, new tblKHOA_LOPRowChangeEvent(((tblKHOA_LOPRow)(e.Row)), e.Action));
428                 }
429             }
430             
431             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
432             
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
433                 
base.OnRowDeleting(e);
434                 
if ((this.tblKHOA_LOPRowDeleting != null)) {
435                     
this.tblKHOA_LOPRowDeleting(this, new tblKHOA_LOPRowChangeEvent(((tblKHOA_LOPRow)(e.Row)), e.Action));
436                 }
437             }
438             
439             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
440             
public void RemovetblKHOA_LOPRow(tblKHOA_LOPRow row) {
441                 
this.Rows.Remove(row);
442             }
443             
444             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
445             
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
446                 
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
447                 
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
448                 QuanlydiemDataSet36 ds =
new QuanlydiemDataSet36();
449                 
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
450                 any1.Namespace =
"http://www.w3.org/2001/XMLSchema";
451                 any1.MinOccurs =
new decimal(0);
452                 any1.MaxOccurs =
decimal.MaxValue;
453                 any1.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
454                 sequence.Items.Add(any1);
455                 
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
456                 any2.Namespace =
"urn:schemas-microsoft-com:xml-diffgram-v1";
457                 any2.MinOccurs =
new decimal(1);
458                 any2.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
459                 sequence.Items.Add(any2);
460                 
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
461                 attribute1.Name =
"namespace";
462                 attribute1.FixedValue = ds.Namespace;
463                 type.Attributes.Add(attribute1);
464                 
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
465                 attribute2.Name =
"tableTypeName";
466                 attribute2.FixedValue =
"tblKHOA_LOPDataTable";
467                 type.Attributes.Add(attribute2);
468                 type.Particle = sequence;
469                 
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
470                 
if (xs.Contains(dsSchema.TargetNamespace)) {
471                     
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
472                     
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
473                     
try {
474                         
global::System.Xml.Schema.XmlSchema schema = null;
475                         dsSchema.Write(s1);
476                         
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
477                             schema = ((
global::System.Xml.Schema.XmlSchema)(schemas.Current));
478                             s2.SetLength(
0);
479                             schema.Write(s2);
480                             
if ((s1.Length == s2.Length)) {
481                                 s1.Position =
0;
482                                 s2.Position =
0;
483                                 
for (; ((s1.Position != s1.Length)
484                                             && (s1.ReadByte() == s2.ReadByte())); ) {
485                                     ;
486                                 }
487                                 
if ((s1.Position == s1.Length)) {
488                                     
return type;
489                                 }
490                             }
491                         }
492                     }
493                     
finally {
494                         
if ((s1 != null)) {
495                             s1.Close();
496                         }
497                         
if ((s2 != null)) {
498                             s2.Close();
499                         }
500                     }
501                 }
502                 xs.Add(dsSchema);
503                 
return type;
504             }
505         }

506         
507         ///
<summary>
508         ///
Represents strongly named DataRow class.
509         ///</summary>

510         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
511         
public partial class tblKHOA_LOPRow : global::System.Data.DataRow {
512             
513             
private tblKHOA_LOPDataTable tabletblKHOA_LOP;
514             
515             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
516             
internal tblKHOA_LOPRow(global::System.Data.DataRowBuilder rb) :
517                     
base(rb) {
518                 
this.tabletblKHOA_LOP = ((tblKHOA_LOPDataTable)(this.Table));
519             }
520             
521             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
522             
public string MaKhoa {
523                 
get {
524                     
return ((string)(this[this.tabletblKHOA_LOP.MaKhoaColumn]));
525                 }
526                 
set {
527                     
this[this.tabletblKHOA_LOP.MaKhoaColumn] = value;
528                 }
529             }
530             
531             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
532             
public string MaLop {
533                 
get {
534                     
return ((string)(this[this.tabletblKHOA_LOP.MaLopColumn]));
535                 }
536                 
set {
537                     
this[this.tabletblKHOA_LOP.MaLopColumn] = value;
538                 }
539             }
540         }

541         
542         ///
<summary>
543         ///
Row event argument class
544         ///</summary>

545         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
546         
public class tblKHOA_LOPRowChangeEvent : global::System.EventArgs {
547             
548             
private tblKHOA_LOPRow eventRow;
549             
550             
private global::System.Data.DataRowAction eventAction;
551             
552             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
553             
public tblKHOA_LOPRowChangeEvent(tblKHOA_LOPRow row, global::System.Data.DataRowAction action) {
554                 
this.eventRow = row;
555                 
this.eventAction = action;
556             }
557             
558             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
559             
public tblKHOA_LOPRow Row {
560                 
get {
561                     
return this.eventRow;
562                 }
563             }
564             
565             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
566             
public global::System.Data.DataRowAction Action {
567                 
get {
568                     
return this.eventAction;
569                 }
570             }
571         }
572     }
573 }

574 namespace
Quản_lý_điểm_sinh_vien_CNTT.QuanlydiemDataSet36TableAdapters {
575     
576     
577     ///
<summary>
578     ///
Represents the connection and commands used to retrieve and save data.
579     ///</summary>

580     
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
581     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
582     
[global::System.ComponentModel.ToolboxItem(true)]
583     
[global::System.ComponentModel.DataObjectAttribute(true)]
584     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
585         
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
586     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
587     
public partial class tblKHOA_LOPTableAdapter : global::System.ComponentModel.Component {
588         
589         
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
590         
591         
private global::System.Data.SqlClient.SqlConnection _connection;
592         
593         
private global::System.Data.SqlClient.SqlTransaction _transaction;
594         
595         
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
596         
597         
private bool _clearBeforeFill;
598         
599         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
600         
public tblKHOA_LOPTableAdapter() {
601             
this.ClearBeforeFill = true;
602         }
603         
604         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
605         
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
606             
get {
607                 
if ((this._adapter == null)) {
608                     
this.InitAdapter();
609                 }
610                 
return this._adapter;
611             }
612         }
613         
614         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
615         
internal global::System.Data.SqlClient.SqlConnection Connection {
616             
get {
617                 
if ((this._connection == null)) {
618                     
this.InitConnection();
619                 }
620                 
return this._connection;
621             }
622             
set {
623                 
this._connection = value;
624                 
if ((this.Adapter.InsertCommand != null)) {
625                     
this.Adapter.InsertCommand.Connection = value;
626                 }
627                 
if ((this.Adapter.DeleteCommand != null)) {
628                     
this.Adapter.DeleteCommand.Connection = value;
629                 }
630                 
if ((this.Adapter.UpdateCommand != null)) {
631                     
this.Adapter.UpdateCommand.Connection = value;
632                 }
633                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
634                     
if ((this.CommandCollection[i] != null)) {
635                         ((
global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
636                     }
637                 }
638             }
639         }
640         
641         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
642         
internal global::System.Data.SqlClient.SqlTransaction Transaction {
643             
get {
644                 
return this._transaction;
645             }
646             
set {
647                 
this._transaction = value;
648                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
649                     
this.CommandCollection[i].Transaction = this._transaction;
650                 }
651                 
if (((this.Adapter != null)
652                             && (
this.Adapter.DeleteCommand != null))) {
653                     
this.Adapter.DeleteCommand.Transaction = this._transaction;
654                 }
655                 
if (((this.Adapter != null)
656                             && (
this.Adapter.InsertCommand != null))) {
657                     
this.Adapter.InsertCommand.Transaction = this._transaction;
658                 }
659                 
if (((this.Adapter != null)
660                             && (
this.Adapter.UpdateCommand != null))) {
661                     
this.Adapter.UpdateCommand.Transaction = this._transaction;
662                 }
663             }
664         }
665         
666         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
667         
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
668             
get {
669                 
if ((this._commandCollection == null)) {
670                     
this.InitCommandCollection();
671                 }
672                 
return this._commandCollection;
673             }
674         }
675         
676         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
677         
public bool ClearBeforeFill {
678             
get {
679                 
return this._clearBeforeFill;
680             }
681             
set {
682                 
this._clearBeforeFill = value;
683             }
684         }
685         
686         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
687         
private void InitAdapter() {
688             
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
689             
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
690             tableMapping.SourceTable =
"Table";
691             tableMapping.DataSetTable =
"tblKHOA_LOP";
692             tableMapping.ColumnMappings.Add(
"MaKhoa", "MaKhoa");
693             tableMapping.ColumnMappings.Add(
"MaLop", "MaLop");
694             
this._adapter.TableMappings.Add(tableMapping);
695             
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
696             
this._adapter.DeleteCommand.Connection = this.Connection;
697             
this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[tblKHOA_LOP] WHERE (([MaKhoa] = @Original_MaKhoa) AND ([MaLop]" +
698                 
" = @Original_MaLop))";
699             
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
700             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaKhoa", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaKhoa", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
701             
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, "", "", ""));
702             
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
703             
this._adapter.InsertCommand.Connection = this.Connection;
704             
this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tblKHOA_LOP] ([MaKhoa], [MaLop]) VALUES (@MaKhoa, @MaLop);\r\nSE" +
705                 
"LECT MaKhoa, MaLop FROM tblKHOA_LOP WHERE (MaKhoa = @MaKhoa) AND (MaLop = @MaLop" +
706                 
")";
707             
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
708             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaKhoa", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaKhoa", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
709             
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, "", "", ""));
710             
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
711             
this._adapter.UpdateCommand.Connection = this.Connection;
712             
this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[tblKHOA_LOP] SET [MaKhoa] = @MaKhoa, [MaLop] = @MaLop WHERE (([MaKh" +
713                 
"oa] = @Original_MaKhoa) AND ([MaLop] = @Original_MaLop));\r\nSELECT MaKhoa, MaLop " +
714                 
"FROM tblKHOA_LOP WHERE (MaKhoa = @MaKhoa) AND (MaLop = @MaLop)";
715             
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
716             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaKhoa", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaKhoa", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
717             
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, "", "", ""));
718             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaKhoa", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaKhoa", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
719             
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, "", "", ""));
720         }
721         
722         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
723         
private void InitConnection() {
724             
this._connection = new global::System.Data.SqlClient.SqlConnection();
725             
this._connection.ConnectionString = global::Quản_lý_điểm_sinh_vien_CNTT.Properties.Settings.Default.QuanlydiemConnectionString2;
726         }
727         
728         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
729         
private void InitCommandCollection() {
730             
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
731             
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
732             
this._commandCollection[0].Connection = this.Connection;
733             
this._commandCollection[0].CommandText = "SELECT MaKhoa, MaLop FROM dbo.tblKHOA_LOP";
734             
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
735         }
736         
737         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
738         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
739         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
740         
public virtual int Fill(QuanlydiemDataSet36.tblKHOA_LOPDataTable dataTable) {
741             
this.Adapter.SelectCommand = this.CommandCollection[0];
742             
if ((this.ClearBeforeFill == true)) {
743                 dataTable.Clear();
744             }
745             
int returnValue = this.Adapter.Fill(dataTable);
746             
return returnValue;
747         }
748         
749         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
750         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
751         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
752         
public virtual QuanlydiemDataSet36.tblKHOA_LOPDataTable GetData() {
753             
this.Adapter.SelectCommand = this.CommandCollection[0];
754             QuanlydiemDataSet36.tblKHOA_LOPDataTable dataTable =
new QuanlydiemDataSet36.tblKHOA_LOPDataTable();
755             
this.Adapter.Fill(dataTable);
756             
return dataTable;
757         }
758         
759         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
760         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
761         
public virtual int Update(QuanlydiemDataSet36.tblKHOA_LOPDataTable dataTable) {
762             
return this.Adapter.Update(dataTable);
763         }
764         
765         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
766         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
767         
public virtual int Update(QuanlydiemDataSet36 dataSet) {
768             
return this.Adapter.Update(dataSet, "tblKHOA_LOP");
769         }
770         
771         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
772         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
773         
public virtual int Update(global::System.Data.DataRow dataRow) {
774             
return this.Adapter.Update(new global::System.Data.DataRow[] {
775                         dataRow});
776         }
777         
778         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
779         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
780         
public virtual int Update(global::System.Data.DataRow[] dataRows) {
781             
return this.Adapter.Update(dataRows);
782         }
783         
784         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
785         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
786         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
787         
public virtual int Delete(string Original_MaKhoa, string Original_MaLop) {
788             
if ((Original_MaKhoa == null)) {
789                 
throw new global::System.ArgumentNullException("Original_MaKhoa");
790             }
791             
else {
792                 
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_MaKhoa));
793             }
794             
if ((Original_MaLop == null)) {
795                 
throw new global::System.ArgumentNullException("Original_MaLop");
796             }
797             
else {
798                 
this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_MaLop));
799             }
800             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
801             
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
802                         !=
global::System.Data.ConnectionState.Open)) {
803                 
this.Adapter.DeleteCommand.Connection.Open();
804             }
805             
try {
806                 
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
807                 
return returnValue;
808             }
809             
finally {
810                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
811                     
this.Adapter.DeleteCommand.Connection.Close();
812                 }
813             }
814         }
815         
816         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
817         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
818         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
819         
public virtual int Insert(string MaKhoa, string MaLop) {
820             
if ((MaKhoa == null)) {
821                 
throw new global::System.ArgumentNullException("MaKhoa");
822             }
823             
else {
824                 
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(MaKhoa));
825             }
826             
if ((MaLop == null)) {
827                 
throw new global::System.ArgumentNullException("MaLop");
828             }
829             
else {
830                 
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(MaLop));
831             }
832             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
833             
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
834                         !=
global::System.Data.ConnectionState.Open)) {
835                 
this.Adapter.InsertCommand.Connection.Open();
836             }
837             
try {
838                 
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
839                 
return returnValue;
840             }
841             
finally {
842                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
843                     
this.Adapter.InsertCommand.Connection.Close();
844                 }
845             }
846         }
847         
848         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
849         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
850         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
851         
public virtual int Update(string MaKhoa, string MaLop, string Original_MaKhoa, string Original_MaLop) {
852             
if ((MaKhoa == null)) {
853                 
throw new global::System.ArgumentNullException("MaKhoa");
854             }
855             
else {
856                 
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(MaKhoa));
857             }
858             
if ((MaLop == null)) {
859                 
throw new global::System.ArgumentNullException("MaLop");
860             }
861             
else {
862                 
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(MaLop));
863             }
864             
if ((Original_MaKhoa == null)) {
865                 
throw new global::System.ArgumentNullException("Original_MaKhoa");
866             }
867             
else {
868                 
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_MaKhoa));
869             }
870             
if ((Original_MaLop == null)) {
871                 
throw new global::System.ArgumentNullException("Original_MaLop");
872             }
873             
else {
874                 
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_MaLop));
875             }
876             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
877             
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
878                         !=
global::System.Data.ConnectionState.Open)) {
879                 
this.Adapter.UpdateCommand.Connection.Open();
880             }
881             
try {
882                 
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
883                 
return returnValue;
884             }
885             
finally {
886                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
887                     
this.Adapter.UpdateCommand.Connection.Close();
888                 }
889             }
890         }
891         
892         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
893         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
894         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
895         
public virtual int Update(string Original_MaKhoa, string Original_MaLop) {
896             
return this.Update(Original_MaKhoa, Original_MaLop, Original_MaKhoa, Original_MaLop);
897         }
898     }

899     
900     ///
<summary>
901     ///
TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
902     ///</summary>

903     
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
904     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
905     
[global::System.ComponentModel.ToolboxItem(true)]
906     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
907         
"esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
908     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
909     
public partial class TableAdapterManager : global::System.ComponentModel.Component {
910         
911         
private UpdateOrderOption _updateOrder;
912         
913         
private tblKHOA_LOPTableAdapter _tblKHOA_LOPTableAdapter;
914         
915         
private bool _backupDataSetBeforeUpdate;
916         
917         
private global::System.Data.IDbConnection _connection;
918         
919         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
920         
public UpdateOrderOption UpdateOrder {
921             
get {
922                 
return this._updateOrder;
923             }
924             
set {
925                 
this._updateOrder = value;
926             }
927         }
928         
929         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
930         [
global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
931             
"ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
932             
"", "System.Drawing.Design.UITypeEditor")]
933         
public tblKHOA_LOPTableAdapter tblKHOA_LOPTableAdapter {
934             
get {
935                 
return this._tblKHOA_LOPTableAdapter;
936             }
937             
set {
938                 
this._tblKHOA_LOPTableAdapter = value;
939             }
940         }
941         
942         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
943         
public bool BackupDataSetBeforeUpdate {
944             
get {
945                 
return this._backupDataSetBeforeUpdate;
946             }
947             
set {
948                 
this._backupDataSetBeforeUpdate = value;
949             }
950         }
951         
952         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
953         
[global::System.ComponentModel.Browsable(false)]
954         
public global::System.Data.IDbConnection Connection {
955             
get {
956                 
if ((this._connection != null)) {
957                     
return this._connection;
958                 }
959                 
if (((this._tblKHOA_LOPTableAdapter != null)
960                             && (
this._tblKHOA_LOPTableAdapter.Connection != null))) {
961                     
return this._tblKHOA_LOPTableAdapter.Connection;
962                 }
963                 
return null;
964             }
965             
set {
966                 
this._connection = value;
967             }
968         }
969         
970         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
971         
[global::System.ComponentModel.Browsable(false)]
972         
public int TableAdapterInstanceCount {
973             
get {
974                 
int count = 0;
975                 
if ((this._tblKHOA_LOPTableAdapter != null)) {
976                     count = (count +
1);
977                 }
978                 
return count;
979             }
980         }

981         
982         ///
<summary>
983         ///
Update rows in top-down order.
984         ///</summary>

985         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
986         
private int UpdateUpdatedRows(QuanlydiemDataSet36 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
987             
int result = 0;
988             
if ((this._tblKHOA_LOPTableAdapter != null)) {
989                 
global::System.Data.DataRow[] updatedRows = dataSet.tblKHOA_LOP.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
990                 updatedRows =
this.GetRealUpdatedRows(updatedRows, allAddedRows);
991                 
if (((updatedRows != null)
992                             && (
0 < updatedRows.Length))) {
993                     result = (result +
this._tblKHOA_LOPTableAdapter.Update(updatedRows));
994                     allChangedRows.AddRange(updatedRows);
995                 }
996             }
997             
return result;
998         }

999         
1000         ///
<summary>
1001         ///
Insert rows in top-down order.
1002         ///</summary>

1003         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1004         
private int UpdateInsertedRows(QuanlydiemDataSet36 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1005             
int result = 0;
1006             
if ((this._tblKHOA_LOPTableAdapter != null)) {
1007                 
global::System.Data.DataRow[] addedRows = dataSet.tblKHOA_LOP.Select(null, null, global::System.Data.DataViewRowState.Added);
1008                 
if (((addedRows != null)
1009                             && (
0 < addedRows.Length))) {
1010                     result = (result +
this._tblKHOA_LOPTableAdapter.Update(addedRows));
1011                     allAddedRows.AddRange(addedRows);
1012                 }
1013             }
1014             
return result;
1015         }

1016         
1017         ///
<summary>
1018         ///
Delete rows in bottom-up order.
1019         ///</summary>

1020         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1021         
private int UpdateDeletedRows(QuanlydiemDataSet36 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
1022             
int result = 0;
1023             
if ((this._tblKHOA_LOPTableAdapter != null)) {
1024                 
global::System.Data.DataRow[] deletedRows = dataSet.tblKHOA_LOP.Select(null, null, global::System.Data.DataViewRowState.Deleted);
1025                 
if (((deletedRows != null)
1026                             && (
0 < deletedRows.Length))) {
1027                     result = (result +
this._tblKHOA_LOPTableAdapter.Update(deletedRows));
1028                     allChangedRows.AddRange(deletedRows);
1029                 }
1030             }
1031             
return result;
1032         }

1033         
1034         ///
<summary>
1035         ///
Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1036         ///</summary>

1037         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1038         
private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1039             
if (((updatedRows == null)
1040                         || (updatedRows.Length <
1))) {
1041                 
return updatedRows;
1042             }
1043             
if (((allAddedRows == null)
1044                         || (allAddedRows.Count <
1))) {
1045                 
return updatedRows;
1046             }
1047             
global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1048             
for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
1049                 
global::System.Data.DataRow row = updatedRows[i];
1050                 
if ((allAddedRows.Contains(row) == false)) {
1051                     realUpdatedRows.Add(row);
1052                 }
1053             }
1054             
return realUpdatedRows.ToArray();
1055         }

1056         
1057         ///
<summary>
1058         ///
Update all changes to the dataset.
1059         ///</summary>

1060         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1061         
public virtual int UpdateAll(QuanlydiemDataSet36 dataSet) {
1062             
if ((dataSet == null)) {
1063                 
throw new global::System.ArgumentNullException("dataSet");
1064             }
1065             
if ((dataSet.HasChanges() == false)) {
1066                 
return 0;
1067             }
1068             
if (((this._tblKHOA_LOPTableAdapter != null)
1069                         && (
this.MatchTableAdapterConnection(this._tblKHOA_LOPTableAdapter.Connection) == false))) {
1070                 
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
1071                         
"tring.");
1072             }
1073             
global::System.Data.IDbConnection workConnection = this.Connection;
1074             
if ((workConnection == null)) {
1075                 
throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
1076                         
"ger TableAdapter property to a valid TableAdapter instance.");
1077             }
1078             
bool workConnOpened = false;
1079             
if (((workConnection.State & global::System.Data.ConnectionState.Broken)
1080                         ==
global::System.Data.ConnectionState.Broken)) {
1081                 workConnection.Close();
1082             }
1083             
if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
1084                 workConnection.Open();
1085                 workConnOpened =
true;
1086             }
1087             
global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
1088             
if ((workTransaction == null)) {
1089                 
throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
1090                         
"ctions or the current state is not allowing the transaction to begin.");
1091             }
1092             
global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1093             
global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1094             
global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
1095             
global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
1096             
int result = 0;
1097             
global::System.Data.DataSet backupDataSet = null;
1098             
if (this.BackupDataSetBeforeUpdate) {
1099                 backupDataSet =
new global::System.Data.DataSet();
1100                 backupDataSet.Merge(dataSet);
1101             }
1102             
try {
1103                 
// ---- Prepare for update -----------
1104                 
//
1105                 
if ((this._tblKHOA_LOPTableAdapter != null)) {
1106                     revertConnections.Add(
this._tblKHOA_LOPTableAdapter, this._tblKHOA_LOPTableAdapter.Connection);
1107                     
this._tblKHOA_LOPTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
1108                     
this._tblKHOA_LOPTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
1109                     
if (this._tblKHOA_LOPTableAdapter.Adapter.AcceptChangesDuringUpdate) {
1110                         
this._tblKHOA_LOPTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
1111                         adaptersWithAcceptChangesDuringUpdate.Add(
this._tblKHOA_LOPTableAdapter.Adapter);
1112                     }
1113                 }
1114                 
//
1115                 
//---- Perform updates -----------
1116                 
//
1117                 
if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
1118                     result = (result +
this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1119                     result = (result +
this.UpdateInsertedRows(dataSet, allAddedRows));
1120                 }
1121                 
else {
1122                     result = (result +
this.UpdateInsertedRows(dataSet, allAddedRows));
1123                     result = (result +
this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1124                 }
1125                 result = (result +
this.UpdateDeletedRows(dataSet, allChangedRows));
1126                 
//
1127                 
//---- Commit updates -----------
1128                 
//
1129                 workTransaction.Commit();
1130                 
if ((0 < allAddedRows.Count)) {
1131                     
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1132                     allAddedRows.CopyTo(rows);
1133                     
for (int i = 0; (i < rows.Length); i = (i + 1)) {
1134                         
global::System.Data.DataRow row = rows[i];
1135                         row.AcceptChanges();
1136                     }
1137                 }
1138                 
if ((0 < allChangedRows.Count)) {
1139                     
global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
1140                     allChangedRows.CopyTo(rows);
1141                     
for (int i = 0; (i < rows.Length); i = (i + 1)) {
1142                         
global::System.Data.DataRow row = rows[i];
1143                         row.AcceptChanges();
1144                     }
1145                 }
1146             }
1147             
catch (global::System.Exception ex) {
1148                 workTransaction.Rollback();
1149                 
// ---- Restore the dataset -----------
1150                 
if (this.BackupDataSetBeforeUpdate) {
1151                     
global::System.Diagnostics.Debug.Assert((backupDataSet != null));
1152                     dataSet.Clear();
1153                     dataSet.Merge(backupDataSet);
1154                 }
1155                 
else {
1156                     
if ((0 < allAddedRows.Count)) {
1157                         
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1158                         allAddedRows.CopyTo(rows);
1159                         
for (int i = 0; (i < rows.Length); i = (i + 1)) {
1160                             
global::System.Data.DataRow row = rows[i];
1161                             row.AcceptChanges();
1162                             row.SetAdded();
1163                         }
1164                     }
1165                 }
1166                 
throw ex;
1167             }
1168             
finally {
1169                 
if (workConnOpened) {
1170                     workConnection.Close();
1171                 }
1172                 
if ((this._tblKHOA_LOPTableAdapter != null)) {
1173                     
this._tblKHOA_LOPTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tblKHOA_LOPTableAdapter]));
1174                     
this._tblKHOA_LOPTableAdapter.Transaction = null;
1175                 }
1176                 
if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
1177                     
global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
1178                     adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
1179                     
for (int i = 0; (i < adapters.Length); i = (i + 1)) {
1180                         
global::System.Data.Common.DataAdapter adapter = adapters[i];
1181                         adapter.AcceptChangesDuringUpdate =
true;
1182                     }
1183                 }
1184             }
1185             
return result;
1186         }
1187         
1188         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1189         
protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
1190             
global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
1191         }
1192         
1193         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1194         
protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
1195             
if ((this._connection != null)) {
1196                 
return true;
1197             }
1198             
if (((this.Connection == null)
1199                         || (inputConnection ==
null))) {
1200                 
return true;
1201             }
1202             
if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
1203                 
return true;
1204             }
1205             
return false;
1206         }

1207         
1208         ///
<summary>
1209         ///
Update Order Option
1210         ///</summary>

1211         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1212         
public enum UpdateOrderOption {
1213             
1214             InsertUpdateDelete =
0,
1215             
1216             UpdateInsertDelete =
1,
1217         }

1218         
1219         ///
<summary>
1220         ///
Used to sort self-referenced table's rows
1221         ///</summary>

1222         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1223         
private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
1224             
1225             
private global::System.Data.DataRelation _relation;
1226             
1227             
private int _childFirst;
1228             
1229             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1230             
internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
1231                 
this._relation = relation;
1232                 
if (childFirst) {
1233                     
this._childFirst = -1;
1234                 }
1235                 
else {
1236                     
this._childFirst = 1;
1237                 }
1238             }
1239             
1240             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1241             
private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) {
1242                 
global::System.Diagnostics.Debug.Assert((child != null));
1243                 
global::System.Diagnostics.Debug.Assert((parent != null));
1244                 
global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1245                 
for (
1246                 ; ((newParent !=
null)
1247                             && ((
object.ReferenceEquals(newParent, child) == false)
1248                             && (
object.ReferenceEquals(newParent, parent) == false)));
1249                 ) {
1250                     newParent = newParent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Default);
1251                 }
1252                 
if ((newParent == null)) {
1253                     
for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null)
1254                                 && ((
object.ReferenceEquals(newParent, child) == false)
1255                                 && (
object.ReferenceEquals(newParent, parent) == false)));
1256                     ) {
1257                         newParent = newParent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Original);
1258                     }
1259                 }
1260                 
if (object.ReferenceEquals(newParent, parent)) {
1261                     
return true;
1262                 }
1263                 
return false;
1264             }
1265             
1266             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1267             
public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
1268                 
if (object.ReferenceEquals(row1, row2)) {
1269                     
return 0;
1270                 }
1271                 
if ((row1 == null)) {
1272                     
return -1;
1273                 }
1274                 
if ((row2 == null)) {
1275                     
return 1;
1276                 }
1277
1278                 
// Is row1 the child or grandchild of row2
1279                 
if (this.IsChildAndParent(row1, row2)) {
1280                     
return this._childFirst;
1281                 }
1282
1283                 
// Is row2 the child or grandchild of row1
1284                 
if (this.IsChildAndParent(row2, row1)) {
1285                     
return (-1 * this._childFirst);
1286                 }
1287                 
return 0;
1288             }
1289         }
1290     }
1291 }
1292
1293 #pragma warning restore
1591



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

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