Quản lý điểm sinh viên CNTT
177.545 lượt xem;
- QuanlydiemDataSet111.Designer.cs
- Quản lý điểm sinh vien CNTT /
- project /
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:2.0.50727.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("QuanlydiemDataSet11")]
25 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
26 public partial class QuanlydiemDataSet11 : 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 QuanlydiemDataSet11() {
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 QuanlydiemDataSet11(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 QuanlydiemDataSet11 cln = ((QuanlydiemDataSet11)(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 = "QuanlydiemDataSet11";
189 this.Prefix = "";
190 this.Namespace = "http://tempuri.org/QuanlydiemDataSet111.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 QuanlydiemDataSet11 ds = new QuanlydiemDataSet11();
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 columnMaMon;
268
269 private global::System.Data.DataColumn columnDiem1;
270
271 private global::System.Data.DataColumn columnDiem2;
272
273 private global::System.Data.DataColumn columnDiemThi;
274
275 private global::System.Data.DataColumn columnDiemTongKet;
276
277 private global::System.Data.DataColumn columnHocKi;
278
279 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
280 public tblKET_QUADataTable() {
281 this.TableName = "tblKET_QUA";
282 this.BeginInit();
283 this.InitClass();
284 this.EndInit();
285 }
286
287 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
288 internal tblKET_QUADataTable(global::System.Data.DataTable table) {
289 this.TableName = table.TableName;
290 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
291 this.CaseSensitive = table.CaseSensitive;
292 }
293 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
294 this.Locale = table.Locale;
295 }
296 if ((table.Namespace != table.DataSet.Namespace)) {
297 this.Namespace = table.Namespace;
298 }
299 this.Prefix = table.Prefix;
300 this.MinimumCapacity = table.MinimumCapacity;
301 }
302
303 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
304 protected tblKET_QUADataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
305 base(info, context) {
306 this.InitVars();
307 }
308
309 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
310 public global::System.Data.DataColumn MaSVColumn {
311 get {
312 return this.columnMaSV;
313 }
314 }
315
316 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
317 public global::System.Data.DataColumn MaMonColumn {
318 get {
319 return this.columnMaMon;
320 }
321 }
322
323 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
324 public global::System.Data.DataColumn Diem1Column {
325 get {
326 return this.columnDiem1;
327 }
328 }
329
330 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
331 public global::System.Data.DataColumn Diem2Column {
332 get {
333 return this.columnDiem2;
334 }
335 }
336
337 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
338 public global::System.Data.DataColumn DiemThiColumn {
339 get {
340 return this.columnDiemThi;
341 }
342 }
343
344 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
345 public global::System.Data.DataColumn DiemTongKetColumn {
346 get {
347 return this.columnDiemTongKet;
348 }
349 }
350
351 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
352 public global::System.Data.DataColumn HocKiColumn {
353 get {
354 return this.columnHocKi;
355 }
356 }
357
358 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
359 [global::System.ComponentModel.Browsable(false)]
360 public int Count {
361 get {
362 return this.Rows.Count;
363 }
364 }
365
366 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
367 public tblKET_QUARow this[int index] {
368 get {
369 return ((tblKET_QUARow)(this.Rows[index]));
370 }
371 }
372
373 public event tblKET_QUARowChangeEventHandler tblKET_QUARowChanging;
374
375 public event tblKET_QUARowChangeEventHandler tblKET_QUARowChanged;
376
377 public event tblKET_QUARowChangeEventHandler tblKET_QUARowDeleting;
378
379 public event tblKET_QUARowChangeEventHandler tblKET_QUARowDeleted;
380
381 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
382 public void AddtblKET_QUARow(tblKET_QUARow row) {
383 this.Rows.Add(row);
384 }
385
386 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
387 public tblKET_QUARow AddtblKET_QUARow(string MaSV, string MaMon, double Diem1, double Diem2, double DiemThi, double DiemTongKet, int HocKi) {
388 tblKET_QUARow rowtblKET_QUARow = ((tblKET_QUARow)(this.NewRow()));
389 object[] columnValuesArray = new object[] {
390 MaSV,
391 MaMon,
392 Diem1,
393 Diem2,
394 DiemThi,
395 DiemTongKet,
396 HocKi};
397 rowtblKET_QUARow.ItemArray = columnValuesArray;
398 this.Rows.Add(rowtblKET_QUARow);
399 return rowtblKET_QUARow;
400 }
401
402 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
403 public tblKET_QUARow FindByMaSVMaMon(string MaSV, string MaMon) {
404 return ((tblKET_QUARow)(this.Rows.Find(new object[] {
405 MaSV,
406 MaMon})));
407 }
408
409 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
410 public override global::System.Data.DataTable Clone() {
411 tblKET_QUADataTable cln = ((tblKET_QUADataTable)(base.Clone()));
412 cln.InitVars();
413 return cln;
414 }
415
416 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
417 protected override global::System.Data.DataTable CreateInstance() {
418 return new tblKET_QUADataTable();
419 }
420
421 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
422 internal void InitVars() {
423 this.columnMaSV = base.Columns["MaSV"];
424 this.columnMaMon = base.Columns["MaMon"];
425 this.columnDiem1 = base.Columns["Diem1"];
426 this.columnDiem2 = base.Columns["Diem2"];
427 this.columnDiemThi = base.Columns["DiemThi"];
428 this.columnDiemTongKet = base.Columns["DiemTongKet"];
429 this.columnHocKi = base.Columns["HocKi"];
430 }
431
432 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
433 private void InitClass() {
434 this.columnMaSV = new global::System.Data.DataColumn("MaSV", typeof(string), null, global::System.Data.MappingType.Element);
435 base.Columns.Add(this.columnMaSV);
436 this.columnMaMon = new global::System.Data.DataColumn("MaMon", typeof(string), null, global::System.Data.MappingType.Element);
437 base.Columns.Add(this.columnMaMon);
438 this.columnDiem1 = new global::System.Data.DataColumn("Diem1", typeof(double), null, global::System.Data.MappingType.Element);
439 base.Columns.Add(this.columnDiem1);
440 this.columnDiem2 = new global::System.Data.DataColumn("Diem2", typeof(double), null, global::System.Data.MappingType.Element);
441 base.Columns.Add(this.columnDiem2);
442 this.columnDiemThi = new global::System.Data.DataColumn("DiemThi", typeof(double), null, global::System.Data.MappingType.Element);
443 base.Columns.Add(this.columnDiemThi);
444 this.columnDiemTongKet = new global::System.Data.DataColumn("DiemTongKet", typeof(double), null, global::System.Data.MappingType.Element);
445 base.Columns.Add(this.columnDiemTongKet);
446 this.columnHocKi = new global::System.Data.DataColumn("HocKi", typeof(int), null, global::System.Data.MappingType.Element);
447 base.Columns.Add(this.columnHocKi);
448 this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
449 this.columnMaSV,
450 this.columnMaMon}, true));
451 this.columnMaSV.AllowDBNull = false;
452 this.columnMaSV.MaxLength = 10;
453 this.columnMaMon.AllowDBNull = false;
454 this.columnMaMon.MaxLength = 10;
455 }
456
457 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
458 public tblKET_QUARow NewtblKET_QUARow() {
459 return ((tblKET_QUARow)(this.NewRow()));
460 }
461
462 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
463 protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
464 return new tblKET_QUARow(builder);
465 }
466
467 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
468 protected override global::System.Type GetRowType() {
469 return typeof(tblKET_QUARow);
470 }
471
472 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
473 protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
474 base.OnRowChanged(e);
475 if ((this.tblKET_QUARowChanged != null)) {
476 this.tblKET_QUARowChanged(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
477 }
478 }
479
480 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
481 protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
482 base.OnRowChanging(e);
483 if ((this.tblKET_QUARowChanging != null)) {
484 this.tblKET_QUARowChanging(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
485 }
486 }
487
488 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
489 protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
490 base.OnRowDeleted(e);
491 if ((this.tblKET_QUARowDeleted != null)) {
492 this.tblKET_QUARowDeleted(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
493 }
494 }
495
496 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
497 protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
498 base.OnRowDeleting(e);
499 if ((this.tblKET_QUARowDeleting != null)) {
500 this.tblKET_QUARowDeleting(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
501 }
502 }
503
504 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
505 public void RemovetblKET_QUARow(tblKET_QUARow row) {
506 this.Rows.Remove(row);
507 }
508
509 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
510 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
511 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
512 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
513 QuanlydiemDataSet11 ds = new QuanlydiemDataSet11();
514 global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
515 any1.Namespace = "http://www.w3.org/2001/XMLSchema";
516 any1.MinOccurs = new decimal(0);
517 any1.MaxOccurs = decimal.MaxValue;
518 any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
519 sequence.Items.Add(any1);
520 global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
521 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
522 any2.MinOccurs = new decimal(1);
523 any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
524 sequence.Items.Add(any2);
525 global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
526 attribute1.Name = "namespace";
527 attribute1.FixedValue = ds.Namespace;
528 type.Attributes.Add(attribute1);
529 global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
530 attribute2.Name = "tableTypeName";
531 attribute2.FixedValue = "tblKET_QUADataTable";
532 type.Attributes.Add(attribute2);
533 type.Particle = sequence;
534 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
535 if (xs.Contains(dsSchema.TargetNamespace)) {
536 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
537 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
538 try {
539 global::System.Xml.Schema.XmlSchema schema = null;
540 dsSchema.Write(s1);
541 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
542 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
543 s2.SetLength(0);
544 schema.Write(s2);
545 if ((s1.Length == s2.Length)) {
546 s1.Position = 0;
547 s2.Position = 0;
548 for (; ((s1.Position != s1.Length)
549 && (s1.ReadByte() == s2.ReadByte())); ) {
550 ;
551 }
552 if ((s1.Position == s1.Length)) {
553 return type;
554 }
555 }
556 }
557 }
558 finally {
559 if ((s1 != null)) {
560 s1.Close();
561 }
562 if ((s2 != null)) {
563 s2.Close();
564 }
565 }
566 }
567 xs.Add(dsSchema);
568 return type;
569 }
570 }
571
572 /// <summary>
573 ///Represents strongly named DataRow class.
574 ///</summary>
575 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
576 public partial class tblKET_QUARow : global::System.Data.DataRow {
577
578 private tblKET_QUADataTable tabletblKET_QUA;
579
580 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
581 internal tblKET_QUARow(global::System.Data.DataRowBuilder rb) :
582 base(rb) {
583 this.tabletblKET_QUA = ((tblKET_QUADataTable)(this.Table));
584 }
585
586 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
587 public string MaSV {
588 get {
589 return ((string)(this[this.tabletblKET_QUA.MaSVColumn]));
590 }
591 set {
592 this[this.tabletblKET_QUA.MaSVColumn] = value;
593 }
594 }
595
596 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
597 public string MaMon {
598 get {
599 return ((string)(this[this.tabletblKET_QUA.MaMonColumn]));
600 }
601 set {
602 this[this.tabletblKET_QUA.MaMonColumn] = value;
603 }
604 }
605
606 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
607 public double Diem1 {
608 get {
609 try {
610 return ((double)(this[this.tabletblKET_QUA.Diem1Column]));
611 }
612 catch (global::System.InvalidCastException e) {
613 throw new global::System.Data.StrongTypingException("The value for column \'Diem1\' in table \'tblKET_QUA\' is DBNull.", e);
614 }
615 }
616 set {
617 this[this.tabletblKET_QUA.Diem1Column] = value;
618 }
619 }
620
621 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
622 public double Diem2 {
623 get {
624 try {
625 return ((double)(this[this.tabletblKET_QUA.Diem2Column]));
626 }
627 catch (global::System.InvalidCastException e) {
628 throw new global::System.Data.StrongTypingException("The value for column \'Diem2\' in table \'tblKET_QUA\' is DBNull.", e);
629 }
630 }
631 set {
632 this[this.tabletblKET_QUA.Diem2Column] = value;
633 }
634 }
635
636 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
637 public double DiemThi {
638 get {
639 try {
640 return ((double)(this[this.tabletblKET_QUA.DiemThiColumn]));
641 }
642 catch (global::System.InvalidCastException e) {
643 throw new global::System.Data.StrongTypingException("The value for column \'DiemThi\' in table \'tblKET_QUA\' is DBNull.", e);
644 }
645 }
646 set {
647 this[this.tabletblKET_QUA.DiemThiColumn] = value;
648 }
649 }
650
651 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
652 public double DiemTongKet {
653 get {
654 try {
655 return ((double)(this[this.tabletblKET_QUA.DiemTongKetColumn]));
656 }
657 catch (global::System.InvalidCastException e) {
658 throw new global::System.Data.StrongTypingException("The value for column \'DiemTongKet\' in table \'tblKET_QUA\' is DBNull.", e);
659 }
660 }
661 set {
662 this[this.tabletblKET_QUA.DiemTongKetColumn] = value;
663 }
664 }
665
666 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
667 public int HocKi {
668 get {
669 try {
670 return ((int)(this[this.tabletblKET_QUA.HocKiColumn]));
671 }
672 catch (global::System.InvalidCastException e) {
673 throw new global::System.Data.StrongTypingException("The value for column \'HocKi\' in table \'tblKET_QUA\' is DBNull.", e);
674 }
675 }
676 set {
677 this[this.tabletblKET_QUA.HocKiColumn] = value;
678 }
679 }
680
681 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
682 public bool IsDiem1Null() {
683 return this.IsNull(this.tabletblKET_QUA.Diem1Column);
684 }
685
686 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
687 public void SetDiem1Null() {
688 this[this.tabletblKET_QUA.Diem1Column] = global::System.Convert.DBNull;
689 }
690
691 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
692 public bool IsDiem2Null() {
693 return this.IsNull(this.tabletblKET_QUA.Diem2Column);
694 }
695
696 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
697 public void SetDiem2Null() {
698 this[this.tabletblKET_QUA.Diem2Column] = global::System.Convert.DBNull;
699 }
700
701 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
702 public bool IsDiemThiNull() {
703 return this.IsNull(this.tabletblKET_QUA.DiemThiColumn);
704 }
705
706 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
707 public void SetDiemThiNull() {
708 this[this.tabletblKET_QUA.DiemThiColumn] = global::System.Convert.DBNull;
709 }
710
711 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
712 public bool IsDiemTongKetNull() {
713 return this.IsNull(this.tabletblKET_QUA.DiemTongKetColumn);
714 }
715
716 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
717 public void SetDiemTongKetNull() {
718 this[this.tabletblKET_QUA.DiemTongKetColumn] = global::System.Convert.DBNull;
719 }
720
721 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
722 public bool IsHocKiNull() {
723 return this.IsNull(this.tabletblKET_QUA.HocKiColumn);
724 }
725
726 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
727 public void SetHocKiNull() {
728 this[this.tabletblKET_QUA.HocKiColumn] = global::System.Convert.DBNull;
729 }
730 }
731
732 /// <summary>
733 ///Row event argument class
734 ///</summary>
735 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
736 public class tblKET_QUARowChangeEvent : global::System.EventArgs {
737
738 private tblKET_QUARow eventRow;
739
740 private global::System.Data.DataRowAction eventAction;
741
742 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
743 public tblKET_QUARowChangeEvent(tblKET_QUARow row, global::System.Data.DataRowAction action) {
744 this.eventRow = row;
745 this.eventAction = action;
746 }
747
748 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
749 public tblKET_QUARow Row {
750 get {
751 return this.eventRow;
752 }
753 }
754
755 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
756 public global::System.Data.DataRowAction Action {
757 get {
758 return this.eventAction;
759 }
760 }
761 }
762 }
763 }
764 namespace Quản_lý_điểm_sinh_vien_CNTT.QuanlydiemDataSet11TableAdapters {
765
766
767 /// <summary>
768 ///Represents the connection and commands used to retrieve and save data.
769 ///</summary>
770 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
771 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
772 [global::System.ComponentModel.ToolboxItem(true)]
773 [global::System.ComponentModel.DataObjectAttribute(true)]
774 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
775 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
776 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
777 public partial class tblKET_QUATableAdapter : global::System.ComponentModel.Component {
778
779 private global::System.Data.SqlClient.SqlDataAdapter _adapter;
780
781 private global::System.Data.SqlClient.SqlConnection _connection;
782
783 private global::System.Data.SqlClient.SqlTransaction _transaction;
784
785 private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
786
787 private bool _clearBeforeFill;
788
789 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
790 public tblKET_QUATableAdapter() {
791 this.ClearBeforeFill = true;
792 }
793
794 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
795 protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
796 get {
797 if ((this._adapter == null)) {
798 this.InitAdapter();
799 }
800 return this._adapter;
801 }
802 }
803
804 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
805 internal global::System.Data.SqlClient.SqlConnection Connection {
806 get {
807 if ((this._connection == null)) {
808 this.InitConnection();
809 }
810 return this._connection;
811 }
812 set {
813 this._connection = value;
814 if ((this.Adapter.InsertCommand != null)) {
815 this.Adapter.InsertCommand.Connection = value;
816 }
817 if ((this.Adapter.DeleteCommand != null)) {
818 this.Adapter.DeleteCommand.Connection = value;
819 }
820 if ((this.Adapter.UpdateCommand != null)) {
821 this.Adapter.UpdateCommand.Connection = value;
822 }
823 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
824 if ((this.CommandCollection[i] != null)) {
825 ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
826 }
827 }
828 }
829 }
830
831 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
832 internal global::System.Data.SqlClient.SqlTransaction Transaction {
833 get {
834 return this._transaction;
835 }
836 set {
837 this._transaction = value;
838 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
839 this.CommandCollection[i].Transaction = this._transaction;
840 }
841 if (((this.Adapter != null)
842 && (this.Adapter.DeleteCommand != null))) {
843 this.Adapter.DeleteCommand.Transaction = this._transaction;
844 }
845 if (((this.Adapter != null)
846 && (this.Adapter.InsertCommand != null))) {
847 this.Adapter.InsertCommand.Transaction = this._transaction;
848 }
849 if (((this.Adapter != null)
850 && (this.Adapter.UpdateCommand != null))) {
851 this.Adapter.UpdateCommand.Transaction = this._transaction;
852 }
853 }
854 }
855
856 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
857 protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
858 get {
859 if ((this._commandCollection == null)) {
860 this.InitCommandCollection();
861 }
862 return this._commandCollection;
863 }
864 }
865
866 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
867 public bool ClearBeforeFill {
868 get {
869 return this._clearBeforeFill;
870 }
871 set {
872 this._clearBeforeFill = value;
873 }
874 }
875
876 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
877 private void InitAdapter() {
878 this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
879 global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
880 tableMapping.SourceTable = "Table";
881 tableMapping.DataSetTable = "tblKET_QUA";
882 tableMapping.ColumnMappings.Add("MaSV", "MaSV");
883 tableMapping.ColumnMappings.Add("MaMon", "MaMon");
884 tableMapping.ColumnMappings.Add("Diem1", "Diem1");
885 tableMapping.ColumnMappings.Add("Diem2", "Diem2");
886 tableMapping.ColumnMappings.Add("DiemThi", "DiemThi");
887 tableMapping.ColumnMappings.Add("DiemTongKet", "DiemTongKet");
888 tableMapping.ColumnMappings.Add("HocKi", "HocKi");
889 this._adapter.TableMappings.Add(tableMapping);
890 this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
891 this._adapter.DeleteCommand.Connection = this.Connection;
892 this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[tblKET_QUA] WHERE (([MaSV] = @Original_MaSV) AND ([MaMon] = @Original_MaMon) AND ((@IsNull_Diem1 = 1 AND [Diem1] IS NULL) OR ([Diem1] = @Original_Diem1)) AND ((@IsNull_Diem2 = 1 AND [Diem2] IS NULL) OR ([Diem2] = @Original_Diem2)) AND ((@IsNull_DiemThi = 1 AND [DiemThi] IS NULL) OR ([DiemThi] = @Original_DiemThi)) AND ((@IsNull_DiemTongKet = 1 AND [DiemTongKet] IS NULL) OR ([DiemTongKet] = @Original_DiemTongKet)) AND ((@IsNull_HocKi = 1 AND [HocKi] IS NULL) OR ([HocKi] = @Original_HocKi)))";
893 this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
894 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSV", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSV", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
895 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaMon", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaMon", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
896 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Diem1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
897 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Diem1", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
898 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Diem2", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
899 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Diem2", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
900 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiemThi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
901 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiemThi", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
902 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiemTongKet", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTongKet", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
903 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiemTongKet", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTongKet", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
904 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HocKi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HocKi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
905 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HocKi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HocKi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
906 this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
907 this._adapter.InsertCommand.Connection = this.Connection;
908 this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[tblKET_QUA] ([MaSV], [MaMon], [Diem1], [Diem2], [DiemThi], [DiemTongKet], [HocKi]) VALUES (@MaSV, @MaMon, @Diem1, @Diem2, @DiemThi, @DiemTongKet, @HocKi);
909 SELECT MaSV, MaMon, Diem1, Diem2, DiemThi, DiemTongKet, HocKi FROM tblKET_QUA WHERE (MaMon = @MaMon) AND (MaSV = @MaSV)";
910 this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
911 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSV", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSV", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
912 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaMon", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaMon", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
913 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Diem1", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
914 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Diem2", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
915 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiemThi", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
916 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, "", "", ""));
917 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, "", "", ""));
918 this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
919 this._adapter.UpdateCommand.Connection = this.Connection;
920 this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[tblKET_QUA] SET [MaSV] = @MaSV, [MaMon] = @MaMon, [Diem1] = @Diem1, [Diem2] = @Diem2, [DiemThi] = @DiemThi, [DiemTongKet] = @DiemTongKet, [HocKi] = @HocKi WHERE (([MaSV] = @Original_MaSV) AND ([MaMon] = @Original_MaMon) AND ((@IsNull_Diem1 = 1 AND [Diem1] IS NULL) OR ([Diem1] = @Original_Diem1)) AND ((@IsNull_Diem2 = 1 AND [Diem2] IS NULL) OR ([Diem2] = @Original_Diem2)) AND ((@IsNull_DiemThi = 1 AND [DiemThi] IS NULL) OR ([DiemThi] = @Original_DiemThi)) AND ((@IsNull_DiemTongKet = 1 AND [DiemTongKet] IS NULL) OR ([DiemTongKet] = @Original_DiemTongKet)) AND ((@IsNull_HocKi = 1 AND [HocKi] IS NULL) OR ([HocKi] = @Original_HocKi)));
921 SELECT MaSV, MaMon, Diem1, Diem2, DiemThi, DiemTongKet, HocKi FROM tblKET_QUA WHERE (MaMon = @MaMon) AND (MaSV = @MaSV)";
922 this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
923 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSV", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSV", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
924 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaMon", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaMon", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
925 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Diem1", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
926 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Diem2", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
927 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiemThi", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
928 this._adapter.UpdateCommand.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, "", "", ""));
929 this._adapter.UpdateCommand.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, "", "", ""));
930 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSV", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSV", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
931 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaMon", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaMon", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
932 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Diem1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
933 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Diem1", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
934 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Diem2", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
935 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Diem2", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
936 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiemThi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
937 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiemThi", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
938 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiemTongKet", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTongKet", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
939 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiemTongKet", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTongKet", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
940 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HocKi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HocKi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
941 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HocKi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HocKi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
942 }
943
944 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
945 private void InitConnection() {
946 this._connection = new global::System.Data.SqlClient.SqlConnection();
947 this._connection.ConnectionString = global::Quản_lý_điểm_sinh_vien_CNTT.Properties.Settings.Default.QuanlydiemConnectionString2;
948 }
949
950 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
951 private void InitCommandCollection() {
952 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
953 this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
954 this._commandCollection[0].Connection = this.Connection;
955 this._commandCollection[0].CommandText = "SELECT MaSV, MaMon, Diem1, Diem2, DiemThi, DiemTongKet, HocKi FROM dbo.tblKET_QUA" +
956 "";
957 this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
958 }
959
960 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
961 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
962 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
963 public virtual int Fill(QuanlydiemDataSet11.tblKET_QUADataTable dataTable) {
964 this.Adapter.SelectCommand = this.CommandCollection[0];
965 if ((this.ClearBeforeFill == true)) {
966 dataTable.Clear();
967 }
968 int returnValue = this.Adapter.Fill(dataTable);
969 return returnValue;
970 }
971
972 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
973 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
974 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
975 public virtual QuanlydiemDataSet11.tblKET_QUADataTable GetData() {
976 this.Adapter.SelectCommand = this.CommandCollection[0];
977 QuanlydiemDataSet11.tblKET_QUADataTable dataTable = new QuanlydiemDataSet11.tblKET_QUADataTable();
978 this.Adapter.Fill(dataTable);
979 return dataTable;
980 }
981
982 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
983 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
984 public virtual int Update(QuanlydiemDataSet11.tblKET_QUADataTable dataTable) {
985 return this.Adapter.Update(dataTable);
986 }
987
988 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
989 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
990 public virtual int Update(QuanlydiemDataSet11 dataSet) {
991 return this.Adapter.Update(dataSet, "tblKET_QUA");
992 }
993
994 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
995 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
996 public virtual int Update(global::System.Data.DataRow dataRow) {
997 return this.Adapter.Update(new global::System.Data.DataRow[] {
998 dataRow});
999 }
1000
1001 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1002 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1003 public virtual int Update(global::System.Data.DataRow[] dataRows) {
1004 return this.Adapter.Update(dataRows);
1005 }
1006
1007 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1008 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1009 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
1010 public virtual int Delete(string Original_MaSV, string Original_MaMon, global::System.Nullable<double> Original_Diem1, global::System.Nullable<double> Original_Diem2, global::System.Nullable<double> Original_DiemThi, global::System.Nullable<double> Original_DiemTongKet, global::System.Nullable<int> Original_HocKi) {
1011 if ((Original_MaSV == null)) {
1012 throw new global::System.ArgumentNullException("Original_MaSV");
1013 }
1014 else {
1015 this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_MaSV));
1016 }
1017 if ((Original_MaMon == null)) {
1018 throw new global::System.ArgumentNullException("Original_MaMon");
1019 }
1020 else {
1021 this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_MaMon));
1022 }
1023 if ((Original_Diem1.HasValue == true)) {
1024 this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0));
1025 this.Adapter.DeleteCommand.Parameters[3].Value = ((double)(Original_Diem1.Value));
1026 }
1027 else {
1028 this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1));
1029 this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value;
1030 }
1031 if ((Original_Diem2.HasValue == true)) {
1032 this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0));
1033 this.Adapter.DeleteCommand.Parameters[5].Value = ((double)(Original_Diem2.Value));
1034 }
1035 else {
1036 this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1));
1037 this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value;
1038 }
1039 if ((Original_DiemThi.HasValue == true)) {
1040 this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0));
1041 this.Adapter.DeleteCommand.Parameters[7].Value = ((double)(Original_DiemThi.Value));
1042 }
1043 else {
1044 this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1));
1045 this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value;
1046 }
1047 if ((Original_DiemTongKet.HasValue == true)) {
1048 this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0));
1049 this.Adapter.DeleteCommand.Parameters[9].Value = ((double)(Original_DiemTongKet.Value));
1050 }
1051 else {
1052 this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1));
1053 this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value;
1054 }
1055 if ((Original_HocKi.HasValue == true)) {
1056 this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0));
1057 this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(Original_HocKi.Value));
1058 }
1059 else {
1060 this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1));
1061 this.Adapter.DeleteCommand.Parameters[11].Value = global::System.DBNull.Value;
1062 }
1063 global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
1064 if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
1065 != global::System.Data.ConnectionState.Open)) {
1066 this.Adapter.DeleteCommand.Connection.Open();
1067 }
1068 try {
1069 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
1070 return returnValue;
1071 }
1072 finally {
1073 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1074 this.Adapter.DeleteCommand.Connection.Close();
1075 }
1076 }
1077 }
1078
1079 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1080 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1081 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1082 public virtual int Insert(string MaSV, string MaMon, global::System.Nullable<double> Diem1, global::System.Nullable<double> Diem2, global::System.Nullable<double> DiemThi, global::System.Nullable<double> DiemTongKet, global::System.Nullable<int> HocKi) {
1083 if ((MaSV == null)) {
1084 throw new global::System.ArgumentNullException("MaSV");
1085 }
1086 else {
1087 this.Adapter.InsertCommand.Parameters[0].Value = ((string)(MaSV));
1088 }
1089 if ((MaMon == null)) {
1090 throw new global::System.ArgumentNullException("MaMon");
1091 }
1092 else {
1093 this.Adapter.InsertCommand.Parameters[1].Value = ((string)(MaMon));
1094 }
1095 if ((Diem1.HasValue == true)) {
1096 this.Adapter.InsertCommand.Parameters[2].Value = ((double)(Diem1.Value));
1097 }
1098 else {
1099 this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1100 }
1101 if ((Diem2.HasValue == true)) {
1102 this.Adapter.InsertCommand.Parameters[3].Value = ((double)(Diem2.Value));
1103 }
1104 else {
1105 this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1106 }
1107 if ((DiemThi.HasValue == true)) {
1108 this.Adapter.InsertCommand.Parameters[4].Value = ((double)(DiemThi.Value));
1109 }
1110 else {
1111 this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
1112 }
1113 if ((DiemTongKet.HasValue == true)) {
1114 this.Adapter.InsertCommand.Parameters[5].Value = ((double)(DiemTongKet.Value));
1115 }
1116 else {
1117 this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
1118 }
1119 if ((HocKi.HasValue == true)) {
1120 this.Adapter.InsertCommand.Parameters[6].Value = ((int)(HocKi.Value));
1121 }
1122 else {
1123 this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value;
1124 }
1125 global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1126 if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1127 != global::System.Data.ConnectionState.Open)) {
1128 this.Adapter.InsertCommand.Connection.Open();
1129 }
1130 try {
1131 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1132 return returnValue;
1133 }
1134 finally {
1135 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1136 this.Adapter.InsertCommand.Connection.Close();
1137 }
1138 }
1139 }
1140
1141 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1142 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1143 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1144 public virtual int Update(string MaSV, string MaMon, global::System.Nullable<double> Diem1, global::System.Nullable<double> Diem2, global::System.Nullable<double> DiemThi, global::System.Nullable<double> DiemTongKet, global::System.Nullable<int> HocKi, string Original_MaSV, string Original_MaMon, global::System.Nullable<double> Original_Diem1, global::System.Nullable<double> Original_Diem2, global::System.Nullable<double> Original_DiemThi, global::System.Nullable<double> Original_DiemTongKet, global::System.Nullable<int> Original_HocKi) {
1145 if ((MaSV == null)) {
1146 throw new global::System.ArgumentNullException("MaSV");
1147 }
1148 else {
1149 this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(MaSV));
1150 }
1151 if ((MaMon == null)) {
1152 throw new global::System.ArgumentNullException("MaMon");
1153 }
1154 else {
1155 this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(MaMon));
1156 }
1157 if ((Diem1.HasValue == true)) {
1158 this.Adapter.UpdateCommand.Parameters[2].Value = ((double)(Diem1.Value));
1159 }
1160 else {
1161 this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1162 }
1163 if ((Diem2.HasValue == true)) {
1164 this.Adapter.UpdateCommand.Parameters[3].Value = ((double)(Diem2.Value));
1165 }
1166 else {
1167 this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
1168 }
1169 if ((DiemThi.HasValue == true)) {
1170 this.Adapter.UpdateCommand.Parameters[4].Value = ((double)(DiemThi.Value));
1171 }
1172 else {
1173 this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
1174 }
1175 if ((DiemTongKet.HasValue == true)) {
1176 this.Adapter.UpdateCommand.Parameters[5].Value = ((double)(DiemTongKet.Value));
1177 }
1178 else {
1179 this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
1180 }
1181 if ((HocKi.HasValue == true)) {
1182 this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(HocKi.Value));
1183 }
1184 else {
1185 this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
1186 }
1187 if ((Original_MaSV == null)) {
1188 throw new global::System.ArgumentNullException("Original_MaSV");
1189 }
1190 else {
1191 this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_MaSV));
1192 }
1193 if ((Original_MaMon == null)) {
1194 throw new global::System.ArgumentNullException("Original_MaMon");
1195 }
1196 else {
1197 this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_MaMon));
1198 }
1199 if ((Original_Diem1.HasValue == true)) {
1200 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0));
1201 this.Adapter.UpdateCommand.Parameters[10].Value = ((double)(Original_Diem1.Value));
1202 }
1203 else {
1204 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1));
1205 this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value;
1206 }
1207 if ((Original_Diem2.HasValue == true)) {
1208 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
1209 this.Adapter.UpdateCommand.Parameters[12].Value = ((double)(Original_Diem2.Value));
1210 }
1211 else {
1212 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
1213 this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
1214 }
1215 if ((Original_DiemThi.HasValue == true)) {
1216 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
1217 this.Adapter.UpdateCommand.Parameters[14].Value = ((double)(Original_DiemThi.Value));
1218 }
1219 else {
1220 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
1221 this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
1222 }
1223 if ((Original_DiemTongKet.HasValue == true)) {
1224 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
1225 this.Adapter.UpdateCommand.Parameters[16].Value = ((double)(Original_DiemTongKet.Value));
1226 }
1227 else {
1228 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
1229 this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value;
1230 }
1231 if ((Original_HocKi.HasValue == true)) {
1232 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0));
1233 this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(Original_HocKi.Value));
1234 }
1235 else {
1236 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1));
1237 this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value;
1238 }
1239 global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
1240 if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
1241 != global::System.Data.ConnectionState.Open)) {
1242 this.Adapter.UpdateCommand.Connection.Open();
1243 }
1244 try {
1245 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
1246 return returnValue;
1247 }
1248 finally {
1249 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1250 this.Adapter.UpdateCommand.Connection.Close();
1251 }
1252 }
1253 }
1254
1255 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1256 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1257 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1258 public virtual int Update(global::System.Nullable<double> Diem1, global::System.Nullable<double> Diem2, global::System.Nullable<double> DiemThi, global::System.Nullable<double> DiemTongKet, global::System.Nullable<int> HocKi, string Original_MaSV, string Original_MaMon, global::System.Nullable<double> Original_Diem1, global::System.Nullable<double> Original_Diem2, global::System.Nullable<double> Original_DiemThi, global::System.Nullable<double> Original_DiemTongKet, global::System.Nullable<int> Original_HocKi) {
1259 return this.Update(Original_MaSV, Original_MaMon, Diem1, Diem2, DiemThi, DiemTongKet, HocKi, Original_MaSV, Original_MaMon, Original_Diem1, Original_Diem2, Original_DiemThi, Original_DiemTongKet, Original_HocKi);
1260 }
1261 }
1262
1263 /// <summary>
1264 ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
1265 ///</summary>
1266 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1267 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
1268 [global::System.ComponentModel.ToolboxItem(true)]
1269 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
1270 "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1271 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
1272 public partial class TableAdapterManager : global::System.ComponentModel.Component {
1273
1274 private UpdateOrderOption _updateOrder;
1275
1276 private tblKET_QUATableAdapter _tblKET_QUATableAdapter;
1277
1278 private bool _backupDataSetBeforeUpdate;
1279
1280 private global::System.Data.IDbConnection _connection;
1281
1282 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1283 public UpdateOrderOption UpdateOrder {
1284 get {
1285 return this._updateOrder;
1286 }
1287 set {
1288 this._updateOrder = value;
1289 }
1290 }
1291
1292 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1293 [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
1294 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
1295 "", "System.Drawing.Design.UITypeEditor")]
1296 public tblKET_QUATableAdapter tblKET_QUATableAdapter {
1297 get {
1298 return this._tblKET_QUATableAdapter;
1299 }
1300 set {
1301 this._tblKET_QUATableAdapter = value;
1302 }
1303 }
1304
1305 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1306 public bool BackupDataSetBeforeUpdate {
1307 get {
1308 return this._backupDataSetBeforeUpdate;
1309 }
1310 set {
1311 this._backupDataSetBeforeUpdate = value;
1312 }
1313 }
1314
1315 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1316 [global::System.ComponentModel.Browsable(false)]
1317 public global::System.Data.IDbConnection Connection {
1318 get {
1319 if ((this._connection != null)) {
1320 return this._connection;
1321 }
1322 if (((this._tblKET_QUATableAdapter != null)
1323 && (this._tblKET_QUATableAdapter.Connection != null))) {
1324 return this._tblKET_QUATableAdapter.Connection;
1325 }
1326 return null;
1327 }
1328 set {
1329 this._connection = value;
1330 }
1331 }
1332
1333 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1334 [global::System.ComponentModel.Browsable(false)]
1335 public int TableAdapterInstanceCount {
1336 get {
1337 int count = 0;
1338 if ((this._tblKET_QUATableAdapter != null)) {
1339 count = (count + 1);
1340 }
1341 return count;
1342 }
1343 }
1344
1345 /// <summary>
1346 ///Update rows in top-down order.
1347 ///</summary>
1348 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1349 private int UpdateUpdatedRows(QuanlydiemDataSet11 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1350 int result = 0;
1351 if ((this._tblKET_QUATableAdapter != null)) {
1352 global::System.Data.DataRow[] updatedRows = dataSet.tblKET_QUA.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
1353 updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
1354 if (((updatedRows != null)
1355 && (0 < updatedRows.Length))) {
1356 result = (result + this._tblKET_QUATableAdapter.Update(updatedRows));
1357 allChangedRows.AddRange(updatedRows);
1358 }
1359 }
1360 return result;
1361 }
1362
1363 /// <summary>
1364 ///Insert rows in top-down order.
1365 ///</summary>
1366 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1367 private int UpdateInsertedRows(QuanlydiemDataSet11 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1368 int result = 0;
1369 if ((this._tblKET_QUATableAdapter != null)) {
1370 global::System.Data.DataRow[] addedRows = dataSet.tblKET_QUA.Select(null, null, global::System.Data.DataViewRowState.Added);
1371 if (((addedRows != null)
1372 && (0 < addedRows.Length))) {
1373 result = (result + this._tblKET_QUATableAdapter.Update(addedRows));
1374 allAddedRows.AddRange(addedRows);
1375 }
1376 }
1377 return result;
1378 }
1379
1380 /// <summary>
1381 ///Delete rows in bottom-up order.
1382 ///</summary>
1383 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1384 private int UpdateDeletedRows(QuanlydiemDataSet11 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
1385 int result = 0;
1386 if ((this._tblKET_QUATableAdapter != null)) {
1387 global::System.Data.DataRow[] deletedRows = dataSet.tblKET_QUA.Select(null, null, global::System.Data.DataViewRowState.Deleted);
1388 if (((deletedRows != null)
1389 && (0 < deletedRows.Length))) {
1390 result = (result + this._tblKET_QUATableAdapter.Update(deletedRows));
1391 allChangedRows.AddRange(deletedRows);
1392 }
1393 }
1394 return result;
1395 }
1396
1397 /// <summary>
1398 ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1399 ///</summary>
1400 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1401 private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1402 if (((updatedRows == null)
1403 || (updatedRows.Length < 1))) {
1404 return updatedRows;
1405 }
1406 if (((allAddedRows == null)
1407 || (allAddedRows.Count < 1))) {
1408 return updatedRows;
1409 }
1410 global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1411 for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
1412 global::System.Data.DataRow row = updatedRows[i];
1413 if ((allAddedRows.Contains(row) == false)) {
1414 realUpdatedRows.Add(row);
1415 }
1416 }
1417 return realUpdatedRows.ToArray();
1418 }
1419
1420 /// <summary>
1421 ///Update all changes to the dataset.
1422 ///</summary>
1423 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1424 public virtual int UpdateAll(QuanlydiemDataSet11 dataSet) {
1425 if ((dataSet == null)) {
1426 throw new global::System.ArgumentNullException("dataSet");
1427 }
1428 if ((dataSet.HasChanges() == false)) {
1429 return 0;
1430 }
1431 if (((this._tblKET_QUATableAdapter != null)
1432 && (this.MatchTableAdapterConnection(this._tblKET_QUATableAdapter.Connection) == false))) {
1433 throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
1434 "tring.");
1435 }
1436 global::System.Data.IDbConnection workConnection = this.Connection;
1437 if ((workConnection == null)) {
1438 throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
1439 "ger TableAdapter property to a valid TableAdapter instance.");
1440 }
1441 bool workConnOpened = false;
1442 if (((workConnection.State & global::System.Data.ConnectionState.Broken)
1443 == global::System.Data.ConnectionState.Broken)) {
1444 workConnection.Close();
1445 }
1446 if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
1447 workConnection.Open();
1448 workConnOpened = true;
1449 }
1450 global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
1451 if ((workTransaction == null)) {
1452 throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
1453 "ctions or the current state is not allowing the transaction to begin.");
1454 }
1455 global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1456 global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1457 global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
1458 global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
1459 int result = 0;
1460 global::System.Data.DataSet backupDataSet = null;
1461 if (this.BackupDataSetBeforeUpdate) {
1462 backupDataSet = new global::System.Data.DataSet();
1463 backupDataSet.Merge(dataSet);
1464 }
1465 try {
1466 // ---- Prepare for update -----------
1467 //
1468 if ((this._tblKET_QUATableAdapter != null)) {
1469 revertConnections.Add(this._tblKET_QUATableAdapter, this._tblKET_QUATableAdapter.Connection);
1470 this._tblKET_QUATableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
1471 this._tblKET_QUATableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
1472 if (this._tblKET_QUATableAdapter.Adapter.AcceptChangesDuringUpdate) {
1473 this._tblKET_QUATableAdapter.Adapter.AcceptChangesDuringUpdate = false;
1474 adaptersWithAcceptChangesDuringUpdate.Add(this._tblKET_QUATableAdapter.Adapter);
1475 }
1476 }
1477 //
1478 //---- Perform updates -----------
1479 //
1480 if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
1481 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1482 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1483 }
1484 else {
1485 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1486 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1487 }
1488 result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
1489 //
1490 //---- Commit updates -----------
1491 //
1492 workTransaction.Commit();
1493 if ((0 < allAddedRows.Count)) {
1494 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1495 allAddedRows.CopyTo(rows);
1496 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1497 global::System.Data.DataRow row = rows[i];
1498 row.AcceptChanges();
1499 }
1500 }
1501 if ((0 < allChangedRows.Count)) {
1502 global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
1503 allChangedRows.CopyTo(rows);
1504 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1505 global::System.Data.DataRow row = rows[i];
1506 row.AcceptChanges();
1507 }
1508 }
1509 }
1510 catch (global::System.Exception ex) {
1511 workTransaction.Rollback();
1512 // ---- Restore the dataset -----------
1513 if (this.BackupDataSetBeforeUpdate) {
1514 global::System.Diagnostics.Debug.Assert((backupDataSet != null));
1515 dataSet.Clear();
1516 dataSet.Merge(backupDataSet);
1517 }
1518 else {
1519 if ((0 < allAddedRows.Count)) {
1520 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1521 allAddedRows.CopyTo(rows);
1522 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1523 global::System.Data.DataRow row = rows[i];
1524 row.AcceptChanges();
1525 row.SetAdded();
1526 }
1527 }
1528 }
1529 throw ex;
1530 }
1531 finally {
1532 if (workConnOpened) {
1533 workConnection.Close();
1534 }
1535 if ((this._tblKET_QUATableAdapter != null)) {
1536 this._tblKET_QUATableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tblKET_QUATableAdapter]));
1537 this._tblKET_QUATableAdapter.Transaction = null;
1538 }
1539 if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
1540 global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
1541 adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
1542 for (int i = 0; (i < adapters.Length); i = (i + 1)) {
1543 global::System.Data.Common.DataAdapter adapter = adapters[i];
1544 adapter.AcceptChangesDuringUpdate = true;
1545 }
1546 }
1547 }
1548 return result;
1549 }
1550
1551 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1552 protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
1553 global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
1554 }
1555
1556 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1557 protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
1558 if ((this._connection != null)) {
1559 return true;
1560 }
1561 if (((this.Connection == null)
1562 || (inputConnection == null))) {
1563 return true;
1564 }
1565 if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
1566 return true;
1567 }
1568 return false;
1569 }
1570
1571 /// <summary>
1572 ///Update Order Option
1573 ///</summary>
1574 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1575 public enum UpdateOrderOption {
1576
1577 InsertUpdateDelete = 0,
1578
1579 UpdateInsertDelete = 1,
1580 }
1581
1582 /// <summary>
1583 ///Used to sort self-referenced table's rows
1584 ///</summary>
1585 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1586 private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
1587
1588 private global::System.Data.DataRelation _relation;
1589
1590 private int _childFirst;
1591
1592 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1593 internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
1594 this._relation = relation;
1595 if (childFirst) {
1596 this._childFirst = -1;
1597 }
1598 else {
1599 this._childFirst = 1;
1600 }
1601 }
1602
1603 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1604 private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) {
1605 global::System.Diagnostics.Debug.Assert((child != null));
1606 global::System.Diagnostics.Debug.Assert((parent != null));
1607 global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1608 for (
1609 ; ((newParent != null)
1610 && ((object.ReferenceEquals(newParent, child) == false)
1611 && (object.ReferenceEquals(newParent, parent) == false)));
1612 ) {
1613 newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1614 }
1615 if ((newParent == null)) {
1616 for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null)
1617 && ((object.ReferenceEquals(newParent, child) == false)
1618 && (object.ReferenceEquals(newParent, parent) == false)));
1619 ) {
1620 newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
1621 }
1622 }
1623 if (object.ReferenceEquals(newParent, parent)) {
1624 return true;
1625 }
1626 return false;
1627 }
1628
1629 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1630 public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
1631 if (object.ReferenceEquals(row1, row2)) {
1632 return 0;
1633 }
1634 if ((row1 == null)) {
1635 return -1;
1636 }
1637 if ((row2 == null)) {
1638 return 1;
1639 }
1640
1641 // Is row1 the child or grandchild of row2
1642 if (this.IsChildAndParent(row1, row2)) {
1643 return this._childFirst;
1644 }
1645
1646 // Is row2 the child or grandchild of row1
1647 if (this.IsChildAndParent(row2, row1)) {
1648 return (-1 * this._childFirst);
1649 }
1650 return 0;
1651 }
1652 }
1653 }
1654 }
1655
1656 #pragma warning restore 1591
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("QuanlydiemDataSet11")]
25 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
26 public partial class QuanlydiemDataSet11 : 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 QuanlydiemDataSet11() {
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 QuanlydiemDataSet11(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 QuanlydiemDataSet11 cln = ((QuanlydiemDataSet11)(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 = "QuanlydiemDataSet11";
189 this.Prefix = "";
190 this.Namespace = "http://tempuri.org/QuanlydiemDataSet111.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 QuanlydiemDataSet11 ds = new QuanlydiemDataSet11();
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 columnMaMon;
268
269 private global::System.Data.DataColumn columnDiem1;
270
271 private global::System.Data.DataColumn columnDiem2;
272
273 private global::System.Data.DataColumn columnDiemThi;
274
275 private global::System.Data.DataColumn columnDiemTongKet;
276
277 private global::System.Data.DataColumn columnHocKi;
278
279 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
280 public tblKET_QUADataTable() {
281 this.TableName = "tblKET_QUA";
282 this.BeginInit();
283 this.InitClass();
284 this.EndInit();
285 }
286
287 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
288 internal tblKET_QUADataTable(global::System.Data.DataTable table) {
289 this.TableName = table.TableName;
290 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
291 this.CaseSensitive = table.CaseSensitive;
292 }
293 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
294 this.Locale = table.Locale;
295 }
296 if ((table.Namespace != table.DataSet.Namespace)) {
297 this.Namespace = table.Namespace;
298 }
299 this.Prefix = table.Prefix;
300 this.MinimumCapacity = table.MinimumCapacity;
301 }
302
303 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
304 protected tblKET_QUADataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
305 base(info, context) {
306 this.InitVars();
307 }
308
309 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
310 public global::System.Data.DataColumn MaSVColumn {
311 get {
312 return this.columnMaSV;
313 }
314 }
315
316 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
317 public global::System.Data.DataColumn MaMonColumn {
318 get {
319 return this.columnMaMon;
320 }
321 }
322
323 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
324 public global::System.Data.DataColumn Diem1Column {
325 get {
326 return this.columnDiem1;
327 }
328 }
329
330 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
331 public global::System.Data.DataColumn Diem2Column {
332 get {
333 return this.columnDiem2;
334 }
335 }
336
337 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
338 public global::System.Data.DataColumn DiemThiColumn {
339 get {
340 return this.columnDiemThi;
341 }
342 }
343
344 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
345 public global::System.Data.DataColumn DiemTongKetColumn {
346 get {
347 return this.columnDiemTongKet;
348 }
349 }
350
351 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
352 public global::System.Data.DataColumn HocKiColumn {
353 get {
354 return this.columnHocKi;
355 }
356 }
357
358 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
359 [global::System.ComponentModel.Browsable(false)]
360 public int Count {
361 get {
362 return this.Rows.Count;
363 }
364 }
365
366 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
367 public tblKET_QUARow this[int index] {
368 get {
369 return ((tblKET_QUARow)(this.Rows[index]));
370 }
371 }
372
373 public event tblKET_QUARowChangeEventHandler tblKET_QUARowChanging;
374
375 public event tblKET_QUARowChangeEventHandler tblKET_QUARowChanged;
376
377 public event tblKET_QUARowChangeEventHandler tblKET_QUARowDeleting;
378
379 public event tblKET_QUARowChangeEventHandler tblKET_QUARowDeleted;
380
381 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
382 public void AddtblKET_QUARow(tblKET_QUARow row) {
383 this.Rows.Add(row);
384 }
385
386 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
387 public tblKET_QUARow AddtblKET_QUARow(string MaSV, string MaMon, double Diem1, double Diem2, double DiemThi, double DiemTongKet, int HocKi) {
388 tblKET_QUARow rowtblKET_QUARow = ((tblKET_QUARow)(this.NewRow()));
389 object[] columnValuesArray = new object[] {
390 MaSV,
391 MaMon,
392 Diem1,
393 Diem2,
394 DiemThi,
395 DiemTongKet,
396 HocKi};
397 rowtblKET_QUARow.ItemArray = columnValuesArray;
398 this.Rows.Add(rowtblKET_QUARow);
399 return rowtblKET_QUARow;
400 }
401
402 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
403 public tblKET_QUARow FindByMaSVMaMon(string MaSV, string MaMon) {
404 return ((tblKET_QUARow)(this.Rows.Find(new object[] {
405 MaSV,
406 MaMon})));
407 }
408
409 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
410 public override global::System.Data.DataTable Clone() {
411 tblKET_QUADataTable cln = ((tblKET_QUADataTable)(base.Clone()));
412 cln.InitVars();
413 return cln;
414 }
415
416 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
417 protected override global::System.Data.DataTable CreateInstance() {
418 return new tblKET_QUADataTable();
419 }
420
421 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
422 internal void InitVars() {
423 this.columnMaSV = base.Columns["MaSV"];
424 this.columnMaMon = base.Columns["MaMon"];
425 this.columnDiem1 = base.Columns["Diem1"];
426 this.columnDiem2 = base.Columns["Diem2"];
427 this.columnDiemThi = base.Columns["DiemThi"];
428 this.columnDiemTongKet = base.Columns["DiemTongKet"];
429 this.columnHocKi = base.Columns["HocKi"];
430 }
431
432 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
433 private void InitClass() {
434 this.columnMaSV = new global::System.Data.DataColumn("MaSV", typeof(string), null, global::System.Data.MappingType.Element);
435 base.Columns.Add(this.columnMaSV);
436 this.columnMaMon = new global::System.Data.DataColumn("MaMon", typeof(string), null, global::System.Data.MappingType.Element);
437 base.Columns.Add(this.columnMaMon);
438 this.columnDiem1 = new global::System.Data.DataColumn("Diem1", typeof(double), null, global::System.Data.MappingType.Element);
439 base.Columns.Add(this.columnDiem1);
440 this.columnDiem2 = new global::System.Data.DataColumn("Diem2", typeof(double), null, global::System.Data.MappingType.Element);
441 base.Columns.Add(this.columnDiem2);
442 this.columnDiemThi = new global::System.Data.DataColumn("DiemThi", typeof(double), null, global::System.Data.MappingType.Element);
443 base.Columns.Add(this.columnDiemThi);
444 this.columnDiemTongKet = new global::System.Data.DataColumn("DiemTongKet", typeof(double), null, global::System.Data.MappingType.Element);
445 base.Columns.Add(this.columnDiemTongKet);
446 this.columnHocKi = new global::System.Data.DataColumn("HocKi", typeof(int), null, global::System.Data.MappingType.Element);
447 base.Columns.Add(this.columnHocKi);
448 this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
449 this.columnMaSV,
450 this.columnMaMon}, true));
451 this.columnMaSV.AllowDBNull = false;
452 this.columnMaSV.MaxLength = 10;
453 this.columnMaMon.AllowDBNull = false;
454 this.columnMaMon.MaxLength = 10;
455 }
456
457 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
458 public tblKET_QUARow NewtblKET_QUARow() {
459 return ((tblKET_QUARow)(this.NewRow()));
460 }
461
462 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
463 protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
464 return new tblKET_QUARow(builder);
465 }
466
467 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
468 protected override global::System.Type GetRowType() {
469 return typeof(tblKET_QUARow);
470 }
471
472 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
473 protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
474 base.OnRowChanged(e);
475 if ((this.tblKET_QUARowChanged != null)) {
476 this.tblKET_QUARowChanged(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
477 }
478 }
479
480 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
481 protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
482 base.OnRowChanging(e);
483 if ((this.tblKET_QUARowChanging != null)) {
484 this.tblKET_QUARowChanging(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
485 }
486 }
487
488 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
489 protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
490 base.OnRowDeleted(e);
491 if ((this.tblKET_QUARowDeleted != null)) {
492 this.tblKET_QUARowDeleted(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
493 }
494 }
495
496 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
497 protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
498 base.OnRowDeleting(e);
499 if ((this.tblKET_QUARowDeleting != null)) {
500 this.tblKET_QUARowDeleting(this, new tblKET_QUARowChangeEvent(((tblKET_QUARow)(e.Row)), e.Action));
501 }
502 }
503
504 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
505 public void RemovetblKET_QUARow(tblKET_QUARow row) {
506 this.Rows.Remove(row);
507 }
508
509 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
510 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
511 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
512 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
513 QuanlydiemDataSet11 ds = new QuanlydiemDataSet11();
514 global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
515 any1.Namespace = "http://www.w3.org/2001/XMLSchema";
516 any1.MinOccurs = new decimal(0);
517 any1.MaxOccurs = decimal.MaxValue;
518 any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
519 sequence.Items.Add(any1);
520 global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
521 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
522 any2.MinOccurs = new decimal(1);
523 any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
524 sequence.Items.Add(any2);
525 global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
526 attribute1.Name = "namespace";
527 attribute1.FixedValue = ds.Namespace;
528 type.Attributes.Add(attribute1);
529 global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
530 attribute2.Name = "tableTypeName";
531 attribute2.FixedValue = "tblKET_QUADataTable";
532 type.Attributes.Add(attribute2);
533 type.Particle = sequence;
534 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
535 if (xs.Contains(dsSchema.TargetNamespace)) {
536 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
537 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
538 try {
539 global::System.Xml.Schema.XmlSchema schema = null;
540 dsSchema.Write(s1);
541 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
542 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
543 s2.SetLength(0);
544 schema.Write(s2);
545 if ((s1.Length == s2.Length)) {
546 s1.Position = 0;
547 s2.Position = 0;
548 for (; ((s1.Position != s1.Length)
549 && (s1.ReadByte() == s2.ReadByte())); ) {
550 ;
551 }
552 if ((s1.Position == s1.Length)) {
553 return type;
554 }
555 }
556 }
557 }
558 finally {
559 if ((s1 != null)) {
560 s1.Close();
561 }
562 if ((s2 != null)) {
563 s2.Close();
564 }
565 }
566 }
567 xs.Add(dsSchema);
568 return type;
569 }
570 }
571
572 /// <summary>
573 ///Represents strongly named DataRow class.
574 ///</summary>
575 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
576 public partial class tblKET_QUARow : global::System.Data.DataRow {
577
578 private tblKET_QUADataTable tabletblKET_QUA;
579
580 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
581 internal tblKET_QUARow(global::System.Data.DataRowBuilder rb) :
582 base(rb) {
583 this.tabletblKET_QUA = ((tblKET_QUADataTable)(this.Table));
584 }
585
586 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
587 public string MaSV {
588 get {
589 return ((string)(this[this.tabletblKET_QUA.MaSVColumn]));
590 }
591 set {
592 this[this.tabletblKET_QUA.MaSVColumn] = value;
593 }
594 }
595
596 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
597 public string MaMon {
598 get {
599 return ((string)(this[this.tabletblKET_QUA.MaMonColumn]));
600 }
601 set {
602 this[this.tabletblKET_QUA.MaMonColumn] = value;
603 }
604 }
605
606 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
607 public double Diem1 {
608 get {
609 try {
610 return ((double)(this[this.tabletblKET_QUA.Diem1Column]));
611 }
612 catch (global::System.InvalidCastException e) {
613 throw new global::System.Data.StrongTypingException("The value for column \'Diem1\' in table \'tblKET_QUA\' is DBNull.", e);
614 }
615 }
616 set {
617 this[this.tabletblKET_QUA.Diem1Column] = value;
618 }
619 }
620
621 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
622 public double Diem2 {
623 get {
624 try {
625 return ((double)(this[this.tabletblKET_QUA.Diem2Column]));
626 }
627 catch (global::System.InvalidCastException e) {
628 throw new global::System.Data.StrongTypingException("The value for column \'Diem2\' in table \'tblKET_QUA\' is DBNull.", e);
629 }
630 }
631 set {
632 this[this.tabletblKET_QUA.Diem2Column] = value;
633 }
634 }
635
636 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
637 public double DiemThi {
638 get {
639 try {
640 return ((double)(this[this.tabletblKET_QUA.DiemThiColumn]));
641 }
642 catch (global::System.InvalidCastException e) {
643 throw new global::System.Data.StrongTypingException("The value for column \'DiemThi\' in table \'tblKET_QUA\' is DBNull.", e);
644 }
645 }
646 set {
647 this[this.tabletblKET_QUA.DiemThiColumn] = value;
648 }
649 }
650
651 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
652 public double DiemTongKet {
653 get {
654 try {
655 return ((double)(this[this.tabletblKET_QUA.DiemTongKetColumn]));
656 }
657 catch (global::System.InvalidCastException e) {
658 throw new global::System.Data.StrongTypingException("The value for column \'DiemTongKet\' in table \'tblKET_QUA\' is DBNull.", e);
659 }
660 }
661 set {
662 this[this.tabletblKET_QUA.DiemTongKetColumn] = value;
663 }
664 }
665
666 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
667 public int HocKi {
668 get {
669 try {
670 return ((int)(this[this.tabletblKET_QUA.HocKiColumn]));
671 }
672 catch (global::System.InvalidCastException e) {
673 throw new global::System.Data.StrongTypingException("The value for column \'HocKi\' in table \'tblKET_QUA\' is DBNull.", e);
674 }
675 }
676 set {
677 this[this.tabletblKET_QUA.HocKiColumn] = value;
678 }
679 }
680
681 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
682 public bool IsDiem1Null() {
683 return this.IsNull(this.tabletblKET_QUA.Diem1Column);
684 }
685
686 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
687 public void SetDiem1Null() {
688 this[this.tabletblKET_QUA.Diem1Column] = global::System.Convert.DBNull;
689 }
690
691 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
692 public bool IsDiem2Null() {
693 return this.IsNull(this.tabletblKET_QUA.Diem2Column);
694 }
695
696 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
697 public void SetDiem2Null() {
698 this[this.tabletblKET_QUA.Diem2Column] = global::System.Convert.DBNull;
699 }
700
701 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
702 public bool IsDiemThiNull() {
703 return this.IsNull(this.tabletblKET_QUA.DiemThiColumn);
704 }
705
706 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
707 public void SetDiemThiNull() {
708 this[this.tabletblKET_QUA.DiemThiColumn] = global::System.Convert.DBNull;
709 }
710
711 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
712 public bool IsDiemTongKetNull() {
713 return this.IsNull(this.tabletblKET_QUA.DiemTongKetColumn);
714 }
715
716 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
717 public void SetDiemTongKetNull() {
718 this[this.tabletblKET_QUA.DiemTongKetColumn] = global::System.Convert.DBNull;
719 }
720
721 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
722 public bool IsHocKiNull() {
723 return this.IsNull(this.tabletblKET_QUA.HocKiColumn);
724 }
725
726 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
727 public void SetHocKiNull() {
728 this[this.tabletblKET_QUA.HocKiColumn] = global::System.Convert.DBNull;
729 }
730 }
731
732 /// <summary>
733 ///Row event argument class
734 ///</summary>
735 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
736 public class tblKET_QUARowChangeEvent : global::System.EventArgs {
737
738 private tblKET_QUARow eventRow;
739
740 private global::System.Data.DataRowAction eventAction;
741
742 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
743 public tblKET_QUARowChangeEvent(tblKET_QUARow row, global::System.Data.DataRowAction action) {
744 this.eventRow = row;
745 this.eventAction = action;
746 }
747
748 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
749 public tblKET_QUARow Row {
750 get {
751 return this.eventRow;
752 }
753 }
754
755 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
756 public global::System.Data.DataRowAction Action {
757 get {
758 return this.eventAction;
759 }
760 }
761 }
762 }
763 }
764 namespace Quản_lý_điểm_sinh_vien_CNTT.QuanlydiemDataSet11TableAdapters {
765
766
767 /// <summary>
768 ///Represents the connection and commands used to retrieve and save data.
769 ///</summary>
770 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
771 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
772 [global::System.ComponentModel.ToolboxItem(true)]
773 [global::System.ComponentModel.DataObjectAttribute(true)]
774 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
775 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
776 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
777 public partial class tblKET_QUATableAdapter : global::System.ComponentModel.Component {
778
779 private global::System.Data.SqlClient.SqlDataAdapter _adapter;
780
781 private global::System.Data.SqlClient.SqlConnection _connection;
782
783 private global::System.Data.SqlClient.SqlTransaction _transaction;
784
785 private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
786
787 private bool _clearBeforeFill;
788
789 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
790 public tblKET_QUATableAdapter() {
791 this.ClearBeforeFill = true;
792 }
793
794 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
795 protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
796 get {
797 if ((this._adapter == null)) {
798 this.InitAdapter();
799 }
800 return this._adapter;
801 }
802 }
803
804 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
805 internal global::System.Data.SqlClient.SqlConnection Connection {
806 get {
807 if ((this._connection == null)) {
808 this.InitConnection();
809 }
810 return this._connection;
811 }
812 set {
813 this._connection = value;
814 if ((this.Adapter.InsertCommand != null)) {
815 this.Adapter.InsertCommand.Connection = value;
816 }
817 if ((this.Adapter.DeleteCommand != null)) {
818 this.Adapter.DeleteCommand.Connection = value;
819 }
820 if ((this.Adapter.UpdateCommand != null)) {
821 this.Adapter.UpdateCommand.Connection = value;
822 }
823 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
824 if ((this.CommandCollection[i] != null)) {
825 ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
826 }
827 }
828 }
829 }
830
831 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
832 internal global::System.Data.SqlClient.SqlTransaction Transaction {
833 get {
834 return this._transaction;
835 }
836 set {
837 this._transaction = value;
838 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
839 this.CommandCollection[i].Transaction = this._transaction;
840 }
841 if (((this.Adapter != null)
842 && (this.Adapter.DeleteCommand != null))) {
843 this.Adapter.DeleteCommand.Transaction = this._transaction;
844 }
845 if (((this.Adapter != null)
846 && (this.Adapter.InsertCommand != null))) {
847 this.Adapter.InsertCommand.Transaction = this._transaction;
848 }
849 if (((this.Adapter != null)
850 && (this.Adapter.UpdateCommand != null))) {
851 this.Adapter.UpdateCommand.Transaction = this._transaction;
852 }
853 }
854 }
855
856 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
857 protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
858 get {
859 if ((this._commandCollection == null)) {
860 this.InitCommandCollection();
861 }
862 return this._commandCollection;
863 }
864 }
865
866 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
867 public bool ClearBeforeFill {
868 get {
869 return this._clearBeforeFill;
870 }
871 set {
872 this._clearBeforeFill = value;
873 }
874 }
875
876 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
877 private void InitAdapter() {
878 this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
879 global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
880 tableMapping.SourceTable = "Table";
881 tableMapping.DataSetTable = "tblKET_QUA";
882 tableMapping.ColumnMappings.Add("MaSV", "MaSV");
883 tableMapping.ColumnMappings.Add("MaMon", "MaMon");
884 tableMapping.ColumnMappings.Add("Diem1", "Diem1");
885 tableMapping.ColumnMappings.Add("Diem2", "Diem2");
886 tableMapping.ColumnMappings.Add("DiemThi", "DiemThi");
887 tableMapping.ColumnMappings.Add("DiemTongKet", "DiemTongKet");
888 tableMapping.ColumnMappings.Add("HocKi", "HocKi");
889 this._adapter.TableMappings.Add(tableMapping);
890 this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
891 this._adapter.DeleteCommand.Connection = this.Connection;
892 this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[tblKET_QUA] WHERE (([MaSV] = @Original_MaSV) AND ([MaMon] = @Original_MaMon) AND ((@IsNull_Diem1 = 1 AND [Diem1] IS NULL) OR ([Diem1] = @Original_Diem1)) AND ((@IsNull_Diem2 = 1 AND [Diem2] IS NULL) OR ([Diem2] = @Original_Diem2)) AND ((@IsNull_DiemThi = 1 AND [DiemThi] IS NULL) OR ([DiemThi] = @Original_DiemThi)) AND ((@IsNull_DiemTongKet = 1 AND [DiemTongKet] IS NULL) OR ([DiemTongKet] = @Original_DiemTongKet)) AND ((@IsNull_HocKi = 1 AND [HocKi] IS NULL) OR ([HocKi] = @Original_HocKi)))";
893 this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
894 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSV", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSV", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
895 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaMon", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaMon", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
896 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Diem1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
897 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Diem1", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
898 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Diem2", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
899 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Diem2", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
900 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiemThi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
901 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiemThi", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
902 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiemTongKet", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTongKet", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
903 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiemTongKet", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTongKet", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
904 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HocKi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HocKi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
905 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HocKi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HocKi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
906 this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
907 this._adapter.InsertCommand.Connection = this.Connection;
908 this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[tblKET_QUA] ([MaSV], [MaMon], [Diem1], [Diem2], [DiemThi], [DiemTongKet], [HocKi]) VALUES (@MaSV, @MaMon, @Diem1, @Diem2, @DiemThi, @DiemTongKet, @HocKi);
909 SELECT MaSV, MaMon, Diem1, Diem2, DiemThi, DiemTongKet, HocKi FROM tblKET_QUA WHERE (MaMon = @MaMon) AND (MaSV = @MaSV)";
910 this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
911 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSV", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSV", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
912 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaMon", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaMon", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
913 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Diem1", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
914 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Diem2", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
915 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiemThi", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
916 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, "", "", ""));
917 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, "", "", ""));
918 this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
919 this._adapter.UpdateCommand.Connection = this.Connection;
920 this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[tblKET_QUA] SET [MaSV] = @MaSV, [MaMon] = @MaMon, [Diem1] = @Diem1, [Diem2] = @Diem2, [DiemThi] = @DiemThi, [DiemTongKet] = @DiemTongKet, [HocKi] = @HocKi WHERE (([MaSV] = @Original_MaSV) AND ([MaMon] = @Original_MaMon) AND ((@IsNull_Diem1 = 1 AND [Diem1] IS NULL) OR ([Diem1] = @Original_Diem1)) AND ((@IsNull_Diem2 = 1 AND [Diem2] IS NULL) OR ([Diem2] = @Original_Diem2)) AND ((@IsNull_DiemThi = 1 AND [DiemThi] IS NULL) OR ([DiemThi] = @Original_DiemThi)) AND ((@IsNull_DiemTongKet = 1 AND [DiemTongKet] IS NULL) OR ([DiemTongKet] = @Original_DiemTongKet)) AND ((@IsNull_HocKi = 1 AND [HocKi] IS NULL) OR ([HocKi] = @Original_HocKi)));
921 SELECT MaSV, MaMon, Diem1, Diem2, DiemThi, DiemTongKet, HocKi FROM tblKET_QUA WHERE (MaMon = @MaMon) AND (MaSV = @MaSV)";
922 this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
923 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSV", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSV", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
924 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaMon", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaMon", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
925 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Diem1", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
926 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Diem2", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
927 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiemThi", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
928 this._adapter.UpdateCommand.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, "", "", ""));
929 this._adapter.UpdateCommand.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, "", "", ""));
930 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSV", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSV", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
931 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaMon", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaMon", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
932 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Diem1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
933 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Diem1", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem1", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
934 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Diem2", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
935 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Diem2", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Diem2", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
936 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiemThi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
937 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiemThi", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemThi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
938 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiemTongKet", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTongKet", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
939 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiemTongKet", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiemTongKet", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
940 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HocKi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HocKi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
941 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HocKi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HocKi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
942 }
943
944 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
945 private void InitConnection() {
946 this._connection = new global::System.Data.SqlClient.SqlConnection();
947 this._connection.ConnectionString = global::Quản_lý_điểm_sinh_vien_CNTT.Properties.Settings.Default.QuanlydiemConnectionString2;
948 }
949
950 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
951 private void InitCommandCollection() {
952 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
953 this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
954 this._commandCollection[0].Connection = this.Connection;
955 this._commandCollection[0].CommandText = "SELECT MaSV, MaMon, Diem1, Diem2, DiemThi, DiemTongKet, HocKi FROM dbo.tblKET_QUA" +
956 "";
957 this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
958 }
959
960 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
961 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
962 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
963 public virtual int Fill(QuanlydiemDataSet11.tblKET_QUADataTable dataTable) {
964 this.Adapter.SelectCommand = this.CommandCollection[0];
965 if ((this.ClearBeforeFill == true)) {
966 dataTable.Clear();
967 }
968 int returnValue = this.Adapter.Fill(dataTable);
969 return returnValue;
970 }
971
972 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
973 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
974 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
975 public virtual QuanlydiemDataSet11.tblKET_QUADataTable GetData() {
976 this.Adapter.SelectCommand = this.CommandCollection[0];
977 QuanlydiemDataSet11.tblKET_QUADataTable dataTable = new QuanlydiemDataSet11.tblKET_QUADataTable();
978 this.Adapter.Fill(dataTable);
979 return dataTable;
980 }
981
982 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
983 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
984 public virtual int Update(QuanlydiemDataSet11.tblKET_QUADataTable dataTable) {
985 return this.Adapter.Update(dataTable);
986 }
987
988 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
989 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
990 public virtual int Update(QuanlydiemDataSet11 dataSet) {
991 return this.Adapter.Update(dataSet, "tblKET_QUA");
992 }
993
994 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
995 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
996 public virtual int Update(global::System.Data.DataRow dataRow) {
997 return this.Adapter.Update(new global::System.Data.DataRow[] {
998 dataRow});
999 }
1000
1001 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1002 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1003 public virtual int Update(global::System.Data.DataRow[] dataRows) {
1004 return this.Adapter.Update(dataRows);
1005 }
1006
1007 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1008 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1009 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
1010 public virtual int Delete(string Original_MaSV, string Original_MaMon, global::System.Nullable<double> Original_Diem1, global::System.Nullable<double> Original_Diem2, global::System.Nullable<double> Original_DiemThi, global::System.Nullable<double> Original_DiemTongKet, global::System.Nullable<int> Original_HocKi) {
1011 if ((Original_MaSV == null)) {
1012 throw new global::System.ArgumentNullException("Original_MaSV");
1013 }
1014 else {
1015 this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_MaSV));
1016 }
1017 if ((Original_MaMon == null)) {
1018 throw new global::System.ArgumentNullException("Original_MaMon");
1019 }
1020 else {
1021 this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_MaMon));
1022 }
1023 if ((Original_Diem1.HasValue == true)) {
1024 this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0));
1025 this.Adapter.DeleteCommand.Parameters[3].Value = ((double)(Original_Diem1.Value));
1026 }
1027 else {
1028 this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1));
1029 this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value;
1030 }
1031 if ((Original_Diem2.HasValue == true)) {
1032 this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0));
1033 this.Adapter.DeleteCommand.Parameters[5].Value = ((double)(Original_Diem2.Value));
1034 }
1035 else {
1036 this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1));
1037 this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value;
1038 }
1039 if ((Original_DiemThi.HasValue == true)) {
1040 this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0));
1041 this.Adapter.DeleteCommand.Parameters[7].Value = ((double)(Original_DiemThi.Value));
1042 }
1043 else {
1044 this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1));
1045 this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value;
1046 }
1047 if ((Original_DiemTongKet.HasValue == true)) {
1048 this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0));
1049 this.Adapter.DeleteCommand.Parameters[9].Value = ((double)(Original_DiemTongKet.Value));
1050 }
1051 else {
1052 this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1));
1053 this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value;
1054 }
1055 if ((Original_HocKi.HasValue == true)) {
1056 this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0));
1057 this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(Original_HocKi.Value));
1058 }
1059 else {
1060 this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1));
1061 this.Adapter.DeleteCommand.Parameters[11].Value = global::System.DBNull.Value;
1062 }
1063 global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
1064 if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
1065 != global::System.Data.ConnectionState.Open)) {
1066 this.Adapter.DeleteCommand.Connection.Open();
1067 }
1068 try {
1069 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
1070 return returnValue;
1071 }
1072 finally {
1073 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1074 this.Adapter.DeleteCommand.Connection.Close();
1075 }
1076 }
1077 }
1078
1079 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1080 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1081 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1082 public virtual int Insert(string MaSV, string MaMon, global::System.Nullable<double> Diem1, global::System.Nullable<double> Diem2, global::System.Nullable<double> DiemThi, global::System.Nullable<double> DiemTongKet, global::System.Nullable<int> HocKi) {
1083 if ((MaSV == null)) {
1084 throw new global::System.ArgumentNullException("MaSV");
1085 }
1086 else {
1087 this.Adapter.InsertCommand.Parameters[0].Value = ((string)(MaSV));
1088 }
1089 if ((MaMon == null)) {
1090 throw new global::System.ArgumentNullException("MaMon");
1091 }
1092 else {
1093 this.Adapter.InsertCommand.Parameters[1].Value = ((string)(MaMon));
1094 }
1095 if ((Diem1.HasValue == true)) {
1096 this.Adapter.InsertCommand.Parameters[2].Value = ((double)(Diem1.Value));
1097 }
1098 else {
1099 this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1100 }
1101 if ((Diem2.HasValue == true)) {
1102 this.Adapter.InsertCommand.Parameters[3].Value = ((double)(Diem2.Value));
1103 }
1104 else {
1105 this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1106 }
1107 if ((DiemThi.HasValue == true)) {
1108 this.Adapter.InsertCommand.Parameters[4].Value = ((double)(DiemThi.Value));
1109 }
1110 else {
1111 this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
1112 }
1113 if ((DiemTongKet.HasValue == true)) {
1114 this.Adapter.InsertCommand.Parameters[5].Value = ((double)(DiemTongKet.Value));
1115 }
1116 else {
1117 this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
1118 }
1119 if ((HocKi.HasValue == true)) {
1120 this.Adapter.InsertCommand.Parameters[6].Value = ((int)(HocKi.Value));
1121 }
1122 else {
1123 this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value;
1124 }
1125 global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1126 if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1127 != global::System.Data.ConnectionState.Open)) {
1128 this.Adapter.InsertCommand.Connection.Open();
1129 }
1130 try {
1131 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1132 return returnValue;
1133 }
1134 finally {
1135 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1136 this.Adapter.InsertCommand.Connection.Close();
1137 }
1138 }
1139 }
1140
1141 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1142 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1143 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1144 public virtual int Update(string MaSV, string MaMon, global::System.Nullable<double> Diem1, global::System.Nullable<double> Diem2, global::System.Nullable<double> DiemThi, global::System.Nullable<double> DiemTongKet, global::System.Nullable<int> HocKi, string Original_MaSV, string Original_MaMon, global::System.Nullable<double> Original_Diem1, global::System.Nullable<double> Original_Diem2, global::System.Nullable<double> Original_DiemThi, global::System.Nullable<double> Original_DiemTongKet, global::System.Nullable<int> Original_HocKi) {
1145 if ((MaSV == null)) {
1146 throw new global::System.ArgumentNullException("MaSV");
1147 }
1148 else {
1149 this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(MaSV));
1150 }
1151 if ((MaMon == null)) {
1152 throw new global::System.ArgumentNullException("MaMon");
1153 }
1154 else {
1155 this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(MaMon));
1156 }
1157 if ((Diem1.HasValue == true)) {
1158 this.Adapter.UpdateCommand.Parameters[2].Value = ((double)(Diem1.Value));
1159 }
1160 else {
1161 this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1162 }
1163 if ((Diem2.HasValue == true)) {
1164 this.Adapter.UpdateCommand.Parameters[3].Value = ((double)(Diem2.Value));
1165 }
1166 else {
1167 this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
1168 }
1169 if ((DiemThi.HasValue == true)) {
1170 this.Adapter.UpdateCommand.Parameters[4].Value = ((double)(DiemThi.Value));
1171 }
1172 else {
1173 this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
1174 }
1175 if ((DiemTongKet.HasValue == true)) {
1176 this.Adapter.UpdateCommand.Parameters[5].Value = ((double)(DiemTongKet.Value));
1177 }
1178 else {
1179 this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
1180 }
1181 if ((HocKi.HasValue == true)) {
1182 this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(HocKi.Value));
1183 }
1184 else {
1185 this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
1186 }
1187 if ((Original_MaSV == null)) {
1188 throw new global::System.ArgumentNullException("Original_MaSV");
1189 }
1190 else {
1191 this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_MaSV));
1192 }
1193 if ((Original_MaMon == null)) {
1194 throw new global::System.ArgumentNullException("Original_MaMon");
1195 }
1196 else {
1197 this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_MaMon));
1198 }
1199 if ((Original_Diem1.HasValue == true)) {
1200 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0));
1201 this.Adapter.UpdateCommand.Parameters[10].Value = ((double)(Original_Diem1.Value));
1202 }
1203 else {
1204 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1));
1205 this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value;
1206 }
1207 if ((Original_Diem2.HasValue == true)) {
1208 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
1209 this.Adapter.UpdateCommand.Parameters[12].Value = ((double)(Original_Diem2.Value));
1210 }
1211 else {
1212 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
1213 this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
1214 }
1215 if ((Original_DiemThi.HasValue == true)) {
1216 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
1217 this.Adapter.UpdateCommand.Parameters[14].Value = ((double)(Original_DiemThi.Value));
1218 }
1219 else {
1220 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
1221 this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
1222 }
1223 if ((Original_DiemTongKet.HasValue == true)) {
1224 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
1225 this.Adapter.UpdateCommand.Parameters[16].Value = ((double)(Original_DiemTongKet.Value));
1226 }
1227 else {
1228 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
1229 this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value;
1230 }
1231 if ((Original_HocKi.HasValue == true)) {
1232 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0));
1233 this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(Original_HocKi.Value));
1234 }
1235 else {
1236 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1));
1237 this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value;
1238 }
1239 global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
1240 if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
1241 != global::System.Data.ConnectionState.Open)) {
1242 this.Adapter.UpdateCommand.Connection.Open();
1243 }
1244 try {
1245 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
1246 return returnValue;
1247 }
1248 finally {
1249 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1250 this.Adapter.UpdateCommand.Connection.Close();
1251 }
1252 }
1253 }
1254
1255 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1256 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1257 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1258 public virtual int Update(global::System.Nullable<double> Diem1, global::System.Nullable<double> Diem2, global::System.Nullable<double> DiemThi, global::System.Nullable<double> DiemTongKet, global::System.Nullable<int> HocKi, string Original_MaSV, string Original_MaMon, global::System.Nullable<double> Original_Diem1, global::System.Nullable<double> Original_Diem2, global::System.Nullable<double> Original_DiemThi, global::System.Nullable<double> Original_DiemTongKet, global::System.Nullable<int> Original_HocKi) {
1259 return this.Update(Original_MaSV, Original_MaMon, Diem1, Diem2, DiemThi, DiemTongKet, HocKi, Original_MaSV, Original_MaMon, Original_Diem1, Original_Diem2, Original_DiemThi, Original_DiemTongKet, Original_HocKi);
1260 }
1261 }
1262
1263 /// <summary>
1264 ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
1265 ///</summary>
1266 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1267 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
1268 [global::System.ComponentModel.ToolboxItem(true)]
1269 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
1270 "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1271 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
1272 public partial class TableAdapterManager : global::System.ComponentModel.Component {
1273
1274 private UpdateOrderOption _updateOrder;
1275
1276 private tblKET_QUATableAdapter _tblKET_QUATableAdapter;
1277
1278 private bool _backupDataSetBeforeUpdate;
1279
1280 private global::System.Data.IDbConnection _connection;
1281
1282 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1283 public UpdateOrderOption UpdateOrder {
1284 get {
1285 return this._updateOrder;
1286 }
1287 set {
1288 this._updateOrder = value;
1289 }
1290 }
1291
1292 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1293 [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
1294 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
1295 "", "System.Drawing.Design.UITypeEditor")]
1296 public tblKET_QUATableAdapter tblKET_QUATableAdapter {
1297 get {
1298 return this._tblKET_QUATableAdapter;
1299 }
1300 set {
1301 this._tblKET_QUATableAdapter = value;
1302 }
1303 }
1304
1305 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1306 public bool BackupDataSetBeforeUpdate {
1307 get {
1308 return this._backupDataSetBeforeUpdate;
1309 }
1310 set {
1311 this._backupDataSetBeforeUpdate = value;
1312 }
1313 }
1314
1315 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1316 [global::System.ComponentModel.Browsable(false)]
1317 public global::System.Data.IDbConnection Connection {
1318 get {
1319 if ((this._connection != null)) {
1320 return this._connection;
1321 }
1322 if (((this._tblKET_QUATableAdapter != null)
1323 && (this._tblKET_QUATableAdapter.Connection != null))) {
1324 return this._tblKET_QUATableAdapter.Connection;
1325 }
1326 return null;
1327 }
1328 set {
1329 this._connection = value;
1330 }
1331 }
1332
1333 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1334 [global::System.ComponentModel.Browsable(false)]
1335 public int TableAdapterInstanceCount {
1336 get {
1337 int count = 0;
1338 if ((this._tblKET_QUATableAdapter != null)) {
1339 count = (count + 1);
1340 }
1341 return count;
1342 }
1343 }
1344
1345 /// <summary>
1346 ///Update rows in top-down order.
1347 ///</summary>
1348 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1349 private int UpdateUpdatedRows(QuanlydiemDataSet11 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1350 int result = 0;
1351 if ((this._tblKET_QUATableAdapter != null)) {
1352 global::System.Data.DataRow[] updatedRows = dataSet.tblKET_QUA.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
1353 updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
1354 if (((updatedRows != null)
1355 && (0 < updatedRows.Length))) {
1356 result = (result + this._tblKET_QUATableAdapter.Update(updatedRows));
1357 allChangedRows.AddRange(updatedRows);
1358 }
1359 }
1360 return result;
1361 }
1362
1363 /// <summary>
1364 ///Insert rows in top-down order.
1365 ///</summary>
1366 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1367 private int UpdateInsertedRows(QuanlydiemDataSet11 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1368 int result = 0;
1369 if ((this._tblKET_QUATableAdapter != null)) {
1370 global::System.Data.DataRow[] addedRows = dataSet.tblKET_QUA.Select(null, null, global::System.Data.DataViewRowState.Added);
1371 if (((addedRows != null)
1372 && (0 < addedRows.Length))) {
1373 result = (result + this._tblKET_QUATableAdapter.Update(addedRows));
1374 allAddedRows.AddRange(addedRows);
1375 }
1376 }
1377 return result;
1378 }
1379
1380 /// <summary>
1381 ///Delete rows in bottom-up order.
1382 ///</summary>
1383 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1384 private int UpdateDeletedRows(QuanlydiemDataSet11 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
1385 int result = 0;
1386 if ((this._tblKET_QUATableAdapter != null)) {
1387 global::System.Data.DataRow[] deletedRows = dataSet.tblKET_QUA.Select(null, null, global::System.Data.DataViewRowState.Deleted);
1388 if (((deletedRows != null)
1389 && (0 < deletedRows.Length))) {
1390 result = (result + this._tblKET_QUATableAdapter.Update(deletedRows));
1391 allChangedRows.AddRange(deletedRows);
1392 }
1393 }
1394 return result;
1395 }
1396
1397 /// <summary>
1398 ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1399 ///</summary>
1400 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1401 private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1402 if (((updatedRows == null)
1403 || (updatedRows.Length < 1))) {
1404 return updatedRows;
1405 }
1406 if (((allAddedRows == null)
1407 || (allAddedRows.Count < 1))) {
1408 return updatedRows;
1409 }
1410 global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1411 for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
1412 global::System.Data.DataRow row = updatedRows[i];
1413 if ((allAddedRows.Contains(row) == false)) {
1414 realUpdatedRows.Add(row);
1415 }
1416 }
1417 return realUpdatedRows.ToArray();
1418 }
1419
1420 /// <summary>
1421 ///Update all changes to the dataset.
1422 ///</summary>
1423 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1424 public virtual int UpdateAll(QuanlydiemDataSet11 dataSet) {
1425 if ((dataSet == null)) {
1426 throw new global::System.ArgumentNullException("dataSet");
1427 }
1428 if ((dataSet.HasChanges() == false)) {
1429 return 0;
1430 }
1431 if (((this._tblKET_QUATableAdapter != null)
1432 && (this.MatchTableAdapterConnection(this._tblKET_QUATableAdapter.Connection) == false))) {
1433 throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
1434 "tring.");
1435 }
1436 global::System.Data.IDbConnection workConnection = this.Connection;
1437 if ((workConnection == null)) {
1438 throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
1439 "ger TableAdapter property to a valid TableAdapter instance.");
1440 }
1441 bool workConnOpened = false;
1442 if (((workConnection.State & global::System.Data.ConnectionState.Broken)
1443 == global::System.Data.ConnectionState.Broken)) {
1444 workConnection.Close();
1445 }
1446 if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
1447 workConnection.Open();
1448 workConnOpened = true;
1449 }
1450 global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
1451 if ((workTransaction == null)) {
1452 throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
1453 "ctions or the current state is not allowing the transaction to begin.");
1454 }
1455 global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1456 global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1457 global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
1458 global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
1459 int result = 0;
1460 global::System.Data.DataSet backupDataSet = null;
1461 if (this.BackupDataSetBeforeUpdate) {
1462 backupDataSet = new global::System.Data.DataSet();
1463 backupDataSet.Merge(dataSet);
1464 }
1465 try {
1466 // ---- Prepare for update -----------
1467 //
1468 if ((this._tblKET_QUATableAdapter != null)) {
1469 revertConnections.Add(this._tblKET_QUATableAdapter, this._tblKET_QUATableAdapter.Connection);
1470 this._tblKET_QUATableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
1471 this._tblKET_QUATableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
1472 if (this._tblKET_QUATableAdapter.Adapter.AcceptChangesDuringUpdate) {
1473 this._tblKET_QUATableAdapter.Adapter.AcceptChangesDuringUpdate = false;
1474 adaptersWithAcceptChangesDuringUpdate.Add(this._tblKET_QUATableAdapter.Adapter);
1475 }
1476 }
1477 //
1478 //---- Perform updates -----------
1479 //
1480 if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
1481 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1482 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1483 }
1484 else {
1485 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1486 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1487 }
1488 result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
1489 //
1490 //---- Commit updates -----------
1491 //
1492 workTransaction.Commit();
1493 if ((0 < allAddedRows.Count)) {
1494 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1495 allAddedRows.CopyTo(rows);
1496 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1497 global::System.Data.DataRow row = rows[i];
1498 row.AcceptChanges();
1499 }
1500 }
1501 if ((0 < allChangedRows.Count)) {
1502 global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
1503 allChangedRows.CopyTo(rows);
1504 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1505 global::System.Data.DataRow row = rows[i];
1506 row.AcceptChanges();
1507 }
1508 }
1509 }
1510 catch (global::System.Exception ex) {
1511 workTransaction.Rollback();
1512 // ---- Restore the dataset -----------
1513 if (this.BackupDataSetBeforeUpdate) {
1514 global::System.Diagnostics.Debug.Assert((backupDataSet != null));
1515 dataSet.Clear();
1516 dataSet.Merge(backupDataSet);
1517 }
1518 else {
1519 if ((0 < allAddedRows.Count)) {
1520 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1521 allAddedRows.CopyTo(rows);
1522 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1523 global::System.Data.DataRow row = rows[i];
1524 row.AcceptChanges();
1525 row.SetAdded();
1526 }
1527 }
1528 }
1529 throw ex;
1530 }
1531 finally {
1532 if (workConnOpened) {
1533 workConnection.Close();
1534 }
1535 if ((this._tblKET_QUATableAdapter != null)) {
1536 this._tblKET_QUATableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tblKET_QUATableAdapter]));
1537 this._tblKET_QUATableAdapter.Transaction = null;
1538 }
1539 if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
1540 global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
1541 adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
1542 for (int i = 0; (i < adapters.Length); i = (i + 1)) {
1543 global::System.Data.Common.DataAdapter adapter = adapters[i];
1544 adapter.AcceptChangesDuringUpdate = true;
1545 }
1546 }
1547 }
1548 return result;
1549 }
1550
1551 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1552 protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
1553 global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
1554 }
1555
1556 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1557 protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
1558 if ((this._connection != null)) {
1559 return true;
1560 }
1561 if (((this.Connection == null)
1562 || (inputConnection == null))) {
1563 return true;
1564 }
1565 if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
1566 return true;
1567 }
1568 return false;
1569 }
1570
1571 /// <summary>
1572 ///Update Order Option
1573 ///</summary>
1574 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1575 public enum UpdateOrderOption {
1576
1577 InsertUpdateDelete = 0,
1578
1579 UpdateInsertDelete = 1,
1580 }
1581
1582 /// <summary>
1583 ///Used to sort self-referenced table's rows
1584 ///</summary>
1585 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1586 private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
1587
1588 private global::System.Data.DataRelation _relation;
1589
1590 private int _childFirst;
1591
1592 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1593 internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
1594 this._relation = relation;
1595 if (childFirst) {
1596 this._childFirst = -1;
1597 }
1598 else {
1599 this._childFirst = 1;
1600 }
1601 }
1602
1603 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1604 private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) {
1605 global::System.Diagnostics.Debug.Assert((child != null));
1606 global::System.Diagnostics.Debug.Assert((parent != null));
1607 global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1608 for (
1609 ; ((newParent != null)
1610 && ((object.ReferenceEquals(newParent, child) == false)
1611 && (object.ReferenceEquals(newParent, parent) == false)));
1612 ) {
1613 newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1614 }
1615 if ((newParent == null)) {
1616 for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null)
1617 && ((object.ReferenceEquals(newParent, child) == false)
1618 && (object.ReferenceEquals(newParent, parent) == false)));
1619 ) {
1620 newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
1621 }
1622 }
1623 if (object.ReferenceEquals(newParent, parent)) {
1624 return true;
1625 }
1626 return false;
1627 }
1628
1629 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1630 public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
1631 if (object.ReferenceEquals(row1, row2)) {
1632 return 0;
1633 }
1634 if ((row1 == null)) {
1635 return -1;
1636 }
1637 if ((row2 == null)) {
1638 return 1;
1639 }
1640
1641 // Is row1 the child or grandchild of row2
1642 if (this.IsChildAndParent(row1, row2)) {
1643 return this._childFirst;
1644 }
1645
1646 // Is row2 the child or grandchild of row1
1647 if (this.IsChildAndParent(row2, row1)) {
1648 return (-1 * this._childFirst);
1649 }
1650 return 0;
1651 }
1652 }
1653 }
1654 }
1655
1656 #pragma warning restore 1591