'------------------------------------------------------------------------------ ' ' Dieser Code wurde von einem Tool generiert. ' Laufzeitversion:4.0.30319.42000 ' ' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn ' der Code erneut generiert wird. ' '------------------------------------------------------------------------------ Option Strict Off Option Explicit On ''' '''Represents a strongly typed in-memory cache of data. ''' _ Partial Public Class MyDataset Inherits Global.System.Data.DataSet Private tableTBWMRH_KONFIGURATION As TBWMRH_KONFIGURATIONDataTable Private tableTBWMRH_PROFIL As TBWMRH_PROFILDataTable Private tableTBWMRH_PROFIL_FILE_JOB As TBWMRH_PROFIL_FILE_JOBDataTable Private tableTBWMRH_PROFIL_JOB As TBWMRH_PROFIL_JOBDataTable Private tableTBDD_EMAIL_ACCOUNT As TBDD_EMAIL_ACCOUNTDataTable Private relationFK_FILE_JOB_PROFILID As Global.System.Data.DataRelation Private relationFK_TBPROFIL_JOB_PROFILID As Global.System.Data.DataRelation Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema _ Public Sub New() MyBase.New Me.BeginInit Me.InitClass Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler Me.EndInit End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context, false) If (Me.IsBinarySerialized(info, context) = true) Then Me.InitVars(false) Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1 AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1 Return End If Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String) If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet() ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema))) If (Not (ds.Tables("TBWMRH_KONFIGURATION")) Is Nothing) Then MyBase.Tables.Add(New TBWMRH_KONFIGURATIONDataTable(ds.Tables("TBWMRH_KONFIGURATION"))) End If If (Not (ds.Tables("TBWMRH_PROFIL")) Is Nothing) Then MyBase.Tables.Add(New TBWMRH_PROFILDataTable(ds.Tables("TBWMRH_PROFIL"))) End If If (Not (ds.Tables("TBWMRH_PROFIL_FILE_JOB")) Is Nothing) Then MyBase.Tables.Add(New TBWMRH_PROFIL_FILE_JOBDataTable(ds.Tables("TBWMRH_PROFIL_FILE_JOB"))) End If If (Not (ds.Tables("TBWMRH_PROFIL_JOB")) Is Nothing) Then MyBase.Tables.Add(New TBWMRH_PROFIL_JOBDataTable(ds.Tables("TBWMRH_PROFIL_JOB"))) End If If (Not (ds.Tables("TBDD_EMAIL_ACCOUNT")) Is Nothing) Then MyBase.Tables.Add(New TBDD_EMAIL_ACCOUNTDataTable(ds.Tables("TBDD_EMAIL_ACCOUNT"))) End If Me.DataSetName = ds.DataSetName Me.Prefix = ds.Prefix Me.Namespace = ds.Namespace Me.Locale = ds.Locale Me.CaseSensitive = ds.CaseSensitive Me.EnforceConstraints = ds.EnforceConstraints Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add) Me.InitVars Else Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema))) End If Me.GetSerializationData(info, context) Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler AddHandler Me.Relations.CollectionChanged, schemaChangedHandler End Sub _ Public ReadOnly Property TBWMRH_KONFIGURATION() As TBWMRH_KONFIGURATIONDataTable Get Return Me.tableTBWMRH_KONFIGURATION End Get End Property _ Public ReadOnly Property TBWMRH_PROFIL() As TBWMRH_PROFILDataTable Get Return Me.tableTBWMRH_PROFIL End Get End Property _ Public ReadOnly Property TBWMRH_PROFIL_FILE_JOB() As TBWMRH_PROFIL_FILE_JOBDataTable Get Return Me.tableTBWMRH_PROFIL_FILE_JOB End Get End Property _ Public ReadOnly Property TBWMRH_PROFIL_JOB() As TBWMRH_PROFIL_JOBDataTable Get Return Me.tableTBWMRH_PROFIL_JOB End Get End Property _ Public ReadOnly Property TBDD_EMAIL_ACCOUNT() As TBDD_EMAIL_ACCOUNTDataTable Get Return Me.tableTBDD_EMAIL_ACCOUNT End Get End Property _ Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode Get Return Me._schemaSerializationMode End Get Set Me._schemaSerializationMode = value End Set End Property _ Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection Get Return MyBase.Tables End Get End Property _ Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection Get Return MyBase.Relations End Get End Property _ Protected Overrides Sub InitializeDerivedDataSet() Me.BeginInit Me.InitClass Me.EndInit End Sub _ Public Overrides Function Clone() As Global.System.Data.DataSet Dim cln As MyDataset = CType(MyBase.Clone,MyDataset) cln.InitVars cln.SchemaSerializationMode = Me.SchemaSerializationMode Return cln End Function _ Protected Overrides Function ShouldSerializeTables() As Boolean Return false End Function _ Protected Overrides Function ShouldSerializeRelations() As Boolean Return false End Function _ Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader) If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then Me.Reset Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet() ds.ReadXml(reader) If (Not (ds.Tables("TBWMRH_KONFIGURATION")) Is Nothing) Then MyBase.Tables.Add(New TBWMRH_KONFIGURATIONDataTable(ds.Tables("TBWMRH_KONFIGURATION"))) End If If (Not (ds.Tables("TBWMRH_PROFIL")) Is Nothing) Then MyBase.Tables.Add(New TBWMRH_PROFILDataTable(ds.Tables("TBWMRH_PROFIL"))) End If If (Not (ds.Tables("TBWMRH_PROFIL_FILE_JOB")) Is Nothing) Then MyBase.Tables.Add(New TBWMRH_PROFIL_FILE_JOBDataTable(ds.Tables("TBWMRH_PROFIL_FILE_JOB"))) End If If (Not (ds.Tables("TBWMRH_PROFIL_JOB")) Is Nothing) Then MyBase.Tables.Add(New TBWMRH_PROFIL_JOBDataTable(ds.Tables("TBWMRH_PROFIL_JOB"))) End If If (Not (ds.Tables("TBDD_EMAIL_ACCOUNT")) Is Nothing) Then MyBase.Tables.Add(New TBDD_EMAIL_ACCOUNTDataTable(ds.Tables("TBDD_EMAIL_ACCOUNT"))) End If Me.DataSetName = ds.DataSetName Me.Prefix = ds.Prefix Me.Namespace = ds.Namespace Me.Locale = ds.Locale Me.CaseSensitive = ds.CaseSensitive Me.EnforceConstraints = ds.EnforceConstraints Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add) Me.InitVars Else Me.ReadXml(reader) Me.InitVars End If End Sub _ Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing)) stream.Position = 0 Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing) End Function _ Friend Overloads Sub InitVars() Me.InitVars(true) End Sub _ Friend Overloads Sub InitVars(ByVal initTable As Boolean) Me.tableTBWMRH_KONFIGURATION = CType(MyBase.Tables("TBWMRH_KONFIGURATION"),TBWMRH_KONFIGURATIONDataTable) If (initTable = true) Then If (Not (Me.tableTBWMRH_KONFIGURATION) Is Nothing) Then Me.tableTBWMRH_KONFIGURATION.InitVars End If End If Me.tableTBWMRH_PROFIL = CType(MyBase.Tables("TBWMRH_PROFIL"),TBWMRH_PROFILDataTable) If (initTable = true) Then If (Not (Me.tableTBWMRH_PROFIL) Is Nothing) Then Me.tableTBWMRH_PROFIL.InitVars End If End If Me.tableTBWMRH_PROFIL_FILE_JOB = CType(MyBase.Tables("TBWMRH_PROFIL_FILE_JOB"),TBWMRH_PROFIL_FILE_JOBDataTable) If (initTable = true) Then If (Not (Me.tableTBWMRH_PROFIL_FILE_JOB) Is Nothing) Then Me.tableTBWMRH_PROFIL_FILE_JOB.InitVars End If End If Me.tableTBWMRH_PROFIL_JOB = CType(MyBase.Tables("TBWMRH_PROFIL_JOB"),TBWMRH_PROFIL_JOBDataTable) If (initTable = true) Then If (Not (Me.tableTBWMRH_PROFIL_JOB) Is Nothing) Then Me.tableTBWMRH_PROFIL_JOB.InitVars End If End If Me.tableTBDD_EMAIL_ACCOUNT = CType(MyBase.Tables("TBDD_EMAIL_ACCOUNT"),TBDD_EMAIL_ACCOUNTDataTable) If (initTable = true) Then If (Not (Me.tableTBDD_EMAIL_ACCOUNT) Is Nothing) Then Me.tableTBDD_EMAIL_ACCOUNT.InitVars End If End If Me.relationFK_FILE_JOB_PROFILID = Me.Relations("FK_FILE_JOB_PROFILID") Me.relationFK_TBPROFIL_JOB_PROFILID = Me.Relations("FK_TBPROFIL_JOB_PROFILID") End Sub _ Private Sub InitClass() Me.DataSetName = "MyDataset" Me.Prefix = "" Me.Namespace = "http://tempuri.org/MyDataset.xsd" Me.EnforceConstraints = true Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema Me.tableTBWMRH_KONFIGURATION = New TBWMRH_KONFIGURATIONDataTable() MyBase.Tables.Add(Me.tableTBWMRH_KONFIGURATION) Me.tableTBWMRH_PROFIL = New TBWMRH_PROFILDataTable() MyBase.Tables.Add(Me.tableTBWMRH_PROFIL) Me.tableTBWMRH_PROFIL_FILE_JOB = New TBWMRH_PROFIL_FILE_JOBDataTable() MyBase.Tables.Add(Me.tableTBWMRH_PROFIL_FILE_JOB) Me.tableTBWMRH_PROFIL_JOB = New TBWMRH_PROFIL_JOBDataTable() MyBase.Tables.Add(Me.tableTBWMRH_PROFIL_JOB) Me.tableTBDD_EMAIL_ACCOUNT = New TBDD_EMAIL_ACCOUNTDataTable() MyBase.Tables.Add(Me.tableTBDD_EMAIL_ACCOUNT) Me.relationFK_FILE_JOB_PROFILID = New Global.System.Data.DataRelation("FK_FILE_JOB_PROFILID", New Global.System.Data.DataColumn() {Me.tableTBWMRH_PROFIL.GUIDColumn}, New Global.System.Data.DataColumn() {Me.tableTBWMRH_PROFIL_FILE_JOB.PROFIL_IDColumn}, false) Me.Relations.Add(Me.relationFK_FILE_JOB_PROFILID) Me.relationFK_TBPROFIL_JOB_PROFILID = New Global.System.Data.DataRelation("FK_TBPROFIL_JOB_PROFILID", New Global.System.Data.DataColumn() {Me.tableTBWMRH_PROFIL.GUIDColumn}, New Global.System.Data.DataColumn() {Me.tableTBWMRH_PROFIL_JOB.PROFIL_IDColumn}, false) Me.Relations.Add(Me.relationFK_TBPROFIL_JOB_PROFILID) End Sub _ Private Function ShouldSerializeTBWMRH_KONFIGURATION() As Boolean Return false End Function _ Private Function ShouldSerializeTBWMRH_PROFIL() As Boolean Return false End Function _ Private Function ShouldSerializeTBWMRH_PROFIL_FILE_JOB() As Boolean Return false End Function _ Private Function ShouldSerializeTBWMRH_PROFIL_JOB() As Boolean Return false End Function _ Private Function ShouldSerializeTBDD_EMAIL_ACCOUNT() As Boolean Return false End Function _ Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs) If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then Me.InitVars End If End Sub _ Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim ds As MyDataset = New MyDataset() Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any.Namespace = ds.Namespace sequence.Items.Add(any) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function _ Public Delegate Sub TBWMRH_KONFIGURATIONRowChangeEventHandler(ByVal sender As Object, ByVal e As TBWMRH_KONFIGURATIONRowChangeEvent) _ Public Delegate Sub TBWMRH_PROFILRowChangeEventHandler(ByVal sender As Object, ByVal e As TBWMRH_PROFILRowChangeEvent) _ Public Delegate Sub TBWMRH_PROFIL_FILE_JOBRowChangeEventHandler(ByVal sender As Object, ByVal e As TBWMRH_PROFIL_FILE_JOBRowChangeEvent) _ Public Delegate Sub TBWMRH_PROFIL_JOBRowChangeEventHandler(ByVal sender As Object, ByVal e As TBWMRH_PROFIL_JOBRowChangeEvent) _ Public Delegate Sub TBDD_EMAIL_ACCOUNTRowChangeEventHandler(ByVal sender As Object, ByVal e As TBDD_EMAIL_ACCOUNTRowChangeEvent) ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class TBWMRH_KONFIGURATIONDataTable Inherits Global.System.Data.TypedTableBase(Of TBWMRH_KONFIGURATIONRow) Private columnGUID As Global.System.Data.DataColumn Private columnWD_LAUFWERK As Global.System.Data.DataColumn Private columnINTERVALL As Global.System.Data.DataColumn Private columnLAST_TICK As Global.System.Data.DataColumn Private columnLOG_ERRORS_ONLY As Global.System.Data.DataColumn Private columnGEAENDERT_WER As Global.System.Data.DataColumn Private columnGEAENDERTWANN As Global.System.Data.DataColumn Private columnPDF_TK_LOCATION As Global.System.Data.DataColumn Private columnPDF_XCHANGE_LOCATION As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "TBWMRH_KONFIGURATION" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property GUIDColumn() As Global.System.Data.DataColumn Get Return Me.columnGUID End Get End Property _ Public ReadOnly Property WD_LAUFWERKColumn() As Global.System.Data.DataColumn Get Return Me.columnWD_LAUFWERK End Get End Property _ Public ReadOnly Property INTERVALLColumn() As Global.System.Data.DataColumn Get Return Me.columnINTERVALL End Get End Property _ Public ReadOnly Property LAST_TICKColumn() As Global.System.Data.DataColumn Get Return Me.columnLAST_TICK End Get End Property _ Public ReadOnly Property LOG_ERRORS_ONLYColumn() As Global.System.Data.DataColumn Get Return Me.columnLOG_ERRORS_ONLY End Get End Property _ Public ReadOnly Property GEAENDERT_WERColumn() As Global.System.Data.DataColumn Get Return Me.columnGEAENDERT_WER End Get End Property _ Public ReadOnly Property GEAENDERTWANNColumn() As Global.System.Data.DataColumn Get Return Me.columnGEAENDERTWANN End Get End Property _ Public ReadOnly Property PDF_TK_LOCATIONColumn() As Global.System.Data.DataColumn Get Return Me.columnPDF_TK_LOCATION End Get End Property _ Public ReadOnly Property PDF_XCHANGE_LOCATIONColumn() As Global.System.Data.DataColumn Get Return Me.columnPDF_XCHANGE_LOCATION End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As TBWMRH_KONFIGURATIONRow Get Return CType(Me.Rows(index),TBWMRH_KONFIGURATIONRow) End Get End Property _ Public Event TBWMRH_KONFIGURATIONRowChanging As TBWMRH_KONFIGURATIONRowChangeEventHandler _ Public Event TBWMRH_KONFIGURATIONRowChanged As TBWMRH_KONFIGURATIONRowChangeEventHandler _ Public Event TBWMRH_KONFIGURATIONRowDeleting As TBWMRH_KONFIGURATIONRowChangeEventHandler _ Public Event TBWMRH_KONFIGURATIONRowDeleted As TBWMRH_KONFIGURATIONRowChangeEventHandler _ Public Overloads Sub AddTBWMRH_KONFIGURATIONRow(ByVal row As TBWMRH_KONFIGURATIONRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddTBWMRH_KONFIGURATIONRow(ByVal GUID As Integer, ByVal WD_LAUFWERK As String, ByVal INTERVALL As Integer, ByVal LAST_TICK As Date, ByVal LOG_ERRORS_ONLY As Boolean, ByVal GEAENDERT_WER As String, ByVal GEAENDERTWANN As Date, ByVal PDF_TK_LOCATION As String, ByVal PDF_XCHANGE_LOCATION As String) As TBWMRH_KONFIGURATIONRow Dim rowTBWMRH_KONFIGURATIONRow As TBWMRH_KONFIGURATIONRow = CType(Me.NewRow,TBWMRH_KONFIGURATIONRow) Dim columnValuesArray() As Object = New Object() {GUID, WD_LAUFWERK, INTERVALL, LAST_TICK, LOG_ERRORS_ONLY, GEAENDERT_WER, GEAENDERTWANN, PDF_TK_LOCATION, PDF_XCHANGE_LOCATION} rowTBWMRH_KONFIGURATIONRow.ItemArray = columnValuesArray Me.Rows.Add(rowTBWMRH_KONFIGURATIONRow) Return rowTBWMRH_KONFIGURATIONRow End Function _ Public Function FindByGUID(ByVal GUID As Integer) As TBWMRH_KONFIGURATIONRow Return CType(Me.Rows.Find(New Object() {GUID}),TBWMRH_KONFIGURATIONRow) End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As TBWMRH_KONFIGURATIONDataTable = CType(MyBase.Clone,TBWMRH_KONFIGURATIONDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New TBWMRH_KONFIGURATIONDataTable() End Function _ Friend Sub InitVars() Me.columnGUID = MyBase.Columns("GUID") Me.columnWD_LAUFWERK = MyBase.Columns("WD_LAUFWERK") Me.columnINTERVALL = MyBase.Columns("INTERVALL") Me.columnLAST_TICK = MyBase.Columns("LAST_TICK") Me.columnLOG_ERRORS_ONLY = MyBase.Columns("LOG_ERRORS_ONLY") Me.columnGEAENDERT_WER = MyBase.Columns("GEAENDERT_WER") Me.columnGEAENDERTWANN = MyBase.Columns("GEAENDERTWANN") Me.columnPDF_TK_LOCATION = MyBase.Columns("PDF_TK_LOCATION") Me.columnPDF_XCHANGE_LOCATION = MyBase.Columns("PDF_XCHANGE_LOCATION") End Sub _ Private Sub InitClass() Me.columnGUID = New Global.System.Data.DataColumn("GUID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGUID) Me.columnWD_LAUFWERK = New Global.System.Data.DataColumn("WD_LAUFWERK", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnWD_LAUFWERK) Me.columnINTERVALL = New Global.System.Data.DataColumn("INTERVALL", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnINTERVALL) Me.columnLAST_TICK = New Global.System.Data.DataColumn("LAST_TICK", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLAST_TICK) Me.columnLOG_ERRORS_ONLY = New Global.System.Data.DataColumn("LOG_ERRORS_ONLY", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLOG_ERRORS_ONLY) Me.columnGEAENDERT_WER = New Global.System.Data.DataColumn("GEAENDERT_WER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGEAENDERT_WER) Me.columnGEAENDERTWANN = New Global.System.Data.DataColumn("GEAENDERTWANN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGEAENDERTWANN) Me.columnPDF_TK_LOCATION = New Global.System.Data.DataColumn("PDF_TK_LOCATION", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPDF_TK_LOCATION) Me.columnPDF_XCHANGE_LOCATION = New Global.System.Data.DataColumn("PDF_XCHANGE_LOCATION", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPDF_XCHANGE_LOCATION) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnGUID}, true)) Me.columnGUID.AllowDBNull = false Me.columnGUID.Unique = true Me.columnWD_LAUFWERK.AllowDBNull = false Me.columnWD_LAUFWERK.MaxLength = 10 Me.columnINTERVALL.AllowDBNull = false Me.columnLAST_TICK.AllowDBNull = false Me.columnLOG_ERRORS_ONLY.AllowDBNull = false Me.columnGEAENDERT_WER.MaxLength = 100 Me.columnPDF_TK_LOCATION.AllowDBNull = false Me.columnPDF_TK_LOCATION.MaxLength = 500 Me.columnPDF_XCHANGE_LOCATION.AllowDBNull = false Me.columnPDF_XCHANGE_LOCATION.MaxLength = 500 End Sub _ Public Function NewTBWMRH_KONFIGURATIONRow() As TBWMRH_KONFIGURATIONRow Return CType(Me.NewRow,TBWMRH_KONFIGURATIONRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New TBWMRH_KONFIGURATIONRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(TBWMRH_KONFIGURATIONRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.TBWMRH_KONFIGURATIONRowChangedEvent) Is Nothing) Then RaiseEvent TBWMRH_KONFIGURATIONRowChanged(Me, New TBWMRH_KONFIGURATIONRowChangeEvent(CType(e.Row,TBWMRH_KONFIGURATIONRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.TBWMRH_KONFIGURATIONRowChangingEvent) Is Nothing) Then RaiseEvent TBWMRH_KONFIGURATIONRowChanging(Me, New TBWMRH_KONFIGURATIONRowChangeEvent(CType(e.Row,TBWMRH_KONFIGURATIONRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.TBWMRH_KONFIGURATIONRowDeletedEvent) Is Nothing) Then RaiseEvent TBWMRH_KONFIGURATIONRowDeleted(Me, New TBWMRH_KONFIGURATIONRowChangeEvent(CType(e.Row,TBWMRH_KONFIGURATIONRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.TBWMRH_KONFIGURATIONRowDeletingEvent) Is Nothing) Then RaiseEvent TBWMRH_KONFIGURATIONRowDeleting(Me, New TBWMRH_KONFIGURATIONRowChangeEvent(CType(e.Row,TBWMRH_KONFIGURATIONRow), e.Action)) End If End Sub _ Public Sub RemoveTBWMRH_KONFIGURATIONRow(ByVal row As TBWMRH_KONFIGURATIONRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As MyDataset = New MyDataset() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "TBWMRH_KONFIGURATIONDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class TBWMRH_PROFILDataTable Inherits Global.System.Data.TypedTableBase(Of TBWMRH_PROFILRow) Private columnGUID As Global.System.Data.DataColumn Private columnProfilname As Global.System.Data.DataColumn Private columnAktiv As Global.System.Data.DataColumn Private columnObjekttyp As Global.System.Data.DataColumn Private columnWindreamSuche As Global.System.Data.DataColumn Private columnDay As Global.System.Data.DataColumn Private columnRun As Global.System.Data.DataColumn Private columnLetzter_Durchlauf As Global.System.Data.DataColumn Private columnRunning As Global.System.Data.DataColumn Private columnReihenfolge As Global.System.Data.DataColumn Private columnERSTELLTWER As Global.System.Data.DataColumn Private columnERSTELLTWANN As Global.System.Data.DataColumn Private columnGEAENDERTWER As Global.System.Data.DataColumn Private columnGEAENDERTWANN As Global.System.Data.DataColumn Private Shared columnLetzter_Durchlauf_defaultValue As Date = Date.Parse("1900-01-01T00:00:00") _ Public Sub New() MyBase.New Me.TableName = "TBWMRH_PROFIL" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property GUIDColumn() As Global.System.Data.DataColumn Get Return Me.columnGUID End Get End Property _ Public ReadOnly Property ProfilnameColumn() As Global.System.Data.DataColumn Get Return Me.columnProfilname End Get End Property _ Public ReadOnly Property AktivColumn() As Global.System.Data.DataColumn Get Return Me.columnAktiv End Get End Property _ Public ReadOnly Property ObjekttypColumn() As Global.System.Data.DataColumn Get Return Me.columnObjekttyp End Get End Property _ Public ReadOnly Property WindreamSucheColumn() As Global.System.Data.DataColumn Get Return Me.columnWindreamSuche End Get End Property _ Public ReadOnly Property DayColumn() As Global.System.Data.DataColumn Get Return Me.columnDay End Get End Property _ Public ReadOnly Property RunColumn() As Global.System.Data.DataColumn Get Return Me.columnRun End Get End Property _ Public ReadOnly Property Letzter_DurchlaufColumn() As Global.System.Data.DataColumn Get Return Me.columnLetzter_Durchlauf End Get End Property _ Public ReadOnly Property RunningColumn() As Global.System.Data.DataColumn Get Return Me.columnRunning End Get End Property _ Public ReadOnly Property ReihenfolgeColumn() As Global.System.Data.DataColumn Get Return Me.columnReihenfolge End Get End Property _ Public ReadOnly Property ERSTELLTWERColumn() As Global.System.Data.DataColumn Get Return Me.columnERSTELLTWER End Get End Property _ Public ReadOnly Property ERSTELLTWANNColumn() As Global.System.Data.DataColumn Get Return Me.columnERSTELLTWANN End Get End Property _ Public ReadOnly Property GEAENDERTWERColumn() As Global.System.Data.DataColumn Get Return Me.columnGEAENDERTWER End Get End Property _ Public ReadOnly Property GEAENDERTWANNColumn() As Global.System.Data.DataColumn Get Return Me.columnGEAENDERTWANN End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As TBWMRH_PROFILRow Get Return CType(Me.Rows(index),TBWMRH_PROFILRow) End Get End Property _ Public Event TBWMRH_PROFILRowChanging As TBWMRH_PROFILRowChangeEventHandler _ Public Event TBWMRH_PROFILRowChanged As TBWMRH_PROFILRowChangeEventHandler _ Public Event TBWMRH_PROFILRowDeleting As TBWMRH_PROFILRowChangeEventHandler _ Public Event TBWMRH_PROFILRowDeleted As TBWMRH_PROFILRowChangeEventHandler _ Public Overloads Sub AddTBWMRH_PROFILRow(ByVal row As TBWMRH_PROFILRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddTBWMRH_PROFILRow(ByVal Profilname As String, ByVal Aktiv As Boolean, ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Date, ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal ERSTELLTWER As String, ByVal ERSTELLTWANN As Date, ByVal GEAENDERTWER As String, ByVal GEAENDERTWANN As Date) As TBWMRH_PROFILRow Dim rowTBWMRH_PROFILRow As TBWMRH_PROFILRow = CType(Me.NewRow,TBWMRH_PROFILRow) Dim columnValuesArray() As Object = New Object() {Nothing, Profilname, Aktiv, Objekttyp, WindreamSuche, Day, Run, Letzter_Durchlauf, Running, Reihenfolge, ERSTELLTWER, ERSTELLTWANN, GEAENDERTWER, GEAENDERTWANN} rowTBWMRH_PROFILRow.ItemArray = columnValuesArray Me.Rows.Add(rowTBWMRH_PROFILRow) Return rowTBWMRH_PROFILRow End Function _ Public Function FindByGUID(ByVal GUID As Integer) As TBWMRH_PROFILRow Return CType(Me.Rows.Find(New Object() {GUID}),TBWMRH_PROFILRow) End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As TBWMRH_PROFILDataTable = CType(MyBase.Clone,TBWMRH_PROFILDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New TBWMRH_PROFILDataTable() End Function _ Friend Sub InitVars() Me.columnGUID = MyBase.Columns("GUID") Me.columnProfilname = MyBase.Columns("Profilname") Me.columnAktiv = MyBase.Columns("Aktiv") Me.columnObjekttyp = MyBase.Columns("Objekttyp") Me.columnWindreamSuche = MyBase.Columns("WindreamSuche") Me.columnDay = MyBase.Columns("Day") Me.columnRun = MyBase.Columns("Run") Me.columnLetzter_Durchlauf = MyBase.Columns("Letzter_Durchlauf") Me.columnRunning = MyBase.Columns("Running") Me.columnReihenfolge = MyBase.Columns("Reihenfolge") Me.columnERSTELLTWER = MyBase.Columns("ERSTELLTWER") Me.columnERSTELLTWANN = MyBase.Columns("ERSTELLTWANN") Me.columnGEAENDERTWER = MyBase.Columns("GEAENDERTWER") Me.columnGEAENDERTWANN = MyBase.Columns("GEAENDERTWANN") End Sub _ Private Sub InitClass() Me.columnGUID = New Global.System.Data.DataColumn("GUID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGUID) Me.columnProfilname = New Global.System.Data.DataColumn("Profilname", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnProfilname) Me.columnAktiv = New Global.System.Data.DataColumn("Aktiv", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAktiv) Me.columnObjekttyp = New Global.System.Data.DataColumn("Objekttyp", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnObjekttyp) Me.columnWindreamSuche = New Global.System.Data.DataColumn("WindreamSuche", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnWindreamSuche) Me.columnDay = New Global.System.Data.DataColumn("Day", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDay) Me.columnRun = New Global.System.Data.DataColumn("Run", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRun) Me.columnLetzter_Durchlauf = New Global.System.Data.DataColumn("Letzter_Durchlauf", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLetzter_Durchlauf) Me.columnRunning = New Global.System.Data.DataColumn("Running", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRunning) Me.columnReihenfolge = New Global.System.Data.DataColumn("Reihenfolge", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnReihenfolge) Me.columnERSTELLTWER = New Global.System.Data.DataColumn("ERSTELLTWER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnERSTELLTWER) Me.columnERSTELLTWANN = New Global.System.Data.DataColumn("ERSTELLTWANN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnERSTELLTWANN) Me.columnGEAENDERTWER = New Global.System.Data.DataColumn("GEAENDERTWER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGEAENDERTWER) Me.columnGEAENDERTWANN = New Global.System.Data.DataColumn("GEAENDERTWANN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGEAENDERTWANN) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnGUID}, true)) Me.columnGUID.AutoIncrement = true Me.columnGUID.AutoIncrementSeed = 1 Me.columnGUID.AllowDBNull = false Me.columnGUID.ReadOnly = true Me.columnGUID.Unique = true Me.columnProfilname.AllowDBNull = false Me.columnProfilname.MaxLength = 100 Me.columnAktiv.DefaultValue = CType(true,Boolean) Me.columnObjekttyp.AllowDBNull = false Me.columnObjekttyp.MaxLength = 100 Me.columnWindreamSuche.MaxLength = 500 Me.columnDay.AllowDBNull = false Me.columnDay.MaxLength = 100 Me.columnRun.AllowDBNull = false Me.columnRun.DefaultValue = CType("",String) Me.columnRun.MaxLength = 100 Me.columnLetzter_Durchlauf.AllowDBNull = false Me.columnLetzter_Durchlauf.DefaultValue = CType(TBWMRH_PROFILDataTable.columnLetzter_Durchlauf_defaultValue,Date) Me.columnRunning.AllowDBNull = false Me.columnRunning.DefaultValue = CType(false,Boolean) Me.columnReihenfolge.AllowDBNull = false Me.columnReihenfolge.DefaultValue = CType(1,Integer) Me.columnERSTELLTWER.MaxLength = 50 Me.columnGEAENDERTWER.MaxLength = 50 End Sub _ Public Function NewTBWMRH_PROFILRow() As TBWMRH_PROFILRow Return CType(Me.NewRow,TBWMRH_PROFILRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New TBWMRH_PROFILRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(TBWMRH_PROFILRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.TBWMRH_PROFILRowChangedEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFILRowChanged(Me, New TBWMRH_PROFILRowChangeEvent(CType(e.Row,TBWMRH_PROFILRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.TBWMRH_PROFILRowChangingEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFILRowChanging(Me, New TBWMRH_PROFILRowChangeEvent(CType(e.Row,TBWMRH_PROFILRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.TBWMRH_PROFILRowDeletedEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFILRowDeleted(Me, New TBWMRH_PROFILRowChangeEvent(CType(e.Row,TBWMRH_PROFILRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.TBWMRH_PROFILRowDeletingEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFILRowDeleting(Me, New TBWMRH_PROFILRowChangeEvent(CType(e.Row,TBWMRH_PROFILRow), e.Action)) End If End Sub _ Public Sub RemoveTBWMRH_PROFILRow(ByVal row As TBWMRH_PROFILRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As MyDataset = New MyDataset() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "TBWMRH_PROFILDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class TBWMRH_PROFIL_FILE_JOBDataTable Inherits Global.System.Data.TypedTableBase(Of TBWMRH_PROFIL_FILE_JOBRow) Private columnGUID As Global.System.Data.DataColumn Private columnPROFIL_ID As Global.System.Data.DataColumn Private columnTYP As Global.System.Data.DataColumn Private columnSTRING1 As Global.System.Data.DataColumn Private columnSTRING2 As Global.System.Data.DataColumn Private columnSTRING3 As Global.System.Data.DataColumn Private columnSTRING4 As Global.System.Data.DataColumn Private columnBOOL1 As Global.System.Data.DataColumn Private columnBOOL2 As Global.System.Data.DataColumn Private columnBOOL3 As Global.System.Data.DataColumn Private columnBOOL4 As Global.System.Data.DataColumn Private columnAKTIV As Global.System.Data.DataColumn Private columnREIHENFOLGE As Global.System.Data.DataColumn Private columnERSTELLTWER As Global.System.Data.DataColumn Private columnERSTELLTWANN As Global.System.Data.DataColumn Private columnGEAENDERTWER As Global.System.Data.DataColumn Private columnGEAENDERTWANN As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "TBWMRH_PROFIL_FILE_JOB" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property GUIDColumn() As Global.System.Data.DataColumn Get Return Me.columnGUID End Get End Property _ Public ReadOnly Property PROFIL_IDColumn() As Global.System.Data.DataColumn Get Return Me.columnPROFIL_ID End Get End Property _ Public ReadOnly Property TYPColumn() As Global.System.Data.DataColumn Get Return Me.columnTYP End Get End Property _ Public ReadOnly Property STRING1Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING1 End Get End Property _ Public ReadOnly Property STRING2Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING2 End Get End Property _ Public ReadOnly Property STRING3Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING3 End Get End Property _ Public ReadOnly Property STRING4Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING4 End Get End Property _ Public ReadOnly Property BOOL1Column() As Global.System.Data.DataColumn Get Return Me.columnBOOL1 End Get End Property _ Public ReadOnly Property BOOL2Column() As Global.System.Data.DataColumn Get Return Me.columnBOOL2 End Get End Property _ Public ReadOnly Property BOOL3Column() As Global.System.Data.DataColumn Get Return Me.columnBOOL3 End Get End Property _ Public ReadOnly Property BOOL4Column() As Global.System.Data.DataColumn Get Return Me.columnBOOL4 End Get End Property _ Public ReadOnly Property AKTIVColumn() As Global.System.Data.DataColumn Get Return Me.columnAKTIV End Get End Property _ Public ReadOnly Property REIHENFOLGEColumn() As Global.System.Data.DataColumn Get Return Me.columnREIHENFOLGE End Get End Property _ Public ReadOnly Property ERSTELLTWERColumn() As Global.System.Data.DataColumn Get Return Me.columnERSTELLTWER End Get End Property _ Public ReadOnly Property ERSTELLTWANNColumn() As Global.System.Data.DataColumn Get Return Me.columnERSTELLTWANN End Get End Property _ Public ReadOnly Property GEAENDERTWERColumn() As Global.System.Data.DataColumn Get Return Me.columnGEAENDERTWER End Get End Property _ Public ReadOnly Property GEAENDERTWANNColumn() As Global.System.Data.DataColumn Get Return Me.columnGEAENDERTWANN End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As TBWMRH_PROFIL_FILE_JOBRow Get Return CType(Me.Rows(index),TBWMRH_PROFIL_FILE_JOBRow) End Get End Property _ Public Event TBWMRH_PROFIL_FILE_JOBRowChanging As TBWMRH_PROFIL_FILE_JOBRowChangeEventHandler _ Public Event TBWMRH_PROFIL_FILE_JOBRowChanged As TBWMRH_PROFIL_FILE_JOBRowChangeEventHandler _ Public Event TBWMRH_PROFIL_FILE_JOBRowDeleting As TBWMRH_PROFIL_FILE_JOBRowChangeEventHandler _ Public Event TBWMRH_PROFIL_FILE_JOBRowDeleted As TBWMRH_PROFIL_FILE_JOBRowChangeEventHandler _ Public Overloads Sub AddTBWMRH_PROFIL_FILE_JOBRow(ByVal row As TBWMRH_PROFIL_FILE_JOBRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddTBWMRH_PROFIL_FILE_JOBRow( _ ByVal parentTBWMRH_PROFILRowByFK_FILE_JOB_PROFILID As TBWMRH_PROFILRow, _ ByVal TYP As String, _ ByVal STRING1 As String, _ ByVal STRING2 As String, _ ByVal STRING3 As String, _ ByVal STRING4 As String, _ ByVal BOOL1 As Boolean, _ ByVal BOOL2 As Boolean, _ ByVal BOOL3 As Boolean, _ ByVal BOOL4 As Boolean, _ ByVal AKTIV As Boolean, _ ByVal REIHENFOLGE As Integer, _ ByVal ERSTELLTWER As String, _ ByVal ERSTELLTWANN As Date, _ ByVal GEAENDERTWER As String, _ ByVal GEAENDERTWANN As Date) As TBWMRH_PROFIL_FILE_JOBRow Dim rowTBWMRH_PROFIL_FILE_JOBRow As TBWMRH_PROFIL_FILE_JOBRow = CType(Me.NewRow,TBWMRH_PROFIL_FILE_JOBRow) Dim columnValuesArray() As Object = New Object() {Nothing, Nothing, TYP, STRING1, STRING2, STRING3, STRING4, BOOL1, BOOL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE, ERSTELLTWER, ERSTELLTWANN, GEAENDERTWER, GEAENDERTWANN} If (Not (parentTBWMRH_PROFILRowByFK_FILE_JOB_PROFILID) Is Nothing) Then columnValuesArray(1) = parentTBWMRH_PROFILRowByFK_FILE_JOB_PROFILID(0) End If rowTBWMRH_PROFIL_FILE_JOBRow.ItemArray = columnValuesArray Me.Rows.Add(rowTBWMRH_PROFIL_FILE_JOBRow) Return rowTBWMRH_PROFIL_FILE_JOBRow End Function _ Public Function FindByGUID(ByVal GUID As Integer) As TBWMRH_PROFIL_FILE_JOBRow Return CType(Me.Rows.Find(New Object() {GUID}),TBWMRH_PROFIL_FILE_JOBRow) End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As TBWMRH_PROFIL_FILE_JOBDataTable = CType(MyBase.Clone,TBWMRH_PROFIL_FILE_JOBDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New TBWMRH_PROFIL_FILE_JOBDataTable() End Function _ Friend Sub InitVars() Me.columnGUID = MyBase.Columns("GUID") Me.columnPROFIL_ID = MyBase.Columns("PROFIL_ID") Me.columnTYP = MyBase.Columns("TYP") Me.columnSTRING1 = MyBase.Columns("STRING1") Me.columnSTRING2 = MyBase.Columns("STRING2") Me.columnSTRING3 = MyBase.Columns("STRING3") Me.columnSTRING4 = MyBase.Columns("STRING4") Me.columnBOOL1 = MyBase.Columns("BOOL1") Me.columnBOOL2 = MyBase.Columns("BOOL2") Me.columnBOOL3 = MyBase.Columns("BOOL3") Me.columnBOOL4 = MyBase.Columns("BOOL4") Me.columnAKTIV = MyBase.Columns("AKTIV") Me.columnREIHENFOLGE = MyBase.Columns("REIHENFOLGE") Me.columnERSTELLTWER = MyBase.Columns("ERSTELLTWER") Me.columnERSTELLTWANN = MyBase.Columns("ERSTELLTWANN") Me.columnGEAENDERTWER = MyBase.Columns("GEAENDERTWER") Me.columnGEAENDERTWANN = MyBase.Columns("GEAENDERTWANN") End Sub _ Private Sub InitClass() Me.columnGUID = New Global.System.Data.DataColumn("GUID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGUID) Me.columnPROFIL_ID = New Global.System.Data.DataColumn("PROFIL_ID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPROFIL_ID) Me.columnTYP = New Global.System.Data.DataColumn("TYP", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTYP) Me.columnSTRING1 = New Global.System.Data.DataColumn("STRING1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING1) Me.columnSTRING2 = New Global.System.Data.DataColumn("STRING2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING2) Me.columnSTRING3 = New Global.System.Data.DataColumn("STRING3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING3) Me.columnSTRING4 = New Global.System.Data.DataColumn("STRING4", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING4) Me.columnBOOL1 = New Global.System.Data.DataColumn("BOOL1", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnBOOL1) Me.columnBOOL2 = New Global.System.Data.DataColumn("BOOL2", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnBOOL2) Me.columnBOOL3 = New Global.System.Data.DataColumn("BOOL3", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnBOOL3) Me.columnBOOL4 = New Global.System.Data.DataColumn("BOOL4", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnBOOL4) Me.columnAKTIV = New Global.System.Data.DataColumn("AKTIV", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAKTIV) Me.columnREIHENFOLGE = New Global.System.Data.DataColumn("REIHENFOLGE", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnREIHENFOLGE) Me.columnERSTELLTWER = New Global.System.Data.DataColumn("ERSTELLTWER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnERSTELLTWER) Me.columnERSTELLTWANN = New Global.System.Data.DataColumn("ERSTELLTWANN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnERSTELLTWANN) Me.columnGEAENDERTWER = New Global.System.Data.DataColumn("GEAENDERTWER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGEAENDERTWER) Me.columnGEAENDERTWANN = New Global.System.Data.DataColumn("GEAENDERTWANN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGEAENDERTWANN) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnGUID}, true)) Me.columnGUID.AutoIncrement = true Me.columnGUID.AutoIncrementSeed = 1 Me.columnGUID.AllowDBNull = false Me.columnGUID.ReadOnly = true Me.columnGUID.Unique = true Me.columnPROFIL_ID.AllowDBNull = false Me.columnTYP.AllowDBNull = false Me.columnTYP.MaxLength = 50 Me.columnSTRING1.MaxLength = 2147483647 Me.columnSTRING2.MaxLength = 2147483647 Me.columnSTRING3.MaxLength = 2147483647 Me.columnSTRING4.MaxLength = 2147483647 Me.columnBOOL1.AllowDBNull = false Me.columnBOOL1.DefaultValue = CType(true,Boolean) Me.columnBOOL2.AllowDBNull = false Me.columnBOOL2.DefaultValue = CType(false,Boolean) Me.columnBOOL3.AllowDBNull = false Me.columnBOOL3.DefaultValue = CType(false,Boolean) Me.columnBOOL4.AllowDBNull = false Me.columnBOOL4.DefaultValue = CType(false,Boolean) Me.columnAKTIV.AllowDBNull = false Me.columnAKTIV.DefaultValue = CType(true,Boolean) Me.columnREIHENFOLGE.AllowDBNull = false Me.columnREIHENFOLGE.DefaultValue = CType(1,Integer) Me.columnERSTELLTWER.MaxLength = 50 Me.columnGEAENDERTWER.MaxLength = 50 End Sub _ Public Function NewTBWMRH_PROFIL_FILE_JOBRow() As TBWMRH_PROFIL_FILE_JOBRow Return CType(Me.NewRow,TBWMRH_PROFIL_FILE_JOBRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New TBWMRH_PROFIL_FILE_JOBRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(TBWMRH_PROFIL_FILE_JOBRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.TBWMRH_PROFIL_FILE_JOBRowChangedEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFIL_FILE_JOBRowChanged(Me, New TBWMRH_PROFIL_FILE_JOBRowChangeEvent(CType(e.Row,TBWMRH_PROFIL_FILE_JOBRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.TBWMRH_PROFIL_FILE_JOBRowChangingEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFIL_FILE_JOBRowChanging(Me, New TBWMRH_PROFIL_FILE_JOBRowChangeEvent(CType(e.Row,TBWMRH_PROFIL_FILE_JOBRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.TBWMRH_PROFIL_FILE_JOBRowDeletedEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFIL_FILE_JOBRowDeleted(Me, New TBWMRH_PROFIL_FILE_JOBRowChangeEvent(CType(e.Row,TBWMRH_PROFIL_FILE_JOBRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.TBWMRH_PROFIL_FILE_JOBRowDeletingEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFIL_FILE_JOBRowDeleting(Me, New TBWMRH_PROFIL_FILE_JOBRowChangeEvent(CType(e.Row,TBWMRH_PROFIL_FILE_JOBRow), e.Action)) End If End Sub _ Public Sub RemoveTBWMRH_PROFIL_FILE_JOBRow(ByVal row As TBWMRH_PROFIL_FILE_JOBRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As MyDataset = New MyDataset() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "TBWMRH_PROFIL_FILE_JOBDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class TBWMRH_PROFIL_JOBDataTable Inherits Global.System.Data.TypedTableBase(Of TBWMRH_PROFIL_JOBRow) Private columnGUID As Global.System.Data.DataColumn Private columnPROFIL_ID As Global.System.Data.DataColumn Private columnJOB_TYP As Global.System.Data.DataColumn Private columnSTRING1 As Global.System.Data.DataColumn Private columnSTRING2 As Global.System.Data.DataColumn Private columnSTRING3 As Global.System.Data.DataColumn Private columnSTRING4 As Global.System.Data.DataColumn Private columnBOOL1 As Global.System.Data.DataColumn Private columnBOOL2 As Global.System.Data.DataColumn Private columnBOOL3 As Global.System.Data.DataColumn Private columnBOOL4 As Global.System.Data.DataColumn Private columnAKTIV As Global.System.Data.DataColumn Private columnREIHENFOLGE As Global.System.Data.DataColumn Private columnERSTELLTWER As Global.System.Data.DataColumn Private columnERSTELLTWANN As Global.System.Data.DataColumn Private columnGEAENDERTWER As Global.System.Data.DataColumn Private columnGEAENDERTWANN As Global.System.Data.DataColumn Private columnSTRING5 As Global.System.Data.DataColumn Private columnSTRING6 As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "TBWMRH_PROFIL_JOB" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property GUIDColumn() As Global.System.Data.DataColumn Get Return Me.columnGUID End Get End Property _ Public ReadOnly Property PROFIL_IDColumn() As Global.System.Data.DataColumn Get Return Me.columnPROFIL_ID End Get End Property _ Public ReadOnly Property JOB_TYPColumn() As Global.System.Data.DataColumn Get Return Me.columnJOB_TYP End Get End Property _ Public ReadOnly Property STRING1Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING1 End Get End Property _ Public ReadOnly Property STRING2Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING2 End Get End Property _ Public ReadOnly Property STRING3Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING3 End Get End Property _ Public ReadOnly Property STRING4Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING4 End Get End Property _ Public ReadOnly Property BOOL1Column() As Global.System.Data.DataColumn Get Return Me.columnBOOL1 End Get End Property _ Public ReadOnly Property BOOL2Column() As Global.System.Data.DataColumn Get Return Me.columnBOOL2 End Get End Property _ Public ReadOnly Property BOOL3Column() As Global.System.Data.DataColumn Get Return Me.columnBOOL3 End Get End Property _ Public ReadOnly Property BOOL4Column() As Global.System.Data.DataColumn Get Return Me.columnBOOL4 End Get End Property _ Public ReadOnly Property AKTIVColumn() As Global.System.Data.DataColumn Get Return Me.columnAKTIV End Get End Property _ Public ReadOnly Property REIHENFOLGEColumn() As Global.System.Data.DataColumn Get Return Me.columnREIHENFOLGE End Get End Property _ Public ReadOnly Property ERSTELLTWERColumn() As Global.System.Data.DataColumn Get Return Me.columnERSTELLTWER End Get End Property _ Public ReadOnly Property ERSTELLTWANNColumn() As Global.System.Data.DataColumn Get Return Me.columnERSTELLTWANN End Get End Property _ Public ReadOnly Property GEAENDERTWERColumn() As Global.System.Data.DataColumn Get Return Me.columnGEAENDERTWER End Get End Property _ Public ReadOnly Property GEAENDERTWANNColumn() As Global.System.Data.DataColumn Get Return Me.columnGEAENDERTWANN End Get End Property _ Public ReadOnly Property STRING5Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING5 End Get End Property _ Public ReadOnly Property STRING6Column() As Global.System.Data.DataColumn Get Return Me.columnSTRING6 End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As TBWMRH_PROFIL_JOBRow Get Return CType(Me.Rows(index),TBWMRH_PROFIL_JOBRow) End Get End Property _ Public Event TBWMRH_PROFIL_JOBRowChanging As TBWMRH_PROFIL_JOBRowChangeEventHandler _ Public Event TBWMRH_PROFIL_JOBRowChanged As TBWMRH_PROFIL_JOBRowChangeEventHandler _ Public Event TBWMRH_PROFIL_JOBRowDeleting As TBWMRH_PROFIL_JOBRowChangeEventHandler _ Public Event TBWMRH_PROFIL_JOBRowDeleted As TBWMRH_PROFIL_JOBRowChangeEventHandler _ Public Overloads Sub AddTBWMRH_PROFIL_JOBRow(ByVal row As TBWMRH_PROFIL_JOBRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddTBWMRH_PROFIL_JOBRow( _ ByVal parentTBWMRH_PROFILRowByFK_TBPROFIL_JOB_PROFILID As TBWMRH_PROFILRow, _ ByVal JOB_TYP As String, _ ByVal STRING1 As String, _ ByVal STRING2 As String, _ ByVal STRING3 As String, _ ByVal STRING4 As String, _ ByVal BOOL1 As Boolean, _ ByVal BOOL2 As Boolean, _ ByVal BOOL3 As Boolean, _ ByVal BOOL4 As Boolean, _ ByVal AKTIV As Boolean, _ ByVal REIHENFOLGE As Integer, _ ByVal ERSTELLTWER As String, _ ByVal ERSTELLTWANN As Date, _ ByVal GEAENDERTWER As String, _ ByVal GEAENDERTWANN As Date, _ ByVal STRING5 As String, _ ByVal STRING6 As String) As TBWMRH_PROFIL_JOBRow Dim rowTBWMRH_PROFIL_JOBRow As TBWMRH_PROFIL_JOBRow = CType(Me.NewRow,TBWMRH_PROFIL_JOBRow) Dim columnValuesArray() As Object = New Object() {Nothing, Nothing, JOB_TYP, STRING1, STRING2, STRING3, STRING4, BOOL1, BOOL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE, ERSTELLTWER, ERSTELLTWANN, GEAENDERTWER, GEAENDERTWANN, STRING5, STRING6} If (Not (parentTBWMRH_PROFILRowByFK_TBPROFIL_JOB_PROFILID) Is Nothing) Then columnValuesArray(1) = parentTBWMRH_PROFILRowByFK_TBPROFIL_JOB_PROFILID(0) End If rowTBWMRH_PROFIL_JOBRow.ItemArray = columnValuesArray Me.Rows.Add(rowTBWMRH_PROFIL_JOBRow) Return rowTBWMRH_PROFIL_JOBRow End Function _ Public Function FindByGUID(ByVal GUID As Integer) As TBWMRH_PROFIL_JOBRow Return CType(Me.Rows.Find(New Object() {GUID}),TBWMRH_PROFIL_JOBRow) End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As TBWMRH_PROFIL_JOBDataTable = CType(MyBase.Clone,TBWMRH_PROFIL_JOBDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New TBWMRH_PROFIL_JOBDataTable() End Function _ Friend Sub InitVars() Me.columnGUID = MyBase.Columns("GUID") Me.columnPROFIL_ID = MyBase.Columns("PROFIL_ID") Me.columnJOB_TYP = MyBase.Columns("JOB_TYP") Me.columnSTRING1 = MyBase.Columns("STRING1") Me.columnSTRING2 = MyBase.Columns("STRING2") Me.columnSTRING3 = MyBase.Columns("STRING3") Me.columnSTRING4 = MyBase.Columns("STRING4") Me.columnBOOL1 = MyBase.Columns("BOOL1") Me.columnBOOL2 = MyBase.Columns("BOOL2") Me.columnBOOL3 = MyBase.Columns("BOOL3") Me.columnBOOL4 = MyBase.Columns("BOOL4") Me.columnAKTIV = MyBase.Columns("AKTIV") Me.columnREIHENFOLGE = MyBase.Columns("REIHENFOLGE") Me.columnERSTELLTWER = MyBase.Columns("ERSTELLTWER") Me.columnERSTELLTWANN = MyBase.Columns("ERSTELLTWANN") Me.columnGEAENDERTWER = MyBase.Columns("GEAENDERTWER") Me.columnGEAENDERTWANN = MyBase.Columns("GEAENDERTWANN") Me.columnSTRING5 = MyBase.Columns("STRING5") Me.columnSTRING6 = MyBase.Columns("STRING6") End Sub _ Private Sub InitClass() Me.columnGUID = New Global.System.Data.DataColumn("GUID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGUID) Me.columnPROFIL_ID = New Global.System.Data.DataColumn("PROFIL_ID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPROFIL_ID) Me.columnJOB_TYP = New Global.System.Data.DataColumn("JOB_TYP", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnJOB_TYP) Me.columnSTRING1 = New Global.System.Data.DataColumn("STRING1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING1) Me.columnSTRING2 = New Global.System.Data.DataColumn("STRING2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING2) Me.columnSTRING3 = New Global.System.Data.DataColumn("STRING3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING3) Me.columnSTRING4 = New Global.System.Data.DataColumn("STRING4", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING4) Me.columnBOOL1 = New Global.System.Data.DataColumn("BOOL1", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnBOOL1) Me.columnBOOL2 = New Global.System.Data.DataColumn("BOOL2", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnBOOL2) Me.columnBOOL3 = New Global.System.Data.DataColumn("BOOL3", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnBOOL3) Me.columnBOOL4 = New Global.System.Data.DataColumn("BOOL4", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnBOOL4) Me.columnAKTIV = New Global.System.Data.DataColumn("AKTIV", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAKTIV) Me.columnREIHENFOLGE = New Global.System.Data.DataColumn("REIHENFOLGE", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnREIHENFOLGE) Me.columnERSTELLTWER = New Global.System.Data.DataColumn("ERSTELLTWER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnERSTELLTWER) Me.columnERSTELLTWANN = New Global.System.Data.DataColumn("ERSTELLTWANN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnERSTELLTWANN) Me.columnGEAENDERTWER = New Global.System.Data.DataColumn("GEAENDERTWER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGEAENDERTWER) Me.columnGEAENDERTWANN = New Global.System.Data.DataColumn("GEAENDERTWANN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGEAENDERTWANN) Me.columnSTRING5 = New Global.System.Data.DataColumn("STRING5", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING5) Me.columnSTRING6 = New Global.System.Data.DataColumn("STRING6", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSTRING6) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnGUID}, true)) Me.columnGUID.AutoIncrement = true Me.columnGUID.AutoIncrementSeed = 1 Me.columnGUID.AllowDBNull = false Me.columnGUID.ReadOnly = true Me.columnGUID.Unique = true Me.columnJOB_TYP.AllowDBNull = false Me.columnJOB_TYP.MaxLength = 50 Me.columnSTRING1.MaxLength = 2147483647 Me.columnSTRING2.MaxLength = 2147483647 Me.columnSTRING3.MaxLength = 2147483647 Me.columnSTRING4.MaxLength = 2147483647 Me.columnBOOL1.DefaultValue = CType(false,Boolean) Me.columnBOOL2.DefaultValue = CType(false,Boolean) Me.columnBOOL3.DefaultValue = CType(false,Boolean) Me.columnBOOL4.DefaultValue = CType(false,Boolean) Me.columnAKTIV.DefaultValue = CType(true,Boolean) Me.columnREIHENFOLGE.AllowDBNull = false Me.columnREIHENFOLGE.DefaultValue = CType(1,Integer) Me.columnERSTELLTWER.MaxLength = 50 Me.columnGEAENDERTWER.MaxLength = 50 Me.columnSTRING5.MaxLength = 2147483647 Me.columnSTRING6.MaxLength = 2147483647 End Sub _ Public Function NewTBWMRH_PROFIL_JOBRow() As TBWMRH_PROFIL_JOBRow Return CType(Me.NewRow,TBWMRH_PROFIL_JOBRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New TBWMRH_PROFIL_JOBRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(TBWMRH_PROFIL_JOBRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.TBWMRH_PROFIL_JOBRowChangedEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFIL_JOBRowChanged(Me, New TBWMRH_PROFIL_JOBRowChangeEvent(CType(e.Row,TBWMRH_PROFIL_JOBRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.TBWMRH_PROFIL_JOBRowChangingEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFIL_JOBRowChanging(Me, New TBWMRH_PROFIL_JOBRowChangeEvent(CType(e.Row,TBWMRH_PROFIL_JOBRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.TBWMRH_PROFIL_JOBRowDeletedEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFIL_JOBRowDeleted(Me, New TBWMRH_PROFIL_JOBRowChangeEvent(CType(e.Row,TBWMRH_PROFIL_JOBRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.TBWMRH_PROFIL_JOBRowDeletingEvent) Is Nothing) Then RaiseEvent TBWMRH_PROFIL_JOBRowDeleting(Me, New TBWMRH_PROFIL_JOBRowChangeEvent(CType(e.Row,TBWMRH_PROFIL_JOBRow), e.Action)) End If End Sub _ Public Sub RemoveTBWMRH_PROFIL_JOBRow(ByVal row As TBWMRH_PROFIL_JOBRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As MyDataset = New MyDataset() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "TBWMRH_PROFIL_JOBDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class TBDD_EMAIL_ACCOUNTDataTable Inherits Global.System.Data.TypedTableBase(Of TBDD_EMAIL_ACCOUNTRow) Private columnGUID As Global.System.Data.DataColumn Private columnNAME As Global.System.Data.DataColumn Private columnEMAIL_FROM As Global.System.Data.DataColumn Private columnEMAIL_SMTP As Global.System.Data.DataColumn Private columnEMAIL_USER As Global.System.Data.DataColumn Private columnEMAIL_PW As Global.System.Data.DataColumn Private columnPORT As Global.System.Data.DataColumn Private columnACTIVE As Global.System.Data.DataColumn Private columnADDED_WHO As Global.System.Data.DataColumn Private columnADDED_WHEN As Global.System.Data.DataColumn Private columnCHANGED_WHO As Global.System.Data.DataColumn Private columnCHANGED_WHEN As Global.System.Data.DataColumn Private columnSSL_AUTH As Global.System.Data.DataColumn Private columnAUTH_TYPE As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "TBDD_EMAIL_ACCOUNT" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property GUIDColumn() As Global.System.Data.DataColumn Get Return Me.columnGUID End Get End Property _ Public ReadOnly Property NAMEColumn() As Global.System.Data.DataColumn Get Return Me.columnNAME End Get End Property _ Public ReadOnly Property EMAIL_FROMColumn() As Global.System.Data.DataColumn Get Return Me.columnEMAIL_FROM End Get End Property _ Public ReadOnly Property EMAIL_SMTPColumn() As Global.System.Data.DataColumn Get Return Me.columnEMAIL_SMTP End Get End Property _ Public ReadOnly Property EMAIL_USERColumn() As Global.System.Data.DataColumn Get Return Me.columnEMAIL_USER End Get End Property _ Public ReadOnly Property EMAIL_PWColumn() As Global.System.Data.DataColumn Get Return Me.columnEMAIL_PW End Get End Property _ Public ReadOnly Property PORTColumn() As Global.System.Data.DataColumn Get Return Me.columnPORT End Get End Property _ Public ReadOnly Property ACTIVEColumn() As Global.System.Data.DataColumn Get Return Me.columnACTIVE End Get End Property _ Public ReadOnly Property ADDED_WHOColumn() As Global.System.Data.DataColumn Get Return Me.columnADDED_WHO End Get End Property _ Public ReadOnly Property ADDED_WHENColumn() As Global.System.Data.DataColumn Get Return Me.columnADDED_WHEN End Get End Property _ Public ReadOnly Property CHANGED_WHOColumn() As Global.System.Data.DataColumn Get Return Me.columnCHANGED_WHO End Get End Property _ Public ReadOnly Property CHANGED_WHENColumn() As Global.System.Data.DataColumn Get Return Me.columnCHANGED_WHEN End Get End Property _ Public ReadOnly Property SSL_AUTHColumn() As Global.System.Data.DataColumn Get Return Me.columnSSL_AUTH End Get End Property _ Public ReadOnly Property AUTH_TYPEColumn() As Global.System.Data.DataColumn Get Return Me.columnAUTH_TYPE End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As TBDD_EMAIL_ACCOUNTRow Get Return CType(Me.Rows(index),TBDD_EMAIL_ACCOUNTRow) End Get End Property _ Public Event TBDD_EMAIL_ACCOUNTRowChanging As TBDD_EMAIL_ACCOUNTRowChangeEventHandler _ Public Event TBDD_EMAIL_ACCOUNTRowChanged As TBDD_EMAIL_ACCOUNTRowChangeEventHandler _ Public Event TBDD_EMAIL_ACCOUNTRowDeleting As TBDD_EMAIL_ACCOUNTRowChangeEventHandler _ Public Event TBDD_EMAIL_ACCOUNTRowDeleted As TBDD_EMAIL_ACCOUNTRowChangeEventHandler _ Public Overloads Sub AddTBDD_EMAIL_ACCOUNTRow(ByVal row As TBDD_EMAIL_ACCOUNTRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddTBDD_EMAIL_ACCOUNTRow(ByVal NAME As String, ByVal EMAIL_FROM As String, ByVal EMAIL_SMTP As String, ByVal EMAIL_USER As String, ByVal EMAIL_PW As String, ByVal PORT As Integer, ByVal ACTIVE As Boolean, ByVal ADDED_WHO As String, ByVal ADDED_WHEN As Date, ByVal CHANGED_WHO As String, ByVal CHANGED_WHEN As Date, ByVal SSL_AUTH As Boolean, ByVal AUTH_TYPE As String) As TBDD_EMAIL_ACCOUNTRow Dim rowTBDD_EMAIL_ACCOUNTRow As TBDD_EMAIL_ACCOUNTRow = CType(Me.NewRow,TBDD_EMAIL_ACCOUNTRow) Dim columnValuesArray() As Object = New Object() {Nothing, NAME, EMAIL_FROM, EMAIL_SMTP, EMAIL_USER, EMAIL_PW, PORT, ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, SSL_AUTH, AUTH_TYPE} rowTBDD_EMAIL_ACCOUNTRow.ItemArray = columnValuesArray Me.Rows.Add(rowTBDD_EMAIL_ACCOUNTRow) Return rowTBDD_EMAIL_ACCOUNTRow End Function _ Public Function FindByGUID(ByVal GUID As Integer) As TBDD_EMAIL_ACCOUNTRow Return CType(Me.Rows.Find(New Object() {GUID}),TBDD_EMAIL_ACCOUNTRow) End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As TBDD_EMAIL_ACCOUNTDataTable = CType(MyBase.Clone,TBDD_EMAIL_ACCOUNTDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New TBDD_EMAIL_ACCOUNTDataTable() End Function _ Friend Sub InitVars() Me.columnGUID = MyBase.Columns("GUID") Me.columnNAME = MyBase.Columns("NAME") Me.columnEMAIL_FROM = MyBase.Columns("EMAIL_FROM") Me.columnEMAIL_SMTP = MyBase.Columns("EMAIL_SMTP") Me.columnEMAIL_USER = MyBase.Columns("EMAIL_USER") Me.columnEMAIL_PW = MyBase.Columns("EMAIL_PW") Me.columnPORT = MyBase.Columns("PORT") Me.columnACTIVE = MyBase.Columns("ACTIVE") Me.columnADDED_WHO = MyBase.Columns("ADDED_WHO") Me.columnADDED_WHEN = MyBase.Columns("ADDED_WHEN") Me.columnCHANGED_WHO = MyBase.Columns("CHANGED_WHO") Me.columnCHANGED_WHEN = MyBase.Columns("CHANGED_WHEN") Me.columnSSL_AUTH = MyBase.Columns("SSL_AUTH") Me.columnAUTH_TYPE = MyBase.Columns("AUTH_TYPE") End Sub _ Private Sub InitClass() Me.columnGUID = New Global.System.Data.DataColumn("GUID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGUID) Me.columnNAME = New Global.System.Data.DataColumn("NAME", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnNAME) Me.columnEMAIL_FROM = New Global.System.Data.DataColumn("EMAIL_FROM", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnEMAIL_FROM) Me.columnEMAIL_SMTP = New Global.System.Data.DataColumn("EMAIL_SMTP", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnEMAIL_SMTP) Me.columnEMAIL_USER = New Global.System.Data.DataColumn("EMAIL_USER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnEMAIL_USER) Me.columnEMAIL_PW = New Global.System.Data.DataColumn("EMAIL_PW", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnEMAIL_PW) Me.columnPORT = New Global.System.Data.DataColumn("PORT", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPORT) Me.columnACTIVE = New Global.System.Data.DataColumn("ACTIVE", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnACTIVE) Me.columnADDED_WHO = New Global.System.Data.DataColumn("ADDED_WHO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnADDED_WHO) Me.columnADDED_WHEN = New Global.System.Data.DataColumn("ADDED_WHEN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnADDED_WHEN) Me.columnCHANGED_WHO = New Global.System.Data.DataColumn("CHANGED_WHO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCHANGED_WHO) Me.columnCHANGED_WHEN = New Global.System.Data.DataColumn("CHANGED_WHEN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCHANGED_WHEN) Me.columnSSL_AUTH = New Global.System.Data.DataColumn("SSL_AUTH", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSSL_AUTH) Me.columnAUTH_TYPE = New Global.System.Data.DataColumn("AUTH_TYPE", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAUTH_TYPE) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnGUID}, true)) Me.columnGUID.AutoIncrement = true Me.columnGUID.AutoIncrementSeed = 1 Me.columnGUID.AllowDBNull = false Me.columnGUID.ReadOnly = true Me.columnGUID.Unique = true Me.columnNAME.MaxLength = 50 Me.columnEMAIL_FROM.AllowDBNull = false Me.columnEMAIL_FROM.DefaultValue = CType("Your Email Adress",String) Me.columnEMAIL_FROM.MaxLength = 100 Me.columnEMAIL_SMTP.AllowDBNull = false Me.columnEMAIL_SMTP.MaxLength = 100 Me.columnEMAIL_USER.AllowDBNull = false Me.columnEMAIL_USER.DefaultValue = CType("Your Email Adress",String) Me.columnEMAIL_USER.MaxLength = 100 Me.columnEMAIL_PW.AllowDBNull = false Me.columnEMAIL_PW.DefaultValue = CType("4711",String) Me.columnEMAIL_PW.MaxLength = 500 Me.columnPORT.AllowDBNull = false Me.columnPORT.DefaultValue = CType(25,Integer) Me.columnACTIVE.AllowDBNull = false Me.columnACTIVE.DefaultValue = CType(false,Boolean) Me.columnADDED_WHO.AllowDBNull = false Me.columnADDED_WHO.MaxLength = 50 Me.columnCHANGED_WHO.MaxLength = 50 Me.columnSSL_AUTH.AllowDBNull = false Me.columnSSL_AUTH.DefaultValue = CType(false,Boolean) Me.columnAUTH_TYPE.AllowDBNull = false Me.columnAUTH_TYPE.MaxLength = 20 End Sub _ Public Function NewTBDD_EMAIL_ACCOUNTRow() As TBDD_EMAIL_ACCOUNTRow Return CType(Me.NewRow,TBDD_EMAIL_ACCOUNTRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New TBDD_EMAIL_ACCOUNTRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(TBDD_EMAIL_ACCOUNTRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.TBDD_EMAIL_ACCOUNTRowChangedEvent) Is Nothing) Then RaiseEvent TBDD_EMAIL_ACCOUNTRowChanged(Me, New TBDD_EMAIL_ACCOUNTRowChangeEvent(CType(e.Row,TBDD_EMAIL_ACCOUNTRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.TBDD_EMAIL_ACCOUNTRowChangingEvent) Is Nothing) Then RaiseEvent TBDD_EMAIL_ACCOUNTRowChanging(Me, New TBDD_EMAIL_ACCOUNTRowChangeEvent(CType(e.Row,TBDD_EMAIL_ACCOUNTRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.TBDD_EMAIL_ACCOUNTRowDeletedEvent) Is Nothing) Then RaiseEvent TBDD_EMAIL_ACCOUNTRowDeleted(Me, New TBDD_EMAIL_ACCOUNTRowChangeEvent(CType(e.Row,TBDD_EMAIL_ACCOUNTRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.TBDD_EMAIL_ACCOUNTRowDeletingEvent) Is Nothing) Then RaiseEvent TBDD_EMAIL_ACCOUNTRowDeleting(Me, New TBDD_EMAIL_ACCOUNTRowChangeEvent(CType(e.Row,TBDD_EMAIL_ACCOUNTRow), e.Action)) End If End Sub _ Public Sub RemoveTBDD_EMAIL_ACCOUNTRow(ByVal row As TBDD_EMAIL_ACCOUNTRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As MyDataset = New MyDataset() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "TBDD_EMAIL_ACCOUNTDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class TBWMRH_KONFIGURATIONRow Inherits Global.System.Data.DataRow Private tableTBWMRH_KONFIGURATION As TBWMRH_KONFIGURATIONDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableTBWMRH_KONFIGURATION = CType(Me.Table,TBWMRH_KONFIGURATIONDataTable) End Sub _ Public Property GUID() As Integer Get Return CType(Me(Me.tableTBWMRH_KONFIGURATION.GUIDColumn),Integer) End Get Set Me(Me.tableTBWMRH_KONFIGURATION.GUIDColumn) = value End Set End Property _ Public Property WD_LAUFWERK() As String Get Return CType(Me(Me.tableTBWMRH_KONFIGURATION.WD_LAUFWERKColumn),String) End Get Set Me(Me.tableTBWMRH_KONFIGURATION.WD_LAUFWERKColumn) = value End Set End Property _ Public Property INTERVALL() As Integer Get Return CType(Me(Me.tableTBWMRH_KONFIGURATION.INTERVALLColumn),Integer) End Get Set Me(Me.tableTBWMRH_KONFIGURATION.INTERVALLColumn) = value End Set End Property _ Public Property LAST_TICK() As Date Get Return CType(Me(Me.tableTBWMRH_KONFIGURATION.LAST_TICKColumn),Date) End Get Set Me(Me.tableTBWMRH_KONFIGURATION.LAST_TICKColumn) = value End Set End Property _ Public Property LOG_ERRORS_ONLY() As Boolean Get Return CType(Me(Me.tableTBWMRH_KONFIGURATION.LOG_ERRORS_ONLYColumn),Boolean) End Get Set Me(Me.tableTBWMRH_KONFIGURATION.LOG_ERRORS_ONLYColumn) = value End Set End Property _ Public Property GEAENDERT_WER() As String Get Try Return CType(Me(Me.tableTBWMRH_KONFIGURATION.GEAENDERT_WERColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERT_WER in Tabelle TBWMRH_KONFIGURATION ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_KONFIGURATION.GEAENDERT_WERColumn) = value End Set End Property _ Public Property GEAENDERTWANN() As Date Get Try Return CType(Me(Me.tableTBWMRH_KONFIGURATION.GEAENDERTWANNColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWANN in Tabelle TBWMRH_KONFIGURATION ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_KONFIGURATION.GEAENDERTWANNColumn) = value End Set End Property _ Public Property PDF_TK_LOCATION() As String Get Return CType(Me(Me.tableTBWMRH_KONFIGURATION.PDF_TK_LOCATIONColumn),String) End Get Set Me(Me.tableTBWMRH_KONFIGURATION.PDF_TK_LOCATIONColumn) = value End Set End Property _ Public Property PDF_XCHANGE_LOCATION() As String Get Return CType(Me(Me.tableTBWMRH_KONFIGURATION.PDF_XCHANGE_LOCATIONColumn),String) End Get Set Me(Me.tableTBWMRH_KONFIGURATION.PDF_XCHANGE_LOCATIONColumn) = value End Set End Property _ Public Function IsGEAENDERT_WERNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_KONFIGURATION.GEAENDERT_WERColumn) End Function _ Public Sub SetGEAENDERT_WERNull() Me(Me.tableTBWMRH_KONFIGURATION.GEAENDERT_WERColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGEAENDERTWANNNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_KONFIGURATION.GEAENDERTWANNColumn) End Function _ Public Sub SetGEAENDERTWANNNull() Me(Me.tableTBWMRH_KONFIGURATION.GEAENDERTWANNColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class TBWMRH_PROFILRow Inherits Global.System.Data.DataRow Private tableTBWMRH_PROFIL As TBWMRH_PROFILDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableTBWMRH_PROFIL = CType(Me.Table,TBWMRH_PROFILDataTable) End Sub _ Public Property GUID() As Integer Get Return CType(Me(Me.tableTBWMRH_PROFIL.GUIDColumn),Integer) End Get Set Me(Me.tableTBWMRH_PROFIL.GUIDColumn) = value End Set End Property _ Public Property Profilname() As String Get Return CType(Me(Me.tableTBWMRH_PROFIL.ProfilnameColumn),String) End Get Set Me(Me.tableTBWMRH_PROFIL.ProfilnameColumn) = value End Set End Property _ Public Property Aktiv() As Boolean Get Try Return CType(Me(Me.tableTBWMRH_PROFIL.AktivColumn),Boolean) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Aktiv in Tabelle TBWMRH_PROFIL ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL.AktivColumn) = value End Set End Property _ Public Property Objekttyp() As String Get Return CType(Me(Me.tableTBWMRH_PROFIL.ObjekttypColumn),String) End Get Set Me(Me.tableTBWMRH_PROFIL.ObjekttypColumn) = value End Set End Property _ Public Property WindreamSuche() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL.WindreamSucheColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte WindreamSuche in Tabelle TBWMRH_PROFIL ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL.WindreamSucheColumn) = value End Set End Property _ Public Property Day() As String Get Return CType(Me(Me.tableTBWMRH_PROFIL.DayColumn),String) End Get Set Me(Me.tableTBWMRH_PROFIL.DayColumn) = value End Set End Property _ Public Property Run() As String Get Return CType(Me(Me.tableTBWMRH_PROFIL.RunColumn),String) End Get Set Me(Me.tableTBWMRH_PROFIL.RunColumn) = value End Set End Property _ Public Property Letzter_Durchlauf() As Date Get Return CType(Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn),Date) End Get Set Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn) = value End Set End Property _ Public Property Running() As Boolean Get Return CType(Me(Me.tableTBWMRH_PROFIL.RunningColumn),Boolean) End Get Set Me(Me.tableTBWMRH_PROFIL.RunningColumn) = value End Set End Property _ Public Property Reihenfolge() As Integer Get Return CType(Me(Me.tableTBWMRH_PROFIL.ReihenfolgeColumn),Integer) End Get Set Me(Me.tableTBWMRH_PROFIL.ReihenfolgeColumn) = value End Set End Property _ Public Property ERSTELLTWER() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL.ERSTELLTWERColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWER in Tabelle TBWMRH_PROFIL ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL.ERSTELLTWERColumn) = value End Set End Property _ Public Property ERSTELLTWANN() As Date Get Try Return CType(Me(Me.tableTBWMRH_PROFIL.ERSTELLTWANNColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWANN in Tabelle TBWMRH_PROFIL ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL.ERSTELLTWANNColumn) = value End Set End Property _ Public Property GEAENDERTWER() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL.GEAENDERTWERColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWER in Tabelle TBWMRH_PROFIL ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL.GEAENDERTWERColumn) = value End Set End Property _ Public Property GEAENDERTWANN() As Date Get Try Return CType(Me(Me.tableTBWMRH_PROFIL.GEAENDERTWANNColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWANN in Tabelle TBWMRH_PROFIL ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL.GEAENDERTWANNColumn) = value End Set End Property _ Public Function IsAktivNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL.AktivColumn) End Function _ Public Sub SetAktivNull() Me(Me.tableTBWMRH_PROFIL.AktivColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsWindreamSucheNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL.WindreamSucheColumn) End Function _ Public Sub SetWindreamSucheNull() Me(Me.tableTBWMRH_PROFIL.WindreamSucheColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsERSTELLTWERNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL.ERSTELLTWERColumn) End Function _ Public Sub SetERSTELLTWERNull() Me(Me.tableTBWMRH_PROFIL.ERSTELLTWERColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsERSTELLTWANNNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL.ERSTELLTWANNColumn) End Function _ Public Sub SetERSTELLTWANNNull() Me(Me.tableTBWMRH_PROFIL.ERSTELLTWANNColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGEAENDERTWERNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL.GEAENDERTWERColumn) End Function _ Public Sub SetGEAENDERTWERNull() Me(Me.tableTBWMRH_PROFIL.GEAENDERTWERColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGEAENDERTWANNNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL.GEAENDERTWANNColumn) End Function _ Public Sub SetGEAENDERTWANNNull() Me(Me.tableTBWMRH_PROFIL.GEAENDERTWANNColumn) = Global.System.Convert.DBNull End Sub _ Public Function GetTBWMRH_PROFIL_FILE_JOBRows() As TBWMRH_PROFIL_FILE_JOBRow() If (Me.Table.ChildRelations("FK_FILE_JOB_PROFILID") Is Nothing) Then Return New TBWMRH_PROFIL_FILE_JOBRow(-1) {} Else Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_FILE_JOB_PROFILID")),TBWMRH_PROFIL_FILE_JOBRow()) End If End Function _ Public Function GetTBWMRH_PROFIL_JOBRows() As TBWMRH_PROFIL_JOBRow() If (Me.Table.ChildRelations("FK_TBPROFIL_JOB_PROFILID") Is Nothing) Then Return New TBWMRH_PROFIL_JOBRow(-1) {} Else Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBPROFIL_JOB_PROFILID")),TBWMRH_PROFIL_JOBRow()) End If End Function End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class TBWMRH_PROFIL_FILE_JOBRow Inherits Global.System.Data.DataRow Private tableTBWMRH_PROFIL_FILE_JOB As TBWMRH_PROFIL_FILE_JOBDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableTBWMRH_PROFIL_FILE_JOB = CType(Me.Table,TBWMRH_PROFIL_FILE_JOBDataTable) End Sub _ Public Property GUID() As Integer Get Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.GUIDColumn),Integer) End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.GUIDColumn) = value End Set End Property _ Public Property PROFIL_ID() As Integer Get Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.PROFIL_IDColumn),Integer) End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.PROFIL_IDColumn) = value End Set End Property _ Public Property TYP() As String Get Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.TYPColumn),String) End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.TYPColumn) = value End Set End Property _ Public Property STRING1() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING1 in Tabelle TBWMRH_PROFIL_FILE_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING1Column) = value End Set End Property _ Public Property STRING2() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING2 in Tabelle TBWMRH_PROFIL_FILE_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING2Column) = value End Set End Property _ Public Property STRING3() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING3 in Tabelle TBWMRH_PROFIL_FILE_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING3Column) = value End Set End Property _ Public Property STRING4() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING4Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING4 in Tabelle TBWMRH_PROFIL_FILE_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING4Column) = value End Set End Property _ Public Property BOOL1() As Boolean Get Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.BOOL1Column),Boolean) End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.BOOL1Column) = value End Set End Property _ Public Property BOOL2() As Boolean Get Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.BOOL2Column),Boolean) End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.BOOL2Column) = value End Set End Property _ Public Property BOOL3() As Boolean Get Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.BOOL3Column),Boolean) End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.BOOL3Column) = value End Set End Property _ Public Property BOOL4() As Boolean Get Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.BOOL4Column),Boolean) End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.BOOL4Column) = value End Set End Property _ Public Property AKTIV() As Boolean Get Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.AKTIVColumn),Boolean) End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.AKTIVColumn) = value End Set End Property _ Public Property REIHENFOLGE() As Integer Get Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.REIHENFOLGEColumn),Integer) End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.REIHENFOLGEColumn) = value End Set End Property _ Public Property ERSTELLTWER() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.ERSTELLTWERColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWER in Tabelle TBWMRH_PROFIL_FILE_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.ERSTELLTWERColumn) = value End Set End Property _ Public Property ERSTELLTWANN() As Date Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.ERSTELLTWANNColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWANN in Tabelle TBWMRH_PROFIL_FILE_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.ERSTELLTWANNColumn) = value End Set End Property _ Public Property GEAENDERTWER() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.GEAENDERTWERColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWER in Tabelle TBWMRH_PROFIL_FILE_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.GEAENDERTWERColumn) = value End Set End Property _ Public Property GEAENDERTWANN() As Date Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_FILE_JOB.GEAENDERTWANNColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWANN in Tabelle TBWMRH_PROFIL_FILE_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_FILE_JOB.GEAENDERTWANNColumn) = value End Set End Property _ Public Property TBWMRH_PROFILRow() As TBWMRH_PROFILRow Get Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_FILE_JOB_PROFILID")),TBWMRH_PROFILRow) End Get Set Me.SetParentRow(value, Me.Table.ParentRelations("FK_FILE_JOB_PROFILID")) End Set End Property _ Public Function IsSTRING1Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING1Column) End Function _ Public Sub SetSTRING1Null() Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsSTRING2Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING2Column) End Function _ Public Sub SetSTRING2Null() Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsSTRING3Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING3Column) End Function _ Public Sub SetSTRING3Null() Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsSTRING4Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING4Column) End Function _ Public Sub SetSTRING4Null() Me(Me.tableTBWMRH_PROFIL_FILE_JOB.STRING4Column) = Global.System.Convert.DBNull End Sub _ Public Function IsERSTELLTWERNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_FILE_JOB.ERSTELLTWERColumn) End Function _ Public Sub SetERSTELLTWERNull() Me(Me.tableTBWMRH_PROFIL_FILE_JOB.ERSTELLTWERColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsERSTELLTWANNNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_FILE_JOB.ERSTELLTWANNColumn) End Function _ Public Sub SetERSTELLTWANNNull() Me(Me.tableTBWMRH_PROFIL_FILE_JOB.ERSTELLTWANNColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGEAENDERTWERNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_FILE_JOB.GEAENDERTWERColumn) End Function _ Public Sub SetGEAENDERTWERNull() Me(Me.tableTBWMRH_PROFIL_FILE_JOB.GEAENDERTWERColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGEAENDERTWANNNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_FILE_JOB.GEAENDERTWANNColumn) End Function _ Public Sub SetGEAENDERTWANNNull() Me(Me.tableTBWMRH_PROFIL_FILE_JOB.GEAENDERTWANNColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class TBWMRH_PROFIL_JOBRow Inherits Global.System.Data.DataRow Private tableTBWMRH_PROFIL_JOB As TBWMRH_PROFIL_JOBDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableTBWMRH_PROFIL_JOB = CType(Me.Table,TBWMRH_PROFIL_JOBDataTable) End Sub _ Public Property GUID() As Integer Get Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.GUIDColumn),Integer) End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.GUIDColumn) = value End Set End Property _ Public Property PROFIL_ID() As Integer Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.PROFIL_IDColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte PROFIL_ID in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.PROFIL_IDColumn) = value End Set End Property _ Public Property JOB_TYP() As String Get Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.JOB_TYPColumn),String) End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.JOB_TYPColumn) = value End Set End Property _ Public Property STRING1() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.STRING1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING1 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.STRING1Column) = value End Set End Property _ Public Property STRING2() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.STRING2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING2 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.STRING2Column) = value End Set End Property _ Public Property STRING3() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.STRING3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING3 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.STRING3Column) = value End Set End Property _ Public Property STRING4() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.STRING4Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING4 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.STRING4Column) = value End Set End Property _ Public Property BOOL1() As Boolean Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.BOOL1Column),Boolean) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte BOOL1 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.BOOL1Column) = value End Set End Property _ Public Property BOOL2() As Boolean Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.BOOL2Column),Boolean) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte BOOL2 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.BOOL2Column) = value End Set End Property _ Public Property BOOL3() As Boolean Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.BOOL3Column),Boolean) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte BOOL3 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.BOOL3Column) = value End Set End Property _ Public Property BOOL4() As Boolean Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.BOOL4Column),Boolean) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte BOOL4 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.BOOL4Column) = value End Set End Property _ Public Property AKTIV() As Boolean Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.AKTIVColumn),Boolean) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte AKTIV in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.AKTIVColumn) = value End Set End Property _ Public Property REIHENFOLGE() As Integer Get Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.REIHENFOLGEColumn),Integer) End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.REIHENFOLGEColumn) = value End Set End Property _ Public Property ERSTELLTWER() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.ERSTELLTWERColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWER in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.ERSTELLTWERColumn) = value End Set End Property _ Public Property ERSTELLTWANN() As Date Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.ERSTELLTWANNColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWANN in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.ERSTELLTWANNColumn) = value End Set End Property _ Public Property GEAENDERTWER() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.GEAENDERTWERColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWER in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.GEAENDERTWERColumn) = value End Set End Property _ Public Property GEAENDERTWANN() As Date Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.GEAENDERTWANNColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWANN in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.GEAENDERTWANNColumn) = value End Set End Property _ Public Property STRING5() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.STRING5Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING5 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.STRING5Column) = value End Set End Property _ Public Property STRING6() As String Get Try Return CType(Me(Me.tableTBWMRH_PROFIL_JOB.STRING6Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte STRING6 in Tabelle TBWMRH_PROFIL_JOB ist DBNull.", e) End Try End Get Set Me(Me.tableTBWMRH_PROFIL_JOB.STRING6Column) = value End Set End Property _ Public Property TBWMRH_PROFILRow() As TBWMRH_PROFILRow Get Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_TBPROFIL_JOB_PROFILID")),TBWMRH_PROFILRow) End Get Set Me.SetParentRow(value, Me.Table.ParentRelations("FK_TBPROFIL_JOB_PROFILID")) End Set End Property _ Public Function IsPROFIL_IDNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.PROFIL_IDColumn) End Function _ Public Sub SetPROFIL_IDNull() Me(Me.tableTBWMRH_PROFIL_JOB.PROFIL_IDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSTRING1Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.STRING1Column) End Function _ Public Sub SetSTRING1Null() Me(Me.tableTBWMRH_PROFIL_JOB.STRING1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsSTRING2Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.STRING2Column) End Function _ Public Sub SetSTRING2Null() Me(Me.tableTBWMRH_PROFIL_JOB.STRING2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsSTRING3Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.STRING3Column) End Function _ Public Sub SetSTRING3Null() Me(Me.tableTBWMRH_PROFIL_JOB.STRING3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsSTRING4Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.STRING4Column) End Function _ Public Sub SetSTRING4Null() Me(Me.tableTBWMRH_PROFIL_JOB.STRING4Column) = Global.System.Convert.DBNull End Sub _ Public Function IsBOOL1Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.BOOL1Column) End Function _ Public Sub SetBOOL1Null() Me(Me.tableTBWMRH_PROFIL_JOB.BOOL1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsBOOL2Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.BOOL2Column) End Function _ Public Sub SetBOOL2Null() Me(Me.tableTBWMRH_PROFIL_JOB.BOOL2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsBOOL3Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.BOOL3Column) End Function _ Public Sub SetBOOL3Null() Me(Me.tableTBWMRH_PROFIL_JOB.BOOL3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsBOOL4Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.BOOL4Column) End Function _ Public Sub SetBOOL4Null() Me(Me.tableTBWMRH_PROFIL_JOB.BOOL4Column) = Global.System.Convert.DBNull End Sub _ Public Function IsAKTIVNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.AKTIVColumn) End Function _ Public Sub SetAKTIVNull() Me(Me.tableTBWMRH_PROFIL_JOB.AKTIVColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsERSTELLTWERNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.ERSTELLTWERColumn) End Function _ Public Sub SetERSTELLTWERNull() Me(Me.tableTBWMRH_PROFIL_JOB.ERSTELLTWERColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsERSTELLTWANNNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.ERSTELLTWANNColumn) End Function _ Public Sub SetERSTELLTWANNNull() Me(Me.tableTBWMRH_PROFIL_JOB.ERSTELLTWANNColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGEAENDERTWERNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.GEAENDERTWERColumn) End Function _ Public Sub SetGEAENDERTWERNull() Me(Me.tableTBWMRH_PROFIL_JOB.GEAENDERTWERColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGEAENDERTWANNNull() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.GEAENDERTWANNColumn) End Function _ Public Sub SetGEAENDERTWANNNull() Me(Me.tableTBWMRH_PROFIL_JOB.GEAENDERTWANNColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSTRING5Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.STRING5Column) End Function _ Public Sub SetSTRING5Null() Me(Me.tableTBWMRH_PROFIL_JOB.STRING5Column) = Global.System.Convert.DBNull End Sub _ Public Function IsSTRING6Null() As Boolean Return Me.IsNull(Me.tableTBWMRH_PROFIL_JOB.STRING6Column) End Function _ Public Sub SetSTRING6Null() Me(Me.tableTBWMRH_PROFIL_JOB.STRING6Column) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class TBDD_EMAIL_ACCOUNTRow Inherits Global.System.Data.DataRow Private tableTBDD_EMAIL_ACCOUNT As TBDD_EMAIL_ACCOUNTDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableTBDD_EMAIL_ACCOUNT = CType(Me.Table,TBDD_EMAIL_ACCOUNTDataTable) End Sub _ Public Property GUID() As Integer Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.GUIDColumn),Integer) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.GUIDColumn) = value End Set End Property _ Public Property NAME() As String Get Try Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.NAMEColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAME in Tabelle TBDD_EMAIL_ACCOUNT ist DBNull.", e) End Try End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.NAMEColumn) = value End Set End Property _ Public Property EMAIL_FROM() As String Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.EMAIL_FROMColumn),String) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.EMAIL_FROMColumn) = value End Set End Property _ Public Property EMAIL_SMTP() As String Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.EMAIL_SMTPColumn),String) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.EMAIL_SMTPColumn) = value End Set End Property _ Public Property EMAIL_USER() As String Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.EMAIL_USERColumn),String) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.EMAIL_USERColumn) = value End Set End Property _ Public Property EMAIL_PW() As String Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.EMAIL_PWColumn),String) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.EMAIL_PWColumn) = value End Set End Property _ Public Property PORT() As Integer Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.PORTColumn),Integer) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.PORTColumn) = value End Set End Property _ Public Property ACTIVE() As Boolean Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.ACTIVEColumn),Boolean) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.ACTIVEColumn) = value End Set End Property _ Public Property ADDED_WHO() As String Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.ADDED_WHOColumn),String) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.ADDED_WHOColumn) = value End Set End Property _ Public Property ADDED_WHEN() As Date Get Try Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.ADDED_WHENColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ADDED_WHEN in Tabelle TBDD_EMAIL_ACCOUNT ist DBNull.", e) End Try End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.ADDED_WHENColumn) = value End Set End Property _ Public Property CHANGED_WHO() As String Get Try Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.CHANGED_WHOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHO in Tabelle TBDD_EMAIL_ACCOUNT ist DBNull.", e) End Try End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.CHANGED_WHOColumn) = value End Set End Property _ Public Property CHANGED_WHEN() As Date Get Try Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.CHANGED_WHENColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHEN in Tabelle TBDD_EMAIL_ACCOUNT ist DBNull.", e) End Try End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.CHANGED_WHENColumn) = value End Set End Property _ Public Property SSL_AUTH() As Boolean Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.SSL_AUTHColumn),Boolean) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.SSL_AUTHColumn) = value End Set End Property _ Public Property AUTH_TYPE() As String Get Return CType(Me(Me.tableTBDD_EMAIL_ACCOUNT.AUTH_TYPEColumn),String) End Get Set Me(Me.tableTBDD_EMAIL_ACCOUNT.AUTH_TYPEColumn) = value End Set End Property _ Public Function IsNAMENull() As Boolean Return Me.IsNull(Me.tableTBDD_EMAIL_ACCOUNT.NAMEColumn) End Function _ Public Sub SetNAMENull() Me(Me.tableTBDD_EMAIL_ACCOUNT.NAMEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsADDED_WHENNull() As Boolean Return Me.IsNull(Me.tableTBDD_EMAIL_ACCOUNT.ADDED_WHENColumn) End Function _ Public Sub SetADDED_WHENNull() Me(Me.tableTBDD_EMAIL_ACCOUNT.ADDED_WHENColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCHANGED_WHONull() As Boolean Return Me.IsNull(Me.tableTBDD_EMAIL_ACCOUNT.CHANGED_WHOColumn) End Function _ Public Sub SetCHANGED_WHONull() Me(Me.tableTBDD_EMAIL_ACCOUNT.CHANGED_WHOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCHANGED_WHENNull() As Boolean Return Me.IsNull(Me.tableTBDD_EMAIL_ACCOUNT.CHANGED_WHENColumn) End Function _ Public Sub SetCHANGED_WHENNull() Me(Me.tableTBDD_EMAIL_ACCOUNT.CHANGED_WHENColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Row event argument class ''' _ Public Class TBWMRH_KONFIGURATIONRowChangeEvent Inherits Global.System.EventArgs Private eventRow As TBWMRH_KONFIGURATIONRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As TBWMRH_KONFIGURATIONRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As TBWMRH_KONFIGURATIONRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class TBWMRH_PROFILRowChangeEvent Inherits Global.System.EventArgs Private eventRow As TBWMRH_PROFILRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As TBWMRH_PROFILRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As TBWMRH_PROFILRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class TBWMRH_PROFIL_FILE_JOBRowChangeEvent Inherits Global.System.EventArgs Private eventRow As TBWMRH_PROFIL_FILE_JOBRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As TBWMRH_PROFIL_FILE_JOBRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As TBWMRH_PROFIL_FILE_JOBRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class TBWMRH_PROFIL_JOBRowChangeEvent Inherits Global.System.EventArgs Private eventRow As TBWMRH_PROFIL_JOBRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As TBWMRH_PROFIL_JOBRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As TBWMRH_PROFIL_JOBRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class TBDD_EMAIL_ACCOUNTRowChangeEvent Inherits Global.System.EventArgs Private eventRow As TBDD_EMAIL_ACCOUNTRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As TBDD_EMAIL_ACCOUNTRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As TBDD_EMAIL_ACCOUNTRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class End Class Namespace MyDatasetTableAdapters ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class TBWMRH_KONFIGURATIONTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "TBWMRH_KONFIGURATION" tableMapping.ColumnMappings.Add("GUID", "GUID") tableMapping.ColumnMappings.Add("WD_LAUFWERK", "WD_LAUFWERK") tableMapping.ColumnMappings.Add("INTERVALL", "INTERVALL") tableMapping.ColumnMappings.Add("LAST_TICK", "LAST_TICK") tableMapping.ColumnMappings.Add("LOG_ERRORS_ONLY", "LOG_ERRORS_ONLY") tableMapping.ColumnMappings.Add("GEAENDERT_WER", "GEAENDERT_WER") tableMapping.ColumnMappings.Add("GEAENDERTWANN", "GEAENDERTWANN") tableMapping.ColumnMappings.Add("PDF_TK_LOCATION", "PDF_TK_LOCATION") tableMapping.ColumnMappings.Add("PDF_XCHANGE_LOCATION", "PDF_XCHANGE_LOCATION") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE TBWMRH_KONFIGURATION"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET GUID = @GUID, WD_LAUFWERK ="& _ " @WD_LAUFWERK, INTERVALL = @INTERVALL, LAST_TICK = @LAST_TICK, LOG_ERRORS_ONLY ="& _ " @LOG_ERRORS_ONLY, GEAENDERT_WER = @GEAENDERT_WER, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" PD"& _ "F_TK_LOCATION = @PDF_TK_LOCATION, PDF_XCHANGE_LOCATION = @PDF_XCHANGE_LOCATION"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)& _ "WHERE (GUID = 1)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_LAUFWERK", Global.System.Data.SqlDbType.VarChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_LAUFWERK", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@INTERVALL", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "INTERVALL", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LAST_TICK", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "LAST_TICK", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LOG_ERRORS_ONLY", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "LOG_ERRORS_ONLY", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GEAENDERT_WER", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "GEAENDERT_WER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PDF_TK_LOCATION", Global.System.Data.SqlDbType.VarChar, 500, Global.System.Data.ParameterDirection.Input, 0, 0, "PDF_TK_LOCATION", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PDF_XCHANGE_LOCATION", Global.System.Data.SqlDbType.VarChar, 500, Global.System.Data.ParameterDirection.Input, 0, 0, "PDF_XCHANGE_LOCATION", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.ResultHandler_Konfig.My.MySettings.Default.SQLSERVER_CS End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT GUID, WD_LAUFWERK, INTERVALL, LAST_TICK, LOG_ERRORS_ONLY, GEAENDERT"& _ "_WER, GEAENDERTWANN, PDF_TK_LOCATION, PDF_XCHANGE_LOCATION"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBWM"& _ "RH_KONFIGURATION"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = 1)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBWMRH_KONFIGURATIONDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As MyDataset.TBWMRH_KONFIGURATIONDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As MyDataset.TBWMRH_KONFIGURATIONDataTable = New MyDataset.TBWMRH_KONFIGURATIONDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBWMRH_KONFIGURATIONDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBWMRH_KONFIGURATION") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Update(ByVal GUID As Integer, ByVal WD_LAUFWERK As String, ByVal INTERVALL As Integer, ByVal LAST_TICK As Date, ByVal LOG_ERRORS_ONLY As Boolean, ByVal GEAENDERT_WER As String, ByVal PDF_TK_LOCATION As String, ByVal PDF_XCHANGE_LOCATION As String) As Integer Me.Adapter.UpdateCommand.Parameters(0).Value = CType(GUID,Integer) If (WD_LAUFWERK Is Nothing) Then Throw New Global.System.ArgumentNullException("WD_LAUFWERK") Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(WD_LAUFWERK,String) End If Me.Adapter.UpdateCommand.Parameters(2).Value = CType(INTERVALL,Integer) Me.Adapter.UpdateCommand.Parameters(3).Value = CType(LAST_TICK,Date) Me.Adapter.UpdateCommand.Parameters(4).Value = CType(LOG_ERRORS_ONLY,Boolean) If (GEAENDERT_WER Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(GEAENDERT_WER,String) End If If (PDF_TK_LOCATION Is Nothing) Then Throw New Global.System.ArgumentNullException("PDF_TK_LOCATION") Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(PDF_TK_LOCATION,String) End If If (PDF_XCHANGE_LOCATION Is Nothing) Then Throw New Global.System.ArgumentNullException("PDF_XCHANGE_LOCATION") Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(PDF_XCHANGE_LOCATION,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class TBWMRH_PROFILTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "TBWMRH_PROFIL" tableMapping.ColumnMappings.Add("GUID", "GUID") tableMapping.ColumnMappings.Add("Profilname", "Profilname") tableMapping.ColumnMappings.Add("Aktiv", "Aktiv") tableMapping.ColumnMappings.Add("Objekttyp", "Objekttyp") tableMapping.ColumnMappings.Add("WindreamSuche", "WindreamSuche") tableMapping.ColumnMappings.Add("Day", "Day") tableMapping.ColumnMappings.Add("Run", "Run") tableMapping.ColumnMappings.Add("Letzter_Durchlauf", "Letzter_Durchlauf") tableMapping.ColumnMappings.Add("Running", "Running") tableMapping.ColumnMappings.Add("Reihenfolge", "Reihenfolge") tableMapping.ColumnMappings.Add("ERSTELLTWER", "ERSTELLTWER") tableMapping.ColumnMappings.Add("ERSTELLTWANN", "ERSTELLTWANN") tableMapping.ColumnMappings.Add("GEAENDERTWER", "GEAENDERTWER") tableMapping.ColumnMappings.Add("GEAENDERTWANN", "GEAENDERTWANN") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBWMRH_PROFIL"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Original_GUID)" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO TBWMRH_PROFIL"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (Profilname, Aktiv, Objekttyp"& _ ", WindreamSuche, Day, Run, Letzter_Durchlauf, Running, Reihenfolge, ERSTELLTWER)"& _ ""&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@Profilname,@Aktiv,@Objekttyp,@WindreamSuche,@Day,@Run,@Letzter"& _ "_Durchlauf,@Running,@Reihenfolge,@ERSTELLTWER); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, Profilname, Aktiv"& _ ", Objekttyp, WindreamSuche, Day, Run, Letzter_Durchlauf, Running, Reihenfolge, E"& _ "RSTELLTWER, ERSTELLTWANN, GEAENDERTWER, GEAENDERTWANN FROM TBWMRH_PROFIL WHERE ("& _ "GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Profilname", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "Profilname", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Aktiv", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "Aktiv", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Objekttyp", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "Objekttyp", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WindreamSuche", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "WindreamSuche", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Day", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "Day", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Run", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "Run", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Letzter_Durchlauf", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "Letzter_Durchlauf", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Running", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "Running", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Reihenfolge", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "Reihenfolge", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ERSTELLTWER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "ERSTELLTWER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE TBWMRH_PROFIL"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET Profilname = @Profilname, Aktiv = "& _ "@Aktiv, Objekttyp = @Objekttyp, WindreamSuche = @WindreamSuche, Day = @Day, Run "& _ "= @Run, Letzter_Durchlauf = @Letzter_Durchlauf, Running = @Running, Reihenfolge "& _ "= @Reihenfolge,"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" GEAENDERTWER = @GEAENDERTWER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _ " (GUID = @Original_GUID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, Profilname, Aktiv, Objekttyp, Wind"& _ "reamSuche, Day, Run, Letzter_Durchlauf, Running, Reihenfolge, ERSTELLTWER, ERSTE"& _ "LLTWANN, GEAENDERTWER, GEAENDERTWANN FROM TBWMRH_PROFIL WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Profilname", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "Profilname", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Aktiv", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "Aktiv", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Objekttyp", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "Objekttyp", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WindreamSuche", Global.System.Data.SqlDbType.VarChar, 500, Global.System.Data.ParameterDirection.Input, 0, 0, "WindreamSuche", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Day", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "Day", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Run", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "Run", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Letzter_Durchlauf", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "Letzter_Durchlauf", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Running", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "Running", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Reihenfolge", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "Reihenfolge", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GEAENDERTWER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "GEAENDERTWER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.ResultHandler_Konfig.My.MySettings.Default.SQLSERVER_CS End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(1) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT GUID, Profilname, Aktiv, Objekttyp, WindreamSuche, Day, Run, Letzte"& _ "r_Durchlauf, Running, Reihenfolge, ERSTELLTWER, ERSTELLTWANN, GEAENDERTWER, GEAE"& _ "NDERTWANN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBWMRH_PROFIL"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"ORDER BY Reihenfolge" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(1).Connection = Me.Connection Me._commandCollection(1).CommandText = "UPDATE TBWMRH_PROFIL"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET Running = 0, LETZTER_DURCHLAUF = '19"& _ "11-11-11 00:00:00' WHERE (GUID = @Original_GUID)" Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBWMRH_PROFILDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As MyDataset.TBWMRH_PROFILDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As MyDataset.TBWMRH_PROFILDataTable = New MyDataset.TBWMRH_PROFILDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBWMRH_PROFILDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBWMRH_PROFIL") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Global.System.Nullable(Of Date), ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal ERSTELLTWER As String) As Integer If (Profilname Is Nothing) Then Throw New Global.System.ArgumentNullException("Profilname") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Profilname,String) End If If (Aktiv.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(Aktiv.Value,Boolean) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (Objekttyp Is Nothing) Then Throw New Global.System.ArgumentNullException("Objekttyp") Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(Objekttyp,String) End If If (WindreamSuche Is Nothing) Then Throw New Global.System.ArgumentNullException("WindreamSuche") Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(WindreamSuche,String) End If If (Day Is Nothing) Then Throw New Global.System.ArgumentNullException("Day") Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(Day,String) End If If (Run Is Nothing) Then Throw New Global.System.ArgumentNullException("Run") Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(Run,String) End If If (Letzter_Durchlauf.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(Letzter_Durchlauf.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If Me.Adapter.InsertCommand.Parameters(7).Value = CType(Running,Boolean) Me.Adapter.InsertCommand.Parameters(8).Value = CType(Reihenfolge,Integer) If (ERSTELLTWER Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(ERSTELLTWER,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Global.System.Nullable(Of Date), ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal GEAENDERTWER As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer If (Profilname Is Nothing) Then Throw New Global.System.ArgumentNullException("Profilname") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(Profilname,String) End If If (Aktiv.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Aktiv.Value,Boolean) Else Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (Objekttyp Is Nothing) Then Throw New Global.System.ArgumentNullException("Objekttyp") Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Objekttyp,String) End If If (WindreamSuche Is Nothing) Then Throw New Global.System.ArgumentNullException("WindreamSuche") Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(WindreamSuche,String) End If If (Day Is Nothing) Then Throw New Global.System.ArgumentNullException("Day") Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Day,String) End If If (Run Is Nothing) Then Throw New Global.System.ArgumentNullException("Run") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Run,String) End If If (Letzter_Durchlauf.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Letzter_Durchlauf.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Running,Boolean) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Reihenfolge,Integer) If (GEAENDERTWER Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(GEAENDERTWER,String) End If Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_GUID,Integer) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(GUID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function cmdUpdateRunningnow(ByVal Original_GUID As Integer) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1) command.Parameters(0).Value = CType(Original_GUID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class TBWMRH_PROFIL_FILE_JOBTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "TBWMRH_PROFIL_FILE_JOB" tableMapping.ColumnMappings.Add("GUID", "GUID") tableMapping.ColumnMappings.Add("PROFIL_ID", "PROFIL_ID") tableMapping.ColumnMappings.Add("TYP", "TYP") tableMapping.ColumnMappings.Add("STRING1", "STRING1") tableMapping.ColumnMappings.Add("STRING2", "STRING2") tableMapping.ColumnMappings.Add("STRING3", "STRING3") tableMapping.ColumnMappings.Add("STRING4", "STRING4") tableMapping.ColumnMappings.Add("BOOL1", "BOOL1") tableMapping.ColumnMappings.Add("BOOL2", "BOOL2") tableMapping.ColumnMappings.Add("BOOL3", "BOOL3") tableMapping.ColumnMappings.Add("BOOL4", "BOOL4") tableMapping.ColumnMappings.Add("AKTIV", "AKTIV") tableMapping.ColumnMappings.Add("REIHENFOLGE", "REIHENFOLGE") tableMapping.ColumnMappings.Add("ERSTELLTWER", "ERSTELLTWER") tableMapping.ColumnMappings.Add("ERSTELLTWANN", "ERSTELLTWANN") tableMapping.ColumnMappings.Add("GEAENDERTWER", "GEAENDERTWER") tableMapping.ColumnMappings.Add("GEAENDERTWANN", "GEAENDERTWANN") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBWMRH_PROFIL_FILE_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Original_GUID)" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO TBWMRH_PROFIL_FILE_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (PROFIL_ID, TYP, STR"& _ "ING1, STRING2, STRING3, STRING4, BOOL1, BOOL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE,"& _ " ERSTELLTWER, GEAENDERTWER)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@PROFIL_ID,@TYP,@STRING1,@STRING2,@S"& _ "TRING3,@STRING4,@BOOL1,@BOOL2,@BOOL3,@BOOL4,@AKTIV,@REIHENFOLGE,@ERSTELLTWER,@GE"& _ "AENDERTWER); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, PROFIL_ID, TYP, STRING1, STRING2, STRING3, STRING4, "& _ "BOOL1, BOOL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE, ERSTELLTWER, ERSTELLTWANN, GEAEN"& _ "DERTWER, GEAENDERTWANN FROM TBWMRH_PROFIL_FILE_JOB WHERE (GUID = SCOPE_IDENTITY("& _ "))" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PROFIL_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PROFIL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYP", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "TYP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING1", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING2", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING3", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING4", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING4", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL1", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL2", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL3", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL4", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL4", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AKTIV", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "AKTIV", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@REIHENFOLGE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "REIHENFOLGE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ERSTELLTWER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "ERSTELLTWER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GEAENDERTWER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "GEAENDERTWER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE TBWMRH_PROFIL_FILE_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET TYP = @TYP, STRING1 = @ST"& _ "RING1, STRING2 = @STRING2, STRING3 = @STRING3, STRING4 = @STRING4, BOOL1 = @BOOL"& _ "1, BOOL2 = @BOOL2, BOOL3 = @BOOL3, BOOL4 = @BOOL4, AKTIV = @AKTIV, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _ " REIHENFOLGE = @REIHENFOLGE, GEAENDERTWER = @GEAENDERTWER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _ " (GUID = @Original_GUID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, PROFIL_ID, TYP, STRING1, STRING2, "& _ "STRING3, STRING4, BOOL1, BOOL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE, ERSTELLTWER, E"& _ "RSTELLTWANN, GEAENDERTWER, GEAENDERTWANN FROM TBWMRH_PROFIL_FILE_JOB WHERE (GUID"& _ " = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYP", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "TYP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING1", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING2", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING3", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING4", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING4", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL1", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL2", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL3", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL4", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL4", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AKTIV", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "AKTIV", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@REIHENFOLGE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "REIHENFOLGE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GEAENDERTWER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "GEAENDERTWER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.ResultHandler_Konfig.My.MySettings.Default.SQLSERVER_CS End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(1) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT GUID, PROFIL_ID, TYP, STRING1, STRING2, STRING3, STRING4, BOOL1, BO"& _ "OL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE, ERSTELLTWER, ERSTELLTWANN, GEAENDERTWER, "& _ "GEAENDERTWANN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBWMRH_PROFIL_FILE_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (PROFIL_ID ="& _ " @PID)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"ORDER BY REIHENFOLGE" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PROFIL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(1).Connection = Me.Connection Me._commandCollection(1).CommandText = "DELETE FROM TBWMRH_PROFIL_FILE_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE PROFIL_ID = @PROFILID" Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PROFILID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PROFIL_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBWMRH_PROFIL_FILE_JOBDataTable, ByVal PID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) Me.Adapter.SelectCommand.Parameters(0).Value = CType(PID,Integer) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal PID As Integer) As MyDataset.TBWMRH_PROFIL_FILE_JOBDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Me.Adapter.SelectCommand.Parameters(0).Value = CType(PID,Integer) Dim dataTable As MyDataset.TBWMRH_PROFIL_FILE_JOBDataTable = New MyDataset.TBWMRH_PROFIL_FILE_JOBDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBWMRH_PROFIL_FILE_JOBDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBWMRH_PROFIL_FILE_JOB") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal PROFIL_ID As Integer, ByVal TYP As String, ByVal STRING1 As String, ByVal STRING2 As String, ByVal STRING3 As String, ByVal STRING4 As String, ByVal BOOL1 As Boolean, ByVal BOOL2 As Boolean, ByVal BOOL3 As Boolean, ByVal BOOL4 As Boolean, ByVal AKTIV As Boolean, ByVal REIHENFOLGE As Integer, ByVal ERSTELLTWER As String, ByVal GEAENDERTWER As String) As Integer Me.Adapter.InsertCommand.Parameters(0).Value = CType(PROFIL_ID,Integer) If (TYP Is Nothing) Then Throw New Global.System.ArgumentNullException("TYP") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(TYP,String) End If If (STRING1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(STRING1,String) End If If (STRING2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(STRING2,String) End If If (STRING3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(STRING3,String) End If If (STRING4 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(STRING4,String) End If Me.Adapter.InsertCommand.Parameters(6).Value = CType(BOOL1,Boolean) Me.Adapter.InsertCommand.Parameters(7).Value = CType(BOOL2,Boolean) Me.Adapter.InsertCommand.Parameters(8).Value = CType(BOOL3,Boolean) Me.Adapter.InsertCommand.Parameters(9).Value = CType(BOOL4,Boolean) Me.Adapter.InsertCommand.Parameters(10).Value = CType(AKTIV,Boolean) Me.Adapter.InsertCommand.Parameters(11).Value = CType(REIHENFOLGE,Integer) If (ERSTELLTWER Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(ERSTELLTWER,String) End If If (GEAENDERTWER Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(GEAENDERTWER,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal TYP As String, ByVal STRING1 As String, ByVal STRING2 As String, ByVal STRING3 As String, ByVal STRING4 As String, ByVal BOOL1 As Boolean, ByVal BOOL2 As Boolean, ByVal BOOL3 As Boolean, ByVal BOOL4 As Boolean, ByVal AKTIV As Boolean, ByVal REIHENFOLGE As Integer, ByVal GEAENDERTWER As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer If (TYP Is Nothing) Then Throw New Global.System.ArgumentNullException("TYP") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(TYP,String) End If If (STRING1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(STRING1,String) End If If (STRING2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(STRING2,String) End If If (STRING3 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(STRING3,String) End If If (STRING4 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(STRING4,String) End If Me.Adapter.UpdateCommand.Parameters(5).Value = CType(BOOL1,Boolean) Me.Adapter.UpdateCommand.Parameters(6).Value = CType(BOOL2,Boolean) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(BOOL3,Boolean) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(BOOL4,Boolean) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(AKTIV,Boolean) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(REIHENFOLGE,Integer) If (GEAENDERTWER Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(GEAENDERTWER,String) End If Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_GUID,Integer) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(GUID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function DeleteForProfil(ByVal PROFILID As Integer) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1) command.Parameters(0).Value = CType(PROFILID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class TBWMRH_PROFIL_JOBTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "TBWMRH_PROFIL_JOB" tableMapping.ColumnMappings.Add("GUID", "GUID") tableMapping.ColumnMappings.Add("PROFIL_ID", "PROFIL_ID") tableMapping.ColumnMappings.Add("JOB_TYP", "JOB_TYP") tableMapping.ColumnMappings.Add("STRING1", "STRING1") tableMapping.ColumnMappings.Add("STRING2", "STRING2") tableMapping.ColumnMappings.Add("STRING3", "STRING3") tableMapping.ColumnMappings.Add("STRING4", "STRING4") tableMapping.ColumnMappings.Add("BOOL1", "BOOL1") tableMapping.ColumnMappings.Add("BOOL2", "BOOL2") tableMapping.ColumnMappings.Add("BOOL3", "BOOL3") tableMapping.ColumnMappings.Add("BOOL4", "BOOL4") tableMapping.ColumnMappings.Add("AKTIV", "AKTIV") tableMapping.ColumnMappings.Add("REIHENFOLGE", "REIHENFOLGE") tableMapping.ColumnMappings.Add("ERSTELLTWER", "ERSTELLTWER") tableMapping.ColumnMappings.Add("ERSTELLTWANN", "ERSTELLTWANN") tableMapping.ColumnMappings.Add("GEAENDERTWER", "GEAENDERTWER") tableMapping.ColumnMappings.Add("GEAENDERTWANN", "GEAENDERTWANN") tableMapping.ColumnMappings.Add("STRING5", "STRING5") tableMapping.ColumnMappings.Add("STRING6", "STRING6") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBWMRH_PROFIL_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Original_GUID)" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO TBWMRH_PROFIL_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (PROFIL_ID, JOB_TYP, STRI"& _ "NG1, STRING2, STRING3, STRING4, BOOL1, BOOL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE, "& _ "ERSTELLTWER, STRING5, STRING6)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@PROFIL_ID,@JOB_TYP,@STRING1,@STR"& _ "ING2,@STRING3,@STRING4,@BOOL1,@BOOL2,@BOOL3,@BOOL4,@AKTIV,@REIHENFOLGE,@ERSTELLT"& _ "WER,@STRING5,@STRING6); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, PROFIL_ID, JOB_TYP, STRING1, STRING2, ST"& _ "RING3, STRING4, BOOL1, BOOL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE, ERSTELLTWER, ERS"& _ "TELLTWANN, GEAENDERTWER, GEAENDERTWANN FROM TBWMRH_PROFIL_JOB WHERE (GUID = SCOP"& _ "E_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PROFIL_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PROFIL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@JOB_TYP", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "JOB_TYP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING1", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING2", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING3", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING4", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING4", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL1", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL2", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL3", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL4", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL4", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AKTIV", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "AKTIV", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@REIHENFOLGE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "REIHENFOLGE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ERSTELLTWER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "ERSTELLTWER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING5", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING5", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING6", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING6", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE TBWMRH_PROFIL_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET PROFIL_ID = @PROFIL_ID, JOB_TY"& _ "P = @JOB_TYP, STRING1 = @STRING1, STRING2 = @STRING2, STRING3 = @STRING3, STRING"& _ "4 = @STRING4, BOOL1 = @BOOL1, BOOL2 = @BOOL2, BOOL3 = @BOOL3, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _ " BOOL4 = @BOOL4, AKTIV = @AKTIV, REIHENFOLGE = @REIHENFOLGE, GEAENDERTWE"& _ "R = @GEAENDERTWER, STRING5 = @STRING5, STRING6 = @STRING6"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = "& _ "@Original_GUID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, PROFIL_ID, JOB_TYP, STRING1, STRING2, STRING3, S"& _ "TRING4, BOOL1, BOOL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE, ERSTELLTWER, ERSTELLTWAN"& _ "N, GEAENDERTWER, GEAENDERTWANN FROM TBWMRH_PROFIL_JOB WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PROFIL_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PROFIL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@JOB_TYP", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "JOB_TYP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING1", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING2", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING3", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING4", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING4", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL1", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL2", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL3", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BOOL4", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "BOOL4", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AKTIV", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "AKTIV", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@REIHENFOLGE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "REIHENFOLGE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GEAENDERTWER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "GEAENDERTWER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING5", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING5", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@STRING6", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, "STRING6", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.ResultHandler_Konfig.My.MySettings.Default.SQLSERVER_CS End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(1) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT GUID, PROFIL_ID, JOB_TYP, STRING1, STRING2, STRING3, STRING4, BOOL1"& _ ", BOOL2, BOOL3, BOOL4, AKTIV, REIHENFOLGE, ERSTELLTWER, ERSTELLTWANN, GEAENDERTW"& _ "ER, GEAENDERTWANN, STRING5, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" STRING6"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM "& _ "TBWMRH_PROFIL_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (PROFIL_ID = @PID)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"ORDER BY REIHENFOLGE" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PROFIL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(1).Connection = Me.Connection Me._commandCollection(1).CommandText = "DELETE FROM TBWMRH_PROFIL_JOB"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE PROFIL_ID = @PID" Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PROFIL_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBWMRH_PROFIL_JOBDataTable, ByVal PID As Global.System.Nullable(Of Integer)) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (PID.HasValue = true) Then Me.Adapter.SelectCommand.Parameters(0).Value = CType(PID.Value,Integer) Else Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal PID As Global.System.Nullable(Of Integer)) As MyDataset.TBWMRH_PROFIL_JOBDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (PID.HasValue = true) Then Me.Adapter.SelectCommand.Parameters(0).Value = CType(PID.Value,Integer) Else Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value End If Dim dataTable As MyDataset.TBWMRH_PROFIL_JOBDataTable = New MyDataset.TBWMRH_PROFIL_JOBDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBWMRH_PROFIL_JOBDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBWMRH_PROFIL_JOB") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal PROFIL_ID As Global.System.Nullable(Of Integer), ByVal JOB_TYP As String, ByVal STRING1 As String, ByVal STRING2 As String, ByVal STRING3 As String, ByVal STRING4 As String, ByVal BOOL1 As Global.System.Nullable(Of Boolean), ByVal BOOL2 As Global.System.Nullable(Of Boolean), ByVal BOOL3 As Global.System.Nullable(Of Boolean), ByVal BOOL4 As Global.System.Nullable(Of Boolean), ByVal AKTIV As Global.System.Nullable(Of Boolean), ByVal REIHENFOLGE As Integer, ByVal ERSTELLTWER As String, ByVal STRING5 As String, ByVal STRING6 As String) As Integer If (PROFIL_ID.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(0).Value = CType(PROFIL_ID.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value End If If (JOB_TYP Is Nothing) Then Throw New Global.System.ArgumentNullException("JOB_TYP") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(JOB_TYP,String) End If If (STRING1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(STRING1,String) End If If (STRING2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(STRING2,String) End If If (STRING3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(STRING3,String) End If If (STRING4 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(STRING4,String) End If If (BOOL1.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(BOOL1.Value,Boolean) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (BOOL2.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(BOOL2.Value,Boolean) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (BOOL3.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(BOOL3.Value,Boolean) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (BOOL4.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(BOOL4.Value,Boolean) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (AKTIV.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(AKTIV.Value,Boolean) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If Me.Adapter.InsertCommand.Parameters(11).Value = CType(REIHENFOLGE,Integer) If (ERSTELLTWER Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(ERSTELLTWER,String) End If If (STRING5 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(STRING5,String) End If If (STRING6 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(STRING6,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal PROFIL_ID As Global.System.Nullable(Of Integer), _ ByVal JOB_TYP As String, _ ByVal STRING1 As String, _ ByVal STRING2 As String, _ ByVal STRING3 As String, _ ByVal STRING4 As String, _ ByVal BOOL1 As Global.System.Nullable(Of Boolean), _ ByVal BOOL2 As Global.System.Nullable(Of Boolean), _ ByVal BOOL3 As Global.System.Nullable(Of Boolean), _ ByVal BOOL4 As Global.System.Nullable(Of Boolean), _ ByVal AKTIV As Global.System.Nullable(Of Boolean), _ ByVal REIHENFOLGE As Integer, _ ByVal GEAENDERTWER As String, _ ByVal STRING5 As String, _ ByVal STRING6 As String, _ ByVal Original_GUID As Integer, _ ByVal GUID As Integer) As Integer If (PROFIL_ID.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(0).Value = CType(PROFIL_ID.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value End If If (JOB_TYP Is Nothing) Then Throw New Global.System.ArgumentNullException("JOB_TYP") Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(JOB_TYP,String) End If If (STRING1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(STRING1,String) End If If (STRING2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(STRING2,String) End If If (STRING3 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(STRING3,String) End If If (STRING4 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(STRING4,String) End If If (BOOL1.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(BOOL1.Value,Boolean) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (BOOL2.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(BOOL2.Value,Boolean) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (BOOL3.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(BOOL3.Value,Boolean) Else Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (BOOL4.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(BOOL4.Value,Boolean) Else Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (AKTIV.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(AKTIV.Value,Boolean) Else Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value End If Me.Adapter.UpdateCommand.Parameters(11).Value = CType(REIHENFOLGE,Integer) If (GEAENDERTWER Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(GEAENDERTWER,String) End If If (STRING5 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(STRING5,String) End If If (STRING6 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(STRING6,String) End If Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_GUID,Integer) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(GUID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function DeleteforPROFIL(ByVal PID As Global.System.Nullable(Of Integer)) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1) If (PID.HasValue = true) Then command.Parameters(0).Value = CType(PID.Value,Integer) Else command.Parameters(0).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class TBDD_EMAIL_ACCOUNTTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "TBDD_EMAIL_ACCOUNT" tableMapping.ColumnMappings.Add("GUID", "GUID") tableMapping.ColumnMappings.Add("NAME", "NAME") tableMapping.ColumnMappings.Add("EMAIL_FROM", "EMAIL_FROM") tableMapping.ColumnMappings.Add("EMAIL_SMTP", "EMAIL_SMTP") tableMapping.ColumnMappings.Add("EMAIL_USER", "EMAIL_USER") tableMapping.ColumnMappings.Add("EMAIL_PW", "EMAIL_PW") tableMapping.ColumnMappings.Add("PORT", "PORT") tableMapping.ColumnMappings.Add("ACTIVE", "ACTIVE") tableMapping.ColumnMappings.Add("ADDED_WHO", "ADDED_WHO") tableMapping.ColumnMappings.Add("ADDED_WHEN", "ADDED_WHEN") tableMapping.ColumnMappings.Add("CHANGED_WHO", "CHANGED_WHO") tableMapping.ColumnMappings.Add("CHANGED_WHEN", "CHANGED_WHEN") tableMapping.ColumnMappings.Add("SSL_AUTH", "SSL_AUTH") tableMapping.ColumnMappings.Add("AUTH_TYPE", "AUTH_TYPE") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBDD_EMAIL_ACCOUNT"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Original_GUID)" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO TBDD_EMAIL_ACCOUNT"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (NAME, EMAIL_FROM, EMAIL"& _ "_SMTP, EMAIL_USER, EMAIL_PW, PORT, ACTIVE, ADDED_WHO, SSL_AUTH, AUTH_TYPE)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALU"& _ "ES (@NAME,@EMAIL_FROM,@EMAIL_SMTP,@EMAIL_USER,@EMAIL_PW,@PORT,@ACTIVE,@AD"& _ "DED_WHO,@SSL_AUTH,@AUTH_TYPE); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, NAME, EMAIL_FROM, EMAIL_SMTP, EM"& _ "AIL_USER, EMAIL_PW, PORT, ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WH"& _ "EN FROM TBDD_EMAIL_ACCOUNT WHERE (GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@NAME", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EMAIL_FROM", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "EMAIL_FROM", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EMAIL_SMTP", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "EMAIL_SMTP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EMAIL_USER", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "EMAIL_USER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EMAIL_PW", Global.System.Data.SqlDbType.VarChar, 500, Global.System.Data.ParameterDirection.Input, 0, 0, "EMAIL_PW", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PORT", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PORT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ACTIVE", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "ACTIVE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SSL_AUTH", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "SSL_AUTH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AUTH_TYPE", Global.System.Data.SqlDbType.VarChar, 20, Global.System.Data.ParameterDirection.Input, 0, 0, "AUTH_TYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE TBDD_EMAIL_ACCOUNT"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET NAME = @NAME, EMAIL_FROM = @E"& _ "MAIL_FROM, EMAIL_SMTP = @EMAIL_SMTP, EMAIL_USER = @EMAIL_USER, EMAIL_PW = @EMAIL"& _ "_PW, PORT = @PORT, ACTIVE = @ACTIVE, CHANGED_WHO = @CHANGED_WHO, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _ " SSL_AUTH = @SSL_AUTH, AUTH_TYPE = @AUTH_TYPE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @"& _ "Original_GUID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, NAME, EMAIL_FROM, EMAIL_SMTP, EMAIL_USER, EMAIL"& _ "_PW, PORT, ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBDD_EM"& _ "AIL_ACCOUNT WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@NAME", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EMAIL_FROM", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "EMAIL_FROM", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EMAIL_SMTP", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "EMAIL_SMTP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EMAIL_USER", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "EMAIL_USER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EMAIL_PW", Global.System.Data.SqlDbType.VarChar, 500, Global.System.Data.ParameterDirection.Input, 0, 0, "EMAIL_PW", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PORT", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PORT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ACTIVE", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "ACTIVE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SSL_AUTH", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "SSL_AUTH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AUTH_TYPE", Global.System.Data.SqlDbType.VarChar, 20, Global.System.Data.ParameterDirection.Input, 0, 0, "AUTH_TYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.ResultHandler_Konfig.My.MySettings.Default.SQLSERVER_CS End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT GUID, NAME, EMAIL_FROM, EMAIL_SMTP, EMAIL_USER, EMAIL_PW, PORT, ACT"& _ "IVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, SSL_AUTH, AUTH_TYPE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM"& _ " TBDD_EMAIL_ACCOUNT" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_EMAIL_ACCOUNTDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As MyDataset.TBDD_EMAIL_ACCOUNTDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As MyDataset.TBDD_EMAIL_ACCOUNTDataTable = New MyDataset.TBDD_EMAIL_ACCOUNTDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_EMAIL_ACCOUNTDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_EMAIL_ACCOUNT") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal NAME As String, ByVal EMAIL_FROM As String, ByVal EMAIL_SMTP As String, ByVal EMAIL_USER As String, ByVal EMAIL_PW As String, ByVal PORT As Integer, ByVal ACTIVE As Boolean, ByVal ADDED_WHO As String, ByVal SSL_AUTH As Boolean, ByVal AUTH_TYPE As String) As Integer If (NAME Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(NAME,String) End If If (EMAIL_FROM Is Nothing) Then Throw New Global.System.ArgumentNullException("EMAIL_FROM") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(EMAIL_FROM,String) End If If (EMAIL_SMTP Is Nothing) Then Throw New Global.System.ArgumentNullException("EMAIL_SMTP") Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(EMAIL_SMTP,String) End If If (EMAIL_USER Is Nothing) Then Throw New Global.System.ArgumentNullException("EMAIL_USER") Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(EMAIL_USER,String) End If If (EMAIL_PW Is Nothing) Then Throw New Global.System.ArgumentNullException("EMAIL_PW") Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(EMAIL_PW,String) End If Me.Adapter.InsertCommand.Parameters(5).Value = CType(PORT,Integer) Me.Adapter.InsertCommand.Parameters(6).Value = CType(ACTIVE,Boolean) If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(ADDED_WHO,String) End If Me.Adapter.InsertCommand.Parameters(8).Value = CType(SSL_AUTH,Boolean) If (AUTH_TYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("AUTH_TYPE") Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(AUTH_TYPE,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal NAME As String, ByVal EMAIL_FROM As String, ByVal EMAIL_SMTP As String, ByVal EMAIL_USER As String, ByVal EMAIL_PW As String, ByVal PORT As Integer, ByVal ACTIVE As Boolean, ByVal CHANGED_WHO As String, ByVal SSL_AUTH As Boolean, ByVal AUTH_TYPE As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer If (NAME Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(NAME,String) End If If (EMAIL_FROM Is Nothing) Then Throw New Global.System.ArgumentNullException("EMAIL_FROM") Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(EMAIL_FROM,String) End If If (EMAIL_SMTP Is Nothing) Then Throw New Global.System.ArgumentNullException("EMAIL_SMTP") Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(EMAIL_SMTP,String) End If If (EMAIL_USER Is Nothing) Then Throw New Global.System.ArgumentNullException("EMAIL_USER") Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(EMAIL_USER,String) End If If (EMAIL_PW Is Nothing) Then Throw New Global.System.ArgumentNullException("EMAIL_PW") Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(EMAIL_PW,String) End If Me.Adapter.UpdateCommand.Parameters(5).Value = CType(PORT,Integer) Me.Adapter.UpdateCommand.Parameters(6).Value = CType(ACTIVE,Boolean) If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(CHANGED_WHO,String) End If Me.Adapter.UpdateCommand.Parameters(8).Value = CType(SSL_AUTH,Boolean) If (AUTH_TYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("AUTH_TYPE") Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(AUTH_TYPE,String) End If Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_GUID,Integer) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(GUID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function End Class ''' '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios ''' _ Partial Public Class TableAdapterManager Inherits Global.System.ComponentModel.Component Private _updateOrder As UpdateOrderOption Private _tBWMRH_KONFIGURATIONTableAdapter As TBWMRH_KONFIGURATIONTableAdapter Private _tBWMRH_PROFILTableAdapter As TBWMRH_PROFILTableAdapter Private _tBWMRH_PROFIL_FILE_JOBTableAdapter As TBWMRH_PROFIL_FILE_JOBTableAdapter Private _tBWMRH_PROFIL_JOBTableAdapter As TBWMRH_PROFIL_JOBTableAdapter Private _tBDD_EMAIL_ACCOUNTTableAdapter As TBDD_EMAIL_ACCOUNTTableAdapter Private _backupDataSetBeforeUpdate As Boolean Private _connection As Global.System.Data.IDbConnection _ Public Property UpdateOrder() As UpdateOrderOption Get Return Me._updateOrder End Get Set Me._updateOrder = value End Set End Property _ Public Property TBWMRH_KONFIGURATIONTableAdapter() As TBWMRH_KONFIGURATIONTableAdapter Get Return Me._tBWMRH_KONFIGURATIONTableAdapter End Get Set Me._tBWMRH_KONFIGURATIONTableAdapter = value End Set End Property _ Public Property TBWMRH_PROFILTableAdapter() As TBWMRH_PROFILTableAdapter Get Return Me._tBWMRH_PROFILTableAdapter End Get Set Me._tBWMRH_PROFILTableAdapter = value End Set End Property _ Public Property TBWMRH_PROFIL_FILE_JOBTableAdapter() As TBWMRH_PROFIL_FILE_JOBTableAdapter Get Return Me._tBWMRH_PROFIL_FILE_JOBTableAdapter End Get Set Me._tBWMRH_PROFIL_FILE_JOBTableAdapter = value End Set End Property _ Public Property TBWMRH_PROFIL_JOBTableAdapter() As TBWMRH_PROFIL_JOBTableAdapter Get Return Me._tBWMRH_PROFIL_JOBTableAdapter End Get Set Me._tBWMRH_PROFIL_JOBTableAdapter = value End Set End Property _ Public Property TBDD_EMAIL_ACCOUNTTableAdapter() As TBDD_EMAIL_ACCOUNTTableAdapter Get Return Me._tBDD_EMAIL_ACCOUNTTableAdapter End Get Set Me._tBDD_EMAIL_ACCOUNTTableAdapter = value End Set End Property _ Public Property BackupDataSetBeforeUpdate() As Boolean Get Return Me._backupDataSetBeforeUpdate End Get Set Me._backupDataSetBeforeUpdate = value End Set End Property _ Public Property Connection() As Global.System.Data.IDbConnection Get If (Not (Me._connection) Is Nothing) Then Return Me._connection End If If ((Not (Me._tBWMRH_KONFIGURATIONTableAdapter) Is Nothing) _ AndAlso (Not (Me._tBWMRH_KONFIGURATIONTableAdapter.Connection) Is Nothing)) Then Return Me._tBWMRH_KONFIGURATIONTableAdapter.Connection End If If ((Not (Me._tBWMRH_PROFILTableAdapter) Is Nothing) _ AndAlso (Not (Me._tBWMRH_PROFILTableAdapter.Connection) Is Nothing)) Then Return Me._tBWMRH_PROFILTableAdapter.Connection End If If ((Not (Me._tBWMRH_PROFIL_FILE_JOBTableAdapter) Is Nothing) _ AndAlso (Not (Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Connection) Is Nothing)) Then Return Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Connection End If If ((Not (Me._tBWMRH_PROFIL_JOBTableAdapter) Is Nothing) _ AndAlso (Not (Me._tBWMRH_PROFIL_JOBTableAdapter.Connection) Is Nothing)) Then Return Me._tBWMRH_PROFIL_JOBTableAdapter.Connection End If If ((Not (Me._tBDD_EMAIL_ACCOUNTTableAdapter) Is Nothing) _ AndAlso (Not (Me._tBDD_EMAIL_ACCOUNTTableAdapter.Connection) Is Nothing)) Then Return Me._tBDD_EMAIL_ACCOUNTTableAdapter.Connection End If Return Nothing End Get Set Me._connection = value End Set End Property _ Public ReadOnly Property TableAdapterInstanceCount() As Integer Get Dim count As Integer = 0 If (Not (Me._tBWMRH_KONFIGURATIONTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._tBWMRH_PROFILTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._tBWMRH_PROFIL_FILE_JOBTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._tBWMRH_PROFIL_JOBTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._tBDD_EMAIL_ACCOUNTTableAdapter) Is Nothing) Then count = (count + 1) End If Return count End Get End Property ''' '''Update rows in top-down order. ''' _ Private Function UpdateUpdatedRows(ByVal dataSet As MyDataset, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow), ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 If (Not (Me._tBWMRH_PROFILTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_PROFIL.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._tBWMRH_PROFILTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._tBWMRH_KONFIGURATIONTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_KONFIGURATION.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._tBWMRH_KONFIGURATIONTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._tBWMRH_PROFIL_FILE_JOBTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_PROFIL_FILE_JOB.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._tBWMRH_PROFIL_JOBTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_PROFIL_JOB.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._tBWMRH_PROFIL_JOBTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._tBDD_EMAIL_ACCOUNTTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBDD_EMAIL_ACCOUNT.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._tBDD_EMAIL_ACCOUNTTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If Return result End Function ''' '''Insert rows in top-down order. ''' _ Private Function UpdateInsertedRows(ByVal dataSet As MyDataset, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 If (Not (Me._tBWMRH_PROFILTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_PROFIL.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._tBWMRH_PROFILTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._tBWMRH_KONFIGURATIONTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_KONFIGURATION.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._tBWMRH_KONFIGURATIONTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._tBWMRH_PROFIL_FILE_JOBTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_PROFIL_FILE_JOB.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._tBWMRH_PROFIL_JOBTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_PROFIL_JOB.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._tBWMRH_PROFIL_JOBTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._tBDD_EMAIL_ACCOUNTTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.TBDD_EMAIL_ACCOUNT.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._tBDD_EMAIL_ACCOUNTTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If Return result End Function ''' '''Delete rows in bottom-up order. ''' _ Private Function UpdateDeletedRows(ByVal dataSet As MyDataset, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 If (Not (Me._tBDD_EMAIL_ACCOUNTTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBDD_EMAIL_ACCOUNT.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._tBDD_EMAIL_ACCOUNTTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._tBWMRH_PROFIL_JOBTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_PROFIL_JOB.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._tBWMRH_PROFIL_JOBTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._tBWMRH_PROFIL_FILE_JOBTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_PROFIL_FILE_JOB.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._tBWMRH_KONFIGURATIONTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_KONFIGURATION.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._tBWMRH_KONFIGURATIONTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._tBWMRH_PROFILTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBWMRH_PROFIL.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._tBWMRH_PROFILTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If Return result End Function ''' '''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first ''' _ Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System.Data.DataRow, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Global.System.Data.DataRow() If ((updatedRows Is Nothing) _ OrElse (updatedRows.Length < 1)) Then Return updatedRows End If If ((allAddedRows Is Nothing) _ OrElse (allAddedRows.Count < 1)) Then Return updatedRows End If Dim realUpdatedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() Dim i As Integer = 0 Do While (i < updatedRows.Length) Dim row As Global.System.Data.DataRow = updatedRows(i) If (allAddedRows.Contains(row) = false) Then realUpdatedRows.Add(row) End If i = (i + 1) Loop Return realUpdatedRows.ToArray End Function ''' '''Update all changes to the dataset. ''' _ Public Overridable Function UpdateAll(ByVal dataSet As MyDataset) As Integer If (dataSet Is Nothing) Then Throw New Global.System.ArgumentNullException("dataSet") End If If (dataSet.HasChanges = false) Then Return 0 End If If ((Not (Me._tBWMRH_KONFIGURATIONTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._tBWMRH_KONFIGURATIONTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("Für alle von einem TableAdapterManager verwalteten Instanzen von TableAdapter mus"& _ "s die gleiche Verbindungszeichenfolge verwendet werden.") End If If ((Not (Me._tBWMRH_PROFILTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._tBWMRH_PROFILTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("Für alle von einem TableAdapterManager verwalteten Instanzen von TableAdapter mus"& _ "s die gleiche Verbindungszeichenfolge verwendet werden.") End If If ((Not (Me._tBWMRH_PROFIL_FILE_JOBTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("Für alle von einem TableAdapterManager verwalteten Instanzen von TableAdapter mus"& _ "s die gleiche Verbindungszeichenfolge verwendet werden.") End If If ((Not (Me._tBWMRH_PROFIL_JOBTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._tBWMRH_PROFIL_JOBTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("Für alle von einem TableAdapterManager verwalteten Instanzen von TableAdapter mus"& _ "s die gleiche Verbindungszeichenfolge verwendet werden.") End If If ((Not (Me._tBDD_EMAIL_ACCOUNTTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._tBDD_EMAIL_ACCOUNTTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("Für alle von einem TableAdapterManager verwalteten Instanzen von TableAdapter mus"& _ "s die gleiche Verbindungszeichenfolge verwendet werden.") End If Dim workConnection As Global.System.Data.IDbConnection = Me.Connection If (workConnection Is Nothing) Then Throw New Global.System.ApplicationException("TableAdapterManager enthält keine Verbindungsinformationen. Legen Sie jede TableA"& _ "dapterManager TableAdapter-Eigenschaft auf eine gültige TableAdapter-Instanz fes"& _ "t.") End If Dim workConnOpened As Boolean = false If ((workConnection.State And Global.System.Data.ConnectionState.Broken) _ = Global.System.Data.ConnectionState.Broken) Then workConnection.Close End If If (workConnection.State = Global.System.Data.ConnectionState.Closed) Then workConnection.Open workConnOpened = true End If Dim workTransaction As Global.System.Data.IDbTransaction = workConnection.BeginTransaction If (workTransaction Is Nothing) Then Throw New Global.System.ApplicationException("Die Transaktion kann nicht gestartet werden. Die aktuelle Datenverbindung unterst"& _ "ützt keine Transaktionen, oder der aktuelle Zustand lässt den Start der Transakt"& _ "ion nicht zu.") End If Dim allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() Dim allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() Dim adaptersWithAcceptChangesDuringUpdate As Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter) = New Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter)() Dim revertConnections As Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection) = New Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection)() Dim result As Integer = 0 Dim backupDataSet As Global.System.Data.DataSet = Nothing If Me.BackupDataSetBeforeUpdate Then backupDataSet = New Global.System.Data.DataSet() backupDataSet.Merge(dataSet) End If Try '---- Prepare for update ----------- ' If (Not (Me._tBWMRH_KONFIGURATIONTableAdapter) Is Nothing) Then revertConnections.Add(Me._tBWMRH_KONFIGURATIONTableAdapter, Me._tBWMRH_KONFIGURATIONTableAdapter.Connection) Me._tBWMRH_KONFIGURATIONTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._tBWMRH_KONFIGURATIONTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._tBWMRH_KONFIGURATIONTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._tBWMRH_KONFIGURATIONTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._tBWMRH_KONFIGURATIONTableAdapter.Adapter) End If End If If (Not (Me._tBWMRH_PROFILTableAdapter) Is Nothing) Then revertConnections.Add(Me._tBWMRH_PROFILTableAdapter, Me._tBWMRH_PROFILTableAdapter.Connection) Me._tBWMRH_PROFILTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._tBWMRH_PROFILTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._tBWMRH_PROFILTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._tBWMRH_PROFILTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._tBWMRH_PROFILTableAdapter.Adapter) End If End If If (Not (Me._tBWMRH_PROFIL_FILE_JOBTableAdapter) Is Nothing) Then revertConnections.Add(Me._tBWMRH_PROFIL_FILE_JOBTableAdapter, Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Connection) Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Adapter) End If End If If (Not (Me._tBWMRH_PROFIL_JOBTableAdapter) Is Nothing) Then revertConnections.Add(Me._tBWMRH_PROFIL_JOBTableAdapter, Me._tBWMRH_PROFIL_JOBTableAdapter.Connection) Me._tBWMRH_PROFIL_JOBTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._tBWMRH_PROFIL_JOBTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._tBWMRH_PROFIL_JOBTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._tBWMRH_PROFIL_JOBTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._tBWMRH_PROFIL_JOBTableAdapter.Adapter) End If End If If (Not (Me._tBDD_EMAIL_ACCOUNTTableAdapter) Is Nothing) Then revertConnections.Add(Me._tBDD_EMAIL_ACCOUNTTableAdapter, Me._tBDD_EMAIL_ACCOUNTTableAdapter.Connection) Me._tBDD_EMAIL_ACCOUNTTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._tBDD_EMAIL_ACCOUNTTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._tBDD_EMAIL_ACCOUNTTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._tBDD_EMAIL_ACCOUNTTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._tBDD_EMAIL_ACCOUNTTableAdapter.Adapter) End If End If ' '---- Perform updates ----------- ' If (Me.UpdateOrder = UpdateOrderOption.UpdateInsertDelete) Then result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)) result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows)) Else result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows)) result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)) End If result = (result + Me.UpdateDeletedRows(dataSet, allChangedRows)) ' '---- Commit updates ----------- ' workTransaction.Commit If (0 < allAddedRows.Count) Then Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow allAddedRows.CopyTo(rows) Dim i As Integer = 0 Do While (i < rows.Length) Dim row As Global.System.Data.DataRow = rows(i) row.AcceptChanges i = (i + 1) Loop End If If (0 < allChangedRows.Count) Then Dim rows((allChangedRows.Count) - 1) As Global.System.Data.DataRow allChangedRows.CopyTo(rows) Dim i As Integer = 0 Do While (i < rows.Length) Dim row As Global.System.Data.DataRow = rows(i) row.AcceptChanges i = (i + 1) Loop End If Catch ex As Global.System.Exception workTransaction.Rollback '---- Restore the dataset ----------- If Me.BackupDataSetBeforeUpdate Then Global.System.Diagnostics.Debug.Assert((Not (backupDataSet) Is Nothing)) dataSet.Clear dataSet.Merge(backupDataSet) Else If (0 < allAddedRows.Count) Then Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow allAddedRows.CopyTo(rows) Dim i As Integer = 0 Do While (i < rows.Length) Dim row As Global.System.Data.DataRow = rows(i) row.AcceptChanges row.SetAdded i = (i + 1) Loop End If End If Throw ex Finally If workConnOpened Then workConnection.Close End If If (Not (Me._tBWMRH_KONFIGURATIONTableAdapter) Is Nothing) Then Me._tBWMRH_KONFIGURATIONTableAdapter.Connection = CType(revertConnections(Me._tBWMRH_KONFIGURATIONTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._tBWMRH_KONFIGURATIONTableAdapter.Transaction = Nothing End If If (Not (Me._tBWMRH_PROFILTableAdapter) Is Nothing) Then Me._tBWMRH_PROFILTableAdapter.Connection = CType(revertConnections(Me._tBWMRH_PROFILTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._tBWMRH_PROFILTableAdapter.Transaction = Nothing End If If (Not (Me._tBWMRH_PROFIL_FILE_JOBTableAdapter) Is Nothing) Then Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Connection = CType(revertConnections(Me._tBWMRH_PROFIL_FILE_JOBTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._tBWMRH_PROFIL_FILE_JOBTableAdapter.Transaction = Nothing End If If (Not (Me._tBWMRH_PROFIL_JOBTableAdapter) Is Nothing) Then Me._tBWMRH_PROFIL_JOBTableAdapter.Connection = CType(revertConnections(Me._tBWMRH_PROFIL_JOBTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._tBWMRH_PROFIL_JOBTableAdapter.Transaction = Nothing End If If (Not (Me._tBDD_EMAIL_ACCOUNTTableAdapter) Is Nothing) Then Me._tBDD_EMAIL_ACCOUNTTableAdapter.Connection = CType(revertConnections(Me._tBDD_EMAIL_ACCOUNTTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._tBDD_EMAIL_ACCOUNTTableAdapter.Transaction = Nothing End If If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters) Dim i As Integer = 0 Do While (i < adapters.Length) Dim adapter As Global.System.Data.Common.DataAdapter = adapters(i) adapter.AcceptChangesDuringUpdate = true i = (i + 1) Loop End If End Try Return result End Function _ Protected Overridable Sub SortSelfReferenceRows(ByVal rows() As Global.System.Data.DataRow, ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean) Global.System.Array.Sort(Of Global.System.Data.DataRow)(rows, New SelfReferenceComparer(relation, childFirst)) End Sub _ Protected Overridable Function MatchTableAdapterConnection(ByVal inputConnection As Global.System.Data.IDbConnection) As Boolean If (Not (Me._connection) Is Nothing) Then Return true End If If ((Me.Connection Is Nothing) _ OrElse (inputConnection Is Nothing)) Then Return true End If If String.Equals(Me.Connection.ConnectionString, inputConnection.ConnectionString, Global.System.StringComparison.Ordinal) Then Return true End If Return false End Function ''' '''Update Order Option ''' _ Public Enum UpdateOrderOption InsertUpdateDelete = 0 UpdateInsertDelete = 1 End Enum ''' '''Used to sort self-referenced table's rows ''' _ Private Class SelfReferenceComparer Inherits Object Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow) Private _relation As Global.System.Data.DataRelation Private _childFirst As Integer _ Friend Sub New(ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean) MyBase.New Me._relation = relation If childFirst Then Me._childFirst = -1 Else Me._childFirst = 1 End If End Sub _ Private Function GetRoot(ByVal row As Global.System.Data.DataRow, ByRef distance As Integer) As Global.System.Data.DataRow Global.System.Diagnostics.Debug.Assert((Not (row) Is Nothing)) Dim root As Global.System.Data.DataRow = row distance = 0 Dim traversedRows As Global.System.Collections.Generic.IDictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow) = New Global.System.Collections.Generic.Dictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow)() traversedRows(row) = row Dim parent As Global.System.Data.DataRow = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default]) Do While ((Not (parent) Is Nothing) _ AndAlso (traversedRows.ContainsKey(parent) = false)) distance = (distance + 1) root = parent traversedRows(parent) = parent parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default]) Loop If (distance = 0) Then traversedRows.Clear traversedRows(row) = row parent = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original) Do While ((Not (parent) Is Nothing) _ AndAlso (traversedRows.ContainsKey(parent) = false)) distance = (distance + 1) root = parent traversedRows(parent) = parent parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original) Loop End If Return root End Function _ Public Function Compare(ByVal row1 As Global.System.Data.DataRow, ByVal row2 As Global.System.Data.DataRow) As Integer Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow).Compare If Object.ReferenceEquals(row1, row2) Then Return 0 End If If (row1 Is Nothing) Then Return -1 End If If (row2 Is Nothing) Then Return 1 End If Dim distance1 As Integer = 0 Dim root1 As Global.System.Data.DataRow = Me.GetRoot(row1, distance1) Dim distance2 As Integer = 0 Dim root2 As Global.System.Data.DataRow = Me.GetRoot(row2, distance2) If Object.ReferenceEquals(root1, root2) Then Return (Me._childFirst * distance1.CompareTo(distance2)) Else Global.System.Diagnostics.Debug.Assert(((Not (root1.Table) Is Nothing) _ AndAlso (Not (root2.Table) Is Nothing))) If (root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2)) Then Return -1 Else Return 1 End If End If End Function End Class End Class End Namespace