//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
#pragma warning disable 1591
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.OleDb;
using System.Diagnostics;
using System.IO;
using System.Runtime.Serialization;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using Deltares.Soilbase;
namespace Deltares.Soilbase
{
///
///Represents a strongly typed in-memory cache of data.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[Serializable()]
[DesignerCategory("code")]
[ToolboxItem(true)]
[XmlSchemaProvider("GetTypedDataSetSchema")]
[XmlRoot("SoilbaseDataSet")]
[HelpKeyword("vs.data.DataSet")]
public partial class SoilbaseDataSet : DataSet
{
#region Delegates
public delegate void MATERIALSRowChangeEventHandler(object sender, MATERIALSRowChangeEvent e);
public delegate void PARAMETERNAMESRowChangeEventHandler(object sender, PARAMETERNAMESRowChangeEvent e);
public delegate void PARAMETERVALUESRowChangeEventHandler(object sender, PARAMETERVALUESRowChangeEvent e);
#endregion
private SchemaSerializationMode _schemaSerializationMode = SchemaSerializationMode.IncludeSchema;
private DataRelation relationFK_PARAMETE_RELATION__MATERIAL;
private DataRelation relationFK_PARAMETE_RELATION__PARAMETE;
private MATERIALSDataTable tableMATERIALS;
private PARAMETERNAMESDataTable tablePARAMETERNAMES;
private PARAMETERVALUESDataTable tablePARAMETERVALUES;
[DebuggerNonUserCode()]
public SoilbaseDataSet()
{
this.BeginInit();
this.InitClass();
var schemaChangedHandler = new CollectionChangeEventHandler(this.SchemaChanged);
base.Tables.CollectionChanged += schemaChangedHandler;
base.Relations.CollectionChanged += schemaChangedHandler;
this.EndInit();
}
[DebuggerNonUserCode()]
protected SoilbaseDataSet(SerializationInfo info, StreamingContext context) :
base(info, context, false)
{
if ((this.IsBinarySerialized(info, context) == true))
{
this.InitVars(false);
var schemaChangedHandler1 = new CollectionChangeEventHandler(this.SchemaChanged);
this.Tables.CollectionChanged += schemaChangedHandler1;
this.Relations.CollectionChanged += schemaChangedHandler1;
return;
}
var strSchema = ((string) (info.GetValue("XmlSchema", typeof (string))));
if ((this.DetermineSchemaSerializationMode(info, context) == SchemaSerializationMode.IncludeSchema))
{
var ds = new DataSet();
ds.ReadXmlSchema(new XmlTextReader(new StringReader(strSchema)));
if ((ds.Tables["MATERIALS"] != null))
{
base.Tables.Add(new MATERIALSDataTable(ds.Tables["MATERIALS"]));
}
if ((ds.Tables["PARAMETERVALUES"] != null))
{
base.Tables.Add(new PARAMETERVALUESDataTable(ds.Tables["PARAMETERVALUES"]));
}
if ((ds.Tables["PARAMETERNAMES"] != null))
{
base.Tables.Add(new PARAMETERNAMESDataTable(ds.Tables["PARAMETERNAMES"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
this.Locale = ds.Locale;
this.CaseSensitive = ds.CaseSensitive;
this.EnforceConstraints = ds.EnforceConstraints;
this.Merge(ds, false, MissingSchemaAction.Add);
this.InitVars();
}
else
{
this.ReadXmlSchema(new XmlTextReader(new StringReader(strSchema)));
}
this.GetSerializationData(info, context);
var schemaChangedHandler = new CollectionChangeEventHandler(this.SchemaChanged);
base.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
[DebuggerNonUserCode()]
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public MATERIALSDataTable MATERIALS
{
get { return this.tableMATERIALS; }
}
[DebuggerNonUserCode()]
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public PARAMETERVALUESDataTable PARAMETERVALUES
{
get { return this.tablePARAMETERVALUES; }
}
[DebuggerNonUserCode()]
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public PARAMETERNAMESDataTable PARAMETERNAMES
{
get { return this.tablePARAMETERNAMES; }
}
[DebuggerNonUserCode()]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public override SchemaSerializationMode SchemaSerializationMode
{
get { return this._schemaSerializationMode; }
set { this._schemaSerializationMode = value; }
}
[DebuggerNonUserCode()]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new DataTableCollection Tables
{
get { return base.Tables; }
}
[DebuggerNonUserCode()]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new DataRelationCollection Relations
{
get { return base.Relations; }
}
[DebuggerNonUserCode()]
protected override void InitializeDerivedDataSet()
{
this.BeginInit();
this.InitClass();
this.EndInit();
}
[DebuggerNonUserCode()]
public override DataSet Clone()
{
var cln = ((SoilbaseDataSet) (base.Clone()));
cln.InitVars();
cln.SchemaSerializationMode = this.SchemaSerializationMode;
return cln;
}
[DebuggerNonUserCode()]
protected override bool ShouldSerializeTables()
{
return false;
}
[DebuggerNonUserCode()]
protected override bool ShouldSerializeRelations()
{
return false;
}
[DebuggerNonUserCode()]
protected override void ReadXmlSerializable(XmlReader reader)
{
if ((this.DetermineSchemaSerializationMode(reader) == SchemaSerializationMode.IncludeSchema))
{
this.Reset();
var ds = new DataSet();
ds.ReadXml(reader);
if ((ds.Tables["MATERIALS"] != null))
{
base.Tables.Add(new MATERIALSDataTable(ds.Tables["MATERIALS"]));
}
if ((ds.Tables["PARAMETERVALUES"] != null))
{
base.Tables.Add(new PARAMETERVALUESDataTable(ds.Tables["PARAMETERVALUES"]));
}
if ((ds.Tables["PARAMETERNAMES"] != null))
{
base.Tables.Add(new PARAMETERNAMESDataTable(ds.Tables["PARAMETERNAMES"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
this.Locale = ds.Locale;
this.CaseSensitive = ds.CaseSensitive;
this.EnforceConstraints = ds.EnforceConstraints;
this.Merge(ds, false, MissingSchemaAction.Add);
this.InitVars();
}
else
{
this.ReadXml(reader);
this.InitVars();
}
}
[DebuggerNonUserCode()]
protected override XmlSchema GetSchemaSerializable()
{
var stream = new MemoryStream();
this.WriteXmlSchema(new XmlTextWriter(stream, null));
stream.Position = 0;
return XmlSchema.Read(new XmlTextReader(stream), null);
}
[DebuggerNonUserCode()]
internal void InitVars()
{
this.InitVars(true);
}
[DebuggerNonUserCode()]
internal void InitVars(bool initTable)
{
this.tableMATERIALS = ((MATERIALSDataTable) (base.Tables["MATERIALS"]));
if ((initTable == true))
{
if ((this.tableMATERIALS != null))
{
this.tableMATERIALS.InitVars();
}
}
this.tablePARAMETERVALUES = ((PARAMETERVALUESDataTable) (base.Tables["PARAMETERVALUES"]));
if ((initTable == true))
{
if ((this.tablePARAMETERVALUES != null))
{
this.tablePARAMETERVALUES.InitVars();
}
}
this.tablePARAMETERNAMES = ((PARAMETERNAMESDataTable) (base.Tables["PARAMETERNAMES"]));
if ((initTable == true))
{
if ((this.tablePARAMETERNAMES != null))
{
this.tablePARAMETERNAMES.InitVars();
}
}
this.relationFK_PARAMETE_RELATION__MATERIAL = this.Relations["FK_PARAMETE_RELATION__MATERIAL"];
this.relationFK_PARAMETE_RELATION__PARAMETE = this.Relations["FK_PARAMETE_RELATION__PARAMETE"];
}
[DebuggerNonUserCode()]
private void InitClass()
{
this.DataSetName = "SoilbaseDataSet";
this.Prefix = "";
this.Namespace = "http://tempuri.org/SoilbaseDataSet.xsd";
this.EnforceConstraints = true;
this.SchemaSerializationMode = SchemaSerializationMode.IncludeSchema;
this.tableMATERIALS = new MATERIALSDataTable();
base.Tables.Add(this.tableMATERIALS);
this.tablePARAMETERVALUES = new PARAMETERVALUESDataTable();
base.Tables.Add(this.tablePARAMETERVALUES);
this.tablePARAMETERNAMES = new PARAMETERNAMESDataTable();
base.Tables.Add(this.tablePARAMETERNAMES);
this.relationFK_PARAMETE_RELATION__MATERIAL = new DataRelation("FK_PARAMETE_RELATION__MATERIAL", new DataColumn[]
{
this.tableMATERIALS.MA_NRColumn
}, new DataColumn[]
{
this.tablePARAMETERVALUES.MA_NRColumn
}, false);
this.Relations.Add(this.relationFK_PARAMETE_RELATION__MATERIAL);
this.relationFK_PARAMETE_RELATION__PARAMETE = new DataRelation("FK_PARAMETE_RELATION__PARAMETE", new DataColumn[]
{
this.tablePARAMETERNAMES.PN_NRColumn
}, new DataColumn[]
{
this.tablePARAMETERVALUES.PN_NRColumn
}, false);
this.Relations.Add(this.relationFK_PARAMETE_RELATION__PARAMETE);
}
[DebuggerNonUserCode()]
private bool ShouldSerializeMATERIALS()
{
return false;
}
[DebuggerNonUserCode()]
private bool ShouldSerializePARAMETERVALUES()
{
return false;
}
[DebuggerNonUserCode()]
private bool ShouldSerializePARAMETERNAMES()
{
return false;
}
[DebuggerNonUserCode()]
private void SchemaChanged(object sender, CollectionChangeEventArgs e)
{
if ((e.Action == CollectionChangeAction.Remove))
{
this.InitVars();
}
}
[DebuggerNonUserCode()]
public static XmlSchemaComplexType GetTypedDataSetSchema(XmlSchemaSet xs)
{
var ds = new SoilbaseDataSet();
var type = new XmlSchemaComplexType();
var sequence = new XmlSchemaSequence();
var any = new XmlSchemaAny();
any.Namespace = ds.Namespace;
sequence.Items.Add(any);
type.Particle = sequence;
XmlSchema dsSchema = ds.GetSchemaSerializable();
if (xs.Contains(dsSchema.TargetNamespace))
{
var s1 = new MemoryStream();
var s2 = new MemoryStream();
try
{
XmlSchema schema = null;
dsSchema.Write(s1);
for (IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
{
schema = ((XmlSchema) (schemas.Current));
s2.SetLength(0);
schema.Write(s2);
if ((s1.Length == s2.Length))
{
s1.Position = 0;
s2.Position = 0;
for (; ((s1.Position != s1.Length)
&& (s1.ReadByte() == s2.ReadByte()));)
{
;
}
if ((s1.Position == s1.Length))
{
return type;
}
}
}
}
finally
{
if ((s1 != null))
{
s1.Close();
}
if ((s2 != null))
{
s2.Close();
}
}
}
xs.Add(dsSchema);
return type;
}
#region Nested type: MATERIALSDataTable
///
///Represents the strongly named DataTable class.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[Serializable()]
[XmlSchemaProvider("GetTypedTableSchema")]
public partial class MATERIALSDataTable : TypedTableBase
{
private DataColumn columnMA_DESCR;
private DataColumn columnMA_INDEX;
private DataColumn columnMA_NAME;
private DataColumn columnMA_NR;
[DebuggerNonUserCode()]
public MATERIALSDataTable()
{
this.TableName = "MATERIALS";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[DebuggerNonUserCode()]
internal MATERIALSDataTable(DataTable table)
{
this.TableName = table.TableName;
if ((table.CaseSensitive != table.DataSet.CaseSensitive))
{
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString()))
{
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace))
{
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
}
[DebuggerNonUserCode()]
protected MATERIALSDataTable(SerializationInfo info, StreamingContext context) :
base(info, context)
{
this.InitVars();
}
[DebuggerNonUserCode()]
public DataColumn MA_NRColumn
{
get { return this.columnMA_NR; }
}
[DebuggerNonUserCode()]
public DataColumn MA_NAMEColumn
{
get { return this.columnMA_NAME; }
}
[DebuggerNonUserCode()]
public DataColumn MA_DESCRColumn
{
get { return this.columnMA_DESCR; }
}
[DebuggerNonUserCode()]
public DataColumn MA_INDEXColumn
{
get { return this.columnMA_INDEX; }
}
[DebuggerNonUserCode()]
[Browsable(false)]
public int Count
{
get { return this.Rows.Count; }
}
[DebuggerNonUserCode()]
public MATERIALSRow this[int index]
{
get { return ((MATERIALSRow) (this.Rows[index])); }
}
public event MATERIALSRowChangeEventHandler MATERIALSRowChanging;
public event MATERIALSRowChangeEventHandler MATERIALSRowChanged;
public event MATERIALSRowChangeEventHandler MATERIALSRowDeleting;
public event MATERIALSRowChangeEventHandler MATERIALSRowDeleted;
[DebuggerNonUserCode()]
public void AddMATERIALSRow(MATERIALSRow row)
{
this.Rows.Add(row);
}
[DebuggerNonUserCode()]
public MATERIALSRow AddMATERIALSRow(string MA_NAME, string MA_DESCR, int MA_INDEX)
{
var rowMATERIALSRow = ((MATERIALSRow) (this.NewRow()));
var columnValuesArray = new object[]
{
null,
MA_NAME,
MA_DESCR,
MA_INDEX
};
rowMATERIALSRow.ItemArray = columnValuesArray;
this.Rows.Add(rowMATERIALSRow);
return rowMATERIALSRow;
}
[DebuggerNonUserCode()]
public MATERIALSRow FindByMA_NR(int MA_NR)
{
return ((MATERIALSRow) (this.Rows.Find(new object[]
{
MA_NR
})));
}
[DebuggerNonUserCode()]
public override DataTable Clone()
{
var cln = ((MATERIALSDataTable) (base.Clone()));
cln.InitVars();
return cln;
}
[DebuggerNonUserCode()]
protected override DataTable CreateInstance()
{
return new MATERIALSDataTable();
}
[DebuggerNonUserCode()]
internal void InitVars()
{
this.columnMA_NR = base.Columns["MA_NR"];
this.columnMA_NAME = base.Columns["MA_NAME"];
this.columnMA_DESCR = base.Columns["MA_DESCR"];
this.columnMA_INDEX = base.Columns["MA_INDEX"];
}
[DebuggerNonUserCode()]
private void InitClass()
{
this.columnMA_NR = new DataColumn("MA_NR", typeof (int), null, MappingType.Element);
base.Columns.Add(this.columnMA_NR);
this.columnMA_NAME = new DataColumn("MA_NAME", typeof (string), null, MappingType.Element);
base.Columns.Add(this.columnMA_NAME);
this.columnMA_DESCR = new DataColumn("MA_DESCR", typeof (string), null, MappingType.Element);
base.Columns.Add(this.columnMA_DESCR);
this.columnMA_INDEX = new DataColumn("MA_INDEX", typeof (int), null, MappingType.Element);
base.Columns.Add(this.columnMA_INDEX);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[]
{
this.columnMA_NR
}, true));
this.columnMA_NR.AutoIncrement = true;
this.columnMA_NR.AutoIncrementSeed = -1;
this.columnMA_NR.AutoIncrementStep = -1;
this.columnMA_NR.AllowDBNull = false;
this.columnMA_NR.Unique = true;
this.columnMA_NAME.MaxLength = 128;
this.columnMA_DESCR.MaxLength = 240;
}
[DebuggerNonUserCode()]
public MATERIALSRow NewMATERIALSRow()
{
return ((MATERIALSRow) (this.NewRow()));
}
[DebuggerNonUserCode()]
protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
{
return new MATERIALSRow(builder);
}
[DebuggerNonUserCode()]
protected override Type GetRowType()
{
return typeof (MATERIALSRow);
}
[DebuggerNonUserCode()]
protected override void OnRowChanged(DataRowChangeEventArgs e)
{
base.OnRowChanged(e);
if ((this.MATERIALSRowChanged != null))
{
this.MATERIALSRowChanged(this, new MATERIALSRowChangeEvent(((MATERIALSRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
protected override void OnRowChanging(DataRowChangeEventArgs e)
{
base.OnRowChanging(e);
if ((this.MATERIALSRowChanging != null))
{
this.MATERIALSRowChanging(this, new MATERIALSRowChangeEvent(((MATERIALSRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
protected override void OnRowDeleted(DataRowChangeEventArgs e)
{
base.OnRowDeleted(e);
if ((this.MATERIALSRowDeleted != null))
{
this.MATERIALSRowDeleted(this, new MATERIALSRowChangeEvent(((MATERIALSRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
protected override void OnRowDeleting(DataRowChangeEventArgs e)
{
base.OnRowDeleting(e);
if ((this.MATERIALSRowDeleting != null))
{
this.MATERIALSRowDeleting(this, new MATERIALSRowChangeEvent(((MATERIALSRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
public void RemoveMATERIALSRow(MATERIALSRow row)
{
this.Rows.Remove(row);
}
[DebuggerNonUserCode()]
public static XmlSchemaComplexType GetTypedTableSchema(XmlSchemaSet xs)
{
var type = new XmlSchemaComplexType();
var sequence = new XmlSchemaSequence();
var ds = new SoilbaseDataSet();
var any1 = new XmlSchemaAny();
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
any1.MinOccurs = new decimal(0);
any1.MaxOccurs = decimal.MaxValue;
any1.ProcessContents = XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any1);
var any2 = new XmlSchemaAny();
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
any2.MinOccurs = new decimal(1);
any2.ProcessContents = XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any2);
var attribute1 = new XmlSchemaAttribute();
attribute1.Name = "namespace";
attribute1.FixedValue = ds.Namespace;
type.Attributes.Add(attribute1);
var attribute2 = new XmlSchemaAttribute();
attribute2.Name = "tableTypeName";
attribute2.FixedValue = "MATERIALSDataTable";
type.Attributes.Add(attribute2);
type.Particle = sequence;
XmlSchema dsSchema = ds.GetSchemaSerializable();
if (xs.Contains(dsSchema.TargetNamespace))
{
var s1 = new MemoryStream();
var s2 = new MemoryStream();
try
{
XmlSchema schema = null;
dsSchema.Write(s1);
for (IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
{
schema = ((XmlSchema) (schemas.Current));
s2.SetLength(0);
schema.Write(s2);
if ((s1.Length == s2.Length))
{
s1.Position = 0;
s2.Position = 0;
for (; ((s1.Position != s1.Length)
&& (s1.ReadByte() == s2.ReadByte()));)
{
;
}
if ((s1.Position == s1.Length))
{
return type;
}
}
}
}
finally
{
if ((s1 != null))
{
s1.Close();
}
if ((s2 != null))
{
s2.Close();
}
}
}
xs.Add(dsSchema);
return type;
}
}
#endregion
#region Nested type: MATERIALSRow
///
///Represents strongly named DataRow class.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public partial class MATERIALSRow : DataRow
{
private MATERIALSDataTable tableMATERIALS;
[DebuggerNonUserCode()]
internal MATERIALSRow(DataRowBuilder rb) :
base(rb)
{
this.tableMATERIALS = ((MATERIALSDataTable) (this.Table));
}
[DebuggerNonUserCode()]
public int MA_NR
{
get { return ((int) (this[this.tableMATERIALS.MA_NRColumn])); }
set { this[this.tableMATERIALS.MA_NRColumn] = value; }
}
[DebuggerNonUserCode()]
public string MA_NAME
{
get
{
try
{
return ((string) (this[this.tableMATERIALS.MA_NAMEColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("The value for column \'MA_NAME\' in table \'MATERIALS\' is DBNull.", e);
}
}
set { this[this.tableMATERIALS.MA_NAMEColumn] = value; }
}
[DebuggerNonUserCode()]
public string MA_DESCR
{
get
{
try
{
return ((string) (this[this.tableMATERIALS.MA_DESCRColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("The value for column \'MA_DESCR\' in table \'MATERIALS\' is DBNull.", e);
}
}
set { this[this.tableMATERIALS.MA_DESCRColumn] = value; }
}
[DebuggerNonUserCode()]
public int MA_INDEX
{
get
{
try
{
return ((int) (this[this.tableMATERIALS.MA_INDEXColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("The value for column \'MA_INDEX\' in table \'MATERIALS\' is DBNull.", e);
}
}
set { this[this.tableMATERIALS.MA_INDEXColumn] = value; }
}
[DebuggerNonUserCode()]
public bool IsMA_NAMENull()
{
return this.IsNull(this.tableMATERIALS.MA_NAMEColumn);
}
[DebuggerNonUserCode()]
public void SetMA_NAMENull()
{
this[this.tableMATERIALS.MA_NAMEColumn] = Convert.DBNull;
}
[DebuggerNonUserCode()]
public bool IsMA_DESCRNull()
{
return this.IsNull(this.tableMATERIALS.MA_DESCRColumn);
}
[DebuggerNonUserCode()]
public void SetMA_DESCRNull()
{
this[this.tableMATERIALS.MA_DESCRColumn] = Convert.DBNull;
}
[DebuggerNonUserCode()]
public bool IsMA_INDEXNull()
{
return this.IsNull(this.tableMATERIALS.MA_INDEXColumn);
}
[DebuggerNonUserCode()]
public void SetMA_INDEXNull()
{
this[this.tableMATERIALS.MA_INDEXColumn] = Convert.DBNull;
}
[DebuggerNonUserCode()]
public PARAMETERVALUESRow[] GetPARAMETERVALUESRows()
{
if ((this.Table.ChildRelations["FK_PARAMETE_RELATION__MATERIAL"] == null))
{
return new PARAMETERVALUESRow[0];
}
else
{
return ((PARAMETERVALUESRow[]) (base.GetChildRows(this.Table.ChildRelations["FK_PARAMETE_RELATION__MATERIAL"])));
}
}
}
#endregion
#region Nested type: MATERIALSRowChangeEvent
///
///Row event argument class
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class MATERIALSRowChangeEvent : EventArgs
{
private DataRowAction eventAction;
private MATERIALSRow eventRow;
[DebuggerNonUserCode()]
public MATERIALSRowChangeEvent(MATERIALSRow row, DataRowAction action)
{
this.eventRow = row;
this.eventAction = action;
}
[DebuggerNonUserCode()]
public MATERIALSRow Row
{
get { return this.eventRow; }
}
[DebuggerNonUserCode()]
public DataRowAction Action
{
get { return this.eventAction; }
}
}
#endregion
#region Nested type: PARAMETERNAMESDataTable
///
///Represents the strongly named DataTable class.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[Serializable()]
[XmlSchemaProvider("GetTypedTableSchema")]
public partial class PARAMETERNAMESDataTable : TypedTableBase
{
private DataColumn columnPN_NAME;
private DataColumn columnPN_NR;
[DebuggerNonUserCode()]
public PARAMETERNAMESDataTable()
{
this.TableName = "PARAMETERNAMES";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[DebuggerNonUserCode()]
internal PARAMETERNAMESDataTable(DataTable table)
{
this.TableName = table.TableName;
if ((table.CaseSensitive != table.DataSet.CaseSensitive))
{
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString()))
{
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace))
{
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
}
[DebuggerNonUserCode()]
protected PARAMETERNAMESDataTable(SerializationInfo info, StreamingContext context) :
base(info, context)
{
this.InitVars();
}
[DebuggerNonUserCode()]
public DataColumn PN_NRColumn
{
get { return this.columnPN_NR; }
}
[DebuggerNonUserCode()]
public DataColumn PN_NAMEColumn
{
get { return this.columnPN_NAME; }
}
[DebuggerNonUserCode()]
[Browsable(false)]
public int Count
{
get { return this.Rows.Count; }
}
[DebuggerNonUserCode()]
public PARAMETERNAMESRow this[int index]
{
get { return ((PARAMETERNAMESRow) (this.Rows[index])); }
}
public event PARAMETERNAMESRowChangeEventHandler PARAMETERNAMESRowChanging;
public event PARAMETERNAMESRowChangeEventHandler PARAMETERNAMESRowChanged;
public event PARAMETERNAMESRowChangeEventHandler PARAMETERNAMESRowDeleting;
public event PARAMETERNAMESRowChangeEventHandler PARAMETERNAMESRowDeleted;
[DebuggerNonUserCode()]
public void AddPARAMETERNAMESRow(PARAMETERNAMESRow row)
{
this.Rows.Add(row);
}
[DebuggerNonUserCode()]
public PARAMETERNAMESRow AddPARAMETERNAMESRow(string PN_NAME)
{
var rowPARAMETERNAMESRow = ((PARAMETERNAMESRow) (this.NewRow()));
var columnValuesArray = new object[]
{
null,
PN_NAME
};
rowPARAMETERNAMESRow.ItemArray = columnValuesArray;
this.Rows.Add(rowPARAMETERNAMESRow);
return rowPARAMETERNAMESRow;
}
[DebuggerNonUserCode()]
public PARAMETERNAMESRow FindByPN_NR(int PN_NR)
{
return ((PARAMETERNAMESRow) (this.Rows.Find(new object[]
{
PN_NR
})));
}
[DebuggerNonUserCode()]
public override DataTable Clone()
{
var cln = ((PARAMETERNAMESDataTable) (base.Clone()));
cln.InitVars();
return cln;
}
[DebuggerNonUserCode()]
protected override DataTable CreateInstance()
{
return new PARAMETERNAMESDataTable();
}
[DebuggerNonUserCode()]
internal void InitVars()
{
this.columnPN_NR = base.Columns["PN_NR"];
this.columnPN_NAME = base.Columns["PN_NAME"];
}
[DebuggerNonUserCode()]
private void InitClass()
{
this.columnPN_NR = new DataColumn("PN_NR", typeof (int), null, MappingType.Element);
base.Columns.Add(this.columnPN_NR);
this.columnPN_NAME = new DataColumn("PN_NAME", typeof (string), null, MappingType.Element);
base.Columns.Add(this.columnPN_NAME);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[]
{
this.columnPN_NR
}, true));
this.columnPN_NR.AutoIncrement = true;
this.columnPN_NR.AutoIncrementSeed = -1;
this.columnPN_NR.AutoIncrementStep = -1;
this.columnPN_NR.AllowDBNull = false;
this.columnPN_NR.Unique = true;
this.columnPN_NAME.MaxLength = 64;
}
[DebuggerNonUserCode()]
public PARAMETERNAMESRow NewPARAMETERNAMESRow()
{
return ((PARAMETERNAMESRow) (this.NewRow()));
}
[DebuggerNonUserCode()]
protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
{
return new PARAMETERNAMESRow(builder);
}
[DebuggerNonUserCode()]
protected override Type GetRowType()
{
return typeof (PARAMETERNAMESRow);
}
[DebuggerNonUserCode()]
protected override void OnRowChanged(DataRowChangeEventArgs e)
{
base.OnRowChanged(e);
if ((this.PARAMETERNAMESRowChanged != null))
{
this.PARAMETERNAMESRowChanged(this, new PARAMETERNAMESRowChangeEvent(((PARAMETERNAMESRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
protected override void OnRowChanging(DataRowChangeEventArgs e)
{
base.OnRowChanging(e);
if ((this.PARAMETERNAMESRowChanging != null))
{
this.PARAMETERNAMESRowChanging(this, new PARAMETERNAMESRowChangeEvent(((PARAMETERNAMESRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
protected override void OnRowDeleted(DataRowChangeEventArgs e)
{
base.OnRowDeleted(e);
if ((this.PARAMETERNAMESRowDeleted != null))
{
this.PARAMETERNAMESRowDeleted(this, new PARAMETERNAMESRowChangeEvent(((PARAMETERNAMESRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
protected override void OnRowDeleting(DataRowChangeEventArgs e)
{
base.OnRowDeleting(e);
if ((this.PARAMETERNAMESRowDeleting != null))
{
this.PARAMETERNAMESRowDeleting(this, new PARAMETERNAMESRowChangeEvent(((PARAMETERNAMESRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
public void RemovePARAMETERNAMESRow(PARAMETERNAMESRow row)
{
this.Rows.Remove(row);
}
[DebuggerNonUserCode()]
public static XmlSchemaComplexType GetTypedTableSchema(XmlSchemaSet xs)
{
var type = new XmlSchemaComplexType();
var sequence = new XmlSchemaSequence();
var ds = new SoilbaseDataSet();
var any1 = new XmlSchemaAny();
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
any1.MinOccurs = new decimal(0);
any1.MaxOccurs = decimal.MaxValue;
any1.ProcessContents = XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any1);
var any2 = new XmlSchemaAny();
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
any2.MinOccurs = new decimal(1);
any2.ProcessContents = XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any2);
var attribute1 = new XmlSchemaAttribute();
attribute1.Name = "namespace";
attribute1.FixedValue = ds.Namespace;
type.Attributes.Add(attribute1);
var attribute2 = new XmlSchemaAttribute();
attribute2.Name = "tableTypeName";
attribute2.FixedValue = "PARAMETERNAMESDataTable";
type.Attributes.Add(attribute2);
type.Particle = sequence;
XmlSchema dsSchema = ds.GetSchemaSerializable();
if (xs.Contains(dsSchema.TargetNamespace))
{
var s1 = new MemoryStream();
var s2 = new MemoryStream();
try
{
XmlSchema schema = null;
dsSchema.Write(s1);
for (IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
{
schema = ((XmlSchema) (schemas.Current));
s2.SetLength(0);
schema.Write(s2);
if ((s1.Length == s2.Length))
{
s1.Position = 0;
s2.Position = 0;
for (; ((s1.Position != s1.Length)
&& (s1.ReadByte() == s2.ReadByte()));)
{
;
}
if ((s1.Position == s1.Length))
{
return type;
}
}
}
}
finally
{
if ((s1 != null))
{
s1.Close();
}
if ((s2 != null))
{
s2.Close();
}
}
}
xs.Add(dsSchema);
return type;
}
}
#endregion
#region Nested type: PARAMETERNAMESRow
///
///Represents strongly named DataRow class.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public partial class PARAMETERNAMESRow : DataRow
{
private PARAMETERNAMESDataTable tablePARAMETERNAMES;
[DebuggerNonUserCode()]
internal PARAMETERNAMESRow(DataRowBuilder rb) :
base(rb)
{
this.tablePARAMETERNAMES = ((PARAMETERNAMESDataTable) (this.Table));
}
[DebuggerNonUserCode()]
public int PN_NR
{
get { return ((int) (this[this.tablePARAMETERNAMES.PN_NRColumn])); }
set { this[this.tablePARAMETERNAMES.PN_NRColumn] = value; }
}
[DebuggerNonUserCode()]
public string PN_NAME
{
get
{
try
{
return ((string) (this[this.tablePARAMETERNAMES.PN_NAMEColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("The value for column \'PN_NAME\' in table \'PARAMETERNAMES\' is DBNull.", e);
}
}
set { this[this.tablePARAMETERNAMES.PN_NAMEColumn] = value; }
}
[DebuggerNonUserCode()]
public bool IsPN_NAMENull()
{
return this.IsNull(this.tablePARAMETERNAMES.PN_NAMEColumn);
}
[DebuggerNonUserCode()]
public void SetPN_NAMENull()
{
this[this.tablePARAMETERNAMES.PN_NAMEColumn] = Convert.DBNull;
}
[DebuggerNonUserCode()]
public PARAMETERVALUESRow[] GetPARAMETERVALUESRows()
{
if ((this.Table.ChildRelations["FK_PARAMETE_RELATION__PARAMETE"] == null))
{
return new PARAMETERVALUESRow[0];
}
else
{
return ((PARAMETERVALUESRow[]) (base.GetChildRows(this.Table.ChildRelations["FK_PARAMETE_RELATION__PARAMETE"])));
}
}
}
#endregion
#region Nested type: PARAMETERNAMESRowChangeEvent
///
///Row event argument class
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class PARAMETERNAMESRowChangeEvent : EventArgs
{
private DataRowAction eventAction;
private PARAMETERNAMESRow eventRow;
[DebuggerNonUserCode()]
public PARAMETERNAMESRowChangeEvent(PARAMETERNAMESRow row, DataRowAction action)
{
this.eventRow = row;
this.eventAction = action;
}
[DebuggerNonUserCode()]
public PARAMETERNAMESRow Row
{
get { return this.eventRow; }
}
[DebuggerNonUserCode()]
public DataRowAction Action
{
get { return this.eventAction; }
}
}
#endregion
#region Nested type: PARAMETERVALUESDataTable
///
///Represents the strongly named DataTable class.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[Serializable()]
[XmlSchemaProvider("GetTypedTableSchema")]
public partial class PARAMETERVALUESDataTable : TypedTableBase
{
private DataColumn columnMA_NR;
private DataColumn columnPN_NR;
private DataColumn columnPV_NR;
private DataColumn columnPV_VALUE;
[DebuggerNonUserCode()]
public PARAMETERVALUESDataTable()
{
this.TableName = "PARAMETERVALUES";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[DebuggerNonUserCode()]
internal PARAMETERVALUESDataTable(DataTable table)
{
this.TableName = table.TableName;
if ((table.CaseSensitive != table.DataSet.CaseSensitive))
{
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString()))
{
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace))
{
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
}
[DebuggerNonUserCode()]
protected PARAMETERVALUESDataTable(SerializationInfo info, StreamingContext context) :
base(info, context)
{
this.InitVars();
}
[DebuggerNonUserCode()]
public DataColumn PV_NRColumn
{
get { return this.columnPV_NR; }
}
[DebuggerNonUserCode()]
public DataColumn MA_NRColumn
{
get { return this.columnMA_NR; }
}
[DebuggerNonUserCode()]
public DataColumn PN_NRColumn
{
get { return this.columnPN_NR; }
}
[DebuggerNonUserCode()]
public DataColumn PV_VALUEColumn
{
get { return this.columnPV_VALUE; }
}
[DebuggerNonUserCode()]
[Browsable(false)]
public int Count
{
get { return this.Rows.Count; }
}
[DebuggerNonUserCode()]
public PARAMETERVALUESRow this[int index]
{
get { return ((PARAMETERVALUESRow) (this.Rows[index])); }
}
public event PARAMETERVALUESRowChangeEventHandler PARAMETERVALUESRowChanging;
public event PARAMETERVALUESRowChangeEventHandler PARAMETERVALUESRowChanged;
public event PARAMETERVALUESRowChangeEventHandler PARAMETERVALUESRowDeleting;
public event PARAMETERVALUESRowChangeEventHandler PARAMETERVALUESRowDeleted;
[DebuggerNonUserCode()]
public void AddPARAMETERVALUESRow(PARAMETERVALUESRow row)
{
this.Rows.Add(row);
}
[DebuggerNonUserCode()]
public PARAMETERVALUESRow AddPARAMETERVALUESRow(MATERIALSRow parentMATERIALSRowByFK_PARAMETE_RELATION__MATERIAL, PARAMETERNAMESRow parentPARAMETERNAMESRowByFK_PARAMETE_RELATION__PARAMETE, double PV_VALUE)
{
var rowPARAMETERVALUESRow = ((PARAMETERVALUESRow) (this.NewRow()));
var columnValuesArray = new object[]
{
null,
null,
null,
PV_VALUE
};
if ((parentMATERIALSRowByFK_PARAMETE_RELATION__MATERIAL != null))
{
columnValuesArray[1] = parentMATERIALSRowByFK_PARAMETE_RELATION__MATERIAL[0];
}
if ((parentPARAMETERNAMESRowByFK_PARAMETE_RELATION__PARAMETE != null))
{
columnValuesArray[2] = parentPARAMETERNAMESRowByFK_PARAMETE_RELATION__PARAMETE[0];
}
rowPARAMETERVALUESRow.ItemArray = columnValuesArray;
this.Rows.Add(rowPARAMETERVALUESRow);
return rowPARAMETERVALUESRow;
}
[DebuggerNonUserCode()]
public PARAMETERVALUESRow FindByPV_NR(int PV_NR)
{
return ((PARAMETERVALUESRow) (this.Rows.Find(new object[]
{
PV_NR
})));
}
[DebuggerNonUserCode()]
public override DataTable Clone()
{
var cln = ((PARAMETERVALUESDataTable) (base.Clone()));
cln.InitVars();
return cln;
}
[DebuggerNonUserCode()]
protected override DataTable CreateInstance()
{
return new PARAMETERVALUESDataTable();
}
[DebuggerNonUserCode()]
internal void InitVars()
{
this.columnPV_NR = base.Columns["PV_NR"];
this.columnMA_NR = base.Columns["MA_NR"];
this.columnPN_NR = base.Columns["PN_NR"];
this.columnPV_VALUE = base.Columns["PV_VALUE"];
}
[DebuggerNonUserCode()]
private void InitClass()
{
this.columnPV_NR = new DataColumn("PV_NR", typeof (int), null, MappingType.Element);
base.Columns.Add(this.columnPV_NR);
this.columnMA_NR = new DataColumn("MA_NR", typeof (int), null, MappingType.Element);
base.Columns.Add(this.columnMA_NR);
this.columnPN_NR = new DataColumn("PN_NR", typeof (int), null, MappingType.Element);
base.Columns.Add(this.columnPN_NR);
this.columnPV_VALUE = new DataColumn("PV_VALUE", typeof (double), null, MappingType.Element);
base.Columns.Add(this.columnPV_VALUE);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[]
{
this.columnPV_NR
}, true));
this.columnPV_NR.AutoIncrement = true;
this.columnPV_NR.AutoIncrementSeed = -1;
this.columnPV_NR.AutoIncrementStep = -1;
this.columnPV_NR.AllowDBNull = false;
this.columnPV_NR.Unique = true;
}
[DebuggerNonUserCode()]
public PARAMETERVALUESRow NewPARAMETERVALUESRow()
{
return ((PARAMETERVALUESRow) (this.NewRow()));
}
[DebuggerNonUserCode()]
protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
{
return new PARAMETERVALUESRow(builder);
}
[DebuggerNonUserCode()]
protected override Type GetRowType()
{
return typeof (PARAMETERVALUESRow);
}
[DebuggerNonUserCode()]
protected override void OnRowChanged(DataRowChangeEventArgs e)
{
base.OnRowChanged(e);
if ((this.PARAMETERVALUESRowChanged != null))
{
this.PARAMETERVALUESRowChanged(this, new PARAMETERVALUESRowChangeEvent(((PARAMETERVALUESRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
protected override void OnRowChanging(DataRowChangeEventArgs e)
{
base.OnRowChanging(e);
if ((this.PARAMETERVALUESRowChanging != null))
{
this.PARAMETERVALUESRowChanging(this, new PARAMETERVALUESRowChangeEvent(((PARAMETERVALUESRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
protected override void OnRowDeleted(DataRowChangeEventArgs e)
{
base.OnRowDeleted(e);
if ((this.PARAMETERVALUESRowDeleted != null))
{
this.PARAMETERVALUESRowDeleted(this, new PARAMETERVALUESRowChangeEvent(((PARAMETERVALUESRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
protected override void OnRowDeleting(DataRowChangeEventArgs e)
{
base.OnRowDeleting(e);
if ((this.PARAMETERVALUESRowDeleting != null))
{
this.PARAMETERVALUESRowDeleting(this, new PARAMETERVALUESRowChangeEvent(((PARAMETERVALUESRow) (e.Row)), e.Action));
}
}
[DebuggerNonUserCode()]
public void RemovePARAMETERVALUESRow(PARAMETERVALUESRow row)
{
this.Rows.Remove(row);
}
[DebuggerNonUserCode()]
public static XmlSchemaComplexType GetTypedTableSchema(XmlSchemaSet xs)
{
var type = new XmlSchemaComplexType();
var sequence = new XmlSchemaSequence();
var ds = new SoilbaseDataSet();
var any1 = new XmlSchemaAny();
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
any1.MinOccurs = new decimal(0);
any1.MaxOccurs = decimal.MaxValue;
any1.ProcessContents = XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any1);
var any2 = new XmlSchemaAny();
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
any2.MinOccurs = new decimal(1);
any2.ProcessContents = XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any2);
var attribute1 = new XmlSchemaAttribute();
attribute1.Name = "namespace";
attribute1.FixedValue = ds.Namespace;
type.Attributes.Add(attribute1);
var attribute2 = new XmlSchemaAttribute();
attribute2.Name = "tableTypeName";
attribute2.FixedValue = "PARAMETERVALUESDataTable";
type.Attributes.Add(attribute2);
type.Particle = sequence;
XmlSchema dsSchema = ds.GetSchemaSerializable();
if (xs.Contains(dsSchema.TargetNamespace))
{
var s1 = new MemoryStream();
var s2 = new MemoryStream();
try
{
XmlSchema schema = null;
dsSchema.Write(s1);
for (IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
{
schema = ((XmlSchema) (schemas.Current));
s2.SetLength(0);
schema.Write(s2);
if ((s1.Length == s2.Length))
{
s1.Position = 0;
s2.Position = 0;
for (; ((s1.Position != s1.Length)
&& (s1.ReadByte() == s2.ReadByte()));)
{
;
}
if ((s1.Position == s1.Length))
{
return type;
}
}
}
}
finally
{
if ((s1 != null))
{
s1.Close();
}
if ((s2 != null))
{
s2.Close();
}
}
}
xs.Add(dsSchema);
return type;
}
}
#endregion
#region Nested type: PARAMETERVALUESRow
///
///Represents strongly named DataRow class.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public partial class PARAMETERVALUESRow : DataRow
{
private PARAMETERVALUESDataTable tablePARAMETERVALUES;
[DebuggerNonUserCode()]
internal PARAMETERVALUESRow(DataRowBuilder rb) :
base(rb)
{
this.tablePARAMETERVALUES = ((PARAMETERVALUESDataTable) (this.Table));
}
[DebuggerNonUserCode()]
public int PV_NR
{
get { return ((int) (this[this.tablePARAMETERVALUES.PV_NRColumn])); }
set { this[this.tablePARAMETERVALUES.PV_NRColumn] = value; }
}
[DebuggerNonUserCode()]
public int MA_NR
{
get
{
try
{
return ((int) (this[this.tablePARAMETERVALUES.MA_NRColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("The value for column \'MA_NR\' in table \'PARAMETERVALUES\' is DBNull.", e);
}
}
set { this[this.tablePARAMETERVALUES.MA_NRColumn] = value; }
}
[DebuggerNonUserCode()]
public int PN_NR
{
get
{
try
{
return ((int) (this[this.tablePARAMETERVALUES.PN_NRColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("The value for column \'PN_NR\' in table \'PARAMETERVALUES\' is DBNull.", e);
}
}
set { this[this.tablePARAMETERVALUES.PN_NRColumn] = value; }
}
[DebuggerNonUserCode()]
public double PV_VALUE
{
get
{
try
{
return ((double) (this[this.tablePARAMETERVALUES.PV_VALUEColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("The value for column \'PV_VALUE\' in table \'PARAMETERVALUES\' is DBNull.", e);
}
}
set { this[this.tablePARAMETERVALUES.PV_VALUEColumn] = value; }
}
[DebuggerNonUserCode()]
public MATERIALSRow MATERIALSRow
{
get { return ((MATERIALSRow) (this.GetParentRow(this.Table.ParentRelations["FK_PARAMETE_RELATION__MATERIAL"]))); }
set { this.SetParentRow(value, this.Table.ParentRelations["FK_PARAMETE_RELATION__MATERIAL"]); }
}
[DebuggerNonUserCode()]
public PARAMETERNAMESRow PARAMETERNAMESRow
{
get { return ((PARAMETERNAMESRow) (this.GetParentRow(this.Table.ParentRelations["FK_PARAMETE_RELATION__PARAMETE"]))); }
set { this.SetParentRow(value, this.Table.ParentRelations["FK_PARAMETE_RELATION__PARAMETE"]); }
}
[DebuggerNonUserCode()]
public bool IsMA_NRNull()
{
return this.IsNull(this.tablePARAMETERVALUES.MA_NRColumn);
}
[DebuggerNonUserCode()]
public void SetMA_NRNull()
{
this[this.tablePARAMETERVALUES.MA_NRColumn] = Convert.DBNull;
}
[DebuggerNonUserCode()]
public bool IsPN_NRNull()
{
return this.IsNull(this.tablePARAMETERVALUES.PN_NRColumn);
}
[DebuggerNonUserCode()]
public void SetPN_NRNull()
{
this[this.tablePARAMETERVALUES.PN_NRColumn] = Convert.DBNull;
}
[DebuggerNonUserCode()]
public bool IsPV_VALUENull()
{
return this.IsNull(this.tablePARAMETERVALUES.PV_VALUEColumn);
}
[DebuggerNonUserCode()]
public void SetPV_VALUENull()
{
this[this.tablePARAMETERVALUES.PV_VALUEColumn] = Convert.DBNull;
}
}
#endregion
#region Nested type: PARAMETERVALUESRowChangeEvent
///
///Row event argument class
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class PARAMETERVALUESRowChangeEvent : EventArgs
{
private DataRowAction eventAction;
private PARAMETERVALUESRow eventRow;
[DebuggerNonUserCode()]
public PARAMETERVALUESRowChangeEvent(PARAMETERVALUESRow row, DataRowAction action)
{
this.eventRow = row;
this.eventAction = action;
}
[DebuggerNonUserCode()]
public PARAMETERVALUESRow Row
{
get { return this.eventRow; }
}
[DebuggerNonUserCode()]
public DataRowAction Action
{
get { return this.eventAction; }
}
}
#endregion
}
}
namespace Deltares.Soilbase
{
///
///Represents the connection and commands used to retrieve and save data.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[DesignerCategory("code")]
[ToolboxItem(true)]
[DataObject(true)]
[Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[HelpKeyword("vs.data.TableAdapter")]
public partial class MATERIALSTableAdapter : Component
{
private OleDbDataAdapter _adapter;
private bool _clearBeforeFill;
private OleDbCommand[] _commandCollection;
private OleDbConnection _connection;
private OleDbTransaction _transaction;
[DebuggerNonUserCode()]
public MATERIALSTableAdapter()
{
this.ClearBeforeFill = true;
}
[DebuggerNonUserCode()]
protected internal OleDbDataAdapter Adapter
{
get
{
if ((this._adapter == null))
{
this.InitAdapter();
}
return this._adapter;
}
}
[DebuggerNonUserCode()]
internal OleDbConnection Connection
{
get
{
if ((this._connection == null))
{
this.InitConnection();
}
return this._connection;
}
set
{
this._connection = value;
if ((this.Adapter.InsertCommand != null))
{
this.Adapter.InsertCommand.Connection = value;
}
if ((this.Adapter.DeleteCommand != null))
{
this.Adapter.DeleteCommand.Connection = value;
}
if ((this.Adapter.UpdateCommand != null))
{
this.Adapter.UpdateCommand.Connection = value;
}
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1))
{
if ((this.CommandCollection[i] != null))
{
((OleDbCommand) (this.CommandCollection[i])).Connection = value;
}
}
}
}
[DebuggerNonUserCode()]
internal OleDbTransaction Transaction
{
get { return this._transaction; }
set
{
this._transaction = value;
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1))
{
this.CommandCollection[i].Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.DeleteCommand != null)))
{
this.Adapter.DeleteCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.InsertCommand != null)))
{
this.Adapter.InsertCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.UpdateCommand != null)))
{
this.Adapter.UpdateCommand.Transaction = this._transaction;
}
}
}
[DebuggerNonUserCode()]
protected OleDbCommand[] CommandCollection
{
get
{
if ((this._commandCollection == null))
{
this.InitCommandCollection();
}
return this._commandCollection;
}
}
[DebuggerNonUserCode()]
public bool ClearBeforeFill
{
get { return this._clearBeforeFill; }
set { this._clearBeforeFill = value; }
}
[DebuggerNonUserCode()]
private void InitAdapter()
{
this._adapter = new OleDbDataAdapter();
var tableMapping = new DataTableMapping();
tableMapping.SourceTable = "Table";
tableMapping.DataSetTable = "MATERIALS";
tableMapping.ColumnMappings.Add("MA_NR", "MA_NR");
tableMapping.ColumnMappings.Add("MA_NAME", "MA_NAME");
tableMapping.ColumnMappings.Add("MA_DESCR", "MA_DESCR");
tableMapping.ColumnMappings.Add("MA_INDEX", "MA_INDEX");
this._adapter.TableMappings.Add(tableMapping);
this._adapter.DeleteCommand = new OleDbCommand();
this._adapter.DeleteCommand.Connection = this.Connection;
this._adapter.DeleteCommand.CommandText = "DELETE FROM `MATERIALS` WHERE ((`MA_NR` = ?) AND ((? = 1 AND `MA_NAME` IS NULL) O" +
"R (`MA_NAME` = ?)) AND ((? = 1 AND `MA_DESCR` IS NULL) OR (`MA_DESCR` = ?)) AND " +
"((? = 1 AND `MA_INDEX` IS NULL) OR (`MA_INDEX` = ?)))";
this._adapter.DeleteCommand.CommandType = CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_MA_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NR", DataRowVersion.Original, false, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("IsNull_MA_NAME", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NAME", DataRowVersion.Original, true, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_MA_NAME", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NAME", DataRowVersion.Original, false, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("IsNull_MA_DESCR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_DESCR", DataRowVersion.Original, true, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_MA_DESCR", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_DESCR", DataRowVersion.Original, false, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("IsNull_MA_INDEX", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_INDEX", DataRowVersion.Original, true, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_MA_INDEX", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_INDEX", DataRowVersion.Original, false, null));
this._adapter.InsertCommand = new OleDbCommand();
this._adapter.InsertCommand.Connection = this.Connection;
this._adapter.InsertCommand.CommandText = "INSERT INTO `MATERIALS` (`MA_NAME`, `MA_DESCR`, `MA_INDEX`) VALUES (?, ?, ?)";
this._adapter.InsertCommand.CommandType = CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new OleDbParameter("MA_NAME", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NAME", DataRowVersion.Current, false, null));
this._adapter.InsertCommand.Parameters.Add(new OleDbParameter("MA_DESCR", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_DESCR", DataRowVersion.Current, false, null));
this._adapter.InsertCommand.Parameters.Add(new OleDbParameter("MA_INDEX", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_INDEX", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand = new OleDbCommand();
this._adapter.UpdateCommand.Connection = this.Connection;
this._adapter.UpdateCommand.CommandText = @"UPDATE `MATERIALS` SET `MA_NAME` = ?, `MA_DESCR` = ?, `MA_INDEX` = ? WHERE ((`MA_NR` = ?) AND ((? = 1 AND `MA_NAME` IS NULL) OR (`MA_NAME` = ?)) AND ((? = 1 AND `MA_DESCR` IS NULL) OR (`MA_DESCR` = ?)) AND ((? = 1 AND `MA_INDEX` IS NULL) OR (`MA_INDEX` = ?)))";
this._adapter.UpdateCommand.CommandType = CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("MA_NAME", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NAME", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("MA_DESCR", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_DESCR", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("MA_INDEX", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_INDEX", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_MA_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NR", DataRowVersion.Original, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("IsNull_MA_NAME", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NAME", DataRowVersion.Original, true, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_MA_NAME", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NAME", DataRowVersion.Original, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("IsNull_MA_DESCR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_DESCR", DataRowVersion.Original, true, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_MA_DESCR", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_DESCR", DataRowVersion.Original, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("IsNull_MA_INDEX", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_INDEX", DataRowVersion.Original, true, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_MA_INDEX", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_INDEX", DataRowVersion.Original, false, null));
}
[DebuggerNonUserCode()]
private void InitConnection()
{
this._connection = new OleDbConnection();
this._connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"D:\\DelphiWin32Projects\\Trunk\\MSoilb" +
"ase\\Install Version\\Examples\\Case A15.mdb\"";
}
[DebuggerNonUserCode()]
private void InitCommandCollection()
{
this._commandCollection = new OleDbCommand[1];
this._commandCollection[0] = new OleDbCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT MA_NR, MA_NAME, MA_DESCR, MA_INDEX FROM MATERIALS";
this._commandCollection[0].CommandType = CommandType.Text;
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Fill, true)]
public virtual int Fill(SoilbaseDataSet.MATERIALSDataTable dataTable)
{
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((this.ClearBeforeFill == true))
{
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Select, true)]
public virtual SoilbaseDataSet.MATERIALSDataTable GetData()
{
this.Adapter.SelectCommand = this.CommandCollection[0];
var dataTable = new SoilbaseDataSet.MATERIALSDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(SoilbaseDataSet.MATERIALSDataTable dataTable)
{
return this.Adapter.Update(dataTable);
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(SoilbaseDataSet dataSet)
{
return this.Adapter.Update(dataSet, "MATERIALS");
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(DataRow dataRow)
{
return this.Adapter.Update(new DataRow[]
{
dataRow
});
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(DataRow[] dataRows)
{
return this.Adapter.Update(dataRows);
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Delete, true)]
public virtual int Delete(int Original_MA_NR, string Original_MA_NAME, string Original_MA_DESCR, Nullable Original_MA_INDEX)
{
this.Adapter.DeleteCommand.Parameters[0].Value = ((int) (Original_MA_NR));
if ((Original_MA_NAME == null))
{
this.Adapter.DeleteCommand.Parameters[1].Value = ((object) (1));
this.Adapter.DeleteCommand.Parameters[2].Value = DBNull.Value;
}
else
{
this.Adapter.DeleteCommand.Parameters[1].Value = ((object) (0));
this.Adapter.DeleteCommand.Parameters[2].Value = ((string) (Original_MA_NAME));
}
if ((Original_MA_DESCR == null))
{
this.Adapter.DeleteCommand.Parameters[3].Value = ((object) (1));
this.Adapter.DeleteCommand.Parameters[4].Value = DBNull.Value;
}
else
{
this.Adapter.DeleteCommand.Parameters[3].Value = ((object) (0));
this.Adapter.DeleteCommand.Parameters[4].Value = ((string) (Original_MA_DESCR));
}
if ((Original_MA_INDEX.HasValue == true))
{
this.Adapter.DeleteCommand.Parameters[5].Value = ((object) (0));
this.Adapter.DeleteCommand.Parameters[6].Value = ((int) (Original_MA_INDEX.Value));
}
else
{
this.Adapter.DeleteCommand.Parameters[5].Value = ((object) (1));
this.Adapter.DeleteCommand.Parameters[6].Value = DBNull.Value;
}
ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
if (((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open)
!= ConnectionState.Open))
{
this.Adapter.DeleteCommand.Connection.Open();
}
try
{
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
return returnValue;
}
finally
{
if ((previousConnectionState == ConnectionState.Closed))
{
this.Adapter.DeleteCommand.Connection.Close();
}
}
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Insert, true)]
public virtual int Insert(string MA_NAME, string MA_DESCR, Nullable MA_INDEX)
{
if ((MA_NAME == null))
{
this.Adapter.InsertCommand.Parameters[0].Value = DBNull.Value;
}
else
{
this.Adapter.InsertCommand.Parameters[0].Value = ((string) (MA_NAME));
}
if ((MA_DESCR == null))
{
this.Adapter.InsertCommand.Parameters[1].Value = DBNull.Value;
}
else
{
this.Adapter.InsertCommand.Parameters[1].Value = ((string) (MA_DESCR));
}
if ((MA_INDEX.HasValue == true))
{
this.Adapter.InsertCommand.Parameters[2].Value = ((int) (MA_INDEX.Value));
}
else
{
this.Adapter.InsertCommand.Parameters[2].Value = DBNull.Value;
}
ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
if (((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open)
!= ConnectionState.Open))
{
this.Adapter.InsertCommand.Connection.Open();
}
try
{
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
return returnValue;
}
finally
{
if ((previousConnectionState == ConnectionState.Closed))
{
this.Adapter.InsertCommand.Connection.Close();
}
}
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Update, true)]
public virtual int Update(string MA_NAME, string MA_DESCR, Nullable MA_INDEX, int Original_MA_NR, string Original_MA_NAME, string Original_MA_DESCR, Nullable Original_MA_INDEX)
{
if ((MA_NAME == null))
{
this.Adapter.UpdateCommand.Parameters[0].Value = DBNull.Value;
}
else
{
this.Adapter.UpdateCommand.Parameters[0].Value = ((string) (MA_NAME));
}
if ((MA_DESCR == null))
{
this.Adapter.UpdateCommand.Parameters[1].Value = DBNull.Value;
}
else
{
this.Adapter.UpdateCommand.Parameters[1].Value = ((string) (MA_DESCR));
}
if ((MA_INDEX.HasValue == true))
{
this.Adapter.UpdateCommand.Parameters[2].Value = ((int) (MA_INDEX.Value));
}
else
{
this.Adapter.UpdateCommand.Parameters[2].Value = DBNull.Value;
}
this.Adapter.UpdateCommand.Parameters[3].Value = ((int) (Original_MA_NR));
if ((Original_MA_NAME == null))
{
this.Adapter.UpdateCommand.Parameters[4].Value = ((object) (1));
this.Adapter.UpdateCommand.Parameters[5].Value = DBNull.Value;
}
else
{
this.Adapter.UpdateCommand.Parameters[4].Value = ((object) (0));
this.Adapter.UpdateCommand.Parameters[5].Value = ((string) (Original_MA_NAME));
}
if ((Original_MA_DESCR == null))
{
this.Adapter.UpdateCommand.Parameters[6].Value = ((object) (1));
this.Adapter.UpdateCommand.Parameters[7].Value = DBNull.Value;
}
else
{
this.Adapter.UpdateCommand.Parameters[6].Value = ((object) (0));
this.Adapter.UpdateCommand.Parameters[7].Value = ((string) (Original_MA_DESCR));
}
if ((Original_MA_INDEX.HasValue == true))
{
this.Adapter.UpdateCommand.Parameters[8].Value = ((object) (0));
this.Adapter.UpdateCommand.Parameters[9].Value = ((int) (Original_MA_INDEX.Value));
}
else
{
this.Adapter.UpdateCommand.Parameters[8].Value = ((object) (1));
this.Adapter.UpdateCommand.Parameters[9].Value = DBNull.Value;
}
ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
if (((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open)
!= ConnectionState.Open))
{
this.Adapter.UpdateCommand.Connection.Open();
}
try
{
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
return returnValue;
}
finally
{
if ((previousConnectionState == ConnectionState.Closed))
{
this.Adapter.UpdateCommand.Connection.Close();
}
}
}
}
///
///Represents the connection and commands used to retrieve and save data.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[DesignerCategory("code")]
[ToolboxItem(true)]
[DataObject(true)]
[Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[HelpKeyword("vs.data.TableAdapter")]
public partial class PARAMETERVALUESTableAdapter : Component
{
private OleDbDataAdapter _adapter;
private bool _clearBeforeFill;
private OleDbCommand[] _commandCollection;
private OleDbConnection _connection;
private OleDbTransaction _transaction;
[DebuggerNonUserCode()]
public PARAMETERVALUESTableAdapter()
{
this.ClearBeforeFill = true;
}
[DebuggerNonUserCode()]
protected internal OleDbDataAdapter Adapter
{
get
{
if ((this._adapter == null))
{
this.InitAdapter();
}
return this._adapter;
}
}
[DebuggerNonUserCode()]
internal OleDbConnection Connection
{
get
{
if ((this._connection == null))
{
this.InitConnection();
}
return this._connection;
}
set
{
this._connection = value;
if ((this.Adapter.InsertCommand != null))
{
this.Adapter.InsertCommand.Connection = value;
}
if ((this.Adapter.DeleteCommand != null))
{
this.Adapter.DeleteCommand.Connection = value;
}
if ((this.Adapter.UpdateCommand != null))
{
this.Adapter.UpdateCommand.Connection = value;
}
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1))
{
if ((this.CommandCollection[i] != null))
{
((OleDbCommand) (this.CommandCollection[i])).Connection = value;
}
}
}
}
[DebuggerNonUserCode()]
internal OleDbTransaction Transaction
{
get { return this._transaction; }
set
{
this._transaction = value;
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1))
{
this.CommandCollection[i].Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.DeleteCommand != null)))
{
this.Adapter.DeleteCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.InsertCommand != null)))
{
this.Adapter.InsertCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.UpdateCommand != null)))
{
this.Adapter.UpdateCommand.Transaction = this._transaction;
}
}
}
[DebuggerNonUserCode()]
protected OleDbCommand[] CommandCollection
{
get
{
if ((this._commandCollection == null))
{
this.InitCommandCollection();
}
return this._commandCollection;
}
}
[DebuggerNonUserCode()]
public bool ClearBeforeFill
{
get { return this._clearBeforeFill; }
set { this._clearBeforeFill = value; }
}
[DebuggerNonUserCode()]
private void InitAdapter()
{
this._adapter = new OleDbDataAdapter();
var tableMapping = new DataTableMapping();
tableMapping.SourceTable = "Table";
tableMapping.DataSetTable = "PARAMETERVALUES";
tableMapping.ColumnMappings.Add("PV_NR", "PV_NR");
tableMapping.ColumnMappings.Add("MA_NR", "MA_NR");
tableMapping.ColumnMappings.Add("PN_NR", "PN_NR");
tableMapping.ColumnMappings.Add("PV_VALUE", "PV_VALUE");
this._adapter.TableMappings.Add(tableMapping);
this._adapter.DeleteCommand = new OleDbCommand();
this._adapter.DeleteCommand.Connection = this.Connection;
this._adapter.DeleteCommand.CommandText = "DELETE FROM `PARAMETERVALUES` WHERE ((`PV_NR` = ?) AND ((? = 1 AND `MA_NR` IS NUL" +
"L) OR (`MA_NR` = ?)) AND ((? = 1 AND `PN_NR` IS NULL) OR (`PN_NR` = ?)) AND ((? " +
"= 1 AND `PV_VALUE` IS NULL) OR (`PV_VALUE` = ?)))";
this._adapter.DeleteCommand.CommandType = CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_PV_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PV_NR", DataRowVersion.Original, false, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("IsNull_MA_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NR", DataRowVersion.Original, true, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_MA_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NR", DataRowVersion.Original, false, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("IsNull_PN_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NR", DataRowVersion.Original, true, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_PN_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NR", DataRowVersion.Original, false, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("IsNull_PV_VALUE", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PV_VALUE", DataRowVersion.Original, true, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_PV_VALUE", OleDbType.Double, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PV_VALUE", DataRowVersion.Original, false, null));
this._adapter.InsertCommand = new OleDbCommand();
this._adapter.InsertCommand.Connection = this.Connection;
this._adapter.InsertCommand.CommandText = "INSERT INTO `PARAMETERVALUES` (`MA_NR`, `PN_NR`, `PV_VALUE`) VALUES (?, ?, ?)";
this._adapter.InsertCommand.CommandType = CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new OleDbParameter("MA_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NR", DataRowVersion.Current, false, null));
this._adapter.InsertCommand.Parameters.Add(new OleDbParameter("PN_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NR", DataRowVersion.Current, false, null));
this._adapter.InsertCommand.Parameters.Add(new OleDbParameter("PV_VALUE", OleDbType.Double, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PV_VALUE", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand = new OleDbCommand();
this._adapter.UpdateCommand.Connection = this.Connection;
this._adapter.UpdateCommand.CommandText = "UPDATE `PARAMETERVALUES` SET `MA_NR` = ?, `PN_NR` = ?, `PV_VALUE` = ? WHERE ((`PV" +
"_NR` = ?) AND ((? = 1 AND `MA_NR` IS NULL) OR (`MA_NR` = ?)) AND ((? = 1 AND `PN" +
"_NR` IS NULL) OR (`PN_NR` = ?)) AND ((? = 1 AND `PV_VALUE` IS NULL) OR (`PV_VALU" +
"E` = ?)))";
this._adapter.UpdateCommand.CommandType = CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("MA_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NR", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("PN_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NR", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("PV_VALUE", OleDbType.Double, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PV_VALUE", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_PV_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PV_NR", DataRowVersion.Original, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("IsNull_MA_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NR", DataRowVersion.Original, true, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_MA_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "MA_NR", DataRowVersion.Original, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("IsNull_PN_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NR", DataRowVersion.Original, true, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_PN_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NR", DataRowVersion.Original, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("IsNull_PV_VALUE", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PV_VALUE", DataRowVersion.Original, true, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_PV_VALUE", OleDbType.Double, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PV_VALUE", DataRowVersion.Original, false, null));
}
[DebuggerNonUserCode()]
private void InitConnection()
{
this._connection = new OleDbConnection();
this._connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"D:\\DelphiWin32Projects\\Trunk\\MSoilb" +
"ase\\Install Version\\Examples\\Case A15.mdb\"";
}
[DebuggerNonUserCode()]
private void InitCommandCollection()
{
this._commandCollection = new OleDbCommand[1];
this._commandCollection[0] = new OleDbCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT PV_NR, MA_NR, PN_NR, PV_VALUE FROM PARAMETERVALUES";
this._commandCollection[0].CommandType = CommandType.Text;
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Fill, true)]
public virtual int Fill(SoilbaseDataSet.PARAMETERVALUESDataTable dataTable)
{
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((this.ClearBeforeFill == true))
{
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Select, true)]
public virtual SoilbaseDataSet.PARAMETERVALUESDataTable GetData()
{
this.Adapter.SelectCommand = this.CommandCollection[0];
var dataTable = new SoilbaseDataSet.PARAMETERVALUESDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(SoilbaseDataSet.PARAMETERVALUESDataTable dataTable)
{
return this.Adapter.Update(dataTable);
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(SoilbaseDataSet dataSet)
{
return this.Adapter.Update(dataSet, "PARAMETERVALUES");
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(DataRow dataRow)
{
return this.Adapter.Update(new DataRow[]
{
dataRow
});
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(DataRow[] dataRows)
{
return this.Adapter.Update(dataRows);
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Delete, true)]
public virtual int Delete(int Original_PV_NR, Nullable Original_MA_NR, Nullable Original_PN_NR, Nullable Original_PV_VALUE)
{
this.Adapter.DeleteCommand.Parameters[0].Value = ((int) (Original_PV_NR));
if ((Original_MA_NR.HasValue == true))
{
this.Adapter.DeleteCommand.Parameters[1].Value = ((object) (0));
this.Adapter.DeleteCommand.Parameters[2].Value = ((int) (Original_MA_NR.Value));
}
else
{
this.Adapter.DeleteCommand.Parameters[1].Value = ((object) (1));
this.Adapter.DeleteCommand.Parameters[2].Value = DBNull.Value;
}
if ((Original_PN_NR.HasValue == true))
{
this.Adapter.DeleteCommand.Parameters[3].Value = ((object) (0));
this.Adapter.DeleteCommand.Parameters[4].Value = ((int) (Original_PN_NR.Value));
}
else
{
this.Adapter.DeleteCommand.Parameters[3].Value = ((object) (1));
this.Adapter.DeleteCommand.Parameters[4].Value = DBNull.Value;
}
if ((Original_PV_VALUE.HasValue == true))
{
this.Adapter.DeleteCommand.Parameters[5].Value = ((object) (0));
this.Adapter.DeleteCommand.Parameters[6].Value = ((double) (Original_PV_VALUE.Value));
}
else
{
this.Adapter.DeleteCommand.Parameters[5].Value = ((object) (1));
this.Adapter.DeleteCommand.Parameters[6].Value = DBNull.Value;
}
ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
if (((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open)
!= ConnectionState.Open))
{
this.Adapter.DeleteCommand.Connection.Open();
}
try
{
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
return returnValue;
}
finally
{
if ((previousConnectionState == ConnectionState.Closed))
{
this.Adapter.DeleteCommand.Connection.Close();
}
}
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Insert, true)]
public virtual int Insert(Nullable MA_NR, Nullable PN_NR, Nullable PV_VALUE)
{
if ((MA_NR.HasValue == true))
{
this.Adapter.InsertCommand.Parameters[0].Value = ((int) (MA_NR.Value));
}
else
{
this.Adapter.InsertCommand.Parameters[0].Value = DBNull.Value;
}
if ((PN_NR.HasValue == true))
{
this.Adapter.InsertCommand.Parameters[1].Value = ((int) (PN_NR.Value));
}
else
{
this.Adapter.InsertCommand.Parameters[1].Value = DBNull.Value;
}
if ((PV_VALUE.HasValue == true))
{
this.Adapter.InsertCommand.Parameters[2].Value = ((double) (PV_VALUE.Value));
}
else
{
this.Adapter.InsertCommand.Parameters[2].Value = DBNull.Value;
}
ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
if (((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open)
!= ConnectionState.Open))
{
this.Adapter.InsertCommand.Connection.Open();
}
try
{
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
return returnValue;
}
finally
{
if ((previousConnectionState == ConnectionState.Closed))
{
this.Adapter.InsertCommand.Connection.Close();
}
}
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Update, true)]
public virtual int Update(Nullable MA_NR, Nullable PN_NR, Nullable PV_VALUE, int Original_PV_NR, Nullable Original_MA_NR, Nullable Original_PN_NR, Nullable Original_PV_VALUE)
{
if ((MA_NR.HasValue == true))
{
this.Adapter.UpdateCommand.Parameters[0].Value = ((int) (MA_NR.Value));
}
else
{
this.Adapter.UpdateCommand.Parameters[0].Value = DBNull.Value;
}
if ((PN_NR.HasValue == true))
{
this.Adapter.UpdateCommand.Parameters[1].Value = ((int) (PN_NR.Value));
}
else
{
this.Adapter.UpdateCommand.Parameters[1].Value = DBNull.Value;
}
if ((PV_VALUE.HasValue == true))
{
this.Adapter.UpdateCommand.Parameters[2].Value = ((double) (PV_VALUE.Value));
}
else
{
this.Adapter.UpdateCommand.Parameters[2].Value = DBNull.Value;
}
this.Adapter.UpdateCommand.Parameters[3].Value = ((int) (Original_PV_NR));
if ((Original_MA_NR.HasValue == true))
{
this.Adapter.UpdateCommand.Parameters[4].Value = ((object) (0));
this.Adapter.UpdateCommand.Parameters[5].Value = ((int) (Original_MA_NR.Value));
}
else
{
this.Adapter.UpdateCommand.Parameters[4].Value = ((object) (1));
this.Adapter.UpdateCommand.Parameters[5].Value = DBNull.Value;
}
if ((Original_PN_NR.HasValue == true))
{
this.Adapter.UpdateCommand.Parameters[6].Value = ((object) (0));
this.Adapter.UpdateCommand.Parameters[7].Value = ((int) (Original_PN_NR.Value));
}
else
{
this.Adapter.UpdateCommand.Parameters[6].Value = ((object) (1));
this.Adapter.UpdateCommand.Parameters[7].Value = DBNull.Value;
}
if ((Original_PV_VALUE.HasValue == true))
{
this.Adapter.UpdateCommand.Parameters[8].Value = ((object) (0));
this.Adapter.UpdateCommand.Parameters[9].Value = ((double) (Original_PV_VALUE.Value));
}
else
{
this.Adapter.UpdateCommand.Parameters[8].Value = ((object) (1));
this.Adapter.UpdateCommand.Parameters[9].Value = DBNull.Value;
}
ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
if (((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open)
!= ConnectionState.Open))
{
this.Adapter.UpdateCommand.Connection.Open();
}
try
{
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
return returnValue;
}
finally
{
if ((previousConnectionState == ConnectionState.Closed))
{
this.Adapter.UpdateCommand.Connection.Close();
}
}
}
}
///
///Represents the connection and commands used to retrieve and save data.
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[DesignerCategory("code")]
[ToolboxItem(true)]
[DataObject(true)]
[Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[HelpKeyword("vs.data.TableAdapter")]
public partial class PARAMETERNAMESTableAdapter : Component
{
private OleDbDataAdapter _adapter;
private bool _clearBeforeFill;
private OleDbCommand[] _commandCollection;
private OleDbConnection _connection;
private OleDbTransaction _transaction;
[DebuggerNonUserCode()]
public PARAMETERNAMESTableAdapter()
{
this.ClearBeforeFill = true;
}
[DebuggerNonUserCode()]
protected internal OleDbDataAdapter Adapter
{
get
{
if ((this._adapter == null))
{
this.InitAdapter();
}
return this._adapter;
}
}
[DebuggerNonUserCode()]
internal OleDbConnection Connection
{
get
{
if ((this._connection == null))
{
this.InitConnection();
}
return this._connection;
}
set
{
this._connection = value;
if ((this.Adapter.InsertCommand != null))
{
this.Adapter.InsertCommand.Connection = value;
}
if ((this.Adapter.DeleteCommand != null))
{
this.Adapter.DeleteCommand.Connection = value;
}
if ((this.Adapter.UpdateCommand != null))
{
this.Adapter.UpdateCommand.Connection = value;
}
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1))
{
if ((this.CommandCollection[i] != null))
{
((OleDbCommand) (this.CommandCollection[i])).Connection = value;
}
}
}
}
[DebuggerNonUserCode()]
internal OleDbTransaction Transaction
{
get { return this._transaction; }
set
{
this._transaction = value;
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1))
{
this.CommandCollection[i].Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.DeleteCommand != null)))
{
this.Adapter.DeleteCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.InsertCommand != null)))
{
this.Adapter.InsertCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.UpdateCommand != null)))
{
this.Adapter.UpdateCommand.Transaction = this._transaction;
}
}
}
[DebuggerNonUserCode()]
protected OleDbCommand[] CommandCollection
{
get
{
if ((this._commandCollection == null))
{
this.InitCommandCollection();
}
return this._commandCollection;
}
}
[DebuggerNonUserCode()]
public bool ClearBeforeFill
{
get { return this._clearBeforeFill; }
set { this._clearBeforeFill = value; }
}
[DebuggerNonUserCode()]
private void InitAdapter()
{
this._adapter = new OleDbDataAdapter();
var tableMapping = new DataTableMapping();
tableMapping.SourceTable = "Table";
tableMapping.DataSetTable = "PARAMETERNAMES";
tableMapping.ColumnMappings.Add("PN_NR", "PN_NR");
tableMapping.ColumnMappings.Add("PN_NAME", "PN_NAME");
this._adapter.TableMappings.Add(tableMapping);
this._adapter.DeleteCommand = new OleDbCommand();
this._adapter.DeleteCommand.Connection = this.Connection;
this._adapter.DeleteCommand.CommandText = "DELETE FROM `PARAMETERNAMES` WHERE ((`PN_NR` = ?) AND ((? = 1 AND `PN_NAME` IS NU" +
"LL) OR (`PN_NAME` = ?)))";
this._adapter.DeleteCommand.CommandType = CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_PN_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NR", DataRowVersion.Original, false, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("IsNull_PN_NAME", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NAME", DataRowVersion.Original, true, null));
this._adapter.DeleteCommand.Parameters.Add(new OleDbParameter("Original_PN_NAME", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NAME", DataRowVersion.Original, false, null));
this._adapter.InsertCommand = new OleDbCommand();
this._adapter.InsertCommand.Connection = this.Connection;
this._adapter.InsertCommand.CommandText = "INSERT INTO `PARAMETERNAMES` (`PN_NAME`) VALUES (?)";
this._adapter.InsertCommand.CommandType = CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new OleDbParameter("PN_NAME", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NAME", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand = new OleDbCommand();
this._adapter.UpdateCommand.Connection = this.Connection;
this._adapter.UpdateCommand.CommandText = "UPDATE `PARAMETERNAMES` SET `PN_NAME` = ? WHERE ((`PN_NR` = ?) AND ((? = 1 AND `P" +
"N_NAME` IS NULL) OR (`PN_NAME` = ?)))";
this._adapter.UpdateCommand.CommandType = CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("PN_NAME", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NAME", DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_PN_NR", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NR", DataRowVersion.Original, false, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("IsNull_PN_NAME", OleDbType.Integer, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NAME", DataRowVersion.Original, true, null));
this._adapter.UpdateCommand.Parameters.Add(new OleDbParameter("Original_PN_NAME", OleDbType.WChar, 0, ParameterDirection.Input, ((byte) (0)), ((byte) (0)), "PN_NAME", DataRowVersion.Original, false, null));
}
[DebuggerNonUserCode()]
private void InitConnection()
{
this._connection = new OleDbConnection();
this._connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"D:\\DelphiWin32Projects\\Trunk\\MSoilb" +
"ase\\Install Version\\Examples\\Case A15.mdb\"";
}
[DebuggerNonUserCode()]
private void InitCommandCollection()
{
this._commandCollection = new OleDbCommand[1];
this._commandCollection[0] = new OleDbCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT PN_NR, PN_NAME FROM PARAMETERNAMES";
this._commandCollection[0].CommandType = CommandType.Text;
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Fill, true)]
public virtual int Fill(SoilbaseDataSet.PARAMETERNAMESDataTable dataTable)
{
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((this.ClearBeforeFill == true))
{
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Select, true)]
public virtual SoilbaseDataSet.PARAMETERNAMESDataTable GetData()
{
this.Adapter.SelectCommand = this.CommandCollection[0];
var dataTable = new SoilbaseDataSet.PARAMETERNAMESDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(SoilbaseDataSet.PARAMETERNAMESDataTable dataTable)
{
return this.Adapter.Update(dataTable);
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(SoilbaseDataSet dataSet)
{
return this.Adapter.Update(dataSet, "PARAMETERNAMES");
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(DataRow dataRow)
{
return this.Adapter.Update(new DataRow[]
{
dataRow
});
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
public virtual int Update(DataRow[] dataRows)
{
return this.Adapter.Update(dataRows);
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Delete, true)]
public virtual int Delete(int Original_PN_NR, string Original_PN_NAME)
{
this.Adapter.DeleteCommand.Parameters[0].Value = ((int) (Original_PN_NR));
if ((Original_PN_NAME == null))
{
this.Adapter.DeleteCommand.Parameters[1].Value = ((object) (1));
this.Adapter.DeleteCommand.Parameters[2].Value = DBNull.Value;
}
else
{
this.Adapter.DeleteCommand.Parameters[1].Value = ((object) (0));
this.Adapter.DeleteCommand.Parameters[2].Value = ((string) (Original_PN_NAME));
}
ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
if (((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open)
!= ConnectionState.Open))
{
this.Adapter.DeleteCommand.Connection.Open();
}
try
{
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
return returnValue;
}
finally
{
if ((previousConnectionState == ConnectionState.Closed))
{
this.Adapter.DeleteCommand.Connection.Close();
}
}
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Insert, true)]
public virtual int Insert(string PN_NAME)
{
if ((PN_NAME == null))
{
this.Adapter.InsertCommand.Parameters[0].Value = DBNull.Value;
}
else
{
this.Adapter.InsertCommand.Parameters[0].Value = ((string) (PN_NAME));
}
ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
if (((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open)
!= ConnectionState.Open))
{
this.Adapter.InsertCommand.Connection.Open();
}
try
{
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
return returnValue;
}
finally
{
if ((previousConnectionState == ConnectionState.Closed))
{
this.Adapter.InsertCommand.Connection.Close();
}
}
}
[DebuggerNonUserCode()]
[HelpKeyword("vs.data.TableAdapter")]
[DataObjectMethod(DataObjectMethodType.Update, true)]
public virtual int Update(string PN_NAME, int Original_PN_NR, string Original_PN_NAME)
{
if ((PN_NAME == null))
{
this.Adapter.UpdateCommand.Parameters[0].Value = DBNull.Value;
}
else
{
this.Adapter.UpdateCommand.Parameters[0].Value = ((string) (PN_NAME));
}
this.Adapter.UpdateCommand.Parameters[1].Value = ((int) (Original_PN_NR));
if ((Original_PN_NAME == null))
{
this.Adapter.UpdateCommand.Parameters[2].Value = ((object) (1));
this.Adapter.UpdateCommand.Parameters[3].Value = DBNull.Value;
}
else
{
this.Adapter.UpdateCommand.Parameters[2].Value = ((object) (0));
this.Adapter.UpdateCommand.Parameters[3].Value = ((string) (Original_PN_NAME));
}
ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
if (((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open)
!= ConnectionState.Open))
{
this.Adapter.UpdateCommand.Connection.Open();
}
try
{
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
return returnValue;
}
finally
{
if ((previousConnectionState == ConnectionState.Closed))
{
this.Adapter.UpdateCommand.Connection.Close();
}
}
}
}
///
///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[DesignerCategory("code")]
[ToolboxItem(true)]
[Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
"esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[HelpKeyword("vs.data.TableAdapterManager")]
public partial class TableAdapterManager : Component
{
#region UpdateOrderOption enum
///
///Update Order Option
///
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public enum UpdateOrderOption
{
InsertUpdateDelete = 0,
UpdateInsertDelete = 1,
}
#endregion
private bool _backupDataSetBeforeUpdate;
private IDbConnection _connection;
private MATERIALSTableAdapter _mATERIALSTableAdapter;
private PARAMETERNAMESTableAdapter _pARAMETERNAMESTableAdapter;
private PARAMETERVALUESTableAdapter _pARAMETERVALUESTableAdapter;
private UpdateOrderOption _updateOrder;
[DebuggerNonUserCode()]
public UpdateOrderOption UpdateOrder
{
get { return this._updateOrder; }
set { this._updateOrder = value; }
}
[DebuggerNonUserCode()]
[Editor("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
"ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
"", "System.Drawing.Design.UITypeEditor")]
public MATERIALSTableAdapter MATERIALSTableAdapter
{
get { return this._mATERIALSTableAdapter; }
set { this._mATERIALSTableAdapter = value; }
}
[DebuggerNonUserCode()]
[Editor("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
"ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
"", "System.Drawing.Design.UITypeEditor")]
public PARAMETERVALUESTableAdapter PARAMETERVALUESTableAdapter
{
get { return this._pARAMETERVALUESTableAdapter; }
set { this._pARAMETERVALUESTableAdapter = value; }
}
[DebuggerNonUserCode()]
[Editor("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
"ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
"", "System.Drawing.Design.UITypeEditor")]
public PARAMETERNAMESTableAdapter PARAMETERNAMESTableAdapter
{
get { return this._pARAMETERNAMESTableAdapter; }
set { this._pARAMETERNAMESTableAdapter = value; }
}
[DebuggerNonUserCode()]
public bool BackupDataSetBeforeUpdate
{
get { return this._backupDataSetBeforeUpdate; }
set { this._backupDataSetBeforeUpdate = value; }
}
[DebuggerNonUserCode()]
[Browsable(false)]
public IDbConnection Connection
{
get
{
if ((this._connection != null))
{
return this._connection;
}
if (((this._mATERIALSTableAdapter != null)
&& (this._mATERIALSTableAdapter.Connection != null)))
{
return this._mATERIALSTableAdapter.Connection;
}
if (((this._pARAMETERVALUESTableAdapter != null)
&& (this._pARAMETERVALUESTableAdapter.Connection != null)))
{
return this._pARAMETERVALUESTableAdapter.Connection;
}
if (((this._pARAMETERNAMESTableAdapter != null)
&& (this._pARAMETERNAMESTableAdapter.Connection != null)))
{
return this._pARAMETERNAMESTableAdapter.Connection;
}
return null;
}
set { this._connection = value; }
}
[DebuggerNonUserCode()]
[Browsable(false)]
public int TableAdapterInstanceCount
{
get
{
int count = 0;
if ((this._mATERIALSTableAdapter != null))
{
count = (count + 1);
}
if ((this._pARAMETERVALUESTableAdapter != null))
{
count = (count + 1);
}
if ((this._pARAMETERNAMESTableAdapter != null))
{
count = (count + 1);
}
return count;
}
}
///
///Update rows in top-down order.
///
[DebuggerNonUserCode()]
private int UpdateUpdatedRows(SoilbaseDataSet dataSet, List allChangedRows, List allAddedRows)
{
int result = 0;
if ((this._pARAMETERNAMESTableAdapter != null))
{
DataRow[] updatedRows = dataSet.PARAMETERNAMES.Select(null, null, DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length)))
{
result = (result + this._pARAMETERNAMESTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
if ((this._mATERIALSTableAdapter != null))
{
DataRow[] updatedRows = dataSet.MATERIALS.Select(null, null, DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length)))
{
result = (result + this._mATERIALSTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
if ((this._pARAMETERVALUESTableAdapter != null))
{
DataRow[] updatedRows = dataSet.PARAMETERVALUES.Select(null, null, DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length)))
{
result = (result + this._pARAMETERVALUESTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
return result;
}
///
///Insert rows in top-down order.
///
[DebuggerNonUserCode()]
private int UpdateInsertedRows(SoilbaseDataSet dataSet, List allAddedRows)
{
int result = 0;
if ((this._pARAMETERNAMESTableAdapter != null))
{
DataRow[] addedRows = dataSet.PARAMETERNAMES.Select(null, null, DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length)))
{
result = (result + this._pARAMETERNAMESTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
if ((this._mATERIALSTableAdapter != null))
{
DataRow[] addedRows = dataSet.MATERIALS.Select(null, null, DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length)))
{
result = (result + this._mATERIALSTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
if ((this._pARAMETERVALUESTableAdapter != null))
{
DataRow[] addedRows = dataSet.PARAMETERVALUES.Select(null, null, DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length)))
{
result = (result + this._pARAMETERVALUESTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
return result;
}
///
///Delete rows in bottom-up order.
///
[DebuggerNonUserCode()]
private int UpdateDeletedRows(SoilbaseDataSet dataSet, List allChangedRows)
{
int result = 0;
if ((this._pARAMETERVALUESTableAdapter != null))
{
DataRow[] deletedRows = dataSet.PARAMETERVALUES.Select(null, null, DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length)))
{
result = (result + this._pARAMETERVALUESTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
if ((this._mATERIALSTableAdapter != null))
{
DataRow[] deletedRows = dataSet.MATERIALS.Select(null, null, DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length)))
{
result = (result + this._mATERIALSTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
if ((this._pARAMETERNAMESTableAdapter != null))
{
DataRow[] deletedRows = dataSet.PARAMETERNAMES.Select(null, null, DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length)))
{
result = (result + this._pARAMETERNAMESTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
return result;
}
///
///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
///
[DebuggerNonUserCode()]
private DataRow[] GetRealUpdatedRows(DataRow[] updatedRows, List allAddedRows)
{
if (((updatedRows == null)
|| (updatedRows.Length < 1)))
{
return updatedRows;
}
if (((allAddedRows == null)
|| (allAddedRows.Count < 1)))
{
return updatedRows;
}
var realUpdatedRows = new List();
for (int i = 0; (i < updatedRows.Length); i = (i + 1))
{
DataRow row = updatedRows[i];
if ((allAddedRows.Contains(row) == false))
{
realUpdatedRows.Add(row);
}
}
return realUpdatedRows.ToArray();
}
///
///Update all changes to the dataset.
///
[DebuggerNonUserCode()]
public virtual int UpdateAll(SoilbaseDataSet dataSet)
{
if ((dataSet == null))
{
throw new ArgumentNullException("dataSet");
}
if ((dataSet.HasChanges() == false))
{
return 0;
}
if (((this._mATERIALSTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._mATERIALSTableAdapter.Connection) == false)))
{
throw new ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
if (((this._pARAMETERVALUESTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._pARAMETERVALUESTableAdapter.Connection) == false)))
{
throw new ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
if (((this._pARAMETERNAMESTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._pARAMETERNAMESTableAdapter.Connection) == false)))
{
throw new ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
IDbConnection workConnection = this.Connection;
if ((workConnection == null))
{
throw new ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
"ger TableAdapter property to a valid TableAdapter instance.");
}
bool workConnOpened = false;
if (((workConnection.State & ConnectionState.Broken)
== ConnectionState.Broken))
{
workConnection.Close();
}
if ((workConnection.State == ConnectionState.Closed))
{
workConnection.Open();
workConnOpened = true;
}
IDbTransaction workTransaction = workConnection.BeginTransaction();
if ((workTransaction == null))
{
throw new ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
"ctions or the current state is not allowing the transaction to begin.");
}
var allChangedRows = new List();
var allAddedRows = new List();
var adaptersWithAcceptChangesDuringUpdate = new List();
var revertConnections = new Dictionary