Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.Designer.cs @ 826

Last change on this file since 826 was 826, checked in by svonolfe, 16 years ago

Added initial version of the DAL (#372)

File size: 145.7 KB
Line 
1//------------------------------------------------------------------------------
2// <auto-generated>
3//     This code was generated by a tool.
4//     Runtime Version:2.0.50727.3053
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
13namespace HeuristicLab.Hive.Server.ADODataAccess {
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("dsHiveServer")]
25    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
26    public partial class dsHiveServer : global::System.Data.DataSet {
27       
28        private ClientDataTable tableClient;
29       
30        private ResourceDataTable tableResource;
31       
32        private global::System.Data.DataRelation relationClient_is_a_Resource;
33       
34        private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
35       
36        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
37        public dsHiveServer() {
38            this.BeginInit();
39            this.InitClass();
40            global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
41            base.Tables.CollectionChanged += schemaChangedHandler;
42            base.Relations.CollectionChanged += schemaChangedHandler;
43            this.EndInit();
44        }
45       
46        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
47        protected dsHiveServer(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
48                base(info, context, false) {
49            if ((this.IsBinarySerialized(info, context) == true)) {
50                this.InitVars(false);
51                global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
52                this.Tables.CollectionChanged += schemaChangedHandler1;
53                this.Relations.CollectionChanged += schemaChangedHandler1;
54                return;
55            }
56            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
57            if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
58                global::System.Data.DataSet ds = new global::System.Data.DataSet();
59                ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
60                if ((ds.Tables["Client"] != null)) {
61                    base.Tables.Add(new ClientDataTable(ds.Tables["Client"]));
62                }
63                if ((ds.Tables["Resource"] != null)) {
64                    base.Tables.Add(new ResourceDataTable(ds.Tables["Resource"]));
65                }
66                this.DataSetName = ds.DataSetName;
67                this.Prefix = ds.Prefix;
68                this.Namespace = ds.Namespace;
69                this.Locale = ds.Locale;
70                this.CaseSensitive = ds.CaseSensitive;
71                this.EnforceConstraints = ds.EnforceConstraints;
72                this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
73                this.InitVars();
74            }
75            else {
76                this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
77            }
78            this.GetSerializationData(info, context);
79            global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
80            base.Tables.CollectionChanged += schemaChangedHandler;
81            this.Relations.CollectionChanged += schemaChangedHandler;
82        }
83       
84        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
85        [global::System.ComponentModel.Browsable(false)]
86        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
87        public ClientDataTable Client {
88            get {
89                return this.tableClient;
90            }
91        }
92       
93        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
94        [global::System.ComponentModel.Browsable(false)]
95        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
96        public ResourceDataTable Resource {
97            get {
98                return this.tableResource;
99            }
100        }
101       
102        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
103        [global::System.ComponentModel.BrowsableAttribute(true)]
104        [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
105        public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
106            get {
107                return this._schemaSerializationMode;
108            }
109            set {
110                this._schemaSerializationMode = value;
111            }
112        }
113       
114        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
115        [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
116        public new global::System.Data.DataTableCollection Tables {
117            get {
118                return base.Tables;
119            }
120        }
121       
122        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
123        [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
124        public new global::System.Data.DataRelationCollection Relations {
125            get {
126                return base.Relations;
127            }
128        }
129       
130        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
131        protected override void InitializeDerivedDataSet() {
132            this.BeginInit();
133            this.InitClass();
134            this.EndInit();
135        }
136       
137        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
138        public override global::System.Data.DataSet Clone() {
139            dsHiveServer cln = ((dsHiveServer)(base.Clone()));
140            cln.InitVars();
141            cln.SchemaSerializationMode = this.SchemaSerializationMode;
142            return cln;
143        }
144       
145        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
146        protected override bool ShouldSerializeTables() {
147            return false;
148        }
149       
150        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
151        protected override bool ShouldSerializeRelations() {
152            return false;
153        }
154       
155        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
156        protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
157            if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
158                this.Reset();
159                global::System.Data.DataSet ds = new global::System.Data.DataSet();
160                ds.ReadXml(reader);
161                if ((ds.Tables["Client"] != null)) {
162                    base.Tables.Add(new ClientDataTable(ds.Tables["Client"]));
163                }
164                if ((ds.Tables["Resource"] != null)) {
165                    base.Tables.Add(new ResourceDataTable(ds.Tables["Resource"]));
166                }
167                this.DataSetName = ds.DataSetName;
168                this.Prefix = ds.Prefix;
169                this.Namespace = ds.Namespace;
170                this.Locale = ds.Locale;
171                this.CaseSensitive = ds.CaseSensitive;
172                this.EnforceConstraints = ds.EnforceConstraints;
173                this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
174                this.InitVars();
175            }
176            else {
177                this.ReadXml(reader);
178                this.InitVars();
179            }
180        }
181       
182        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
183        protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
184            global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
185            this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
186            stream.Position = 0;
187            return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
188        }
189       
190        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
191        internal void InitVars() {
192            this.InitVars(true);
193        }
194       
195        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
196        internal void InitVars(bool initTable) {
197            this.tableClient = ((ClientDataTable)(base.Tables["Client"]));
198            if ((initTable == true)) {
199                if ((this.tableClient != null)) {
200                    this.tableClient.InitVars();
201                }
202            }
203            this.tableResource = ((ResourceDataTable)(base.Tables["Resource"]));
204            if ((initTable == true)) {
205                if ((this.tableResource != null)) {
206                    this.tableResource.InitVars();
207                }
208            }
209            this.relationClient_is_a_Resource = this.Relations["Client_is_a_Resource"];
210        }
211       
212        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
213        private void InitClass() {
214            this.DataSetName = "dsHiveServer";
215            this.Prefix = "";
216            this.Namespace = "http://tempuri.org/dsHiveServer.xsd";
217            this.EnforceConstraints = true;
218            this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
219            this.tableClient = new ClientDataTable();
220            base.Tables.Add(this.tableClient);
221            this.tableResource = new ResourceDataTable();
222            base.Tables.Add(this.tableResource);
223            this.relationClient_is_a_Resource = new global::System.Data.DataRelation("Client_is_a_Resource", new global::System.Data.DataColumn[] {
224                        this.tableResource.ResourceIdColumn}, new global::System.Data.DataColumn[] {
225                        this.tableClient.ResourceIdColumn}, false);
226            this.Relations.Add(this.relationClient_is_a_Resource);
227        }
228       
229        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
230        private bool ShouldSerializeClient() {
231            return false;
232        }
233       
234        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
235        private bool ShouldSerializeResource() {
236            return false;
237        }
238       
239        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
240        private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
241            if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
242                this.InitVars();
243            }
244        }
245       
246        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
247        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
248            dsHiveServer ds = new dsHiveServer();
249            global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
250            global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
251            global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
252            any.Namespace = ds.Namespace;
253            sequence.Items.Add(any);
254            type.Particle = sequence;
255            global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
256            if (xs.Contains(dsSchema.TargetNamespace)) {
257                global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
258                global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
259                try {
260                    global::System.Xml.Schema.XmlSchema schema = null;
261                    dsSchema.Write(s1);
262                    for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
263                        schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
264                        s2.SetLength(0);
265                        schema.Write(s2);
266                        if ((s1.Length == s2.Length)) {
267                            s1.Position = 0;
268                            s2.Position = 0;
269                            for (; ((s1.Position != s1.Length)
270                                        && (s1.ReadByte() == s2.ReadByte())); ) {
271                                ;
272                            }
273                            if ((s1.Position == s1.Length)) {
274                                return type;
275                            }
276                        }
277                    }
278                }
279                finally {
280                    if ((s1 != null)) {
281                        s1.Close();
282                    }
283                    if ((s2 != null)) {
284                        s2.Close();
285                    }
286                }
287            }
288            xs.Add(dsSchema);
289            return type;
290        }
291       
292        public delegate void ClientRowChangeEventHandler(object sender, ClientRowChangeEvent e);
293       
294        public delegate void ResourceRowChangeEventHandler(object sender, ResourceRowChangeEvent e);
295       
296        /// <summary>
297        ///Represents the strongly named DataTable class.
298        ///</summary>
299        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
300        [global::System.Serializable()]
301        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
302        public partial class ClientDataTable : global::System.Data.TypedTableBase<ClientRow> {
303           
304            private global::System.Data.DataColumn columnResourceId;
305           
306            private global::System.Data.DataColumn columnGUID;
307           
308            private global::System.Data.DataColumn columnCPUSpeed;
309           
310            private global::System.Data.DataColumn columnMemory;
311           
312            private global::System.Data.DataColumn columnLogin;
313           
314            private global::System.Data.DataColumn columnStatus;
315           
316            private global::System.Data.DataColumn columnClientConfigId;
317           
318            private global::System.Data.DataColumn columnNumberOfCores;
319           
320            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
321            public ClientDataTable() {
322                this.TableName = "Client";
323                this.BeginInit();
324                this.InitClass();
325                this.EndInit();
326            }
327           
328            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
329            internal ClientDataTable(global::System.Data.DataTable table) {
330                this.TableName = table.TableName;
331                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
332                    this.CaseSensitive = table.CaseSensitive;
333                }
334                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
335                    this.Locale = table.Locale;
336                }
337                if ((table.Namespace != table.DataSet.Namespace)) {
338                    this.Namespace = table.Namespace;
339                }
340                this.Prefix = table.Prefix;
341                this.MinimumCapacity = table.MinimumCapacity;
342            }
343           
344            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
345            protected ClientDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
346                    base(info, context) {
347                this.InitVars();
348            }
349           
350            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
351            public global::System.Data.DataColumn ResourceIdColumn {
352                get {
353                    return this.columnResourceId;
354                }
355            }
356           
357            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
358            public global::System.Data.DataColumn GUIDColumn {
359                get {
360                    return this.columnGUID;
361                }
362            }
363           
364            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
365            public global::System.Data.DataColumn CPUSpeedColumn {
366                get {
367                    return this.columnCPUSpeed;
368                }
369            }
370           
371            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
372            public global::System.Data.DataColumn MemoryColumn {
373                get {
374                    return this.columnMemory;
375                }
376            }
377           
378            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
379            public global::System.Data.DataColumn LoginColumn {
380                get {
381                    return this.columnLogin;
382                }
383            }
384           
385            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
386            public global::System.Data.DataColumn StatusColumn {
387                get {
388                    return this.columnStatus;
389                }
390            }
391           
392            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
393            public global::System.Data.DataColumn ClientConfigIdColumn {
394                get {
395                    return this.columnClientConfigId;
396                }
397            }
398           
399            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
400            public global::System.Data.DataColumn NumberOfCoresColumn {
401                get {
402                    return this.columnNumberOfCores;
403                }
404            }
405           
406            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
407            [global::System.ComponentModel.Browsable(false)]
408            public int Count {
409                get {
410                    return this.Rows.Count;
411                }
412            }
413           
414            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
415            public ClientRow this[int index] {
416                get {
417                    return ((ClientRow)(this.Rows[index]));
418                }
419            }
420           
421            public event ClientRowChangeEventHandler ClientRowChanging;
422           
423            public event ClientRowChangeEventHandler ClientRowChanged;
424           
425            public event ClientRowChangeEventHandler ClientRowDeleting;
426           
427            public event ClientRowChangeEventHandler ClientRowDeleted;
428           
429            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
430            public void AddClientRow(ClientRow row) {
431                this.Rows.Add(row);
432            }
433           
434            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
435            public ClientRow AddClientRow(ResourceRow parentResourceRowByClient_is_a_Resource, System.Guid GUID, int CPUSpeed, string Memory, string Login, string Status, long ClientConfigId, int NumberOfCores) {
436                ClientRow rowClientRow = ((ClientRow)(this.NewRow()));
437                object[] columnValuesArray = new object[] {
438                        null,
439                        GUID,
440                        CPUSpeed,
441                        Memory,
442                        Login,
443                        Status,
444                        ClientConfigId,
445                        NumberOfCores};
446                if ((parentResourceRowByClient_is_a_Resource != null)) {
447                    columnValuesArray[0] = parentResourceRowByClient_is_a_Resource[0];
448                }
449                rowClientRow.ItemArray = columnValuesArray;
450                this.Rows.Add(rowClientRow);
451                return rowClientRow;
452            }
453           
454            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
455            public ClientRow FindByResourceId(long ResourceId) {
456                return ((ClientRow)(this.Rows.Find(new object[] {
457                            ResourceId})));
458            }
459           
460            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
461            public override global::System.Data.DataTable Clone() {
462                ClientDataTable cln = ((ClientDataTable)(base.Clone()));
463                cln.InitVars();
464                return cln;
465            }
466           
467            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
468            protected override global::System.Data.DataTable CreateInstance() {
469                return new ClientDataTable();
470            }
471           
472            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
473            internal void InitVars() {
474                this.columnResourceId = base.Columns["ResourceId"];
475                this.columnGUID = base.Columns["GUID"];
476                this.columnCPUSpeed = base.Columns["CPUSpeed"];
477                this.columnMemory = base.Columns["Memory"];
478                this.columnLogin = base.Columns["Login"];
479                this.columnStatus = base.Columns["Status"];
480                this.columnClientConfigId = base.Columns["ClientConfigId"];
481                this.columnNumberOfCores = base.Columns["NumberOfCores"];
482            }
483           
484            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
485            private void InitClass() {
486                this.columnResourceId = new global::System.Data.DataColumn("ResourceId", typeof(long), null, global::System.Data.MappingType.Element);
487                base.Columns.Add(this.columnResourceId);
488                this.columnGUID = new global::System.Data.DataColumn("GUID", typeof(global::System.Guid), null, global::System.Data.MappingType.Element);
489                base.Columns.Add(this.columnGUID);
490                this.columnCPUSpeed = new global::System.Data.DataColumn("CPUSpeed", typeof(int), null, global::System.Data.MappingType.Element);
491                base.Columns.Add(this.columnCPUSpeed);
492                this.columnMemory = new global::System.Data.DataColumn("Memory", typeof(string), null, global::System.Data.MappingType.Element);
493                base.Columns.Add(this.columnMemory);
494                this.columnLogin = new global::System.Data.DataColumn("Login", typeof(string), null, global::System.Data.MappingType.Element);
495                base.Columns.Add(this.columnLogin);
496                this.columnStatus = new global::System.Data.DataColumn("Status", typeof(string), null, global::System.Data.MappingType.Element);
497                base.Columns.Add(this.columnStatus);
498                this.columnClientConfigId = new global::System.Data.DataColumn("ClientConfigId", typeof(long), null, global::System.Data.MappingType.Element);
499                base.Columns.Add(this.columnClientConfigId);
500                this.columnNumberOfCores = new global::System.Data.DataColumn("NumberOfCores", typeof(int), null, global::System.Data.MappingType.Element);
501                base.Columns.Add(this.columnNumberOfCores);
502                this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
503                                this.columnResourceId}, true));
504                this.columnResourceId.AllowDBNull = false;
505                this.columnResourceId.Unique = true;
506                this.columnMemory.MaxLength = 18;
507                this.columnLogin.MaxLength = 18;
508                this.columnStatus.MaxLength = 18;
509            }
510           
511            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
512            public ClientRow NewClientRow() {
513                return ((ClientRow)(this.NewRow()));
514            }
515           
516            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
517            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
518                return new ClientRow(builder);
519            }
520           
521            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
522            protected override global::System.Type GetRowType() {
523                return typeof(ClientRow);
524            }
525           
526            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
527            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
528                base.OnRowChanged(e);
529                if ((this.ClientRowChanged != null)) {
530                    this.ClientRowChanged(this, new ClientRowChangeEvent(((ClientRow)(e.Row)), e.Action));
531                }
532            }
533           
534            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
535            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
536                base.OnRowChanging(e);
537                if ((this.ClientRowChanging != null)) {
538                    this.ClientRowChanging(this, new ClientRowChangeEvent(((ClientRow)(e.Row)), e.Action));
539                }
540            }
541           
542            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
543            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
544                base.OnRowDeleted(e);
545                if ((this.ClientRowDeleted != null)) {
546                    this.ClientRowDeleted(this, new ClientRowChangeEvent(((ClientRow)(e.Row)), e.Action));
547                }
548            }
549           
550            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
551            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
552                base.OnRowDeleting(e);
553                if ((this.ClientRowDeleting != null)) {
554                    this.ClientRowDeleting(this, new ClientRowChangeEvent(((ClientRow)(e.Row)), e.Action));
555                }
556            }
557           
558            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
559            public void RemoveClientRow(ClientRow row) {
560                this.Rows.Remove(row);
561            }
562           
563            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
564            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
565                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
566                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
567                dsHiveServer ds = new dsHiveServer();
568                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
569                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
570                any1.MinOccurs = new decimal(0);
571                any1.MaxOccurs = decimal.MaxValue;
572                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
573                sequence.Items.Add(any1);
574                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
575                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
576                any2.MinOccurs = new decimal(1);
577                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
578                sequence.Items.Add(any2);
579                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
580                attribute1.Name = "namespace";
581                attribute1.FixedValue = ds.Namespace;
582                type.Attributes.Add(attribute1);
583                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
584                attribute2.Name = "tableTypeName";
585                attribute2.FixedValue = "ClientDataTable";
586                type.Attributes.Add(attribute2);
587                type.Particle = sequence;
588                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
589                if (xs.Contains(dsSchema.TargetNamespace)) {
590                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
591                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
592                    try {
593                        global::System.Xml.Schema.XmlSchema schema = null;
594                        dsSchema.Write(s1);
595                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
596                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
597                            s2.SetLength(0);
598                            schema.Write(s2);
599                            if ((s1.Length == s2.Length)) {
600                                s1.Position = 0;
601                                s2.Position = 0;
602                                for (; ((s1.Position != s1.Length)
603                                            && (s1.ReadByte() == s2.ReadByte())); ) {
604                                    ;
605                                }
606                                if ((s1.Position == s1.Length)) {
607                                    return type;
608                                }
609                            }
610                        }
611                    }
612                    finally {
613                        if ((s1 != null)) {
614                            s1.Close();
615                        }
616                        if ((s2 != null)) {
617                            s2.Close();
618                        }
619                    }
620                }
621                xs.Add(dsSchema);
622                return type;
623            }
624        }
625       
626        /// <summary>
627        ///Represents the strongly named DataTable class.
628        ///</summary>
629        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
630        [global::System.Serializable()]
631        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
632        public partial class ResourceDataTable : global::System.Data.TypedTableBase<ResourceRow> {
633           
634            private global::System.Data.DataColumn columnResourceId;
635           
636            private global::System.Data.DataColumn columnName;
637           
638            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
639            public ResourceDataTable() {
640                this.TableName = "Resource";
641                this.BeginInit();
642                this.InitClass();
643                this.EndInit();
644            }
645           
646            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
647            internal ResourceDataTable(global::System.Data.DataTable table) {
648                this.TableName = table.TableName;
649                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
650                    this.CaseSensitive = table.CaseSensitive;
651                }
652                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
653                    this.Locale = table.Locale;
654                }
655                if ((table.Namespace != table.DataSet.Namespace)) {
656                    this.Namespace = table.Namespace;
657                }
658                this.Prefix = table.Prefix;
659                this.MinimumCapacity = table.MinimumCapacity;
660            }
661           
662            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
663            protected ResourceDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
664                    base(info, context) {
665                this.InitVars();
666            }
667           
668            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
669            public global::System.Data.DataColumn ResourceIdColumn {
670                get {
671                    return this.columnResourceId;
672                }
673            }
674           
675            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
676            public global::System.Data.DataColumn NameColumn {
677                get {
678                    return this.columnName;
679                }
680            }
681           
682            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
683            [global::System.ComponentModel.Browsable(false)]
684            public int Count {
685                get {
686                    return this.Rows.Count;
687                }
688            }
689           
690            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
691            public ResourceRow this[int index] {
692                get {
693                    return ((ResourceRow)(this.Rows[index]));
694                }
695            }
696           
697            public event ResourceRowChangeEventHandler ResourceRowChanging;
698           
699            public event ResourceRowChangeEventHandler ResourceRowChanged;
700           
701            public event ResourceRowChangeEventHandler ResourceRowDeleting;
702           
703            public event ResourceRowChangeEventHandler ResourceRowDeleted;
704           
705            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
706            public void AddResourceRow(ResourceRow row) {
707                this.Rows.Add(row);
708            }
709           
710            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
711            public ResourceRow AddResourceRow(string Name) {
712                ResourceRow rowResourceRow = ((ResourceRow)(this.NewRow()));
713                object[] columnValuesArray = new object[] {
714                        null,
715                        Name};
716                rowResourceRow.ItemArray = columnValuesArray;
717                this.Rows.Add(rowResourceRow);
718                return rowResourceRow;
719            }
720           
721            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
722            public ResourceRow FindByResourceId(long ResourceId) {
723                return ((ResourceRow)(this.Rows.Find(new object[] {
724                            ResourceId})));
725            }
726           
727            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
728            public override global::System.Data.DataTable Clone() {
729                ResourceDataTable cln = ((ResourceDataTable)(base.Clone()));
730                cln.InitVars();
731                return cln;
732            }
733           
734            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
735            protected override global::System.Data.DataTable CreateInstance() {
736                return new ResourceDataTable();
737            }
738           
739            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
740            internal void InitVars() {
741                this.columnResourceId = base.Columns["ResourceId"];
742                this.columnName = base.Columns["Name"];
743            }
744           
745            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
746            private void InitClass() {
747                this.columnResourceId = new global::System.Data.DataColumn("ResourceId", typeof(long), null, global::System.Data.MappingType.Element);
748                base.Columns.Add(this.columnResourceId);
749                this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element);
750                base.Columns.Add(this.columnName);
751                this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
752                                this.columnResourceId}, true));
753                this.columnResourceId.AutoIncrement = true;
754                this.columnResourceId.AutoIncrementSeed = -1;
755                this.columnResourceId.AutoIncrementStep = -1;
756                this.columnResourceId.AllowDBNull = false;
757                this.columnResourceId.ReadOnly = true;
758                this.columnResourceId.Unique = true;
759                this.columnName.MaxLength = 18;
760            }
761           
762            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
763            public ResourceRow NewResourceRow() {
764                return ((ResourceRow)(this.NewRow()));
765            }
766           
767            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
768            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
769                return new ResourceRow(builder);
770            }
771           
772            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
773            protected override global::System.Type GetRowType() {
774                return typeof(ResourceRow);
775            }
776           
777            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
778            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
779                base.OnRowChanged(e);
780                if ((this.ResourceRowChanged != null)) {
781                    this.ResourceRowChanged(this, new ResourceRowChangeEvent(((ResourceRow)(e.Row)), e.Action));
782                }
783            }
784           
785            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
786            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
787                base.OnRowChanging(e);
788                if ((this.ResourceRowChanging != null)) {
789                    this.ResourceRowChanging(this, new ResourceRowChangeEvent(((ResourceRow)(e.Row)), e.Action));
790                }
791            }
792           
793            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
794            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
795                base.OnRowDeleted(e);
796                if ((this.ResourceRowDeleted != null)) {
797                    this.ResourceRowDeleted(this, new ResourceRowChangeEvent(((ResourceRow)(e.Row)), e.Action));
798                }
799            }
800           
801            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
802            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
803                base.OnRowDeleting(e);
804                if ((this.ResourceRowDeleting != null)) {
805                    this.ResourceRowDeleting(this, new ResourceRowChangeEvent(((ResourceRow)(e.Row)), e.Action));
806                }
807            }
808           
809            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
810            public void RemoveResourceRow(ResourceRow row) {
811                this.Rows.Remove(row);
812            }
813           
814            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
815            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
816                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
817                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
818                dsHiveServer ds = new dsHiveServer();
819                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
820                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
821                any1.MinOccurs = new decimal(0);
822                any1.MaxOccurs = decimal.MaxValue;
823                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
824                sequence.Items.Add(any1);
825                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
826                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
827                any2.MinOccurs = new decimal(1);
828                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
829                sequence.Items.Add(any2);
830                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
831                attribute1.Name = "namespace";
832                attribute1.FixedValue = ds.Namespace;
833                type.Attributes.Add(attribute1);
834                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
835                attribute2.Name = "tableTypeName";
836                attribute2.FixedValue = "ResourceDataTable";
837                type.Attributes.Add(attribute2);
838                type.Particle = sequence;
839                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
840                if (xs.Contains(dsSchema.TargetNamespace)) {
841                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
842                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
843                    try {
844                        global::System.Xml.Schema.XmlSchema schema = null;
845                        dsSchema.Write(s1);
846                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
847                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
848                            s2.SetLength(0);
849                            schema.Write(s2);
850                            if ((s1.Length == s2.Length)) {
851                                s1.Position = 0;
852                                s2.Position = 0;
853                                for (; ((s1.Position != s1.Length)
854                                            && (s1.ReadByte() == s2.ReadByte())); ) {
855                                    ;
856                                }
857                                if ((s1.Position == s1.Length)) {
858                                    return type;
859                                }
860                            }
861                        }
862                    }
863                    finally {
864                        if ((s1 != null)) {
865                            s1.Close();
866                        }
867                        if ((s2 != null)) {
868                            s2.Close();
869                        }
870                    }
871                }
872                xs.Add(dsSchema);
873                return type;
874            }
875        }
876       
877        /// <summary>
878        ///Represents strongly named DataRow class.
879        ///</summary>
880        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
881        public partial class ClientRow : global::System.Data.DataRow {
882           
883            private ClientDataTable tableClient;
884           
885            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
886            internal ClientRow(global::System.Data.DataRowBuilder rb) :
887                    base(rb) {
888                this.tableClient = ((ClientDataTable)(this.Table));
889            }
890           
891            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
892            public long ResourceId {
893                get {
894                    return ((long)(this[this.tableClient.ResourceIdColumn]));
895                }
896                set {
897                    this[this.tableClient.ResourceIdColumn] = value;
898                }
899            }
900           
901            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
902            public System.Guid GUID {
903                get {
904                    try {
905                        return ((global::System.Guid)(this[this.tableClient.GUIDColumn]));
906                    }
907                    catch (global::System.InvalidCastException e) {
908                        throw new global::System.Data.StrongTypingException("The value for column \'GUID\' in table \'Client\' is DBNull.", e);
909                    }
910                }
911                set {
912                    this[this.tableClient.GUIDColumn] = value;
913                }
914            }
915           
916            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
917            public int CPUSpeed {
918                get {
919                    try {
920                        return ((int)(this[this.tableClient.CPUSpeedColumn]));
921                    }
922                    catch (global::System.InvalidCastException e) {
923                        throw new global::System.Data.StrongTypingException("The value for column \'CPUSpeed\' in table \'Client\' is DBNull.", e);
924                    }
925                }
926                set {
927                    this[this.tableClient.CPUSpeedColumn] = value;
928                }
929            }
930           
931            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
932            public string Memory {
933                get {
934                    try {
935                        return ((string)(this[this.tableClient.MemoryColumn]));
936                    }
937                    catch (global::System.InvalidCastException e) {
938                        throw new global::System.Data.StrongTypingException("The value for column \'Memory\' in table \'Client\' is DBNull.", e);
939                    }
940                }
941                set {
942                    this[this.tableClient.MemoryColumn] = value;
943                }
944            }
945           
946            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
947            public string Login {
948                get {
949                    try {
950                        return ((string)(this[this.tableClient.LoginColumn]));
951                    }
952                    catch (global::System.InvalidCastException e) {
953                        throw new global::System.Data.StrongTypingException("The value for column \'Login\' in table \'Client\' is DBNull.", e);
954                    }
955                }
956                set {
957                    this[this.tableClient.LoginColumn] = value;
958                }
959            }
960           
961            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
962            public string Status {
963                get {
964                    try {
965                        return ((string)(this[this.tableClient.StatusColumn]));
966                    }
967                    catch (global::System.InvalidCastException e) {
968                        throw new global::System.Data.StrongTypingException("The value for column \'Status\' in table \'Client\' is DBNull.", e);
969                    }
970                }
971                set {
972                    this[this.tableClient.StatusColumn] = value;
973                }
974            }
975           
976            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
977            public long ClientConfigId {
978                get {
979                    try {
980                        return ((long)(this[this.tableClient.ClientConfigIdColumn]));
981                    }
982                    catch (global::System.InvalidCastException e) {
983                        throw new global::System.Data.StrongTypingException("The value for column \'ClientConfigId\' in table \'Client\' is DBNull.", e);
984                    }
985                }
986                set {
987                    this[this.tableClient.ClientConfigIdColumn] = value;
988                }
989            }
990           
991            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
992            public int NumberOfCores {
993                get {
994                    try {
995                        return ((int)(this[this.tableClient.NumberOfCoresColumn]));
996                    }
997                    catch (global::System.InvalidCastException e) {
998                        throw new global::System.Data.StrongTypingException("The value for column \'NumberOfCores\' in table \'Client\' is DBNull.", e);
999                    }
1000                }
1001                set {
1002                    this[this.tableClient.NumberOfCoresColumn] = value;
1003                }
1004            }
1005           
1006            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1007            public ResourceRow ResourceRow {
1008                get {
1009                    return ((ResourceRow)(this.GetParentRow(this.Table.ParentRelations["Client_is_a_Resource"])));
1010                }
1011                set {
1012                    this.SetParentRow(value, this.Table.ParentRelations["Client_is_a_Resource"]);
1013                }
1014            }
1015           
1016            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1017            public bool IsGUIDNull() {
1018                return this.IsNull(this.tableClient.GUIDColumn);
1019            }
1020           
1021            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1022            public void SetGUIDNull() {
1023                this[this.tableClient.GUIDColumn] = global::System.Convert.DBNull;
1024            }
1025           
1026            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1027            public bool IsCPUSpeedNull() {
1028                return this.IsNull(this.tableClient.CPUSpeedColumn);
1029            }
1030           
1031            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1032            public void SetCPUSpeedNull() {
1033                this[this.tableClient.CPUSpeedColumn] = global::System.Convert.DBNull;
1034            }
1035           
1036            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1037            public bool IsMemoryNull() {
1038                return this.IsNull(this.tableClient.MemoryColumn);
1039            }
1040           
1041            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1042            public void SetMemoryNull() {
1043                this[this.tableClient.MemoryColumn] = global::System.Convert.DBNull;
1044            }
1045           
1046            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1047            public bool IsLoginNull() {
1048                return this.IsNull(this.tableClient.LoginColumn);
1049            }
1050           
1051            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1052            public void SetLoginNull() {
1053                this[this.tableClient.LoginColumn] = global::System.Convert.DBNull;
1054            }
1055           
1056            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1057            public bool IsStatusNull() {
1058                return this.IsNull(this.tableClient.StatusColumn);
1059            }
1060           
1061            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1062            public void SetStatusNull() {
1063                this[this.tableClient.StatusColumn] = global::System.Convert.DBNull;
1064            }
1065           
1066            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1067            public bool IsClientConfigIdNull() {
1068                return this.IsNull(this.tableClient.ClientConfigIdColumn);
1069            }
1070           
1071            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1072            public void SetClientConfigIdNull() {
1073                this[this.tableClient.ClientConfigIdColumn] = global::System.Convert.DBNull;
1074            }
1075           
1076            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1077            public bool IsNumberOfCoresNull() {
1078                return this.IsNull(this.tableClient.NumberOfCoresColumn);
1079            }
1080           
1081            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1082            public void SetNumberOfCoresNull() {
1083                this[this.tableClient.NumberOfCoresColumn] = global::System.Convert.DBNull;
1084            }
1085        }
1086       
1087        /// <summary>
1088        ///Represents strongly named DataRow class.
1089        ///</summary>
1090        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1091        public partial class ResourceRow : global::System.Data.DataRow {
1092           
1093            private ResourceDataTable tableResource;
1094           
1095            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1096            internal ResourceRow(global::System.Data.DataRowBuilder rb) :
1097                    base(rb) {
1098                this.tableResource = ((ResourceDataTable)(this.Table));
1099            }
1100           
1101            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1102            public long ResourceId {
1103                get {
1104                    return ((long)(this[this.tableResource.ResourceIdColumn]));
1105                }
1106                set {
1107                    this[this.tableResource.ResourceIdColumn] = value;
1108                }
1109            }
1110           
1111            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1112            public string Name {
1113                get {
1114                    try {
1115                        return ((string)(this[this.tableResource.NameColumn]));
1116                    }
1117                    catch (global::System.InvalidCastException e) {
1118                        throw new global::System.Data.StrongTypingException("The value for column \'Name\' in table \'Resource\' is DBNull.", e);
1119                    }
1120                }
1121                set {
1122                    this[this.tableResource.NameColumn] = value;
1123                }
1124            }
1125           
1126            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1127            public bool IsNameNull() {
1128                return this.IsNull(this.tableResource.NameColumn);
1129            }
1130           
1131            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1132            public void SetNameNull() {
1133                this[this.tableResource.NameColumn] = global::System.Convert.DBNull;
1134            }
1135           
1136            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1137            public ClientRow[] GetClientRows() {
1138                if ((this.Table.ChildRelations["Client_is_a_Resource"] == null)) {
1139                    return new ClientRow[0];
1140                }
1141                else {
1142                    return ((ClientRow[])(base.GetChildRows(this.Table.ChildRelations["Client_is_a_Resource"])));
1143                }
1144            }
1145        }
1146       
1147        /// <summary>
1148        ///Row event argument class
1149        ///</summary>
1150        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1151        public class ClientRowChangeEvent : global::System.EventArgs {
1152           
1153            private ClientRow eventRow;
1154           
1155            private global::System.Data.DataRowAction eventAction;
1156           
1157            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1158            public ClientRowChangeEvent(ClientRow row, global::System.Data.DataRowAction action) {
1159                this.eventRow = row;
1160                this.eventAction = action;
1161            }
1162           
1163            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1164            public ClientRow Row {
1165                get {
1166                    return this.eventRow;
1167                }
1168            }
1169           
1170            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1171            public global::System.Data.DataRowAction Action {
1172                get {
1173                    return this.eventAction;
1174                }
1175            }
1176        }
1177       
1178        /// <summary>
1179        ///Row event argument class
1180        ///</summary>
1181        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1182        public class ResourceRowChangeEvent : global::System.EventArgs {
1183           
1184            private ResourceRow eventRow;
1185           
1186            private global::System.Data.DataRowAction eventAction;
1187           
1188            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1189            public ResourceRowChangeEvent(ResourceRow row, global::System.Data.DataRowAction action) {
1190                this.eventRow = row;
1191                this.eventAction = action;
1192            }
1193           
1194            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1195            public ResourceRow Row {
1196                get {
1197                    return this.eventRow;
1198                }
1199            }
1200           
1201            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1202            public global::System.Data.DataRowAction Action {
1203                get {
1204                    return this.eventAction;
1205                }
1206            }
1207        }
1208    }
1209}
1210namespace HeuristicLab.Hive.Server.ADODataAccess.dsHiveServerTableAdapters {
1211   
1212   
1213    /// <summary>
1214    ///Represents the connection and commands used to retrieve and save data.
1215    ///</summary>
1216    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1217    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
1218    [global::System.ComponentModel.ToolboxItem(true)]
1219    [global::System.ComponentModel.DataObjectAttribute(true)]
1220    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
1221        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1222    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1223    public partial class ClientTableAdapter : global::System.ComponentModel.Component {
1224       
1225        private global::System.Data.SqlClient.SqlDataAdapter _adapter;
1226       
1227        private global::System.Data.SqlClient.SqlConnection _connection;
1228       
1229        private global::System.Data.SqlClient.SqlTransaction _transaction;
1230       
1231        private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
1232       
1233        private bool _clearBeforeFill;
1234       
1235        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1236        public ClientTableAdapter() {
1237            this.ClearBeforeFill = true;
1238        }
1239       
1240        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1241        protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
1242            get {
1243                if ((this._adapter == null)) {
1244                    this.InitAdapter();
1245                }
1246                return this._adapter;
1247            }
1248        }
1249       
1250        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1251        internal global::System.Data.SqlClient.SqlConnection Connection {
1252            get {
1253                if ((this._connection == null)) {
1254                    this.InitConnection();
1255                }
1256                return this._connection;
1257            }
1258            set {
1259                this._connection = value;
1260                if ((this.Adapter.InsertCommand != null)) {
1261                    this.Adapter.InsertCommand.Connection = value;
1262                }
1263                if ((this.Adapter.DeleteCommand != null)) {
1264                    this.Adapter.DeleteCommand.Connection = value;
1265                }
1266                if ((this.Adapter.UpdateCommand != null)) {
1267                    this.Adapter.UpdateCommand.Connection = value;
1268                }
1269                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
1270                    if ((this.CommandCollection[i] != null)) {
1271                        ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
1272                    }
1273                }
1274            }
1275        }
1276       
1277        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1278        internal global::System.Data.SqlClient.SqlTransaction Transaction {
1279            get {
1280                return this._transaction;
1281            }
1282            set {
1283                this._transaction = value;
1284                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
1285                    this.CommandCollection[i].Transaction = this._transaction;
1286                }
1287                if (((this.Adapter != null)
1288                            && (this.Adapter.DeleteCommand != null))) {
1289                    this.Adapter.DeleteCommand.Transaction = this._transaction;
1290                }
1291                if (((this.Adapter != null)
1292                            && (this.Adapter.InsertCommand != null))) {
1293                    this.Adapter.InsertCommand.Transaction = this._transaction;
1294                }
1295                if (((this.Adapter != null)
1296                            && (this.Adapter.UpdateCommand != null))) {
1297                    this.Adapter.UpdateCommand.Transaction = this._transaction;
1298                }
1299            }
1300        }
1301       
1302        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1303        protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
1304            get {
1305                if ((this._commandCollection == null)) {
1306                    this.InitCommandCollection();
1307                }
1308                return this._commandCollection;
1309            }
1310        }
1311       
1312        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1313        public bool ClearBeforeFill {
1314            get {
1315                return this._clearBeforeFill;
1316            }
1317            set {
1318                this._clearBeforeFill = value;
1319            }
1320        }
1321       
1322        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1323        private void InitAdapter() {
1324            this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
1325            global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
1326            tableMapping.SourceTable = "Table";
1327            tableMapping.DataSetTable = "Client";
1328            tableMapping.ColumnMappings.Add("ResourceId", "ResourceId");
1329            tableMapping.ColumnMappings.Add("GUID", "GUID");
1330            tableMapping.ColumnMappings.Add("CPUSpeed", "CPUSpeed");
1331            tableMapping.ColumnMappings.Add("Memory", "Memory");
1332            tableMapping.ColumnMappings.Add("Login", "Login");
1333            tableMapping.ColumnMappings.Add("Status", "Status");
1334            tableMapping.ColumnMappings.Add("ClientConfigId", "ClientConfigId");
1335            tableMapping.ColumnMappings.Add("NumberOfCores", "NumberOfCores");
1336            this._adapter.TableMappings.Add(tableMapping);
1337            this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
1338            this._adapter.DeleteCommand.Connection = this.Connection;
1339            this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Client] WHERE (([ResourceId] = @Original_ResourceId) AND ((@IsNull_GUID = 1 AND [GUID] IS NULL) OR ([GUID] = @Original_GUID)) AND ((@IsNull_CPUSpeed = 1 AND [CPUSpeed] IS NULL) OR ([CPUSpeed] = @Original_CPUSpeed)) AND ((@IsNull_Memory = 1 AND [Memory] IS NULL) OR ([Memory] = @Original_Memory)) AND ((@IsNull_Login = 1 AND [Login] IS NULL) OR ([Login] = @Original_Login)) AND ((@IsNull_Status = 1 AND [Status] IS NULL) OR ([Status] = @Original_Status)) AND ((@IsNull_ClientConfigId = 1 AND [ClientConfigId] IS NULL) OR ([ClientConfigId] = @Original_ClientConfigId)) AND ((@IsNull_NumberOfCores = 1 AND [NumberOfCores] IS NULL) OR ([NumberOfCores] = @Original_NumberOfCores)))";
1340            this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
1341            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ResourceId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1342            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_GUID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GUID", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1343            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_GUID", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GUID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1344            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CPUSpeed", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CPUSpeed", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1345            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CPUSpeed", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CPUSpeed", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1346            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Memory", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Memory", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1347            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Memory", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Memory", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1348            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Login", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Login", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1349            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Login", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Login", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1350            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Status", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1351            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Status", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1352            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ClientConfigId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientConfigId", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1353            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientConfigId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientConfigId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1354            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_NumberOfCores", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumberOfCores", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1355            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NumberOfCores", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumberOfCores", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1356            this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
1357            this._adapter.InsertCommand.Connection = this.Connection;
1358            this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Client] ([ResourceId], [GUID], [CPUSpeed], [Memory], [Login], [Status], [ClientConfigId], [NumberOfCores]) VALUES (@ResourceId, @GUID, @CPUSpeed, @Memory, @Login, @Status, @ClientConfigId, @NumberOfCores);
1359SELECT ResourceId, GUID, CPUSpeed, Memory, Login, Status, ClientConfigId, NumberOfCores FROM Client WHERE (ResourceId = @ResourceId)";
1360            this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
1361            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ResourceId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1362            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GUID", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GUID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1363            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CPUSpeed", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CPUSpeed", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1364            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Memory", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Memory", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1365            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Login", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Login", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1366            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1367            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientConfigId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientConfigId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1368            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumberOfCores", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumberOfCores", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1369            this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
1370            this._adapter.UpdateCommand.Connection = this.Connection;
1371            this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Client] SET [ResourceId] = @ResourceId, [GUID] = @GUID, [CPUSpeed] = @CPUSpeed, [Memory] = @Memory, [Login] = @Login, [Status] = @Status, [ClientConfigId] = @ClientConfigId, [NumberOfCores] = @NumberOfCores WHERE (([ResourceId] = @Original_ResourceId) AND ((@IsNull_GUID = 1 AND [GUID] IS NULL) OR ([GUID] = @Original_GUID)) AND ((@IsNull_CPUSpeed = 1 AND [CPUSpeed] IS NULL) OR ([CPUSpeed] = @Original_CPUSpeed)) AND ((@IsNull_Memory = 1 AND [Memory] IS NULL) OR ([Memory] = @Original_Memory)) AND ((@IsNull_Login = 1 AND [Login] IS NULL) OR ([Login] = @Original_Login)) AND ((@IsNull_Status = 1 AND [Status] IS NULL) OR ([Status] = @Original_Status)) AND ((@IsNull_ClientConfigId = 1 AND [ClientConfigId] IS NULL) OR ([ClientConfigId] = @Original_ClientConfigId)) AND ((@IsNull_NumberOfCores = 1 AND [NumberOfCores] IS NULL) OR ([NumberOfCores] = @Original_NumberOfCores)));
1372SELECT ResourceId, GUID, CPUSpeed, Memory, Login, Status, ClientConfigId, NumberOfCores FROM Client WHERE (ResourceId = @ResourceId)";
1373            this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
1374            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ResourceId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1375            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GUID", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GUID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1376            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CPUSpeed", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CPUSpeed", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1377            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Memory", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Memory", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1378            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Login", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Login", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1379            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1380            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientConfigId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientConfigId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1381            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumberOfCores", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumberOfCores", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1382            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ResourceId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1383            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_GUID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GUID", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1384            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_GUID", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "GUID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1385            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CPUSpeed", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CPUSpeed", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1386            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CPUSpeed", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CPUSpeed", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1387            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Memory", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Memory", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1388            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Memory", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Memory", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1389            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Login", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Login", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1390            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Login", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Login", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1391            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Status", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1392            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Status", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1393            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ClientConfigId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientConfigId", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1394            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientConfigId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientConfigId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1395            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_NumberOfCores", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumberOfCores", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1396            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NumberOfCores", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumberOfCores", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1397        }
1398       
1399        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1400        private void InitConnection() {
1401            this._connection = new global::System.Data.SqlClient.SqlConnection();
1402            this._connection.ConnectionString = global::HeuristicLab.Hive.Server.ADODataAccess.Properties.Settings.Default.HiveServerConnectionString;
1403        }
1404       
1405        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1406        private void InitCommandCollection() {
1407            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2];
1408            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
1409            this._commandCollection[0].Connection = this.Connection;
1410            this._commandCollection[0].CommandText = "SELECT ResourceId, GUID, CPUSpeed, Memory, Login, Status, ClientConfigId, NumberO" +
1411                "fCores FROM dbo.Client";
1412            this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
1413            this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
1414            this._commandCollection[1].Connection = this.Connection;
1415            this._commandCollection[1].CommandText = "SELECT* FROM dbo.Client WHERE GUID = @ID";
1416            this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
1417            this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "GUID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1418        }
1419       
1420        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1421        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1422        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
1423        public virtual int Fill(dsHiveServer.ClientDataTable dataTable) {
1424            this.Adapter.SelectCommand = this.CommandCollection[0];
1425            if ((this.ClearBeforeFill == true)) {
1426                dataTable.Clear();
1427            }
1428            int returnValue = this.Adapter.Fill(dataTable);
1429            return returnValue;
1430        }
1431       
1432        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1433        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1434        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
1435        public virtual dsHiveServer.ClientDataTable GetData() {
1436            this.Adapter.SelectCommand = this.CommandCollection[0];
1437            dsHiveServer.ClientDataTable dataTable = new dsHiveServer.ClientDataTable();
1438            this.Adapter.Fill(dataTable);
1439            return dataTable;
1440        }
1441       
1442        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1443        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1444        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)]
1445        public virtual int FillById(dsHiveServer.ClientDataTable dataTable, global::System.Nullable<global::System.Guid> ID) {
1446            this.Adapter.SelectCommand = this.CommandCollection[1];
1447            if ((ID.HasValue == true)) {
1448                this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ID.Value));
1449            }
1450            else {
1451                this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;
1452            }
1453            if ((this.ClearBeforeFill == true)) {
1454                dataTable.Clear();
1455            }
1456            int returnValue = this.Adapter.Fill(dataTable);
1457            return returnValue;
1458        }
1459       
1460        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1461        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1462        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
1463        public virtual dsHiveServer.ClientDataTable GetDataById(global::System.Nullable<global::System.Guid> ID) {
1464            this.Adapter.SelectCommand = this.CommandCollection[1];
1465            if ((ID.HasValue == true)) {
1466                this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ID.Value));
1467            }
1468            else {
1469                this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;
1470            }
1471            dsHiveServer.ClientDataTable dataTable = new dsHiveServer.ClientDataTable();
1472            this.Adapter.Fill(dataTable);
1473            return dataTable;
1474        }
1475       
1476        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1477        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1478        public virtual int Update(dsHiveServer.ClientDataTable dataTable) {
1479            return this.Adapter.Update(dataTable);
1480        }
1481       
1482        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1483        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1484        public virtual int Update(dsHiveServer dataSet) {
1485            return this.Adapter.Update(dataSet, "Client");
1486        }
1487       
1488        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1489        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1490        public virtual int Update(global::System.Data.DataRow dataRow) {
1491            return this.Adapter.Update(new global::System.Data.DataRow[] {
1492                        dataRow});
1493        }
1494       
1495        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1496        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1497        public virtual int Update(global::System.Data.DataRow[] dataRows) {
1498            return this.Adapter.Update(dataRows);
1499        }
1500       
1501        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1502        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1503        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
1504        public virtual int Delete(long Original_ResourceId, global::System.Nullable<global::System.Guid> Original_GUID, global::System.Nullable<int> Original_CPUSpeed, string Original_Memory, string Original_Login, string Original_Status, global::System.Nullable<long> Original_ClientConfigId, global::System.Nullable<int> Original_NumberOfCores) {
1505            this.Adapter.DeleteCommand.Parameters[0].Value = ((long)(Original_ResourceId));
1506            if ((Original_GUID.HasValue == true)) {
1507                this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
1508                this.Adapter.DeleteCommand.Parameters[2].Value = ((System.Guid)(Original_GUID.Value));
1509            }
1510            else {
1511                this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
1512                this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
1513            }
1514            if ((Original_CPUSpeed.HasValue == true)) {
1515                this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
1516                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_CPUSpeed.Value));
1517            }
1518            else {
1519                this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
1520                this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
1521            }
1522            if ((Original_Memory == null)) {
1523                this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
1524                this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
1525            }
1526            else {
1527                this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
1528                this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Memory));
1529            }
1530            if ((Original_Login == null)) {
1531                this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
1532                this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
1533            }
1534            else {
1535                this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
1536                this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_Login));
1537            }
1538            if ((Original_Status == null)) {
1539                this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1));
1540                this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value;
1541            }
1542            else {
1543                this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0));
1544                this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_Status));
1545            }
1546            if ((Original_ClientConfigId.HasValue == true)) {
1547                this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0));
1548                this.Adapter.DeleteCommand.Parameters[12].Value = ((long)(Original_ClientConfigId.Value));
1549            }
1550            else {
1551                this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1));
1552                this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value;
1553            }
1554            if ((Original_NumberOfCores.HasValue == true)) {
1555                this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0));
1556                this.Adapter.DeleteCommand.Parameters[14].Value = ((int)(Original_NumberOfCores.Value));
1557            }
1558            else {
1559                this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1));
1560                this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value;
1561            }
1562            global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
1563            if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
1564                        != global::System.Data.ConnectionState.Open)) {
1565                this.Adapter.DeleteCommand.Connection.Open();
1566            }
1567            try {
1568                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
1569                return returnValue;
1570            }
1571            finally {
1572                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1573                    this.Adapter.DeleteCommand.Connection.Close();
1574                }
1575            }
1576        }
1577       
1578        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1579        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1580        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1581        public virtual int Insert(long ResourceId, global::System.Nullable<global::System.Guid> GUID, global::System.Nullable<int> CPUSpeed, string Memory, string Login, string Status, global::System.Nullable<long> ClientConfigId, global::System.Nullable<int> NumberOfCores) {
1582            this.Adapter.InsertCommand.Parameters[0].Value = ((long)(ResourceId));
1583            if ((GUID.HasValue == true)) {
1584                this.Adapter.InsertCommand.Parameters[1].Value = ((System.Guid)(GUID.Value));
1585            }
1586            else {
1587                this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
1588            }
1589            if ((CPUSpeed.HasValue == true)) {
1590                this.Adapter.InsertCommand.Parameters[2].Value = ((int)(CPUSpeed.Value));
1591            }
1592            else {
1593                this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1594            }
1595            if ((Memory == null)) {
1596                this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1597            }
1598            else {
1599                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Memory));
1600            }
1601            if ((Login == null)) {
1602                this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
1603            }
1604            else {
1605                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Login));
1606            }
1607            if ((Status == null)) {
1608                this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
1609            }
1610            else {
1611                this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Status));
1612            }
1613            if ((ClientConfigId.HasValue == true)) {
1614                this.Adapter.InsertCommand.Parameters[6].Value = ((long)(ClientConfigId.Value));
1615            }
1616            else {
1617                this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value;
1618            }
1619            if ((NumberOfCores.HasValue == true)) {
1620                this.Adapter.InsertCommand.Parameters[7].Value = ((int)(NumberOfCores.Value));
1621            }
1622            else {
1623                this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value;
1624            }
1625            global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1626            if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1627                        != global::System.Data.ConnectionState.Open)) {
1628                this.Adapter.InsertCommand.Connection.Open();
1629            }
1630            try {
1631                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1632                return returnValue;
1633            }
1634            finally {
1635                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1636                    this.Adapter.InsertCommand.Connection.Close();
1637                }
1638            }
1639        }
1640       
1641        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1642        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1643        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1644        public virtual int Update(
1645                    long ResourceId,
1646                    global::System.Nullable<global::System.Guid> GUID,
1647                    global::System.Nullable<int> CPUSpeed,
1648                    string Memory,
1649                    string Login,
1650                    string Status,
1651                    global::System.Nullable<long> ClientConfigId,
1652                    global::System.Nullable<int> NumberOfCores,
1653                    long Original_ResourceId,
1654                    global::System.Nullable<global::System.Guid> Original_GUID,
1655                    global::System.Nullable<int> Original_CPUSpeed,
1656                    string Original_Memory,
1657                    string Original_Login,
1658                    string Original_Status,
1659                    global::System.Nullable<long> Original_ClientConfigId,
1660                    global::System.Nullable<int> Original_NumberOfCores) {
1661            this.Adapter.UpdateCommand.Parameters[0].Value = ((long)(ResourceId));
1662            if ((GUID.HasValue == true)) {
1663                this.Adapter.UpdateCommand.Parameters[1].Value = ((System.Guid)(GUID.Value));
1664            }
1665            else {
1666                this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
1667            }
1668            if ((CPUSpeed.HasValue == true)) {
1669                this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(CPUSpeed.Value));
1670            }
1671            else {
1672                this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1673            }
1674            if ((Memory == null)) {
1675                this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
1676            }
1677            else {
1678                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Memory));
1679            }
1680            if ((Login == null)) {
1681                this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
1682            }
1683            else {
1684                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Login));
1685            }
1686            if ((Status == null)) {
1687                this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
1688            }
1689            else {
1690                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Status));
1691            }
1692            if ((ClientConfigId.HasValue == true)) {
1693                this.Adapter.UpdateCommand.Parameters[6].Value = ((long)(ClientConfigId.Value));
1694            }
1695            else {
1696                this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
1697            }
1698            if ((NumberOfCores.HasValue == true)) {
1699                this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(NumberOfCores.Value));
1700            }
1701            else {
1702                this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value;
1703            }
1704            this.Adapter.UpdateCommand.Parameters[8].Value = ((long)(Original_ResourceId));
1705            if ((Original_GUID.HasValue == true)) {
1706                this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0));
1707                this.Adapter.UpdateCommand.Parameters[10].Value = ((System.Guid)(Original_GUID.Value));
1708            }
1709            else {
1710                this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1));
1711                this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value;
1712            }
1713            if ((Original_CPUSpeed.HasValue == true)) {
1714                this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
1715                this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_CPUSpeed.Value));
1716            }
1717            else {
1718                this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
1719                this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
1720            }
1721            if ((Original_Memory == null)) {
1722                this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
1723                this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
1724            }
1725            else {
1726                this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
1727                this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Memory));
1728            }
1729            if ((Original_Login == null)) {
1730                this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
1731                this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value;
1732            }
1733            else {
1734                this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
1735                this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_Login));
1736            }
1737            if ((Original_Status == null)) {
1738                this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1));
1739                this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value;
1740            }
1741            else {
1742                this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0));
1743                this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_Status));
1744            }
1745            if ((Original_ClientConfigId.HasValue == true)) {
1746                this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0));
1747                this.Adapter.UpdateCommand.Parameters[20].Value = ((long)(Original_ClientConfigId.Value));
1748            }
1749            else {
1750                this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1));
1751                this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value;
1752            }
1753            if ((Original_NumberOfCores.HasValue == true)) {
1754                this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0));
1755                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(Original_NumberOfCores.Value));
1756            }
1757            else {
1758                this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1));
1759                this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value;
1760            }
1761            global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
1762            if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
1763                        != global::System.Data.ConnectionState.Open)) {
1764                this.Adapter.UpdateCommand.Connection.Open();
1765            }
1766            try {
1767                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
1768                return returnValue;
1769            }
1770            finally {
1771                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1772                    this.Adapter.UpdateCommand.Connection.Close();
1773                }
1774            }
1775        }
1776       
1777        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1778        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1779        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1780        public virtual int Update(global::System.Nullable<global::System.Guid> GUID, global::System.Nullable<int> CPUSpeed, string Memory, string Login, string Status, global::System.Nullable<long> ClientConfigId, global::System.Nullable<int> NumberOfCores, long Original_ResourceId, global::System.Nullable<global::System.Guid> Original_GUID, global::System.Nullable<int> Original_CPUSpeed, string Original_Memory, string Original_Login, string Original_Status, global::System.Nullable<long> Original_ClientConfigId, global::System.Nullable<int> Original_NumberOfCores) {
1781            return this.Update(Original_ResourceId, GUID, CPUSpeed, Memory, Login, Status, ClientConfigId, NumberOfCores, Original_ResourceId, Original_GUID, Original_CPUSpeed, Original_Memory, Original_Login, Original_Status, Original_ClientConfigId, Original_NumberOfCores);
1782        }
1783    }
1784   
1785    /// <summary>
1786    ///Represents the connection and commands used to retrieve and save data.
1787    ///</summary>
1788    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
1789    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
1790    [global::System.ComponentModel.ToolboxItem(true)]
1791    [global::System.ComponentModel.DataObjectAttribute(true)]
1792    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
1793        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1794    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1795    public partial class ResourceTableAdapter : global::System.ComponentModel.Component {
1796       
1797        private global::System.Data.SqlClient.SqlDataAdapter _adapter;
1798       
1799        private global::System.Data.SqlClient.SqlConnection _connection;
1800       
1801        private global::System.Data.SqlClient.SqlTransaction _transaction;
1802       
1803        private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
1804       
1805        private bool _clearBeforeFill;
1806       
1807        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1808        public ResourceTableAdapter() {
1809            this.ClearBeforeFill = true;
1810        }
1811       
1812        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1813        protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
1814            get {
1815                if ((this._adapter == null)) {
1816                    this.InitAdapter();
1817                }
1818                return this._adapter;
1819            }
1820        }
1821       
1822        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1823        internal global::System.Data.SqlClient.SqlConnection Connection {
1824            get {
1825                if ((this._connection == null)) {
1826                    this.InitConnection();
1827                }
1828                return this._connection;
1829            }
1830            set {
1831                this._connection = value;
1832                if ((this.Adapter.InsertCommand != null)) {
1833                    this.Adapter.InsertCommand.Connection = value;
1834                }
1835                if ((this.Adapter.DeleteCommand != null)) {
1836                    this.Adapter.DeleteCommand.Connection = value;
1837                }
1838                if ((this.Adapter.UpdateCommand != null)) {
1839                    this.Adapter.UpdateCommand.Connection = value;
1840                }
1841                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
1842                    if ((this.CommandCollection[i] != null)) {
1843                        ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
1844                    }
1845                }
1846            }
1847        }
1848       
1849        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1850        internal global::System.Data.SqlClient.SqlTransaction Transaction {
1851            get {
1852                return this._transaction;
1853            }
1854            set {
1855                this._transaction = value;
1856                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
1857                    this.CommandCollection[i].Transaction = this._transaction;
1858                }
1859                if (((this.Adapter != null)
1860                            && (this.Adapter.DeleteCommand != null))) {
1861                    this.Adapter.DeleteCommand.Transaction = this._transaction;
1862                }
1863                if (((this.Adapter != null)
1864                            && (this.Adapter.InsertCommand != null))) {
1865                    this.Adapter.InsertCommand.Transaction = this._transaction;
1866                }
1867                if (((this.Adapter != null)
1868                            && (this.Adapter.UpdateCommand != null))) {
1869                    this.Adapter.UpdateCommand.Transaction = this._transaction;
1870                }
1871            }
1872        }
1873       
1874        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1875        protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
1876            get {
1877                if ((this._commandCollection == null)) {
1878                    this.InitCommandCollection();
1879                }
1880                return this._commandCollection;
1881            }
1882        }
1883       
1884        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1885        public bool ClearBeforeFill {
1886            get {
1887                return this._clearBeforeFill;
1888            }
1889            set {
1890                this._clearBeforeFill = value;
1891            }
1892        }
1893       
1894        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1895        private void InitAdapter() {
1896            this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
1897            global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
1898            tableMapping.SourceTable = "Table";
1899            tableMapping.DataSetTable = "Resource";
1900            tableMapping.ColumnMappings.Add("ResourceId", "ResourceId");
1901            tableMapping.ColumnMappings.Add("Name", "Name");
1902            this._adapter.TableMappings.Add(tableMapping);
1903            this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
1904            this._adapter.DeleteCommand.Connection = this.Connection;
1905            this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Resource] WHERE (([ResourceId] = @Original_ResourceId) AND ((@" +
1906                "IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)))";
1907            this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
1908            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ResourceId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1909            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1910            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1911            this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
1912            this._adapter.InsertCommand.Connection = this.Connection;
1913            this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Resource] ([Name]) VALUES (@Name);\r\nSELECT ResourceId, Name FR" +
1914                "OM Resource WHERE (ResourceId = SCOPE_IDENTITY())";
1915            this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
1916            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1917            this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
1918            this._adapter.UpdateCommand.Connection = this.Connection;
1919            this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Resource] SET [Name] = @Name WHERE (([ResourceId] = @Original_Resou" +
1920                "rceId) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)))" +
1921                ";\r\nSELECT ResourceId, Name FROM Resource WHERE (ResourceId = @ResourceId)";
1922            this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
1923            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1924            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ResourceId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1925            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1926            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1927            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ResourceId", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1928        }
1929       
1930        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1931        private void InitConnection() {
1932            this._connection = new global::System.Data.SqlClient.SqlConnection();
1933            this._connection.ConnectionString = global::HeuristicLab.Hive.Server.ADODataAccess.Properties.Settings.Default.HiveServerConnectionString;
1934        }
1935       
1936        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1937        private void InitCommandCollection() {
1938            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2];
1939            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
1940            this._commandCollection[0].Connection = this.Connection;
1941            this._commandCollection[0].CommandText = "SELECT ResourceId, Name FROM dbo.Resource";
1942            this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
1943            this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
1944            this._commandCollection[1].Connection = this.Connection;
1945            this._commandCollection[1].CommandText = "SELECT * FROM dbo.Resource WHERE ResourceId = @ID";
1946            this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
1947            this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1948        }
1949       
1950        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1951        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1952        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
1953        public virtual int Fill(dsHiveServer.ResourceDataTable dataTable) {
1954            this.Adapter.SelectCommand = this.CommandCollection[0];
1955            if ((this.ClearBeforeFill == true)) {
1956                dataTable.Clear();
1957            }
1958            int returnValue = this.Adapter.Fill(dataTable);
1959            return returnValue;
1960        }
1961       
1962        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1963        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1964        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
1965        public virtual dsHiveServer.ResourceDataTable GetData() {
1966            this.Adapter.SelectCommand = this.CommandCollection[0];
1967            dsHiveServer.ResourceDataTable dataTable = new dsHiveServer.ResourceDataTable();
1968            this.Adapter.Fill(dataTable);
1969            return dataTable;
1970        }
1971       
1972        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1973        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1974        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)]
1975        public virtual int FillById(dsHiveServer.ResourceDataTable dataTable, long ID) {
1976            this.Adapter.SelectCommand = this.CommandCollection[1];
1977            this.Adapter.SelectCommand.Parameters[0].Value = ((long)(ID));
1978            if ((this.ClearBeforeFill == true)) {
1979                dataTable.Clear();
1980            }
1981            int returnValue = this.Adapter.Fill(dataTable);
1982            return returnValue;
1983        }
1984       
1985        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1986        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1987        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
1988        public virtual dsHiveServer.ResourceDataTable GetDataById(long ID) {
1989            this.Adapter.SelectCommand = this.CommandCollection[1];
1990            this.Adapter.SelectCommand.Parameters[0].Value = ((long)(ID));
1991            dsHiveServer.ResourceDataTable dataTable = new dsHiveServer.ResourceDataTable();
1992            this.Adapter.Fill(dataTable);
1993            return dataTable;
1994        }
1995       
1996        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1997        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1998        public virtual int Update(dsHiveServer.ResourceDataTable dataTable) {
1999            return this.Adapter.Update(dataTable);
2000        }
2001       
2002        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2003        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
2004        public virtual int Update(dsHiveServer dataSet) {
2005            return this.Adapter.Update(dataSet, "Resource");
2006        }
2007       
2008        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2009        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
2010        public virtual int Update(global::System.Data.DataRow dataRow) {
2011            return this.Adapter.Update(new global::System.Data.DataRow[] {
2012                        dataRow});
2013        }
2014       
2015        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2016        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
2017        public virtual int Update(global::System.Data.DataRow[] dataRows) {
2018            return this.Adapter.Update(dataRows);
2019        }
2020       
2021        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2022        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
2023        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
2024        public virtual int Delete(long Original_ResourceId, string Original_Name) {
2025            this.Adapter.DeleteCommand.Parameters[0].Value = ((long)(Original_ResourceId));
2026            if ((Original_Name == null)) {
2027                this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
2028                this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
2029            }
2030            else {
2031                this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
2032                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Name));
2033            }
2034            global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
2035            if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
2036                        != global::System.Data.ConnectionState.Open)) {
2037                this.Adapter.DeleteCommand.Connection.Open();
2038            }
2039            try {
2040                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
2041                return returnValue;
2042            }
2043            finally {
2044                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
2045                    this.Adapter.DeleteCommand.Connection.Close();
2046                }
2047            }
2048        }
2049       
2050        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2051        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
2052        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
2053        public virtual int Insert(string Name) {
2054            if ((Name == null)) {
2055                this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value;
2056            }
2057            else {
2058                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
2059            }
2060            global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
2061            if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
2062                        != global::System.Data.ConnectionState.Open)) {
2063                this.Adapter.InsertCommand.Connection.Open();
2064            }
2065            try {
2066                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
2067                return returnValue;
2068            }
2069            finally {
2070                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
2071                    this.Adapter.InsertCommand.Connection.Close();
2072                }
2073            }
2074        }
2075       
2076        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2077        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
2078        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
2079        public virtual int Update(string Name, long Original_ResourceId, string Original_Name, long ResourceId) {
2080            if ((Name == null)) {
2081                this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value;
2082            }
2083            else {
2084                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
2085            }
2086            this.Adapter.UpdateCommand.Parameters[1].Value = ((long)(Original_ResourceId));
2087            if ((Original_Name == null)) {
2088                this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(1));
2089                this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
2090            }
2091            else {
2092                this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(0));
2093                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Name));
2094            }
2095            this.Adapter.UpdateCommand.Parameters[4].Value = ((long)(ResourceId));
2096            global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
2097            if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
2098                        != global::System.Data.ConnectionState.Open)) {
2099                this.Adapter.UpdateCommand.Connection.Open();
2100            }
2101            try {
2102                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
2103                return returnValue;
2104            }
2105            finally {
2106                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
2107                    this.Adapter.UpdateCommand.Connection.Close();
2108                }
2109            }
2110        }
2111       
2112        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2113        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
2114        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
2115        public virtual int Update(string Name, long Original_ResourceId, string Original_Name) {
2116            return this.Update(Name, Original_ResourceId, Original_Name, Original_ResourceId);
2117        }
2118    }
2119   
2120    /// <summary>
2121    ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
2122    ///</summary>
2123    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
2124    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
2125    [global::System.ComponentModel.ToolboxItem(true)]
2126    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
2127        "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
2128    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
2129    public partial class TableAdapterManager : global::System.ComponentModel.Component {
2130       
2131        private UpdateOrderOption _updateOrder;
2132       
2133        private ClientTableAdapter _clientTableAdapter;
2134       
2135        private ResourceTableAdapter _resourceTableAdapter;
2136       
2137        private bool _backupDataSetBeforeUpdate;
2138       
2139        private global::System.Data.IDbConnection _connection;
2140       
2141        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2142        public UpdateOrderOption UpdateOrder {
2143            get {
2144                return this._updateOrder;
2145            }
2146            set {
2147                this._updateOrder = value;
2148            }
2149        }
2150       
2151        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2152        [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
2153            "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
2154            "", "System.Drawing.Design.UITypeEditor")]
2155        public ClientTableAdapter ClientTableAdapter {
2156            get {
2157                return this._clientTableAdapter;
2158            }
2159            set {
2160                this._clientTableAdapter = value;
2161            }
2162        }
2163       
2164        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2165        [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
2166            "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
2167            "", "System.Drawing.Design.UITypeEditor")]
2168        public ResourceTableAdapter ResourceTableAdapter {
2169            get {
2170                return this._resourceTableAdapter;
2171            }
2172            set {
2173                this._resourceTableAdapter = value;
2174            }
2175        }
2176       
2177        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2178        public bool BackupDataSetBeforeUpdate {
2179            get {
2180                return this._backupDataSetBeforeUpdate;
2181            }
2182            set {
2183                this._backupDataSetBeforeUpdate = value;
2184            }
2185        }
2186       
2187        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2188        [global::System.ComponentModel.Browsable(false)]
2189        public global::System.Data.IDbConnection Connection {
2190            get {
2191                if ((this._connection != null)) {
2192                    return this._connection;
2193                }
2194                if (((this._clientTableAdapter != null)
2195                            && (this._clientTableAdapter.Connection != null))) {
2196                    return this._clientTableAdapter.Connection;
2197                }
2198                if (((this._resourceTableAdapter != null)
2199                            && (this._resourceTableAdapter.Connection != null))) {
2200                    return this._resourceTableAdapter.Connection;
2201                }
2202                return null;
2203            }
2204            set {
2205                this._connection = value;
2206            }
2207        }
2208       
2209        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2210        [global::System.ComponentModel.Browsable(false)]
2211        public int TableAdapterInstanceCount {
2212            get {
2213                int count = 0;
2214                if ((this._clientTableAdapter != null)) {
2215                    count = (count + 1);
2216                }
2217                if ((this._resourceTableAdapter != null)) {
2218                    count = (count + 1);
2219                }
2220                return count;
2221            }
2222        }
2223       
2224        /// <summary>
2225        ///Update rows in top-down order.
2226        ///</summary>
2227        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2228        private int UpdateUpdatedRows(dsHiveServer dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
2229            int result = 0;
2230            if ((this._resourceTableAdapter != null)) {
2231                global::System.Data.DataRow[] updatedRows = dataSet.Resource.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
2232                updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
2233                if (((updatedRows != null)
2234                            && (0 < updatedRows.Length))) {
2235                    result = (result + this._resourceTableAdapter.Update(updatedRows));
2236                    allChangedRows.AddRange(updatedRows);
2237                }
2238            }
2239            if ((this._clientTableAdapter != null)) {
2240                global::System.Data.DataRow[] updatedRows = dataSet.Client.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
2241                updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
2242                if (((updatedRows != null)
2243                            && (0 < updatedRows.Length))) {
2244                    result = (result + this._clientTableAdapter.Update(updatedRows));
2245                    allChangedRows.AddRange(updatedRows);
2246                }
2247            }
2248            return result;
2249        }
2250       
2251        /// <summary>
2252        ///Insert rows in top-down order.
2253        ///</summary>
2254        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2255        private int UpdateInsertedRows(dsHiveServer dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
2256            int result = 0;
2257            if ((this._resourceTableAdapter != null)) {
2258                global::System.Data.DataRow[] addedRows = dataSet.Resource.Select(null, null, global::System.Data.DataViewRowState.Added);
2259                if (((addedRows != null)
2260                            && (0 < addedRows.Length))) {
2261                    result = (result + this._resourceTableAdapter.Update(addedRows));
2262                    allAddedRows.AddRange(addedRows);
2263                }
2264            }
2265            if ((this._clientTableAdapter != null)) {
2266                global::System.Data.DataRow[] addedRows = dataSet.Client.Select(null, null, global::System.Data.DataViewRowState.Added);
2267                if (((addedRows != null)
2268                            && (0 < addedRows.Length))) {
2269                    result = (result + this._clientTableAdapter.Update(addedRows));
2270                    allAddedRows.AddRange(addedRows);
2271                }
2272            }
2273            return result;
2274        }
2275       
2276        /// <summary>
2277        ///Delete rows in bottom-up order.
2278        ///</summary>
2279        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2280        private int UpdateDeletedRows(dsHiveServer dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
2281            int result = 0;
2282            if ((this._clientTableAdapter != null)) {
2283                global::System.Data.DataRow[] deletedRows = dataSet.Client.Select(null, null, global::System.Data.DataViewRowState.Deleted);
2284                if (((deletedRows != null)
2285                            && (0 < deletedRows.Length))) {
2286                    result = (result + this._clientTableAdapter.Update(deletedRows));
2287                    allChangedRows.AddRange(deletedRows);
2288                }
2289            }
2290            if ((this._resourceTableAdapter != null)) {
2291                global::System.Data.DataRow[] deletedRows = dataSet.Resource.Select(null, null, global::System.Data.DataViewRowState.Deleted);
2292                if (((deletedRows != null)
2293                            && (0 < deletedRows.Length))) {
2294                    result = (result + this._resourceTableAdapter.Update(deletedRows));
2295                    allChangedRows.AddRange(deletedRows);
2296                }
2297            }
2298            return result;
2299        }
2300       
2301        /// <summary>
2302        ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
2303        ///</summary>
2304        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2305        private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
2306            if (((updatedRows == null)
2307                        || (updatedRows.Length < 1))) {
2308                return updatedRows;
2309            }
2310            if (((allAddedRows == null)
2311                        || (allAddedRows.Count < 1))) {
2312                return updatedRows;
2313            }
2314            global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
2315            for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
2316                global::System.Data.DataRow row = updatedRows[i];
2317                if ((allAddedRows.Contains(row) == false)) {
2318                    realUpdatedRows.Add(row);
2319                }
2320            }
2321            return realUpdatedRows.ToArray();
2322        }
2323       
2324        /// <summary>
2325        ///Update all changes to the dataset.
2326        ///</summary>
2327        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2328        public virtual int UpdateAll(dsHiveServer dataSet) {
2329            if ((dataSet == null)) {
2330                throw new global::System.ArgumentNullException("dataSet");
2331            }
2332            if ((dataSet.HasChanges() == false)) {
2333                return 0;
2334            }
2335            if (((this._clientTableAdapter != null)
2336                        && (this.MatchTableAdapterConnection(this._clientTableAdapter.Connection) == false))) {
2337                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
2338                        "tring.");
2339            }
2340            if (((this._resourceTableAdapter != null)
2341                        && (this.MatchTableAdapterConnection(this._resourceTableAdapter.Connection) == false))) {
2342                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
2343                        "tring.");
2344            }
2345            global::System.Data.IDbConnection workConnection = this.Connection;
2346            if ((workConnection == null)) {
2347                throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
2348                        "ger TableAdapter property to a valid TableAdapter instance.");
2349            }
2350            bool workConnOpened = false;
2351            if (((workConnection.State & global::System.Data.ConnectionState.Broken)
2352                        == global::System.Data.ConnectionState.Broken)) {
2353                workConnection.Close();
2354            }
2355            if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
2356                workConnection.Open();
2357                workConnOpened = true;
2358            }
2359            global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
2360            if ((workTransaction == null)) {
2361                throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
2362                        "ctions or the current state is not allowing the transaction to begin.");
2363            }
2364            global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
2365            global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
2366            global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
2367            global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
2368            int result = 0;
2369            global::System.Data.DataSet backupDataSet = null;
2370            if (this.BackupDataSetBeforeUpdate) {
2371                backupDataSet = new global::System.Data.DataSet();
2372                backupDataSet.Merge(dataSet);
2373            }
2374            try {
2375                // ---- Prepare for update -----------
2376                //
2377                if ((this._clientTableAdapter != null)) {
2378                    revertConnections.Add(this._clientTableAdapter, this._clientTableAdapter.Connection);
2379                    this._clientTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
2380                    this._clientTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
2381                    if (this._clientTableAdapter.Adapter.AcceptChangesDuringUpdate) {
2382                        this._clientTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
2383                        adaptersWithAcceptChangesDuringUpdate.Add(this._clientTableAdapter.Adapter);
2384                    }
2385                }
2386                if ((this._resourceTableAdapter != null)) {
2387                    revertConnections.Add(this._resourceTableAdapter, this._resourceTableAdapter.Connection);
2388                    this._resourceTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
2389                    this._resourceTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
2390                    if (this._resourceTableAdapter.Adapter.AcceptChangesDuringUpdate) {
2391                        this._resourceTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
2392                        adaptersWithAcceptChangesDuringUpdate.Add(this._resourceTableAdapter.Adapter);
2393                    }
2394                }
2395                //
2396                //---- Perform updates -----------
2397                //
2398                if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
2399                    result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
2400                    result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
2401                }
2402                else {
2403                    result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
2404                    result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
2405                }
2406                result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
2407                //
2408                //---- Commit updates -----------
2409                //
2410                workTransaction.Commit();
2411                if ((0 < allAddedRows.Count)) {
2412                    global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
2413                    allAddedRows.CopyTo(rows);
2414                    for (int i = 0; (i < rows.Length); i = (i + 1)) {
2415                        global::System.Data.DataRow row = rows[i];
2416                        row.AcceptChanges();
2417                    }
2418                }
2419                if ((0 < allChangedRows.Count)) {
2420                    global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
2421                    allChangedRows.CopyTo(rows);
2422                    for (int i = 0; (i < rows.Length); i = (i + 1)) {
2423                        global::System.Data.DataRow row = rows[i];
2424                        row.AcceptChanges();
2425                    }
2426                }
2427            }
2428            catch (global::System.Exception ex) {
2429                workTransaction.Rollback();
2430                // ---- Restore the dataset -----------
2431                if (this.BackupDataSetBeforeUpdate) {
2432                    global::System.Diagnostics.Debug.Assert((backupDataSet != null));
2433                    dataSet.Clear();
2434                    dataSet.Merge(backupDataSet);
2435                }
2436                else {
2437                    if ((0 < allAddedRows.Count)) {
2438                        global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
2439                        allAddedRows.CopyTo(rows);
2440                        for (int i = 0; (i < rows.Length); i = (i + 1)) {
2441                            global::System.Data.DataRow row = rows[i];
2442                            row.AcceptChanges();
2443                            row.SetAdded();
2444                        }
2445                    }
2446                }
2447                throw ex;
2448            }
2449            finally {
2450                if (workConnOpened) {
2451                    workConnection.Close();
2452                }
2453                if ((this._clientTableAdapter != null)) {
2454                    this._clientTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._clientTableAdapter]));
2455                    this._clientTableAdapter.Transaction = null;
2456                }
2457                if ((this._resourceTableAdapter != null)) {
2458                    this._resourceTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._resourceTableAdapter]));
2459                    this._resourceTableAdapter.Transaction = null;
2460                }
2461                if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
2462                    global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
2463                    adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
2464                    for (int i = 0; (i < adapters.Length); i = (i + 1)) {
2465                        global::System.Data.Common.DataAdapter adapter = adapters[i];
2466                        adapter.AcceptChangesDuringUpdate = true;
2467                    }
2468                }
2469            }
2470            return result;
2471        }
2472       
2473        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2474        protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
2475            global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
2476        }
2477       
2478        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2479        protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
2480            if ((this._connection != null)) {
2481                return true;
2482            }
2483            if (((this.Connection == null)
2484                        || (inputConnection == null))) {
2485                return true;
2486            }
2487            if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
2488                return true;
2489            }
2490            return false;
2491        }
2492       
2493        /// <summary>
2494        ///Update Order Option
2495        ///</summary>
2496        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
2497        public enum UpdateOrderOption {
2498           
2499            InsertUpdateDelete = 0,
2500           
2501            UpdateInsertDelete = 1,
2502        }
2503       
2504        /// <summary>
2505        ///Used to sort self-referenced table's rows
2506        ///</summary>
2507        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
2508        private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
2509           
2510            private global::System.Data.DataRelation _relation;
2511           
2512            private int _childFirst;
2513           
2514            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2515            internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
2516                this._relation = relation;
2517                if (childFirst) {
2518                    this._childFirst = -1;
2519                }
2520                else {
2521                    this._childFirst = 1;
2522                }
2523            }
2524           
2525            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2526            private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) {
2527                global::System.Diagnostics.Debug.Assert((child != null));
2528                global::System.Diagnostics.Debug.Assert((parent != null));
2529                global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
2530                for (
2531                ; ((newParent != null)
2532                            && ((object.ReferenceEquals(newParent, child) == false)
2533                            && (object.ReferenceEquals(newParent, parent) == false)));
2534                ) {
2535                    newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
2536                }
2537                if ((newParent == null)) {
2538                    for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null)
2539                                && ((object.ReferenceEquals(newParent, child) == false)
2540                                && (object.ReferenceEquals(newParent, parent) == false)));
2541                    ) {
2542                        newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
2543                    }
2544                }
2545                if (object.ReferenceEquals(newParent, parent)) {
2546                    return true;
2547                }
2548                return false;
2549            }
2550           
2551            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2552            public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
2553                if (object.ReferenceEquals(row1, row2)) {
2554                    return 0;
2555                }
2556                if ((row1 == null)) {
2557                    return -1;
2558                }
2559                if ((row2 == null)) {
2560                    return 1;
2561                }
2562
2563                // Is row1 the child or grandchild of row2
2564                if (this.IsChildAndParent(row1, row2)) {
2565                    return this._childFirst;
2566                }
2567
2568                // Is row2 the child or grandchild of row1
2569                if (this.IsChildAndParent(row2, row1)) {
2570                    return (-1 * this._childFirst);
2571                }
2572                return 0;
2573            }
2574        }
2575    }
2576}
2577
2578#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.