1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated
by a tool.
4 // Runtime Version:
2.0.50727.1433
5 //
6 // Changes to
this file may cause incorrect behavior and will be lost if
7 // the code
is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------

10
11 #pragma warning disable
1591
12
13 namespace
Quản_lý_điểm_sinh_vien_CNTT {
14     
15     
16     ///
<summary>
17     ///
Represents a strongly typed in-memory cache of data.
18     ///</summary>

19     
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
20     
[global::System.Serializable()]
21     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
22     
[global::System.ComponentModel.ToolboxItem(true)]
23     
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
24     
[global::System.Xml.Serialization.XmlRootAttribute("QuanlydiemDataSet3")]
25     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
26     
public partial class QuanlydiemDataSet3 : global::System.Data.DataSet {
27         
28         
private tblSINH_VIENDataTable tabletblSINH_VIEN;
29         
30         
private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
31         
32         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
33         
public QuanlydiemDataSet3() {
34             
this.BeginInit();
35             
this.InitClass();
36             
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
37             
base.Tables.CollectionChanged += schemaChangedHandler;
38             
base.Relations.CollectionChanged += schemaChangedHandler;
39             
this.EndInit();
40         }
41         
42         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
43         
protected QuanlydiemDataSet3(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
44                 
base(info, context, false) {
45             
if ((this.IsBinarySerialized(info, context) == true)) {
46                 
this.InitVars(false);
47                 
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
48                 
this.Tables.CollectionChanged += schemaChangedHandler1;
49                 
this.Relations.CollectionChanged += schemaChangedHandler1;
50                 
return;
51             }
52             
string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
53             
if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
54                 
global::System.Data.DataSet ds = new global::System.Data.DataSet();
55                 ds.ReadXmlSchema(
new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
56                 
if ((ds.Tables["tblSINH_VIEN"] != null)) {
57                     
base.Tables.Add(new tblSINH_VIENDataTable(ds.Tables["tblSINH_VIEN"]));
58                 }
59                 
this.DataSetName = ds.DataSetName;
60                 
this.Prefix = ds.Prefix;
61                 
this.Namespace = ds.Namespace;
62                 
this.Locale = ds.Locale;
63                 
this.CaseSensitive = ds.CaseSensitive;
64                 
this.EnforceConstraints = ds.EnforceConstraints;
65                 
this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
66                 
this.InitVars();
67             }
68             
else {
69                 
this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
70             }
71             
this.GetSerializationData(info, context);
72             
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
73             
base.Tables.CollectionChanged += schemaChangedHandler;
74             
this.Relations.CollectionChanged += schemaChangedHandler;
75         }
76         
77         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
78         
[global::System.ComponentModel.Browsable(false)]
79         
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
80         
public tblSINH_VIENDataTable tblSINH_VIEN {
81             
get {
82                 
return this.tabletblSINH_VIEN;
83             }
84         }
85         
86         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
87         
[global::System.ComponentModel.BrowsableAttribute(true)]
88         
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
89         
public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
90             
get {
91                 
return this._schemaSerializationMode;
92             }
93             
set {
94                 
this._schemaSerializationMode = value;
95             }
96         }
97         
98         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
99         
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
100         
public new global::System.Data.DataTableCollection Tables {
101             
get {
102                 
return base.Tables;
103             }
104         }
105         
106         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
107         
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
108         
public new global::System.Data.DataRelationCollection Relations {
109             
get {
110                 
return base.Relations;
111             }
112         }
113         
114         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
115         
protected override void InitializeDerivedDataSet() {
116             
this.BeginInit();
117             
this.InitClass();
118             
this.EndInit();
119         }
120         
121         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
122         
public override global::System.Data.DataSet Clone() {
123             QuanlydiemDataSet3 cln = ((QuanlydiemDataSet3)(
base.Clone()));
124             cln.InitVars();
125             cln.SchemaSerializationMode =
this.SchemaSerializationMode;
126             
return cln;
127         }
128         
129         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
130         
protected override bool ShouldSerializeTables() {
131             
return false;
132         }
133         
134         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
135         
protected override bool ShouldSerializeRelations() {
136             
return false;
137         }
138         
139         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
140         
protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
141             
if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
142                 
this.Reset();
143                 
global::System.Data.DataSet ds = new global::System.Data.DataSet();
144                 ds.ReadXml(reader);
145                 
if ((ds.Tables["tblSINH_VIEN"] != null)) {
146                     
base.Tables.Add(new tblSINH_VIENDataTable(ds.Tables["tblSINH_VIEN"]));
147                 }
148                 
this.DataSetName = ds.DataSetName;
149                 
this.Prefix = ds.Prefix;
150                 
this.Namespace = ds.Namespace;
151                 
this.Locale = ds.Locale;
152                 
this.CaseSensitive = ds.CaseSensitive;
153                 
this.EnforceConstraints = ds.EnforceConstraints;
154                 
this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
155                 
this.InitVars();
156             }
157             
else {
158                 
this.ReadXml(reader);
159                 
this.InitVars();
160             }
161         }
162         
163         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
164         
protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
165             
global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
166             
this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
167             stream.Position =
0;
168             
return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
169         }
170         
171         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
172         
internal void InitVars() {
173             
this.InitVars(true);
174         }
175         
176         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
177         
internal void InitVars(bool initTable) {
178             
this.tabletblSINH_VIEN = ((tblSINH_VIENDataTable)(base.Tables["tblSINH_VIEN"]));
179             
if ((initTable == true)) {
180                 
if ((this.tabletblSINH_VIEN != null)) {
181                     
this.tabletblSINH_VIEN.InitVars();
182                 }
183             }
184         }
185         
186         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
187         
private void InitClass() {
188             
this.DataSetName = "QuanlydiemDataSet3";
189             
this.Prefix = "";
190             
this.Namespace = "http://tempuri.org/QuanlydiemDataSet31.xsd";
191             
this.EnforceConstraints = true;
192             
this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
193             
this.tabletblSINH_VIEN = new tblSINH_VIENDataTable();
194             
base.Tables.Add(this.tabletblSINH_VIEN);
195         }
196         
197         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
198         
private bool ShouldSerializetblSINH_VIEN() {
199             
return false;
200         }
201         
202         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
203         
private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
204             
if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
205                 
this.InitVars();
206             }
207         }
208         
209         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
210         
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
211             QuanlydiemDataSet3 ds =
new QuanlydiemDataSet3();
212             
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
213             
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
214             
global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
215             any.Namespace = ds.Namespace;
216             sequence.Items.Add(any);
217             type.Particle = sequence;
218             
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
219             
if (xs.Contains(dsSchema.TargetNamespace)) {
220                 
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
221                 
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
222                 
try {
223                     
global::System.Xml.Schema.XmlSchema schema = null;
224                     dsSchema.Write(s1);
225                     
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
226                         schema = ((
global::System.Xml.Schema.XmlSchema)(schemas.Current));
227                         s2.SetLength(
0);
228                         schema.Write(s2);
229                         
if ((s1.Length == s2.Length)) {
230                             s1.Position =
0;
231                             s2.Position =
0;
232                             
for (; ((s1.Position != s1.Length)
233                                         && (s1.ReadByte() == s2.ReadByte())); ) {
234                                 ;
235                             }
236                             
if ((s1.Position == s1.Length)) {
237                                 
return type;
238                             }
239                         }
240                     }
241                 }
242                 
finally {
243                     
if ((s1 != null)) {
244                         s1.Close();
245                     }
246                     
if ((s2 != null)) {
247                         s2.Close();
248                     }
249                 }
250             }
251             xs.Add(dsSchema);
252             
return type;
253         }
254         
255         
public delegate void tblSINH_VIENRowChangeEventHandler(object sender, tblSINH_VIENRowChangeEvent e);
256         
257         ///
<summary>
258         ///
Represents the strongly named DataTable class.
259         ///</summary>

260         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
261         
[global::System.Serializable()]
262         
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
263         
public partial class tblSINH_VIENDataTable : global::System.Data.TypedTableBase<tblSINH_VIENRow> {
264             
265             
private global::System.Data.DataColumn columnMaSv;
266             
267             
private global::System.Data.DataColumn columnHoTen;
268             
269             
private global::System.Data.DataColumn columnNgaySinh;
270             
271             
private global::System.Data.DataColumn columnGioiTinh;
272             
273             
private global::System.Data.DataColumn columnDiaChi;
274             
275             
private global::System.Data.DataColumn columnMaLop;
276             
277             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
278             
public tblSINH_VIENDataTable() {
279                 
this.TableName = "tblSINH_VIEN";
280                 
this.BeginInit();
281                 
this.InitClass();
282                 
this.EndInit();
283             }
284             
285             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
286             
internal tblSINH_VIENDataTable(global::System.Data.DataTable table) {
287                 
this.TableName = table.TableName;
288                 
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
289                     
this.CaseSensitive = table.CaseSensitive;
290                 }
291                 
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
292                     
this.Locale = table.Locale;
293                 }
294                 
if ((table.Namespace != table.DataSet.Namespace)) {
295                     
this.Namespace = table.Namespace;
296                 }
297                 
this.Prefix = table.Prefix;
298                 
this.MinimumCapacity = table.MinimumCapacity;
299             }
300             
301             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
302             
protected tblSINH_VIENDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
303                     
base(info, context) {
304                 
this.InitVars();
305             }
306             
307             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
308             
public global::System.Data.DataColumn MaSvColumn {
309                 
get {
310                     
return this.columnMaSv;
311                 }
312             }
313             
314             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
315             
public global::System.Data.DataColumn HoTenColumn {
316                 
get {
317                     
return this.columnHoTen;
318                 }
319             }
320             
321             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
322             
public global::System.Data.DataColumn NgaySinhColumn {
323                 
get {
324                     
return this.columnNgaySinh;
325                 }
326             }
327             
328             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
329             
public global::System.Data.DataColumn GioiTinhColumn {
330                 
get {
331                     
return this.columnGioiTinh;
332                 }
333             }
334             
335             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
336             
public global::System.Data.DataColumn DiaChiColumn {
337                 
get {
338                     
return this.columnDiaChi;
339                 }
340             }
341             
342             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
343             
public global::System.Data.DataColumn MaLopColumn {
344                 
get {
345                     
return this.columnMaLop;
346                 }
347             }
348             
349             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
350             
[global::System.ComponentModel.Browsable(false)]
351             
public int Count {
352                 
get {
353                     
return this.Rows.Count;
354                 }
355             }
356             
357             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
358             
public tblSINH_VIENRow this[int index] {
359                 
get {
360                     
return ((tblSINH_VIENRow)(this.Rows[index]));
361                 }
362             }
363             
364             
public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowChanging;
365             
366             
public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowChanged;
367             
368             
public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowDeleting;
369             
370             
public event tblSINH_VIENRowChangeEventHandler tblSINH_VIENRowDeleted;
371             
372             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
373             
public void AddtblSINH_VIENRow(tblSINH_VIENRow row) {
374                 
this.Rows.Add(row);
375             }
376             
377             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
378             
public tblSINH_VIENRow AddtblSINH_VIENRow(string MaSv, string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop) {
379                 tblSINH_VIENRow rowtblSINH_VIENRow = ((tblSINH_VIENRow)(
this.NewRow()));
380                 
object[] columnValuesArray = new object[] {
381                         MaSv,
382                         HoTen,
383                         NgaySinh,
384                         GioiTinh,
385                         DiaChi,
386                         MaLop};
387                 rowtblSINH_VIENRow.ItemArray = columnValuesArray;
388                 
this.Rows.Add(rowtblSINH_VIENRow);
389                 
return rowtblSINH_VIENRow;
390             }
391             
392             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
393             
public tblSINH_VIENRow FindByMaSv(string MaSv) {
394                 
return ((tblSINH_VIENRow)(this.Rows.Find(new object[] {
395                             MaSv})));
396             }
397             
398             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
399             
public override global::System.Data.DataTable Clone() {
400                 tblSINH_VIENDataTable cln = ((tblSINH_VIENDataTable)(
base.Clone()));
401                 cln.InitVars();
402                 
return cln;
403             }
404             
405             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
406             
protected override global::System.Data.DataTable CreateInstance() {
407                 
return new tblSINH_VIENDataTable();
408             }
409             
410             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
411             
internal void InitVars() {
412                 
this.columnMaSv = base.Columns["MaSv"];
413                 
this.columnHoTen = base.Columns["HoTen"];
414                 
this.columnNgaySinh = base.Columns["NgaySinh"];
415                 
this.columnGioiTinh = base.Columns["GioiTinh"];
416                 
this.columnDiaChi = base.Columns["DiaChi"];
417                 
this.columnMaLop = base.Columns["MaLop"];
418             }
419             
420             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
421             
private void InitClass() {
422                 
this.columnMaSv = new global::System.Data.DataColumn("MaSv", typeof(string), null, global::System.Data.MappingType.Element);
423                 
base.Columns.Add(this.columnMaSv);
424                 
this.columnHoTen = new global::System.Data.DataColumn("HoTen", typeof(string), null, global::System.Data.MappingType.Element);
425                 
base.Columns.Add(this.columnHoTen);
426                 
this.columnNgaySinh = new global::System.Data.DataColumn("NgaySinh", typeof(string), null, global::System.Data.MappingType.Element);
427                 
base.Columns.Add(this.columnNgaySinh);
428                 
this.columnGioiTinh = new global::System.Data.DataColumn("GioiTinh", typeof(string), null, global::System.Data.MappingType.Element);
429                 
base.Columns.Add(this.columnGioiTinh);
430                 
this.columnDiaChi = new global::System.Data.DataColumn("DiaChi", typeof(string), null, global::System.Data.MappingType.Element);
431                 
base.Columns.Add(this.columnDiaChi);
432                 
this.columnMaLop = new global::System.Data.DataColumn("MaLop", typeof(string), null, global::System.Data.MappingType.Element);
433                 
base.Columns.Add(this.columnMaLop);
434                 
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
435                                 
this.columnMaSv}, true));
436                 
this.columnMaSv.AllowDBNull = false;
437                 
this.columnMaSv.Unique = true;
438                 
this.columnMaSv.MaxLength = 50;
439                 
this.columnHoTen.MaxLength = 50;
440                 
this.columnNgaySinh.MaxLength = 50;
441                 
this.columnGioiTinh.MaxLength = 50;
442                 
this.columnDiaChi.MaxLength = 50;
443                 
this.columnMaLop.AllowDBNull = false;
444                 
this.columnMaLop.MaxLength = 5;
445             }
446             
447             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
448             
public tblSINH_VIENRow NewtblSINH_VIENRow() {
449                 
return ((tblSINH_VIENRow)(this.NewRow()));
450             }
451             
452             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
453             
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
454                 
return new tblSINH_VIENRow(builder);
455             }
456             
457             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
458             
protected override global::System.Type GetRowType() {
459                 
return typeof(tblSINH_VIENRow);
460             }
461             
462             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
463             
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
464                 
base.OnRowChanged(e);
465                 
if ((this.tblSINH_VIENRowChanged != null)) {
466                     
this.tblSINH_VIENRowChanged(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
467                 }
468             }
469             
470             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
471             
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
472                 
base.OnRowChanging(e);
473                 
if ((this.tblSINH_VIENRowChanging != null)) {
474                     
this.tblSINH_VIENRowChanging(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
475                 }
476             }
477             
478             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
479             
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
480                 
base.OnRowDeleted(e);
481                 
if ((this.tblSINH_VIENRowDeleted != null)) {
482                     
this.tblSINH_VIENRowDeleted(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
483                 }
484             }
485             
486             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
487             
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
488                 
base.OnRowDeleting(e);
489                 
if ((this.tblSINH_VIENRowDeleting != null)) {
490                     
this.tblSINH_VIENRowDeleting(this, new tblSINH_VIENRowChangeEvent(((tblSINH_VIENRow)(e.Row)), e.Action));
491                 }
492             }
493             
494             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
495             
public void RemovetblSINH_VIENRow(tblSINH_VIENRow row) {
496                 
this.Rows.Remove(row);
497             }
498             
499             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
500             
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
501                 
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
502                 
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
503                 QuanlydiemDataSet3 ds =
new QuanlydiemDataSet3();
504                 
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
505                 any1.Namespace =
"http://www.w3.org/2001/XMLSchema";
506                 any1.MinOccurs =
new decimal(0);
507                 any1.MaxOccurs =
decimal.MaxValue;
508                 any1.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
509                 sequence.Items.Add(any1);
510                 
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
511                 any2.Namespace =
"urn:schemas-microsoft-com:xml-diffgram-v1";
512                 any2.MinOccurs =
new decimal(1);
513                 any2.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
514                 sequence.Items.Add(any2);
515                 
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
516                 attribute1.Name =
"namespace";
517                 attribute1.FixedValue = ds.Namespace;
518                 type.Attributes.Add(attribute1);
519                 
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
520                 attribute2.Name =
"tableTypeName";
521                 attribute2.FixedValue =
"tblSINH_VIENDataTable";
522                 type.Attributes.Add(attribute2);
523                 type.Particle = sequence;
524                 
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
525                 
if (xs.Contains(dsSchema.TargetNamespace)) {
526                     
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
527                     
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
528                     
try {
529                         
global::System.Xml.Schema.XmlSchema schema = null;
530                         dsSchema.Write(s1);
531                         
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
532                             schema = ((
global::System.Xml.Schema.XmlSchema)(schemas.Current));
533                             s2.SetLength(
0);
534                             schema.Write(s2);
535                             
if ((s1.Length == s2.Length)) {
536                                 s1.Position =
0;
537                                 s2.Position =
0;
538                                 
for (; ((s1.Position != s1.Length)
539                                             && (s1.ReadByte() == s2.ReadByte())); ) {
540                                     ;
541                                 }
542                                 
if ((s1.Position == s1.Length)) {
543                                     
return type;
544                                 }
545                             }
546                         }
547                     }
548                     
finally {
549                         
if ((s1 != null)) {
550                             s1.Close();
551                         }
552                         
if ((s2 != null)) {
553                             s2.Close();
554                         }
555                     }
556                 }
557                 xs.Add(dsSchema);
558                 
return type;
559             }
560         }

561         
562         ///
<summary>
563         ///
Represents strongly named DataRow class.
564         ///</summary>

565         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
566         
public partial class tblSINH_VIENRow : global::System.Data.DataRow {
567             
568             
private tblSINH_VIENDataTable tabletblSINH_VIEN;
569             
570             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
571             
internal tblSINH_VIENRow(global::System.Data.DataRowBuilder rb) :
572                     
base(rb) {
573                 
this.tabletblSINH_VIEN = ((tblSINH_VIENDataTable)(this.Table));
574             }
575             
576             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
577             
public string MaSv {
578                 
get {
579                     
return ((string)(this[this.tabletblSINH_VIEN.MaSvColumn]));
580                 }
581                 
set {
582                     
this[this.tabletblSINH_VIEN.MaSvColumn] = value;
583                 }
584             }
585             
586             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
587             
public string HoTen {
588                 
get {
589                     
try {
590                         
return ((string)(this[this.tabletblSINH_VIEN.HoTenColumn]));
591                     }
592                     
catch (global::System.InvalidCastException e) {
593                         
throw new global::System.Data.StrongTypingException("The value for column \'HoTen\' in table \'tblSINH_VIEN\' is DBNull.", e);
594                     }
595                 }
596                 
set {
597                     
this[this.tabletblSINH_VIEN.HoTenColumn] = value;
598                 }
599             }
600             
601             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
602             
public string NgaySinh {
603                 
get {
604                     
try {
605                         
return ((string)(this[this.tabletblSINH_VIEN.NgaySinhColumn]));
606                     }
607                     
catch (global::System.InvalidCastException e) {
608                         
throw new global::System.Data.StrongTypingException("The value for column \'NgaySinh\' in table \'tblSINH_VIEN\' is DBNull.", e);
609                     }
610                 }
611                 
set {
612                     
this[this.tabletblSINH_VIEN.NgaySinhColumn] = value;
613                 }
614             }
615             
616             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
617             
public string GioiTinh {
618                 
get {
619                     
try {
620                         
return ((string)(this[this.tabletblSINH_VIEN.GioiTinhColumn]));
621                     }
622                     
catch (global::System.InvalidCastException e) {
623                         
throw new global::System.Data.StrongTypingException("The value for column \'GioiTinh\' in table \'tblSINH_VIEN\' is DBNull.", e);
624                     }
625                 }
626                 
set {
627                     
this[this.tabletblSINH_VIEN.GioiTinhColumn] = value;
628                 }
629             }
630             
631             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
632             
public string DiaChi {
633                 
get {
634                     
try {
635                         
return ((string)(this[this.tabletblSINH_VIEN.DiaChiColumn]));
636                     }
637                     
catch (global::System.InvalidCastException e) {
638                         
throw new global::System.Data.StrongTypingException("The value for column \'DiaChi\' in table \'tblSINH_VIEN\' is DBNull.", e);
639                     }
640                 }
641                 
set {
642                     
this[this.tabletblSINH_VIEN.DiaChiColumn] = value;
643                 }
644             }
645             
646             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
647             
public string MaLop {
648                 
get {
649                     
return ((string)(this[this.tabletblSINH_VIEN.MaLopColumn]));
650                 }
651                 
set {
652                     
this[this.tabletblSINH_VIEN.MaLopColumn] = value;
653                 }
654             }
655             
656             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
657             
public bool IsHoTenNull() {
658                 
return this.IsNull(this.tabletblSINH_VIEN.HoTenColumn);
659             }
660             
661             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
662             
public void SetHoTenNull() {
663                 
this[this.tabletblSINH_VIEN.HoTenColumn] = global::System.Convert.DBNull;
664             }
665             
666             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
667             
public bool IsNgaySinhNull() {
668                 
return this.IsNull(this.tabletblSINH_VIEN.NgaySinhColumn);
669             }
670             
671             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
672             
public void SetNgaySinhNull() {
673                 
this[this.tabletblSINH_VIEN.NgaySinhColumn] = global::System.Convert.DBNull;
674             }
675             
676             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
677             
public bool IsGioiTinhNull() {
678                 
return this.IsNull(this.tabletblSINH_VIEN.GioiTinhColumn);
679             }
680             
681             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
682             
public void SetGioiTinhNull() {
683                 
this[this.tabletblSINH_VIEN.GioiTinhColumn] = global::System.Convert.DBNull;
684             }
685             
686             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
687             
public bool IsDiaChiNull() {
688                 
return this.IsNull(this.tabletblSINH_VIEN.DiaChiColumn);
689             }
690             
691             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
692             
public void SetDiaChiNull() {
693                 
this[this.tabletblSINH_VIEN.DiaChiColumn] = global::System.Convert.DBNull;
694             }
695         }

696         
697         ///
<summary>
698         ///
Row event argument class
699         ///</summary>

700         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
701         
public class tblSINH_VIENRowChangeEvent : global::System.EventArgs {
702             
703             
private tblSINH_VIENRow eventRow;
704             
705             
private global::System.Data.DataRowAction eventAction;
706             
707             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
708             
public tblSINH_VIENRowChangeEvent(tblSINH_VIENRow row, global::System.Data.DataRowAction action) {
709                 
this.eventRow = row;
710                 
this.eventAction = action;
711             }
712             
713             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
714             
public tblSINH_VIENRow Row {
715                 
get {
716                     
return this.eventRow;
717                 }
718             }
719             
720             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
721             
public global::System.Data.DataRowAction Action {
722                 
get {
723                     
return this.eventAction;
724                 }
725             }
726         }
727     }
728 }

729 namespace
Quản_lý_điểm_sinh_vien_CNTT.QuanlydiemDataSet3TableAdapters {
730     
731     
732     ///
<summary>
733     ///
Represents the connection and commands used to retrieve and save data.
734     ///</summary>

735     
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
736     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
737     
[global::System.ComponentModel.ToolboxItem(true)]
738     
[global::System.ComponentModel.DataObjectAttribute(true)]
739     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
740         
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
741     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
742     
public partial class tblSINH_VIENTableAdapter : global::System.ComponentModel.Component {
743         
744         
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
745         
746         
private global::System.Data.SqlClient.SqlConnection _connection;
747         
748         
private global::System.Data.SqlClient.SqlTransaction _transaction;
749         
750         
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
751         
752         
private bool _clearBeforeFill;
753         
754         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
755         
public tblSINH_VIENTableAdapter() {
756             
this.ClearBeforeFill = true;
757         }
758         
759         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
760         
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
761             
get {
762                 
if ((this._adapter == null)) {
763                     
this.InitAdapter();
764                 }
765                 
return this._adapter;
766             }
767         }
768         
769         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
770         
internal global::System.Data.SqlClient.SqlConnection Connection {
771             
get {
772                 
if ((this._connection == null)) {
773                     
this.InitConnection();
774                 }
775                 
return this._connection;
776             }
777             
set {
778                 
this._connection = value;
779                 
if ((this.Adapter.InsertCommand != null)) {
780                     
this.Adapter.InsertCommand.Connection = value;
781                 }
782                 
if ((this.Adapter.DeleteCommand != null)) {
783                     
this.Adapter.DeleteCommand.Connection = value;
784                 }
785                 
if ((this.Adapter.UpdateCommand != null)) {
786                     
this.Adapter.UpdateCommand.Connection = value;
787                 }
788                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
789                     
if ((this.CommandCollection[i] != null)) {
790                         ((
global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
791                     }
792                 }
793             }
794         }
795         
796         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
797         
internal global::System.Data.SqlClient.SqlTransaction Transaction {
798             
get {
799                 
return this._transaction;
800             }
801             
set {
802                 
this._transaction = value;
803                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
804                     
this.CommandCollection[i].Transaction = this._transaction;
805                 }
806                 
if (((this.Adapter != null)
807                             && (
this.Adapter.DeleteCommand != null))) {
808                     
this.Adapter.DeleteCommand.Transaction = this._transaction;
809                 }
810                 
if (((this.Adapter != null)
811                             && (
this.Adapter.InsertCommand != null))) {
812                     
this.Adapter.InsertCommand.Transaction = this._transaction;
813                 }
814                 
if (((this.Adapter != null)
815                             && (
this.Adapter.UpdateCommand != null))) {
816                     
this.Adapter.UpdateCommand.Transaction = this._transaction;
817                 }
818             }
819         }
820         
821         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
822         
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
823             
get {
824                 
if ((this._commandCollection == null)) {
825                     
this.InitCommandCollection();
826                 }
827                 
return this._commandCollection;
828             }
829         }
830         
831         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
832         
public bool ClearBeforeFill {
833             
get {
834                 
return this._clearBeforeFill;
835             }
836             
set {
837                 
this._clearBeforeFill = value;
838             }
839         }
840         
841         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
842         
private void InitAdapter() {
843             
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
844             
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
845             tableMapping.SourceTable =
"Table";
846             tableMapping.DataSetTable =
"tblSINH_VIEN";
847             tableMapping.ColumnMappings.Add(
"MaSv", "MaSv");
848             tableMapping.ColumnMappings.Add(
"HoTen", "HoTen");
849             tableMapping.ColumnMappings.Add(
"NgaySinh", "NgaySinh");
850             tableMapping.ColumnMappings.Add(
"GioiTinh", "GioiTinh");
851             tableMapping.ColumnMappings.Add(
"DiaChi", "DiaChi");
852             tableMapping.ColumnMappings.Add(
"MaLop", "MaLop");
853             
this._adapter.TableMappings.Add(tableMapping);
854             
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
855             
this._adapter.DeleteCommand.Connection = this.Connection;
856             
this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[tblSINH_VIEN] WHERE (([MaSv] = @Original_MaSv) AND ((@IsNull_HoTen = 1 AND [HoTen] IS NULL) OR ([HoTen] = @Original_HoTen)) AND ((@IsNull_NgaySinh = 1 AND [NgaySinh] IS NULL) OR ([NgaySinh] = @Original_NgaySinh)) AND ((@IsNull_GioiTinh = 1 AND [GioiTinh] IS NULL) OR ([GioiTinh] = @Original_GioiTinh)) AND ((@IsNull_DiaChi = 1 AND [DiaChi] IS NULL) OR ([DiaChi] = @Original_DiaChi)) AND ([MaLop] = @Original_MaLop))";
857             
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
858             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSv", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
859             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HoTen", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
860             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HoTen", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
861             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_NgaySinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
862             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NgaySinh", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
863             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_GioiTinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
864             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_GioiTinh", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
865             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiaChi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
866             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiaChi", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
867             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaLop", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
868             
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
869             
this._adapter.InsertCommand.Connection = this.Connection;
870             
this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tblSINH_VIEN] ([MaSv], [HoTen], [NgaySinh], [GioiTinh], [DiaCh" +
871                 
"i], [MaLop]) VALUES (@MaSv, @HoTen, @NgaySinh, @GioiTinh, @DiaChi, @MaLop);\r\nSEL" +
872                 
"ECT MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop FROM tblSINH_VIEN WHERE (MaSv" +
873                 
" = @MaSv)";
874             
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
875             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSv", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
876             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HoTen", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
877             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NgaySinh", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
878             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GioiTinh", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
879             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiaChi", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
880             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaLop", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
881             
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
882             
this._adapter.UpdateCommand.Connection = this.Connection;
883             
this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[tblSINH_VIEN] SET [MaSv] = @MaSv, [HoTen] = @HoTen, [NgaySinh] = @NgaySinh, [GioiTinh] = @GioiTinh, [DiaChi] = @DiaChi, [MaLop] = @MaLop WHERE (([MaSv] = @Original_MaSv) AND ((@IsNull_HoTen = 1 AND [HoTen] IS NULL) OR ([HoTen] = @Original_HoTen)) AND ((@IsNull_NgaySinh = 1 AND [NgaySinh] IS NULL) OR ([NgaySinh] = @Original_NgaySinh)) AND ((@IsNull_GioiTinh = 1 AND [GioiTinh] IS NULL) OR ([GioiTinh] = @Original_GioiTinh)) AND ((@IsNull_DiaChi = 1 AND [DiaChi] IS NULL) OR ([DiaChi] = @Original_DiaChi)) AND ([MaLop] = @Original_MaLop));
884 SELECT MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop FROM tblSINH_VIEN WHERE (MaSv = @MaSv)"
;
885             
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
886             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaSv", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
887             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HoTen", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
888             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NgaySinh", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
889             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GioiTinh", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
890             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiaChi", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
891             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaLop", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
892             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaSv", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaSv", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
893             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_HoTen", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
894             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_HoTen", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "HoTen", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
895             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_NgaySinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
896             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NgaySinh", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NgaySinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
897             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_GioiTinh", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
898             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_GioiTinh", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GioiTinh", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
899             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiaChi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
900             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiaChi", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiaChi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
901             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaLop", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaLop", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
902         }
903         
904         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
905         
private void InitConnection() {
906             
this._connection = new global::System.Data.SqlClient.SqlConnection();
907             
this._connection.ConnectionString = global::Quản_lý_điểm_sinh_vien_CNTT.Properties.Settings.Default.QuanlydiemConnectionString;
908         }
909         
910         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
911         
private void InitCommandCollection() {
912             
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
913             
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
914             
this._commandCollection[0].Connection = this.Connection;
915             
this._commandCollection[0].CommandText = "SELECT MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop FROM dbo.tblSINH_VIEN";
916             
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
917         }
918         
919         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
920         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
921         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
922         
public virtual int Fill(QuanlydiemDataSet3.tblSINH_VIENDataTable dataTable) {
923             
this.Adapter.SelectCommand = this.CommandCollection[0];
924             
if ((this.ClearBeforeFill == true)) {
925                 dataTable.Clear();
926             }
927             
int returnValue = this.Adapter.Fill(dataTable);
928             
return returnValue;
929         }
930         
931         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
932         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
933         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
934         
public virtual QuanlydiemDataSet3.tblSINH_VIENDataTable GetData() {
935             
this.Adapter.SelectCommand = this.CommandCollection[0];
936             QuanlydiemDataSet3.tblSINH_VIENDataTable dataTable =
new QuanlydiemDataSet3.tblSINH_VIENDataTable();
937             
this.Adapter.Fill(dataTable);
938             
return dataTable;
939         }
940         
941         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
942         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
943         
public virtual int Update(QuanlydiemDataSet3.tblSINH_VIENDataTable dataTable) {
944             
return this.Adapter.Update(dataTable);
945         }
946         
947         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
948         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
949         
public virtual int Update(QuanlydiemDataSet3 dataSet) {
950             
return this.Adapter.Update(dataSet, "tblSINH_VIEN");
951         }
952         
953         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
954         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
955         
public virtual int Update(global::System.Data.DataRow dataRow) {
956             
return this.Adapter.Update(new global::System.Data.DataRow[] {
957                         dataRow});
958         }
959         
960         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
961         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
962         
public virtual int Update(global::System.Data.DataRow[] dataRows) {
963             
return this.Adapter.Update(dataRows);
964         }
965         
966         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
967         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
968         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
969         
public virtual int Delete(string Original_MaSv, string Original_HoTen, string Original_NgaySinh, string Original_GioiTinh, string Original_DiaChi, string Original_MaLop) {
970             
if ((Original_MaSv == null)) {
971                 
throw new global::System.ArgumentNullException("Original_MaSv");
972             }
973             
else {
974                 
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_MaSv));
975             }
976             
if ((Original_HoTen == null)) {
977                 
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
978                 
this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
979             }
980             
else {
981                 
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
982                 
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_HoTen));
983             }
984             
if ((Original_NgaySinh == null)) {
985                 
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
986                 
this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
987             }
988             
else {
989                 
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
990                 
this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_NgaySinh));
991             }
992             
if ((Original_GioiTinh == null)) {
993                 
this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
994                 
this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
995             }
996             
else {
997                 
this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
998                 
this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_GioiTinh));
999             }
1000             
if ((Original_DiaChi == null)) {
1001                 
this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
1002                 
this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
1003             }
1004             
else {
1005                 
this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
1006                 
this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_DiaChi));
1007             }
1008             
if ((Original_MaLop == null)) {
1009                 
throw new global::System.ArgumentNullException("Original_MaLop");
1010             }
1011             
else {
1012                 
this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_MaLop));
1013             }
1014             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
1015             
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
1016                         !=
global::System.Data.ConnectionState.Open)) {
1017                 
this.Adapter.DeleteCommand.Connection.Open();
1018             }
1019             
try {
1020                 
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
1021                 
return returnValue;
1022             }
1023             
finally {
1024                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1025                     
this.Adapter.DeleteCommand.Connection.Close();
1026                 }
1027             }
1028         }
1029         
1030         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1031         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1032         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1033         
public virtual int Insert(string MaSv, string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop) {
1034             
if ((MaSv == null)) {
1035                 
throw new global::System.ArgumentNullException("MaSv");
1036             }
1037             
else {
1038                 
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(MaSv));
1039             }
1040             
if ((HoTen == null)) {
1041                 
this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
1042             }
1043             
else {
1044                 
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(HoTen));
1045             }
1046             
if ((NgaySinh == null)) {
1047                 
this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1048             }
1049             
else {
1050                 
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(NgaySinh));
1051             }
1052             
if ((GioiTinh == null)) {
1053                 
this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1054             }
1055             
else {
1056                 
this.Adapter.InsertCommand.Parameters[3].Value = ((string)(GioiTinh));
1057             }
1058             
if ((DiaChi == null)) {
1059                 
this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
1060             }
1061             
else {
1062                 
this.Adapter.InsertCommand.Parameters[4].Value = ((string)(DiaChi));
1063             }
1064             
if ((MaLop == null)) {
1065                 
throw new global::System.ArgumentNullException("MaLop");
1066             }
1067             
else {
1068                 
this.Adapter.InsertCommand.Parameters[5].Value = ((string)(MaLop));
1069             }
1070             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1071             
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1072                         !=
global::System.Data.ConnectionState.Open)) {
1073                 
this.Adapter.InsertCommand.Connection.Open();
1074             }
1075             
try {
1076                 
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1077                 
return returnValue;
1078             }
1079             
finally {
1080                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1081                     
this.Adapter.InsertCommand.Connection.Close();
1082                 }
1083             }
1084         }
1085         
1086         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1087         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1088         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1089         
public virtual int Update(string MaSv, string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop, string Original_MaSv, string Original_HoTen, string Original_NgaySinh, string Original_GioiTinh, string Original_DiaChi, string Original_MaLop) {
1090             
if ((MaSv == null)) {
1091                 
throw new global::System.ArgumentNullException("MaSv");
1092             }
1093             
else {
1094                 
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(MaSv));
1095             }
1096             
if ((HoTen == null)) {
1097                 
this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
1098             }
1099             
else {
1100                 
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(HoTen));
1101             }
1102             
if ((NgaySinh == null)) {
1103                 
this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1104             }
1105             
else {
1106                 
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(NgaySinh));
1107             }
1108             
if ((GioiTinh == null)) {
1109                 
this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
1110             }
1111             
else {
1112                 
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(GioiTinh));
1113             }
1114             
if ((DiaChi == null)) {
1115                 
this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
1116             }
1117             
else {
1118                 
this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(DiaChi));
1119             }
1120             
if ((MaLop == null)) {
1121                 
throw new global::System.ArgumentNullException("MaLop");
1122             }
1123             
else {
1124                 
this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(MaLop));
1125             }
1126             
if ((Original_MaSv == null)) {
1127                 
throw new global::System.ArgumentNullException("Original_MaSv");
1128             }
1129             
else {
1130                 
this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_MaSv));
1131             }
1132             
if ((Original_HoTen == null)) {
1133                 
this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1));
1134                 
this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value;
1135             }
1136             
else {
1137                 
this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0));
1138                 
this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_HoTen));
1139             }
1140             
if ((Original_NgaySinh == null)) {
1141                 
this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1));
1142                 
this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value;
1143             }
1144             
else {
1145                 
this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0));
1146                 
this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_NgaySinh));
1147             }
1148             
if ((Original_GioiTinh == null)) {
1149                 
this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
1150                 
this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
1151             }
1152             
else {
1153                 
this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
1154                 
this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_GioiTinh));
1155             }
1156             
if ((Original_DiaChi == null)) {
1157                 
this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
1158                 
this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
1159             }
1160             
else {
1161                 
this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
1162                 
this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_DiaChi));
1163             }
1164             
if ((Original_MaLop == null)) {
1165                 
throw new global::System.ArgumentNullException("Original_MaLop");
1166             }
1167             
else {
1168                 
this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_MaLop));
1169             }
1170             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
1171             
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
1172                         !=
global::System.Data.ConnectionState.Open)) {
1173                 
this.Adapter.UpdateCommand.Connection.Open();
1174             }
1175             
try {
1176                 
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
1177                 
return returnValue;
1178             }
1179             
finally {
1180                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1181                     
this.Adapter.UpdateCommand.Connection.Close();
1182                 }
1183             }
1184         }
1185         
1186         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1187         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1188         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1189         
public virtual int Update(string HoTen, string NgaySinh, string GioiTinh, string DiaChi, string MaLop, string Original_MaSv, string Original_HoTen, string Original_NgaySinh, string Original_GioiTinh, string Original_DiaChi, string Original_MaLop) {
1190             
return this.Update(Original_MaSv, HoTen, NgaySinh, GioiTinh, DiaChi, MaLop, Original_MaSv, Original_HoTen, Original_NgaySinh, Original_GioiTinh, Original_DiaChi, Original_MaLop);
1191         }
1192     }

1193     
1194     ///
<summary>
1195     ///
TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
1196     ///</summary>

1197     
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1198     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
1199     
[global::System.ComponentModel.ToolboxItem(true)]
1200     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
1201         
"esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1202     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
1203     
public partial class TableAdapterManager : global::System.ComponentModel.Component {
1204         
1205         
private UpdateOrderOption _updateOrder;
1206         
1207         
private tblSINH_VIENTableAdapter _tblSINH_VIENTableAdapter;
1208         
1209         
private bool _backupDataSetBeforeUpdate;
1210         
1211         
private global::System.Data.IDbConnection _connection;
1212         
1213         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1214         
public UpdateOrderOption UpdateOrder {
1215             
get {
1216                 
return this._updateOrder;
1217             }
1218             
set {
1219                 
this._updateOrder = value;
1220             }
1221         }
1222         
1223         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1224         [
global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
1225             
"ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
1226             
"", "System.Drawing.Design.UITypeEditor")]
1227         
public tblSINH_VIENTableAdapter tblSINH_VIENTableAdapter {
1228             
get {
1229                 
return this._tblSINH_VIENTableAdapter;
1230             }
1231             
set {
1232                 
if (((this._tblSINH_VIENTableAdapter != null)
1233                             && (
this.TableAdapterInstanceCount == 1))) {
1234                     
this._tblSINH_VIENTableAdapter = value;
1235                     
return;
1236                 }
1237                 
if (((value != null)
1238                             && (
this.MatchTableAdapterConnection(value.Connection) == false))) {
1239                     
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
1240                             
"tring.");
1241                 }
1242                 
this._tblSINH_VIENTableAdapter = value;
1243             }
1244         }
1245         
1246         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1247         
public bool BackupDataSetBeforeUpdate {
1248             
get {
1249                 
return this._backupDataSetBeforeUpdate;
1250             }
1251             
set {
1252                 
this._backupDataSetBeforeUpdate = value;
1253             }
1254         }
1255         
1256         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1257         
[global::System.ComponentModel.Browsable(false)]
1258         
public global::System.Data.IDbConnection Connection {
1259             
get {
1260                 
if ((this._connection != null)) {
1261                     
return this._connection;
1262                 }
1263                 
if (((this._tblSINH_VIENTableAdapter != null)
1264                             && (
this._tblSINH_VIENTableAdapter.Connection != null))) {
1265                     
return this._tblSINH_VIENTableAdapter.Connection;
1266                 }
1267                 
return null;
1268             }
1269             
set {
1270                 
this._connection = value;
1271             }
1272         }
1273         
1274         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1275         
[global::System.ComponentModel.Browsable(false)]
1276         
public int TableAdapterInstanceCount {
1277             
get {
1278                 
int count = 0;
1279                 
if ((this._tblSINH_VIENTableAdapter != null)) {
1280                     count = (count +
1);
1281                 }
1282                 
return count;
1283             }
1284         }

1285         
1286         ///
<summary>
1287         ///
Update rows in top-down order.
1288         ///</summary>

1289         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1290         
private int UpdateUpdatedRows(QuanlydiemDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1291             
int result = 0;
1292             
if ((this._tblSINH_VIENTableAdapter != null)) {
1293                 
global::System.Data.DataRow[] updatedRows = dataSet.tblSINH_VIEN.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
1294                 updatedRows =
this.GetRealUpdatedRows(updatedRows, allAddedRows);
1295                 
if (((updatedRows != null)
1296                             && (
0 < updatedRows.Length))) {
1297                     result = (result +
this._tblSINH_VIENTableAdapter.Update(updatedRows));
1298                     allChangedRows.AddRange(updatedRows);
1299                 }
1300             }
1301             
return result;
1302         }

1303         
1304         ///
<summary>
1305         ///
Insert rows in top-down order.
1306         ///</summary>

1307         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1308         
private int UpdateInsertedRows(QuanlydiemDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1309             
int result = 0;
1310             
if ((this._tblSINH_VIENTableAdapter != null)) {
1311                 
global::System.Data.DataRow[] addedRows = dataSet.tblSINH_VIEN.Select(null, null, global::System.Data.DataViewRowState.Added);
1312                 
if (((addedRows != null)
1313                             && (
0 < addedRows.Length))) {
1314                     result = (result +
this._tblSINH_VIENTableAdapter.Update(addedRows));
1315                     allAddedRows.AddRange(addedRows);
1316                 }
1317             }
1318             
return result;
1319         }

1320         
1321         ///
<summary>
1322         ///
Delete rows in bottom-up order.
1323         ///</summary>

1324         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1325         
private int UpdateDeletedRows(QuanlydiemDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
1326             
int result = 0;
1327             
if ((this._tblSINH_VIENTableAdapter != null)) {
1328                 
global::System.Data.DataRow[] deletedRows = dataSet.tblSINH_VIEN.Select(null, null, global::System.Data.DataViewRowState.Deleted);
1329                 
if (((deletedRows != null)
1330                             && (
0 < deletedRows.Length))) {
1331                     result = (result +
this._tblSINH_VIENTableAdapter.Update(deletedRows));
1332                     allChangedRows.AddRange(deletedRows);
1333                 }
1334             }
1335             
return result;
1336         }

1337         
1338         ///
<summary>
1339         ///
Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1340         ///</summary>

1341         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1342         
private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1343             
if (((updatedRows == null)
1344                         || (updatedRows.Length <
1))) {
1345                 
return updatedRows;
1346             }
1347             
if (((allAddedRows == null)
1348                         || (allAddedRows.Count <
1))) {
1349                 
return updatedRows;
1350             }
1351             
global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1352             
for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
1353                 
global::System.Data.DataRow row = updatedRows[i];
1354                 
if ((allAddedRows.Contains(row) == false)) {
1355                     realUpdatedRows.Add(row);
1356                 }
1357             }
1358             
return realUpdatedRows.ToArray();
1359         }

1360         
1361         ///
<summary>
1362         ///
Update all changes to the dataset.
1363         ///</summary>

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

1503         
1504         ///
<summary>
1505         ///
Update Order Option
1506         ///</summary>

1507         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1508         
public enum UpdateOrderOption {
1509             
1510             InsertUpdateDelete =
0,
1511             
1512             UpdateInsertDelete =
1,
1513         }

1514         
1515         ///
<summary>
1516         ///
Used to sort self-referenced table's rows
1517         ///</summary>

1518         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1519         
private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
1520             
1521             
private global::System.Data.DataRelation _relation;
1522             
1523             
private int _childFirst;
1524             
1525             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1526             
internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
1527                 
this._relation = relation;
1528                 
if (childFirst) {
1529                     
this._childFirst = -1;
1530                 }
1531                 
else {
1532                     
this._childFirst = 1;
1533                 }
1534             }
1535             
1536             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1537             
private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) {
1538                 
global::System.Diagnostics.Debug.Assert((child != null));
1539                 
global::System.Diagnostics.Debug.Assert((parent != null));
1540                 
global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1541                 
for (
1542                 ; ((newParent !=
null)
1543                             && ((
object.ReferenceEquals(newParent, child) == false)
1544                             && (
object.ReferenceEquals(newParent, parent) == false)));
1545                 ) {
1546                     newParent = newParent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Default);
1547                 }
1548                 
if ((newParent == null)) {
1549                     
for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null)
1550                                 && ((
object.ReferenceEquals(newParent, child) == false)
1551                                 && (
object.ReferenceEquals(newParent, parent) == false)));
1552                     ) {
1553                         newParent = newParent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Original);
1554                     }
1555                 }
1556                 
if (object.ReferenceEquals(newParent, parent)) {
1557                     
return true;
1558                 }
1559                 
return false;
1560             }
1561             
1562             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1563             
public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
1564                 
if (object.ReferenceEquals(row1, row2)) {
1565                     
return 0;
1566                 }
1567                 
if ((row1 == null)) {
1568                     
return -1;
1569                 }
1570                 
if ((row2 == null)) {
1571                     
return 1;
1572                 }
1573
1574                 
// Is row1 the child or grandchild of row2
1575                 
if (this.IsChildAndParent(row1, row2)) {
1576                     
return this._childFirst;
1577                 }
1578
1579                 
// Is row2 the child or grandchild of row1
1580                 
if (this.IsChildAndParent(row2, row1)) {
1581                     
return (-1 * this._childFirst);
1582                 }
1583                 
return 0;
1584             }
1585         }
1586     }
1587 }
1588
1589 #pragma warning restore
1591



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

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