From 524552a2da0ab573d43c0c33da640080faf48196 Mon Sep 17 00:00:00 2001 From: SchreiberM Date: Wed, 19 Aug 2015 14:36:21 +0200 Subject: [PATCH] MS 19.08 --- Global_Indexer/ClassDatabase.vb | 12 +- Global_Indexer/ClassFilehandle.vb | 27 + Global_Indexer/ClassPostprocessing.vb | 14 +- Global_Indexer/Global_Indexer.vbproj | 10 + Global_Indexer/ModuleCURRENT.vb | 5 + Global_Indexer/My Project/AssemblyInfo.vb | 2 +- .../My Project/Resources.Designer.vb | 10 + Global_Indexer/My Project/Resources.resx | 27 +- Global_Indexer/MyDataset.Designer.vb | 6165 +++++++++-------- Global_Indexer/MyDataset.xsc | 31 +- Global_Indexer/MyDataset.xsd | 51 +- Global_Indexer/MyDataset.xss | 85 +- Global_Indexer/frmAdministration.Designer.vb | 223 +- Global_Indexer/frmAdministration.resx | 3 + Global_Indexer/frmAdministration.vb | 82 +- Global_Indexer/frmConfig_Basic.designer.vb | 134 +- Global_Indexer/frmHistory.Designer.vb | 55 +- Global_Indexer/frmHistory.vb | 52 +- Global_Indexer/frmIndex.designer.vb | 34 +- Global_Indexer/frmIndex.resx | 9 + Global_Indexer/frmIndex.vb | 168 +- Global_Indexer/frmSQLSuggestion.vb | 1 + Global_Indexer/frmStart.Designer.vb | 25 +- Global_Indexer/frmStart.vb | 148 +- SetupWix/Product.wxs | 9 +- 25 files changed, 3973 insertions(+), 3409 deletions(-) diff --git a/Global_Indexer/ClassDatabase.vb b/Global_Indexer/ClassDatabase.vb index fcb30ef..5285ebe 100644 --- a/Global_Indexer/ClassDatabase.vb +++ b/Global_Indexer/ClassDatabase.vb @@ -11,12 +11,12 @@ Public Class ClassDatabase SQLconnect.Close() Return True Catch ex As Exception - ClassLogger.Add("Fehler bei DatabaseInit: " & ex.Message, True) + ClassLogger.Add("Fehler bei Database-Init: " & ex.Message, True) Return False End Try End Function - Public Shared Function Return_Datatable(Select_anweisung As String, Optional userInput As Boolean = False) + Public Shared Function Return_Datatable(Select_anweisung As String, Optional userInput As Boolean = False) Try Dim SQLconnect As New SqlClient.SqlConnection Dim SQLcommand As SqlClient.SqlCommand @@ -35,7 +35,7 @@ Public Class ClassDatabase MsgBox("Error in Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical) End If ClassLogger.Add("Fehler bei Return_Datatable: " & ex.Message, True) - ClassLogger.Add("SQL: " & Select_anweisung, False) + ClassLogger.Add("#SQL: " & Select_anweisung, False) Return Nothing End Try End Function @@ -57,7 +57,7 @@ Public Class ClassDatabase MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical) End If ClassLogger.Add("Fehler bei Execute_non_Query: " & ex.Message, True) - ClassLogger.Add("SQL: " & ExecuteCMD, False) + ClassLogger.Add("#SQL: " & ExecuteCMD, False) Return False End Try @@ -81,7 +81,7 @@ Public Class ClassDatabase MsgBox("Error in Execute Scalar - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & cmdscalar, MsgBoxStyle.Critical) End If ClassLogger.Add("Fehler bei Execute_Scalar: " & ex.Message, True) - ClassLogger.Add("SQL: " & cmdscalar, False) + ClassLogger.Add("#SQL: " & cmdscalar, False) Return Nothing End Try End Function @@ -101,7 +101,7 @@ Public Class ClassDatabase Return result Catch ex As Exception ClassLogger.Add("Fehler bei OracleExecute_Scalar: " & ex.Message, True) - ClassLogger.Add("SQL: " & cmdscalar, False) + ClassLogger.Add("#SQL: " & cmdscalar, False) Return Nothing End Try End Function diff --git a/Global_Indexer/ClassFilehandle.vb b/Global_Indexer/ClassFilehandle.vb index 0248762..9a19100 100644 --- a/Global_Indexer/ClassFilehandle.vb +++ b/Global_Indexer/ClassFilehandle.vb @@ -38,6 +38,8 @@ Public Class ClassFilehandle If Not msg.InternetMessageId Is Nothing Then CURRENT_MESSAGEID = msg.InternetMessageId + Else + MsgBox("Es konnte keine Message-ID ausgelesen werden." & vbNewLine & "Dies kann zu Fehlern in der Indexierung führen!", MsgBoxStyle.Exclamation, "Achtung:") End If 'Nur die MSGDatei ablegen @@ -96,4 +98,29 @@ Public Class ClassFilehandle Return False End Try End Function + Public Shared Function IsFileInUse(ByVal fullFilePath As String) As Boolean + ' Gibt zurück, ob die übergebene Datei momentan exklusiv zu haben ist. + ' Prüft, ob die angegeben Datei aktuell durch eine + ' andere Anwendung in Benutzung ist + Dim ff As Integer = FreeFile() + + If System.IO.File.Exists(fullFilePath) Then + Try + ' Versuchen, die Datei mit *exklusiven* Lese- und + ' Schreibrechten zu öffnen + FileOpen(ff, fullFilePath, OpenMode.Binary, _ + OpenAccess.ReadWrite, _ + OpenShare.LockReadWrite) + Catch + ' Ist ein Fehler aufgetreten, so wird nach außen hin generell + ' davon ausgegangen, dass die Datei in Benutzung ist (obwohl + ' auch andere Ursachen, etwa Rechteprobleme, möglich sind). + IsFileInUse = True + Finally + ' Die eventuell geöffnete Datei schließen + FileClose(ff) + End Try + End If + + End Function End Class diff --git a/Global_Indexer/ClassPostprocessing.vb b/Global_Indexer/ClassPostprocessing.vb index 53cff7e..81b5743 100644 --- a/Global_Indexer/ClassPostprocessing.vb +++ b/Global_Indexer/ClassPostprocessing.vb @@ -7,32 +7,32 @@ Public Class ClassPostprocessing For Each row As DataRow In DTNB.Rows Select Case row.Item("TYPE").ToString.ToUpper Case "VBSPLIT" - If LogErrorsOnly = False Then ClassLogger.Add(" ... Nachbearbeitung mit VBSPLIT", False) + If LogErrorsOnly = False Then ClassLogger.Add(" ...Nachbearbeitung mit VBSPLIT", False) Dim strSplit() As String strSplit = result.Split(row.Item("TEXT1")) For i As Integer = 0 To strSplit.Length - 1 If i = CInt(row.Item("TEXT2")) Then - If LogErrorsOnly = False Then ClassLogger.Add(" ... Split-Ergebnis für Index (" & i.ToString & "): " & strSplit(i), False) + If LogErrorsOnly = False Then ClassLogger.Add(" ...Split-Ergebnis für Index (" & i.ToString & "): " & strSplit(i), False) result = strSplit(i).ToString End If Next Case "VBREPLACE" If LogErrorsOnly = False Then - ClassLogger.Add(" ... Nachbearbeitung mit VBREPLACE", False) - ClassLogger.Add(" ... Ersetze '" & row.Item("TEXT1") & "' mit '" & row.Item("TEXT2") & "'", False) + ClassLogger.Add(" ...Nachbearbeitung mit VBREPLACE", False) + ClassLogger.Add(" ...Ersetze '" & row.Item("TEXT1") & "' mit '" & row.Item("TEXT2") & "'", False) result = result.Replace(row.Item("TEXT1"), row.Item("TEXT2")) End If result = result.Replace(row.Item("TEXT1"), row.Item("TEXT2")) - Case "Regular Expression" - If LogErrorsOnly = False Then ClassLogger.Add(" ... NAchbearbeitung mit RegEx", False) + Case "REG. EXPRESSION" + If LogErrorsOnly = False Then ClassLogger.Add(" ...Nachbearbeitung mit RegEx", False) Dim RegexList As New List(Of System.Text.RegularExpressions.Regex) Dim Regex As New System.Text.RegularExpressions.Regex(row.Item("TEXT1"), System.Text.RegularExpressions.RegexOptions.IgnoreCase) RegexList.Add(Regex) ' Dim resultRegex = ClassPostprocessing.extractFromStringviaRE(result, RegexList) If Not IsNothing(resultRegex) Then - If LogErrorsOnly = False Then ClassLogger.Add(" ... Ergebnis des RegEx: " & resultRegex.ToString, False) + If LogErrorsOnly = False Then ClassLogger.Add(" ...Ergebnis des RegEx: " & resultRegex.ToString, False) result = resultRegex.ToString Else ClassLogger.Add("Postprocessing RegEx konnte kein ergebnis auswerten!", True) diff --git a/Global_Indexer/Global_Indexer.vbproj b/Global_Indexer/Global_Indexer.vbproj index 1e8ce9a..70152e4 100644 --- a/Global_Indexer/Global_Indexer.vbproj +++ b/Global_Indexer/Global_Indexer.vbproj @@ -122,6 +122,12 @@ + + AboutBox1.vb + + + Form + @@ -261,6 +267,9 @@ + + AboutBox1.vb + frmAdministration.vb @@ -516,6 +525,7 @@ + diff --git a/Global_Indexer/ModuleCURRENT.vb b/Global_Indexer/ModuleCURRENT.vb index e5edfbc..0269934 100644 --- a/Global_Indexer/ModuleCURRENT.vb +++ b/Global_Indexer/ModuleCURRENT.vb @@ -1,4 +1,5 @@ Module ModuleCURRENT + Public START_INCOMPLETE As Boolean = False Public CURRENT_FILENAME As String Public CURRENT_NEWFILENAME As String Public CURRENT_WORKFILE_GUID As Integer @@ -30,4 +31,8 @@ Public CURRENT_ABBRUCH As Integer = 0 + Public MULTIINDEXING_ACTIVE As Boolean = False + + Public DTACTUAL_FILES As DataTable + End Module diff --git a/Global_Indexer/My Project/AssemblyInfo.vb b/Global_Indexer/My Project/AssemblyInfo.vb index a11dda0..4b210ff 100644 --- a/Global_Indexer/My Project/AssemblyInfo.vb +++ b/Global_Indexer/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + diff --git a/Global_Indexer/My Project/Resources.Designer.vb b/Global_Indexer/My Project/Resources.Designer.vb index 861d866..066ccf4 100644 --- a/Global_Indexer/My Project/Resources.Designer.vb +++ b/Global_Indexer/My Project/Resources.Designer.vb @@ -310,6 +310,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Excel_25ixel() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Excel_25ixel", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' diff --git a/Global_Indexer/My Project/Resources.resx b/Global_Indexer/My Project/Resources.resx index 6db75b8..ef61366 100644 --- a/Global_Indexer/My Project/Resources.resx +++ b/Global_Indexer/My Project/Resources.resx @@ -139,9 +139,6 @@ ..\Resources\bell_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\database_save1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\Einstellungen6.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -154,6 +151,9 @@ ..\Resources\delete_12x12.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\cancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\database_save2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -169,6 +169,9 @@ ..\Resources\folder_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\save_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\handdrawn_arrow_right_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -178,6 +181,9 @@ ..\Resources\key.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Save_6530.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\arrow_refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -202,15 +208,12 @@ ..\Resources\CheckOutforEdit_13187_32x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\save_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\database_save1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\action_add_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Shortcut_8169_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\arrow_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -244,13 +247,13 @@ ..\Resources\gear_32xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Save_6530.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Shortcut_8169_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\database_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\cancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Excel_25ixel.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/Global_Indexer/MyDataset.Designer.vb b/Global_Indexer/MyDataset.Designer.vb index 539049b..202b42c 100644 --- a/Global_Indexer/MyDataset.Designer.vb +++ b/Global_Indexer/MyDataset.Designer.vb @@ -4145,6 +4145,8 @@ Partial Public Class MyDataset Private columnOPTIONAL As Global.System.Data.DataColumn + Private columnIndexwert_File As Global.System.Data.DataColumn + _ Public Sub New() @@ -4348,6 +4350,14 @@ Partial Public Class MyDataset End Get End Property + _ + Public ReadOnly Property Indexwert_FileColumn() As Global.System.Data.DataColumn + Get + Return Me.columnIndexwert_File + End Get + End Property + _ @@ -4406,9 +4416,10 @@ Partial Public Class MyDataset ByVal SQL_CHECK As String, _ ByVal Indexiert As Boolean, _ ByVal Indexwert As String, _ - ByVal _OPTIONAL As Boolean) As VWDDINDEX_MANRow + ByVal _OPTIONAL As Boolean, _ + ByVal Indexwert_File As String) As VWDDINDEX_MANRow Dim rowVWDDINDEX_MANRow As VWDDINDEX_MANRow = CType(Me.NewRow,VWDDINDEX_MANRow) - Dim columnValuesArray() As Object = New Object() {GUID, INDEXNAME, WD_INDEX, COMMENT, DATATYPE, DOK_ID, DOKUMENTART, KURZNAME, SUGGESTION, CONNECTION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASSWORD, SQL_RESULT, SQL_CHECK, Indexiert, Indexwert, _OPTIONAL} + Dim columnValuesArray() As Object = New Object() {GUID, INDEXNAME, WD_INDEX, COMMENT, DATATYPE, DOK_ID, DOKUMENTART, KURZNAME, SUGGESTION, CONNECTION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASSWORD, SQL_RESULT, SQL_CHECK, Indexiert, Indexwert, _OPTIONAL, Indexwert_File} rowVWDDINDEX_MANRow.ItemArray = columnValuesArray Me.Rows.Add(rowVWDDINDEX_MANRow) Return rowVWDDINDEX_MANRow @@ -4458,6 +4469,7 @@ Partial Public Class MyDataset Me.columnIndexiert = MyBase.Columns("Indexiert") Me.columnIndexwert = MyBase.Columns("Indexwert") Me.columnOPTIONAL = MyBase.Columns("OPTIONAL") + Me.columnIndexwert_File = MyBase.Columns("Indexwert_File") End Sub _ Public Sub New() @@ -4880,6 +4897,14 @@ Partial Public Class MyDataset End Get End Property + _ + Public ReadOnly Property SQL_ACTIVEColumn() As Global.System.Data.DataColumn + Get + Return Me.columnSQL_ACTIVE + End Get + End Property + _ @@ -4934,9 +4959,10 @@ Partial Public Class MyDataset ByVal SQL_RESULT As String, _ ByVal Indexiert As Boolean, _ ByVal Indexwert As String, _ - ByVal VALUE As String) As VWDDINDEX_AUTOMRow + ByVal VALUE As String, _ + ByVal SQL_ACTIVE As Boolean) As VWDDINDEX_AUTOMRow Dim rowVWDDINDEX_AUTOMRow As VWDDINDEX_AUTOMRow = CType(Me.NewRow,VWDDINDEX_AUTOMRow) - Dim columnValuesArray() As Object = New Object() {GUID, INDEXNAME, COMMENT, DOCTYPE_ID, DOKUMENTART, KURZNAME, CONNECTION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASSWORD, SQL_RESULT, Indexiert, Indexwert, VALUE} + Dim columnValuesArray() As Object = New Object() {GUID, INDEXNAME, COMMENT, DOCTYPE_ID, DOKUMENTART, KURZNAME, CONNECTION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASSWORD, SQL_RESULT, Indexiert, Indexwert, VALUE, SQL_ACTIVE} rowVWDDINDEX_AUTOMRow.ItemArray = columnValuesArray Me.Rows.Add(rowVWDDINDEX_AUTOMRow) Return rowVWDDINDEX_AUTOMRow @@ -4982,6 +5008,7 @@ Partial Public Class MyDataset Me.columnIndexiert = MyBase.Columns("Indexiert") Me.columnIndexwert = MyBase.Columns("Indexwert") Me.columnVALUE = MyBase.Columns("VALUE") + Me.columnSQL_ACTIVE = MyBase.Columns("SQL_ACTIVE") End Sub _ Public Sub New() @@ -6582,6 +6614,14 @@ Partial Public Class MyDataset End Get End Property + _ + Public ReadOnly Property VARIANTColumn() As Global.System.Data.DataColumn + Get + Return Me.columnVARIANT + End Get + End Property + _ @@ -6619,9 +6659,9 @@ Partial Public Class MyDataset _ - Public Overloads Function AddTBDD_INDEX_MAN_POSTPROCESSINGRow(ByVal parentTBDD_INDEX_MANRowByFKTBDD_INDEX_MAN_POSTPROCESSING_IDXID As TBDD_INDEX_MANRow, ByVal COMMENT As String, ByVal TYPE As String, ByVal FUNCTION1 As String, ByVal FUNCTION2 As String, ByVal TEXT1 As String, ByVal TEXT2 As String, ByVal TEXT3 As String, ByVal SEQUENCE As Integer, ByVal ADDED_WHO As String, ByVal ADDED_WHEN As Date, ByVal CHANGED_WHO As String, ByVal CHANGED_WHEN As Date) As TBDD_INDEX_MAN_POSTPROCESSINGRow + Public Overloads Function AddTBDD_INDEX_MAN_POSTPROCESSINGRow(ByVal parentTBDD_INDEX_MANRowByFKTBDD_INDEX_MAN_POSTPROCESSING_IDXID As TBDD_INDEX_MANRow, ByVal COMMENT As String, ByVal TYPE As String, ByVal FUNCTION1 As String, ByVal FUNCTION2 As String, ByVal TEXT1 As String, ByVal TEXT2 As String, ByVal TEXT3 As String, ByVal SEQUENCE As Integer, ByVal ADDED_WHO As String, ByVal ADDED_WHEN As Date, ByVal CHANGED_WHO As String, ByVal CHANGED_WHEN As Date, ByVal _VARIANT As String) As TBDD_INDEX_MAN_POSTPROCESSINGRow Dim rowTBDD_INDEX_MAN_POSTPROCESSINGRow As TBDD_INDEX_MAN_POSTPROCESSINGRow = CType(Me.NewRow,TBDD_INDEX_MAN_POSTPROCESSINGRow) - Dim columnValuesArray() As Object = New Object() {Nothing, Nothing, COMMENT, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, TEXT3, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN} + Dim columnValuesArray() As Object = New Object() {Nothing, Nothing, COMMENT, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, TEXT3, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, _VARIANT} If (Not (parentTBDD_INDEX_MANRowByFKTBDD_INDEX_MAN_POSTPROCESSING_IDXID) Is Nothing) Then columnValuesArray(1) = parentTBDD_INDEX_MANRowByFKTBDD_INDEX_MAN_POSTPROCESSING_IDXID(0) End If @@ -6667,6 +6707,7 @@ Partial Public Class MyDataset Me.columnADDED_WHEN = MyBase.Columns("ADDED_WHEN") Me.columnCHANGED_WHO = MyBase.Columns("CHANGED_WHO") Me.columnCHANGED_WHEN = MyBase.Columns("CHANGED_WHEN") + Me.columnVARIANT = MyBase.Columns("VARIANT") End Sub _ + Public Property Indexwert_File() As String + Get + Try + Return CType(Me(Me.tableVWDDINDEX_MAN.Indexwert_FileColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Indexwert_File in Tabelle VWDDINDEX_MAN ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableVWDDINDEX_MAN.Indexwert_FileColumn) = value + End Set + End Property + _ Public Function IsWD_INDEXNull() As Boolean @@ -14111,6 +14175,18 @@ Partial Public Class MyDataset Public Sub SetIndexwertNull() Me(Me.tableVWDDINDEX_MAN.IndexwertColumn) = Global.System.Convert.DBNull End Sub + + _ + Public Function IsIndexwert_FileNull() As Boolean + Return Me.IsNull(Me.tableVWDDINDEX_MAN.Indexwert_FileColumn) + End Function + + _ + Public Sub SetIndexwert_FileNull() + Me(Me.tableVWDDINDEX_MAN.Indexwert_FileColumn) = Global.System.Convert.DBNull + End Sub End Class ''' @@ -14355,6 +14431,17 @@ Partial Public Class MyDataset End Set End Property + _ + Public Property SQL_ACTIVE() As Boolean + Get + Return CType(Me(Me.tableVWDDINDEX_AUTOM.SQL_ACTIVEColumn),Boolean) + End Get + Set + Me(Me.tableVWDDINDEX_AUTOM.SQL_ACTIVEColumn) = value + End Set + End Property + _ Public Function IsCOMMENTNull() As Boolean @@ -15307,6 +15394,17 @@ Partial Public Class MyDataset End Set End Property + _ + Public Property _VARIANT() As String + Get + Return CType(Me(Me.tableTBDD_INDEX_MAN_POSTPROCESSING.VARIANTColumn),String) + End Get + Set + Me(Me.tableTBDD_INDEX_MAN_POSTPROCESSING.VARIANTColumn) = value + End Set + End Property + _ Public Property TBDD_INDEX_MANRow() As TBDD_INDEX_MANRow @@ -20539,298 +20637,298 @@ Namespace MyDatasetTableAdapters 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, DOK_ID, NAME, WD_INDEX, COMMENT, DATATYPE, SUGGESTION, DEFAUL" & _ - "T_VALUE, CONNECTION_ID, SEQUENCE, SQL_RESULT, SQL_CHECK, ACTIVE, ADDED_WHO, ADDE" & _ - "D_WHEN, CHANGED_WHO, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " CHANGED_WHEN, OPTIONAL" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM " & _ - " TBDD_INDEX_MAN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (DOK_ID = @DOK_ID)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ORDER BY SEQUENCE" + Me._commandCollection(0).CommandText = "SELECT GUID, DOK_ID, NAME, WD_INDEX, COMMENT, DATATYPE, SUGGESTION, DEFAUL"& _ + "T_VALUE, CONNECTION_ID, SEQUENCE, SQL_RESULT, SQL_CHECK, ACTIVE, ADDED_WHO, ADDE"& _ + "D_WHEN, CHANGED_WHO, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CHANGED_WHEN, OPTIONAL"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM "& _ + " TBDD_INDEX_MAN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (DOK_ID = @DOK_ID)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"ORDER BY SEQUENCE" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOK_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOK_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOK_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOK_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBDD_INDEX_MANDataTable, ByVal DOK_ID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_INDEX_MANDataTable, ByVal DOK_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal DOK_ID As Integer) As MyDataset.TBDD_INDEX_MANDataTable + + _ + Public Overloads Overridable Function GetData(ByVal DOK_ID As Integer) As MyDataset.TBDD_INDEX_MANDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID,Integer) Dim dataTable As MyDataset.TBDD_INDEX_MANDataTable = New MyDataset.TBDD_INDEX_MANDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_MANDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_MANDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_INDEX_MAN") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) + + _ + 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) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal DOK_ID As Integer, ByVal NAME As String, ByVal WD_INDEX As String, ByVal COMMENT As String, ByVal DATATYPE As String, ByVal SUGGESTION As Boolean, ByVal DEFAULT_VALUE As String, ByVal CONNECTION_ID As Global.System.Nullable(Of Short), ByVal SEQUENCE As Integer, ByVal SQL_RESULT As String, ByVal SQL_CHECK As String, ByVal ACTIVE As Boolean, ByVal ADDED_WHO As String, ByVal _OPTIONAL As Boolean) As Integer - Me.Adapter.InsertCommand.Parameters(0).Value = CType(DOK_ID, Integer) + + _ + Public Overloads Overridable Function Insert(ByVal DOK_ID As Integer, ByVal NAME As String, ByVal WD_INDEX As String, ByVal COMMENT As String, ByVal DATATYPE As String, ByVal SUGGESTION As Boolean, ByVal DEFAULT_VALUE As String, ByVal CONNECTION_ID As Global.System.Nullable(Of Short), ByVal SEQUENCE As Integer, ByVal SQL_RESULT As String, ByVal SQL_CHECK As String, ByVal ACTIVE As Boolean, ByVal ADDED_WHO As String, ByVal _OPTIONAL As Boolean) As Integer + Me.Adapter.InsertCommand.Parameters(0).Value = CType(DOK_ID,Integer) If (NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("NAME") Else - Me.Adapter.InsertCommand.Parameters(1).Value = CType(NAME, String) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(NAME,String) End If If (WD_INDEX Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(WD_INDEX, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(WD_INDEX,String) End If If (COMMENT Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(COMMENT, String) + Me.Adapter.InsertCommand.Parameters(3).Value = CType(COMMENT,String) End If If (DATATYPE Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(4).Value = CType(DATATYPE, String) + Me.Adapter.InsertCommand.Parameters(4).Value = CType(DATATYPE,String) End If - Me.Adapter.InsertCommand.Parameters(5).Value = CType(SUGGESTION, Boolean) + Me.Adapter.InsertCommand.Parameters(5).Value = CType(SUGGESTION,Boolean) If (DEFAULT_VALUE Is Nothing) Then Throw New Global.System.ArgumentNullException("DEFAULT_VALUE") Else - Me.Adapter.InsertCommand.Parameters(6).Value = CType(DEFAULT_VALUE, String) + Me.Adapter.InsertCommand.Parameters(6).Value = CType(DEFAULT_VALUE,String) End If - If (CONNECTION_ID.HasValue = True) Then - Me.Adapter.InsertCommand.Parameters(7).Value = CType(CONNECTION_ID.Value, Short) + If (CONNECTION_ID.HasValue = true) Then + Me.Adapter.InsertCommand.Parameters(7).Value = CType(CONNECTION_ID.Value,Short) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If - Me.Adapter.InsertCommand.Parameters(8).Value = CType(SEQUENCE, Integer) + Me.Adapter.InsertCommand.Parameters(8).Value = CType(SEQUENCE,Integer) If (SQL_RESULT Is Nothing) Then Throw New Global.System.ArgumentNullException("SQL_RESULT") Else - Me.Adapter.InsertCommand.Parameters(9).Value = CType(SQL_RESULT, String) + Me.Adapter.InsertCommand.Parameters(9).Value = CType(SQL_RESULT,String) End If If (SQL_CHECK Is Nothing) Then Throw New Global.System.ArgumentNullException("SQL_CHECK") Else - Me.Adapter.InsertCommand.Parameters(10).Value = CType(SQL_CHECK, String) + Me.Adapter.InsertCommand.Parameters(10).Value = CType(SQL_CHECK,String) End If - Me.Adapter.InsertCommand.Parameters(11).Value = CType(ACTIVE, Boolean) + Me.Adapter.InsertCommand.Parameters(11).Value = CType(ACTIVE,Boolean) If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(12).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(12).Value = CType(ADDED_WHO,String) End If - Me.Adapter.InsertCommand.Parameters(13).Value = CType(_OPTIONAL, Boolean) + Me.Adapter.InsertCommand.Parameters(13).Value = CType(_OPTIONAL,Boolean) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State - If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update( _ - ByVal DOK_ID As Integer, _ - ByVal NAME As String, _ - ByVal WD_INDEX As String, _ - ByVal COMMENT As String, _ - ByVal DATATYPE As String, _ - ByVal SUGGESTION As Boolean, _ - ByVal DEFAULT_VALUE As String, _ - ByVal CONNECTION_ID As Global.System.Nullable(Of Short), _ - ByVal SEQUENCE As Integer, _ - ByVal SQL_RESULT As String, _ - ByVal SQL_CHECK As String, _ - ByVal ACTIVE As Boolean, _ - ByVal CHANGED_WHO As String, _ - ByVal _OPTIONAL As Boolean, _ - ByVal Original_GUID As Integer, _ + + _ + Public Overloads Overridable Function Update( _ + ByVal DOK_ID As Integer, _ + ByVal NAME As String, _ + ByVal WD_INDEX As String, _ + ByVal COMMENT As String, _ + ByVal DATATYPE As String, _ + ByVal SUGGESTION As Boolean, _ + ByVal DEFAULT_VALUE As String, _ + ByVal CONNECTION_ID As Global.System.Nullable(Of Short), _ + ByVal SEQUENCE As Integer, _ + ByVal SQL_RESULT As String, _ + ByVal SQL_CHECK As String, _ + ByVal ACTIVE As Boolean, _ + ByVal CHANGED_WHO As String, _ + ByVal _OPTIONAL As Boolean, _ + ByVal Original_GUID As Integer, _ ByVal GUID As Integer) As Integer - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(DOK_ID, Integer) + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(DOK_ID,Integer) If (NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("NAME") Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(NAME, String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(NAME,String) End If If (WD_INDEX Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(WD_INDEX, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(WD_INDEX,String) End If If (COMMENT Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(COMMENT, String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(COMMENT,String) End If If (DATATYPE Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(DATATYPE, String) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(DATATYPE,String) End If - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(SUGGESTION, Boolean) + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(SUGGESTION,Boolean) If (DEFAULT_VALUE Is Nothing) Then Throw New Global.System.ArgumentNullException("DEFAULT_VALUE") Else - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(DEFAULT_VALUE, String) + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(DEFAULT_VALUE,String) End If - If (CONNECTION_ID.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(7).Value = CType(CONNECTION_ID.Value, Short) + If (CONNECTION_ID.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(CONNECTION_ID.Value,Short) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(SEQUENCE, Integer) + Me.Adapter.UpdateCommand.Parameters(8).Value = CType(SEQUENCE,Integer) If (SQL_RESULT Is Nothing) Then Throw New Global.System.ArgumentNullException("SQL_RESULT") Else - Me.Adapter.UpdateCommand.Parameters(9).Value = CType(SQL_RESULT, String) + Me.Adapter.UpdateCommand.Parameters(9).Value = CType(SQL_RESULT,String) End If If (SQL_CHECK Is Nothing) Then Throw New Global.System.ArgumentNullException("SQL_CHECK") Else - Me.Adapter.UpdateCommand.Parameters(10).Value = CType(SQL_CHECK, String) + Me.Adapter.UpdateCommand.Parameters(10).Value = CType(SQL_CHECK,String) End If - Me.Adapter.UpdateCommand.Parameters(11).Value = CType(ACTIVE, Boolean) + Me.Adapter.UpdateCommand.Parameters(11).Value = CType(ACTIVE,Boolean) If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(12).Value = CType(CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(12).Value = CType(CHANGED_WHO,String) End If - Me.Adapter.UpdateCommand.Parameters(13).Value = CType(_OPTIONAL, Boolean) - Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_GUID, Integer) - Me.Adapter.UpdateCommand.Parameters(15).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(13).Value = CType(_OPTIONAL,Boolean) + Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(15).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + 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 TBDD_CONNECTIONTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -20844,65 +20942,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -20924,315 +21022,315 @@ Namespace MyDatasetTableAdapters 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_CONNECTION" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Original_GUID)" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBDD_CONNECTION"&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.SmallInt, 2, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.SmallInt, 2, 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_CONNECTION" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (BEZEICHNUNG, SQL_PROVIDER," & _ - " SERVER, DATENBANK, USERNAME, PASSWORD, BEMERKUNG, AKTIV, ERSTELLTWER)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES " & _ - " (@BEZEICHNUNG,@SQL_PROVIDER,@SERVER,@DATENBANK,@USERNAME,@PASSWORD,@BEMERK" & _ - "UNG,@AKTIV,@ERSTELLTWER); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, BEZEICHNUNG, SQL_PROVIDER, SERVER, DATE" & _ - "NBANK, USERNAME, PASSWORD, BEMERKUNG, AKTIV, ERSTELLTWER, ERSTELLTWANN, GEANDERT" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBDD_CONNECTION"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (BEZEICHNUNG, SQL_PROVIDER,"& _ + " SERVER, DATENBANK, USERNAME, PASSWORD, BEMERKUNG, AKTIV, ERSTELLTWER)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES "& _ + " (@BEZEICHNUNG,@SQL_PROVIDER,@SERVER,@DATENBANK,@USERNAME,@PASSWORD,@BEMERK"& _ + "UNG,@AKTIV,@ERSTELLTWER); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, BEZEICHNUNG, SQL_PROVIDER, SERVER, DATE"& _ + "NBANK, USERNAME, PASSWORD, BEMERKUNG, AKTIV, ERSTELLTWER, ERSTELLTWANN, GEANDERT"& _ "WER, GEAENDERTWANN FROM TBDD_CONNECTION WHERE (GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BEZEICHNUNG", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "BEZEICHNUNG", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SQL_PROVIDER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_PROVIDER", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SERVER", Global.System.Data.SqlDbType.VarChar, 150, Global.System.Data.ParameterDirection.Input, 0, 0, "SERVER", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DATENBANK", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "DATENBANK", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USERNAME", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "USERNAME", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PASSWORD", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "PASSWORD", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BEMERKUNG", Global.System.Data.SqlDbType.VarChar, 400, Global.System.Data.ParameterDirection.Input, 0, 0, "BEMERKUNG", 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("@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("@BEZEICHNUNG", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "BEZEICHNUNG", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SQL_PROVIDER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_PROVIDER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SERVER", Global.System.Data.SqlDbType.VarChar, 150, Global.System.Data.ParameterDirection.Input, 0, 0, "SERVER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DATENBANK", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "DATENBANK", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USERNAME", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "USERNAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PASSWORD", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "PASSWORD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BEMERKUNG", Global.System.Data.SqlDbType.VarChar, 400, Global.System.Data.ParameterDirection.Input, 0, 0, "BEMERKUNG", 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("@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 TBDD_CONNECTION" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET BEZEICHNUNG = @BEZEICHNUNG, SQL_" & _ - "PROVIDER = @SQL_PROVIDER, SERVER = @SERVER, DATENBANK = @DATENBANK, USERNAME = @" & _ - "USERNAME, PASSWORD = @PASSWORD, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " BEMERKUNG = @BEMERKUN" & _ - "G, AKTIV = @AKTIV, GEANDERTWER = @GEANDERTWER" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Original_GU" & _ - "ID); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, BEZEICHNUNG, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASS" & _ - "WORD, BEMERKUNG, AKTIV, ERSTELLTWER, ERSTELLTWANN, GEANDERTWER, GEAENDERTWANN FR" & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE TBDD_CONNECTION"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET BEZEICHNUNG = @BEZEICHNUNG, SQL_"& _ + "PROVIDER = @SQL_PROVIDER, SERVER = @SERVER, DATENBANK = @DATENBANK, USERNAME = @"& _ + "USERNAME, PASSWORD = @PASSWORD, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" BEMERKUNG = @BEMERKUN"& _ + "G, AKTIV = @AKTIV, GEANDERTWER = @GEANDERTWER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Original_GU"& _ + "ID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, BEZEICHNUNG, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASS"& _ + "WORD, BEMERKUNG, AKTIV, ERSTELLTWER, ERSTELLTWANN, GEANDERTWER, GEAENDERTWANN FR"& _ "OM TBDD_CONNECTION WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BEZEICHNUNG", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "BEZEICHNUNG", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SQL_PROVIDER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_PROVIDER", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SERVER", Global.System.Data.SqlDbType.VarChar, 150, Global.System.Data.ParameterDirection.Input, 0, 0, "SERVER", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DATENBANK", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "DATENBANK", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USERNAME", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "USERNAME", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PASSWORD", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "PASSWORD", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BEMERKUNG", Global.System.Data.SqlDbType.VarChar, 400, Global.System.Data.ParameterDirection.Input, 0, 0, "BEMERKUNG", 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("@GEANDERTWER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "GEANDERTWER", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.SmallInt, 2, 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.SmallInt, 2, 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("@BEZEICHNUNG", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "BEZEICHNUNG", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SQL_PROVIDER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_PROVIDER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SERVER", Global.System.Data.SqlDbType.VarChar, 150, Global.System.Data.ParameterDirection.Input, 0, 0, "SERVER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DATENBANK", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "DATENBANK", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USERNAME", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "USERNAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PASSWORD", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "PASSWORD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@BEMERKUNG", Global.System.Data.SqlDbType.VarChar, 400, Global.System.Data.ParameterDirection.Input, 0, 0, "BEMERKUNG", 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("@GEANDERTWER", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "GEANDERTWER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.SmallInt, 2, 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.SmallInt, 2, 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.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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 TBDD_CONNECTION.*" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBDD_CONNECTION" + Me._commandCollection(0).CommandText = "SELECT TBDD_CONNECTION.*"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBDD_CONNECTION" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBDD_CONNECTIONDataTable) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_CONNECTIONDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData() As MyDataset.TBDD_CONNECTIONDataTable + + _ + Public Overloads Overridable Function GetData() As MyDataset.TBDD_CONNECTIONDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As MyDataset.TBDD_CONNECTIONDataTable = New MyDataset.TBDD_CONNECTIONDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_CONNECTIONDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_CONNECTIONDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_CONNECTION") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Short) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Short) + + _ + Public Overloads Overridable Function Delete(ByVal Original_GUID As Short) As Integer + Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Short) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State - If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal BEZEICHNUNG As String, ByVal SQL_PROVIDER As String, ByVal SERVER As String, ByVal DATENBANK As String, ByVal USERNAME As String, ByVal PASSWORD As String, ByVal BEMERKUNG As String, ByVal AKTIV As Boolean, ByVal ERSTELLTWER As String) As Integer + + _ + Public Overloads Overridable Function Insert(ByVal BEZEICHNUNG As String, ByVal SQL_PROVIDER As String, ByVal SERVER As String, ByVal DATENBANK As String, ByVal USERNAME As String, ByVal PASSWORD As String, ByVal BEMERKUNG As String, ByVal AKTIV As Boolean, ByVal ERSTELLTWER As String) As Integer If (BEZEICHNUNG Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(0).Value = CType(BEZEICHNUNG, String) + Me.Adapter.InsertCommand.Parameters(0).Value = CType(BEZEICHNUNG,String) End If If (SQL_PROVIDER Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(1).Value = CType(SQL_PROVIDER, String) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(SQL_PROVIDER,String) End If If (SERVER Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(SERVER, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(SERVER,String) End If If (DATENBANK Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(DATENBANK, String) + Me.Adapter.InsertCommand.Parameters(3).Value = CType(DATENBANK,String) End If If (USERNAME Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(4).Value = CType(USERNAME, String) + Me.Adapter.InsertCommand.Parameters(4).Value = CType(USERNAME,String) End If If (PASSWORD Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(5).Value = CType(PASSWORD, String) + Me.Adapter.InsertCommand.Parameters(5).Value = CType(PASSWORD,String) End If If (BEMERKUNG Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(6).Value = CType(BEMERKUNG, String) + Me.Adapter.InsertCommand.Parameters(6).Value = CType(BEMERKUNG,String) End If - Me.Adapter.InsertCommand.Parameters(7).Value = CType(AKTIV, Boolean) + Me.Adapter.InsertCommand.Parameters(7).Value = CType(AKTIV,Boolean) If (ERSTELLTWER Is Nothing) Then Throw New Global.System.ArgumentNullException("ERSTELLTWER") Else - Me.Adapter.InsertCommand.Parameters(8).Value = CType(ERSTELLTWER, String) + Me.Adapter.InsertCommand.Parameters(8).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) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update(ByVal BEZEICHNUNG As String, ByVal SQL_PROVIDER As String, ByVal SERVER As String, ByVal DATENBANK As String, ByVal USERNAME As String, ByVal PASSWORD As String, ByVal BEMERKUNG As String, ByVal AKTIV As Boolean, ByVal GEANDERTWER As String, ByVal Original_GUID As Short, ByVal GUID As Short) As Integer + + _ + Public Overloads Overridable Function Update(ByVal BEZEICHNUNG As String, ByVal SQL_PROVIDER As String, ByVal SERVER As String, ByVal DATENBANK As String, ByVal USERNAME As String, ByVal PASSWORD As String, ByVal BEMERKUNG As String, ByVal AKTIV As Boolean, ByVal GEANDERTWER As String, ByVal Original_GUID As Short, ByVal GUID As Short) As Integer If (BEZEICHNUNG Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(BEZEICHNUNG, String) + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(BEZEICHNUNG,String) End If If (SQL_PROVIDER Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(SQL_PROVIDER, String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(SQL_PROVIDER,String) End If If (SERVER Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(SERVER, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(SERVER,String) End If If (DATENBANK Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(DATENBANK, String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(DATENBANK,String) End If If (USERNAME Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(USERNAME, String) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(USERNAME,String) End If If (PASSWORD Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(PASSWORD, String) + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(PASSWORD,String) End If If (BEMERKUNG Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(BEMERKUNG, String) + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(BEMERKUNG,String) End If - Me.Adapter.UpdateCommand.Parameters(7).Value = CType(AKTIV, Boolean) + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(AKTIV,Boolean) If (GEANDERTWER Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(GEANDERTWER, String) + Me.Adapter.UpdateCommand.Parameters(8).Value = CType(GEANDERTWER,String) End If - Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_GUID, Short) - Me.Adapter.UpdateCommand.Parameters(10).Value = CType(GUID, Short) + Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_GUID,Short) + Me.Adapter.UpdateCommand.Parameters(10).Value = CType(GUID,Short) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State - If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + 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 VWDDINDEX_MANTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -21246,65 +21344,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -21331,105 +21429,105 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("OPTIONAL", "OPTIONAL") Me._adapter.TableMappings.Add(tableMapping) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, INDEXNAME, WD_INDEX, COMMENT, DATATYPE, DOK_ID, DOKUMENTART, " & _ - "KURZNAME, SUGGESTION, CONNECTION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK" & _ - ", USERNAME, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " PASSWORD, SQL_RESULT, SQL_CHECK, OPTIONAL" & _ - "" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM VWDDINDEX_MAN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (DOK_ID = @DokID)" + Me._commandCollection(0).CommandText = "SELECT GUID, INDEXNAME, WD_INDEX, COMMENT, DATATYPE, DOK_ID, DOKUMENTART, "& _ + "KURZNAME, SUGGESTION, CONNECTION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK"& _ + ", USERNAME, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" PASSWORD, SQL_RESULT, SQL_CHECK, OPTIONAL"& _ + ""&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM VWDDINDEX_MAN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (DOK_ID = @DokID)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DokID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOK_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DokID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOK_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.VWDDINDEX_MANDataTable, ByVal DokID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.VWDDINDEX_MANDataTable, ByVal DokID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DokID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DokID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal DokID As Integer) As MyDataset.VWDDINDEX_MANDataTable + + _ + Public Overloads Overridable Function GetData(ByVal DokID As Integer) As MyDataset.VWDDINDEX_MANDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DokID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DokID,Integer) Dim dataTable As MyDataset.VWDDINDEX_MANDataTable = New MyDataset.VWDDINDEX_MANDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class - + ''' '''Represents the connection and commands used to retrieve and save data. ''' - _ + _ Partial Public Class VWDDINDEX_AUTOMTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -21443,65 +21541,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -21522,107 +21620,108 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("PASSWORD", "PASSWORD") tableMapping.ColumnMappings.Add("SQL_RESULT", "SQL_RESULT") tableMapping.ColumnMappings.Add("VALUE", "VALUE") + tableMapping.ColumnMappings.Add("SQL_ACTIVE", "SQL_ACTIVE") Me._adapter.TableMappings.Add(tableMapping) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, INDEXNAME, COMMENT, DOCTYPE_ID, DOKUMENTART, KURZNAME, CONNEC" & _ - "TION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASSWORD, SQL_RE" & _ - "SULT,VALUE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM VWDDINDEX_AUTOM" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (DOCTYPE_ID = @DOCTYPE" & _ - ")" + Me._commandCollection(0).CommandText = "SELECT GUID, INDEXNAME, COMMENT, DOCTYPE_ID, DOKUMENTART, KURZNAME, CONNEC"& _ + "TION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASSWORD, SQL_RE"& _ + "SULT, VALUE, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" SQL_ACTIVE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM VWDDINDEX_AU"& _ + "TOM"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (DOCTYPE_ID = @DOCTYPE)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.VWDDINDEX_AUTOMDataTable, ByVal DOCTYPE As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.VWDDINDEX_AUTOMDataTable, ByVal DOCTYPE As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal DOCTYPE As Integer) As MyDataset.VWDDINDEX_AUTOMDataTable + + _ + Public Overloads Overridable Function GetData(ByVal DOCTYPE As Integer) As MyDataset.VWDDINDEX_AUTOMDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE,Integer) Dim dataTable As MyDataset.VWDDINDEX_AUTOMDataTable = New MyDataset.VWDDINDEX_AUTOMDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class - + ''' '''Represents the connection and commands used to retrieve and save data. ''' - _ + _ Partial Public Class TBDD_INDEX_AUTOMTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -21636,65 +21735,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -21716,304 +21815,304 @@ Namespace MyDatasetTableAdapters 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_INDEX_AUTOM" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Original_GUID)" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBDD_INDEX_AUTOM"&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.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_INDEX_AUTOM" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (DOCTYPE_ID, INDEXNAME, VA" & _ - "LUE, CONNECTION_ID, COMMENT, ACTIVE, ADDED_WHO, SQL_RESULT, SQL_ACTIVE)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES " & _ - " (@DOCTYPE_ID,@INDEXNAME,@VALUE,@CONNECTION_ID,@COMMENT,@ACTIVE,@ADDED_WHO" & _ - ",@SQL_RESULT,@SQL_ACTIVE); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, DOCTYPE_ID, INDEXNAME, VALUE, CONNECT" & _ - "ION_ID, COMMENT, ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, SQL_R" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBDD_INDEX_AUTOM"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (DOCTYPE_ID, INDEXNAME, VA"& _ + "LUE, CONNECTION_ID, COMMENT, ACTIVE, ADDED_WHO, SQL_RESULT, SQL_ACTIVE)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES "& _ + " (@DOCTYPE_ID,@INDEXNAME,@VALUE,@CONNECTION_ID,@COMMENT,@ACTIVE,@ADDED_WHO"& _ + ",@SQL_RESULT,@SQL_ACTIVE); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, DOCTYPE_ID, INDEXNAME, VALUE, CONNECT"& _ + "ION_ID, COMMENT, ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, SQL_R"& _ "ESULT FROM TBDD_INDEX_AUTOM WHERE (GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@INDEXNAME", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "INDEXNAME", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@VALUE", Global.System.Data.SqlDbType.VarChar, 2000, Global.System.Data.ParameterDirection.Input, 0, 0, "VALUE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CONNECTION_ID", Global.System.Data.SqlDbType.SmallInt, 2, Global.System.Data.ParameterDirection.Input, 0, 0, "CONNECTION_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 400, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", 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("@SQL_RESULT", Global.System.Data.SqlDbType.VarChar, 2000, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_RESULT", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SQL_ACTIVE", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_ACTIVE", 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_INDEX_AUTOM" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET DOCTYPE_ID = @DOCTYPE_ID, INDEX" & _ - "NAME = @INDEXNAME, VALUE = @VALUE, CONNECTION_ID = @CONNECTION_ID, COMMENT = @CO" & _ - "MMENT, ACTIVE = @ACTIVE, CHANGED_WHO = @CHANGED_WHO, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " " & _ - "SQL_RESULT = @SQL_RESULT, SQL_ACTIVE = @SQL_ACTIVE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Origin" & _ - "al_GUID); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, DOCTYPE_ID, INDEXNAME, VALUE, CONNECTION_ID, COMMENT, " & _ - "ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, SQL_RESULT FROM TBDD_I" & _ - "NDEX_AUTOM WHERE (GUID = @GUID)" + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@INDEXNAME", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "INDEXNAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@VALUE", Global.System.Data.SqlDbType.VarChar, 2000, Global.System.Data.ParameterDirection.Input, 0, 0, "VALUE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CONNECTION_ID", Global.System.Data.SqlDbType.SmallInt, 2, Global.System.Data.ParameterDirection.Input, 0, 0, "CONNECTION_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 400, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", 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("@SQL_RESULT", Global.System.Data.SqlDbType.VarChar, 2000, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_RESULT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SQL_ACTIVE", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_ACTIVE", 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_INDEX_AUTOM"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET DOCTYPE_ID = @DOCTYPE_ID, INDEX"& _ + "NAME = @INDEXNAME, VALUE = @VALUE, CONNECTION_ID = @CONNECTION_ID, COMMENT = @CO"& _ + "MMENT, ACTIVE = @ACTIVE, CHANGED_WHO = @CHANGED_WHO, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _ + "SQL_RESULT = @SQL_RESULT, SQL_ACTIVE = @SQL_ACTIVE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Origin"& _ + "al_GUID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, DOCTYPE_ID, INDEXNAME, VALUE, CONNECTION_ID, COMMENT, "& _ + "ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, SQL_RESULT FROM TBDD_I"& _ + "NDEX_AUTOM WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@INDEXNAME", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "INDEXNAME", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@VALUE", Global.System.Data.SqlDbType.VarChar, 2000, Global.System.Data.ParameterDirection.Input, 0, 0, "VALUE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CONNECTION_ID", Global.System.Data.SqlDbType.SmallInt, 2, Global.System.Data.ParameterDirection.Input, 0, 0, "CONNECTION_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 400, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", 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("@SQL_RESULT", Global.System.Data.SqlDbType.VarChar, 2000, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_RESULT", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SQL_ACTIVE", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_ACTIVE", 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, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@INDEXNAME", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "INDEXNAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@VALUE", Global.System.Data.SqlDbType.VarChar, 2000, Global.System.Data.ParameterDirection.Input, 0, 0, "VALUE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CONNECTION_ID", Global.System.Data.SqlDbType.SmallInt, 2, Global.System.Data.ParameterDirection.Input, 0, 0, "CONNECTION_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 400, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", 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("@SQL_RESULT", Global.System.Data.SqlDbType.VarChar, 2000, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_RESULT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SQL_ACTIVE", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "SQL_ACTIVE", 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.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, DOCTYPE_ID, INDEXNAME, VALUE, CONNECTION_ID, COMMENT, ACTIVE," & _ - " ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, SQL_RESULT, SQL_ACTIVE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM " & _ - " TBDD_INDEX_AUTOM" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (DOCTYPE_ID = @DOCTYPE_ID)" + Me._commandCollection(0).CommandText = "SELECT GUID, DOCTYPE_ID, INDEXNAME, VALUE, CONNECTION_ID, COMMENT, ACTIVE,"& _ + " ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, SQL_RESULT, SQL_ACTIVE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM "& _ + " TBDD_INDEX_AUTOM"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (DOCTYPE_ID = @DOCTYPE_ID)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBDD_INDEX_AUTOMDataTable, ByVal DOCTYPE_ID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_INDEX_AUTOMDataTable, ByVal DOCTYPE_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal DOCTYPE_ID As Integer) As MyDataset.TBDD_INDEX_AUTOMDataTable + + _ + Public Overloads Overridable Function GetData(ByVal DOCTYPE_ID As Integer) As MyDataset.TBDD_INDEX_AUTOMDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE_ID,Integer) Dim dataTable As MyDataset.TBDD_INDEX_AUTOMDataTable = New MyDataset.TBDD_INDEX_AUTOMDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_AUTOMDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_AUTOMDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_INDEX_AUTOM") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) + + _ + 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) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal DOCTYPE_ID As Integer, ByVal INDEXNAME As String, ByVal VALUE As String, ByVal CONNECTION_ID As Global.System.Nullable(Of Short), ByVal COMMENT As String, ByVal ACTIVE As Boolean, ByVal ADDED_WHO As String, ByVal SQL_RESULT As String, ByVal SQL_ACTIVE As Boolean) As Integer - Me.Adapter.InsertCommand.Parameters(0).Value = CType(DOCTYPE_ID, Integer) + + _ + Public Overloads Overridable Function Insert(ByVal DOCTYPE_ID As Integer, ByVal INDEXNAME As String, ByVal VALUE As String, ByVal CONNECTION_ID As Global.System.Nullable(Of Short), ByVal COMMENT As String, ByVal ACTIVE As Boolean, ByVal ADDED_WHO As String, ByVal SQL_RESULT As String, ByVal SQL_ACTIVE As Boolean) As Integer + Me.Adapter.InsertCommand.Parameters(0).Value = CType(DOCTYPE_ID,Integer) If (INDEXNAME Is Nothing) Then Throw New Global.System.ArgumentNullException("INDEXNAME") Else - Me.Adapter.InsertCommand.Parameters(1).Value = CType(INDEXNAME, String) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(INDEXNAME,String) End If If (VALUE Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(VALUE, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(VALUE,String) End If - If (CONNECTION_ID.HasValue = True) Then - Me.Adapter.InsertCommand.Parameters(3).Value = CType(CONNECTION_ID.Value, Short) + If (CONNECTION_ID.HasValue = true) Then + Me.Adapter.InsertCommand.Parameters(3).Value = CType(CONNECTION_ID.Value,Short) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (COMMENT Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(4).Value = CType(COMMENT, String) + Me.Adapter.InsertCommand.Parameters(4).Value = CType(COMMENT,String) End If - Me.Adapter.InsertCommand.Parameters(5).Value = CType(ACTIVE, Boolean) + Me.Adapter.InsertCommand.Parameters(5).Value = CType(ACTIVE,Boolean) If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(6).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(6).Value = CType(ADDED_WHO,String) End If If (SQL_RESULT Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(7).Value = CType(SQL_RESULT, String) + Me.Adapter.InsertCommand.Parameters(7).Value = CType(SQL_RESULT,String) End If - Me.Adapter.InsertCommand.Parameters(8).Value = CType(SQL_ACTIVE, Boolean) + Me.Adapter.InsertCommand.Parameters(8).Value = CType(SQL_ACTIVE,Boolean) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State - If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update(ByVal DOCTYPE_ID As Integer, ByVal INDEXNAME As String, ByVal VALUE As String, ByVal CONNECTION_ID As Global.System.Nullable(Of Short), ByVal COMMENT As String, ByVal ACTIVE As Boolean, ByVal CHANGED_WHO As String, ByVal SQL_RESULT As String, ByVal SQL_ACTIVE As Boolean, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(DOCTYPE_ID, Integer) + + _ + Public Overloads Overridable Function Update(ByVal DOCTYPE_ID As Integer, ByVal INDEXNAME As String, ByVal VALUE As String, ByVal CONNECTION_ID As Global.System.Nullable(Of Short), ByVal COMMENT As String, ByVal ACTIVE As Boolean, ByVal CHANGED_WHO As String, ByVal SQL_RESULT As String, ByVal SQL_ACTIVE As Boolean, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(DOCTYPE_ID,Integer) If (INDEXNAME Is Nothing) Then Throw New Global.System.ArgumentNullException("INDEXNAME") Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(INDEXNAME, String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(INDEXNAME,String) End If If (VALUE Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(VALUE, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(VALUE,String) End If - If (CONNECTION_ID.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(CONNECTION_ID.Value, Short) + If (CONNECTION_ID.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(CONNECTION_ID.Value,Short) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (COMMENT Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(COMMENT, String) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(COMMENT,String) End If - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(ACTIVE, Boolean) + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(ACTIVE,Boolean) If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(CHANGED_WHO,String) End If If (SQL_RESULT Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(7).Value = CType(SQL_RESULT, String) + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(SQL_RESULT,String) End If - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(SQL_ACTIVE, Boolean) - Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_GUID, Integer) - Me.Adapter.UpdateCommand.Parameters(10).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(8).Value = CType(SQL_ACTIVE,Boolean) + Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(10).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + 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 TBGI_CONFIGURATIONTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -22027,65 +22126,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -22102,195 +22201,195 @@ Namespace MyDatasetTableAdapters 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 TBGI_CONFIGURATION" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET GUID = @GUID, IDX_EMAIL_ID = " & _ - "@IDX_EMAIL_ID, IDX_EMAIL_FROM = @IDX_EMAIL_FROM, IDX_EMAIL_TO = @IDX_EMAIL_TO, I" & _ - "DX_EMAIL_SUBJECT = @IDX_EMAIL_SUBJECT, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " IDX_EMAIL_DATE" & _ - "_IN = @IDX_EMAIL_DATE_IN, CHANGED_WHO = @CHANGED_WHO" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = 1); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, IDX_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMAIL_SUBJECT, IDX" & _ - "_EMAIL_DATE_IN, CHANGED_WHO, CHANGED_WHEN FROM TBGI_CONFIGURATION WHERE (GUID = " & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE TBGI_CONFIGURATION"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET GUID = @GUID, IDX_EMAIL_ID = "& _ + "@IDX_EMAIL_ID, IDX_EMAIL_FROM = @IDX_EMAIL_FROM, IDX_EMAIL_TO = @IDX_EMAIL_TO, I"& _ + "DX_EMAIL_SUBJECT = @IDX_EMAIL_SUBJECT, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" IDX_EMAIL_DATE"& _ + "_IN = @IDX_EMAIL_DATE_IN, CHANGED_WHO = @CHANGED_WHO"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = 1); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, IDX_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMAIL_SUBJECT, IDX"& _ + "_EMAIL_DATE_IN, CHANGED_WHO, CHANGED_WHEN FROM TBGI_CONFIGURATION WHERE (GUID = "& _ "@GUID)" 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.TinyInt, 1, 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("@IDX_EMAIL_ID", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_FROM", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_FROM", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_TO", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_TO", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_SUBJECT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_SUBJECT", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_DATE_IN", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_DATE_IN", 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("@GUID", Global.System.Data.SqlDbType.TinyInt, 1, 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("@IDX_EMAIL_ID", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_FROM", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_FROM", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_TO", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_TO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_SUBJECT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_SUBJECT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_DATE_IN", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_DATE_IN", 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, "", "", "")) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, IDX_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMAIL_SUBJECT" & _ - ", IDX_EMAIL_DATE_IN, CHANGED_WHO, CHANGED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBGI_CONFIGURATI" & _ - "ON" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = 1)" + Me._commandCollection(0).CommandText = "SELECT GUID, IDX_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMAIL_SUBJECT"& _ + ", IDX_EMAIL_DATE_IN, CHANGED_WHO, CHANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBGI_CONFIGURATI"& _ + "ON"&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 Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBGI_CONFIGURATIONDataTable) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBGI_CONFIGURATIONDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData() As MyDataset.TBGI_CONFIGURATIONDataTable + + _ + Public Overloads Overridable Function GetData() As MyDataset.TBGI_CONFIGURATIONDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As MyDataset.TBGI_CONFIGURATIONDataTable = New MyDataset.TBGI_CONFIGURATIONDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBGI_CONFIGURATIONDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBGI_CONFIGURATIONDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBGI_CONFIGURATION") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Update(ByVal GUID As Byte, ByVal IDX_EMAIL_ID As String, ByVal IDX_EMAIL_FROM As String, ByVal IDX_EMAIL_TO As String, ByVal IDX_EMAIL_SUBJECT As String, ByVal IDX_EMAIL_DATE_IN As String, ByVal CHANGED_WHO As String) As Integer - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(GUID, Byte) + + _ + Public Overloads Overridable Function Update(ByVal GUID As Byte, ByVal IDX_EMAIL_ID As String, ByVal IDX_EMAIL_FROM As String, ByVal IDX_EMAIL_TO As String, ByVal IDX_EMAIL_SUBJECT As String, ByVal IDX_EMAIL_DATE_IN As String, ByVal CHANGED_WHO As String) As Integer + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(GUID,Byte) If (IDX_EMAIL_ID Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_ID") Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(IDX_EMAIL_ID, String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(IDX_EMAIL_ID,String) End If If (IDX_EMAIL_FROM Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_FROM") Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(IDX_EMAIL_FROM, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(IDX_EMAIL_FROM,String) End If If (IDX_EMAIL_TO Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_TO") Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(IDX_EMAIL_TO, String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(IDX_EMAIL_TO,String) End If If (IDX_EMAIL_SUBJECT Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_SUBJECT") Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(IDX_EMAIL_SUBJECT, String) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(IDX_EMAIL_SUBJECT,String) End If If (IDX_EMAIL_DATE_IN Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_DATE_IN") Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(IDX_EMAIL_DATE_IN, String) + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(IDX_EMAIL_DATE_IN,String) End If If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(CHANGED_WHO,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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + 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 TBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -22304,65 +22403,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ - Public Property ClearBeforeFill() As Boolean - Get + + _ + Public Property ClearBeforeFill() As Boolean + Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -22383,334 +22482,334 @@ Namespace MyDatasetTableAdapters 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 TBGI_OBJECTTYPE_EMAIL_INDEX" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Original_GUID)" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBGI_OBJECTTYPE_EMAIL_INDEX"&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.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 TBGI_OBJECTTYPE_EMAIL_INDEX" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (OBJECTTYPE, ID" & _ - "X_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMAIL_SUBJECT, IDX_EMAIL_DATE_IN, " & _ - "ADDED_WHO, CHANGED_WHO, IDX_CHECK_ATTACHMENT)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES (@OBJECTTYPE,@IDX_E" & _ - "MAIL_ID,@IDX_EMAIL_FROM,@IDX_EMAIL_TO,@IDX_EMAIL_SUBJECT,@IDX_EMAIL_DATE_IN,@ADD" & _ - "ED_WHO,@CHANGED_WHO,@IDX_CHECK_ATTACHMENT); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, OBJECTTYPE, IDX_E" & _ - "MAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMAIL_SUBJECT, IDX_EMAIL_DATE_IN, ADD" & _ - "ED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBGI_OBJECTTYPE_EMAIL_INDEX W" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBGI_OBJECTTYPE_EMAIL_INDEX"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (OBJECTTYPE, ID"& _ + "X_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMAIL_SUBJECT, IDX_EMAIL_DATE_IN, "& _ + "ADDED_WHO, CHANGED_WHO, IDX_CHECK_ATTACHMENT)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@OBJECTTYPE,@IDX_E"& _ + "MAIL_ID,@IDX_EMAIL_FROM,@IDX_EMAIL_TO,@IDX_EMAIL_SUBJECT,@IDX_EMAIL_DATE_IN,@ADD"& _ + "ED_WHO,@CHANGED_WHO,@IDX_CHECK_ATTACHMENT); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, OBJECTTYPE, IDX_E"& _ + "MAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMAIL_SUBJECT, IDX_EMAIL_DATE_IN, ADD"& _ + "ED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBGI_OBJECTTYPE_EMAIL_INDEX W"& _ "HERE (GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_ID", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_FROM", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_FROM", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_TO", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_TO", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_SUBJECT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_SUBJECT", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_DATE_IN", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_DATE_IN", 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("@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.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_CHECK_ATTACHMENT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_CHECK_ATTACHMENT", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_ID", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_FROM", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_FROM", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_TO", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_TO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_SUBJECT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_SUBJECT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_DATE_IN", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_DATE_IN", 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("@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.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_CHECK_ATTACHMENT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_CHECK_ATTACHMENT", 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 TBGI_OBJECTTYPE_EMAIL_INDEX" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET OBJECTTYPE = @OBJECT" & _ - "TYPE, IDX_EMAIL_ID = @IDX_EMAIL_ID, IDX_EMAIL_FROM = @IDX_EMAIL_FROM, IDX_EMAIL_" & _ - "TO = @IDX_EMAIL_TO, IDX_EMAIL_SUBJECT = @IDX_EMAIL_SUBJECT, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " " & _ - " IDX_EMAIL_DATE_IN = @IDX_EMAIL_DATE_IN, CHANGED_WHO = @CHANGED_WHO, IDX_C" & _ - "HECK_ATTACHMENT = @IDX_CHECK_ATTACHMENT" & 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, OBJECTTYPE, IDX_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMA" & _ - "IL_SUBJECT, IDX_EMAIL_DATE_IN, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN " & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE TBGI_OBJECTTYPE_EMAIL_INDEX"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET OBJECTTYPE = @OBJECT"& _ + "TYPE, IDX_EMAIL_ID = @IDX_EMAIL_ID, IDX_EMAIL_FROM = @IDX_EMAIL_FROM, IDX_EMAIL_"& _ + "TO = @IDX_EMAIL_TO, IDX_EMAIL_SUBJECT = @IDX_EMAIL_SUBJECT, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _ + " IDX_EMAIL_DATE_IN = @IDX_EMAIL_DATE_IN, CHANGED_WHO = @CHANGED_WHO, IDX_C"& _ + "HECK_ATTACHMENT = @IDX_CHECK_ATTACHMENT"&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, OBJECTTYPE, IDX_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMA"& _ + "IL_SUBJECT, IDX_EMAIL_DATE_IN, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN "& _ "FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_ID", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_FROM", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_FROM", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_TO", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_TO", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_SUBJECT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_SUBJECT", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_DATE_IN", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_DATE_IN", 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("@IDX_CHECK_ATTACHMENT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_CHECK_ATTACHMENT", 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, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_ID", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_FROM", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_FROM", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_TO", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_TO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_SUBJECT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_SUBJECT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDX_EMAIL_DATE_IN", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_EMAIL_DATE_IN", 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("@IDX_CHECK_ATTACHMENT", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "IDX_CHECK_ATTACHMENT", 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.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, OBJECTTYPE, IDX_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_E" & _ - "MAIL_SUBJECT, IDX_EMAIL_DATE_IN, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHE" & _ - "N, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " IDX_CHECK_ATTACHMENT" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBGI_OBJECTT" & _ - "YPE_EMAIL_INDEX" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (OBJECTTYPE = @Objecttype)" + Me._commandCollection(0).CommandText = "SELECT GUID, OBJECTTYPE, IDX_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_E"& _ + "MAIL_SUBJECT, IDX_EMAIL_DATE_IN, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHE"& _ + "N, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" IDX_CHECK_ATTACHMENT"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBGI_OBJECTT"& _ + "YPE_EMAIL_INDEX"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (OBJECTTYPE = @Objecttype)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Objecttype", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Objecttype", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable, ByVal Objecttype As String) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable, ByVal Objecttype As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Objecttype Is Nothing) Then Throw New Global.System.ArgumentNullException("Objecttype") Else - Me.Adapter.SelectCommand.Parameters(0).Value = CType(Objecttype, String) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(Objecttype,String) End If - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal Objecttype As String) As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable + + _ + Public Overloads Overridable Function GetData(ByVal Objecttype As String) As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Objecttype Is Nothing) Then Throw New Global.System.ArgumentNullException("Objecttype") Else - Me.Adapter.SelectCommand.Parameters(0).Value = CType(Objecttype, String) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(Objecttype,String) End If Dim dataTable As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable = New MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBGI_OBJECTTYPE_EMAIL_INDEX") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) + + _ + 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) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal OBJECTTYPE As String, ByVal IDX_EMAIL_ID As String, ByVal IDX_EMAIL_FROM As String, ByVal IDX_EMAIL_TO As String, ByVal IDX_EMAIL_SUBJECT As String, ByVal IDX_EMAIL_DATE_IN As String, ByVal ADDED_WHO As String, ByVal CHANGED_WHO As String, ByVal IDX_CHECK_ATTACHMENT As String) As Integer + + _ + Public Overloads Overridable Function Insert(ByVal OBJECTTYPE As String, ByVal IDX_EMAIL_ID As String, ByVal IDX_EMAIL_FROM As String, ByVal IDX_EMAIL_TO As String, ByVal IDX_EMAIL_SUBJECT As String, ByVal IDX_EMAIL_DATE_IN As String, ByVal ADDED_WHO As String, ByVal CHANGED_WHO As String, ByVal IDX_CHECK_ATTACHMENT As String) As Integer If (OBJECTTYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("OBJECTTYPE") Else - Me.Adapter.InsertCommand.Parameters(0).Value = CType(OBJECTTYPE, String) + Me.Adapter.InsertCommand.Parameters(0).Value = CType(OBJECTTYPE,String) End If If (IDX_EMAIL_ID Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_ID") Else - Me.Adapter.InsertCommand.Parameters(1).Value = CType(IDX_EMAIL_ID, String) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(IDX_EMAIL_ID,String) End If If (IDX_EMAIL_FROM Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_FROM") Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(IDX_EMAIL_FROM, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(IDX_EMAIL_FROM,String) End If If (IDX_EMAIL_TO Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_TO") Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(IDX_EMAIL_TO, String) + Me.Adapter.InsertCommand.Parameters(3).Value = CType(IDX_EMAIL_TO,String) End If If (IDX_EMAIL_SUBJECT Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_SUBJECT") Else - Me.Adapter.InsertCommand.Parameters(4).Value = CType(IDX_EMAIL_SUBJECT, String) + Me.Adapter.InsertCommand.Parameters(4).Value = CType(IDX_EMAIL_SUBJECT,String) End If If (IDX_EMAIL_DATE_IN Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_DATE_IN") Else - Me.Adapter.InsertCommand.Parameters(5).Value = CType(IDX_EMAIL_DATE_IN, String) + Me.Adapter.InsertCommand.Parameters(5).Value = CType(IDX_EMAIL_DATE_IN,String) End If If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(6).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(6).Value = CType(ADDED_WHO,String) End If If (CHANGED_WHO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(7).Value = CType(CHANGED_WHO, String) + Me.Adapter.InsertCommand.Parameters(7).Value = CType(CHANGED_WHO,String) End If If (IDX_CHECK_ATTACHMENT Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_CHECK_ATTACHMENT") Else - Me.Adapter.InsertCommand.Parameters(8).Value = CType(IDX_CHECK_ATTACHMENT, String) + Me.Adapter.InsertCommand.Parameters(8).Value = CType(IDX_CHECK_ATTACHMENT,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) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update(ByVal OBJECTTYPE As String, ByVal IDX_EMAIL_ID As String, ByVal IDX_EMAIL_FROM As String, ByVal IDX_EMAIL_TO As String, ByVal IDX_EMAIL_SUBJECT As String, ByVal IDX_EMAIL_DATE_IN As String, ByVal CHANGED_WHO As String, ByVal IDX_CHECK_ATTACHMENT As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + + _ + Public Overloads Overridable Function Update(ByVal OBJECTTYPE As String, ByVal IDX_EMAIL_ID As String, ByVal IDX_EMAIL_FROM As String, ByVal IDX_EMAIL_TO As String, ByVal IDX_EMAIL_SUBJECT As String, ByVal IDX_EMAIL_DATE_IN As String, ByVal CHANGED_WHO As String, ByVal IDX_CHECK_ATTACHMENT As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer If (OBJECTTYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("OBJECTTYPE") Else - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(OBJECTTYPE, String) + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(OBJECTTYPE,String) End If If (IDX_EMAIL_ID Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_ID") Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(IDX_EMAIL_ID, String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(IDX_EMAIL_ID,String) End If If (IDX_EMAIL_FROM Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_FROM") Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(IDX_EMAIL_FROM, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(IDX_EMAIL_FROM,String) End If If (IDX_EMAIL_TO Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_TO") Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(IDX_EMAIL_TO, String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(IDX_EMAIL_TO,String) End If If (IDX_EMAIL_SUBJECT Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_SUBJECT") Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(IDX_EMAIL_SUBJECT, String) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(IDX_EMAIL_SUBJECT,String) End If If (IDX_EMAIL_DATE_IN Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_EMAIL_DATE_IN") Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(IDX_EMAIL_DATE_IN, String) + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(IDX_EMAIL_DATE_IN,String) End If If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(CHANGED_WHO,String) End If If (IDX_CHECK_ATTACHMENT Is Nothing) Then Throw New Global.System.ArgumentNullException("IDX_CHECK_ATTACHMENT") Else - Me.Adapter.UpdateCommand.Parameters(7).Value = CType(IDX_CHECK_ATTACHMENT, String) + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(IDX_CHECK_ATTACHMENT,String) End If - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_GUID, Integer) - Me.Adapter.UpdateCommand.Parameters(9).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(9).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + 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 TBDD_INDEX_MAN_POSTPROCESSINGTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -22724,65 +22823,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -22802,183 +22901,187 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("ADDED_WHEN", "ADDED_WHEN") tableMapping.ColumnMappings.Add("CHANGED_WHO", "CHANGED_WHO") tableMapping.ColumnMappings.Add("CHANGED_WHEN", "CHANGED_WHEN") + tableMapping.ColumnMappings.Add("VARIANT", "VARIANT") 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_INDEX_MAN_POSTPROCESSING" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @GUID)" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBDD_INDEX_MAN_POSTPROCESSING"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @GUID)" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.DeleteCommand.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, "", "", "")) + Me._adapter.DeleteCommand.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, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection - Me._adapter.InsertCommand.CommandText = "INSERT INTO TBDD_INDEX_MAN_POSTPROCESSING" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (IDXMAN_ID, C" & _ - "OMMENT, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, TEXT3, SEQUENCE, ADDED_WHO)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "V" & _ - "ALUES (@IDXMAN_ID,@COMMENT,@TYPE,@FUNCTION1,@FUNCTION2,@TEXT1,@TEXT2,@TEX" & _ - "T3,@SEQUENCE,@ADDED_WHO)" + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBDD_INDEX_MAN_POSTPROCESSING"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (IDXMAN_ID, C"& _ + "OMMENT, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, TEXT3, SEQUENCE, ADDED_WHO, VA"& _ + "RIANT)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@IDXMAN_ID,@COMMENT,@TYPE,@FUNCTION1,@FUNCTION2,@TEXT1,@T"& _ + "EXT2,@TEXT3,@SEQUENCE,@ADDED_WHO,@VARIANT)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDXMAN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "IDXMAN_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYPE", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION1", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION2", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT1", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT2", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT3", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT3", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", 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("@IDXMAN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "IDXMAN_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYPE", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION1", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION2", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT1", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT2", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT3", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", 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("@VARIANT", Global.System.Data.SqlDbType.VarChar, 20, Global.System.Data.ParameterDirection.Input, 0, 0, "VARIANT", 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_INDEX_MAN_POSTPROCESSING" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET IDXMAN_ID = @IDXMA" & _ - "N_ID, COMMENT = @COMMENT, TYPE = @TYPE, FUNCTION1 = @FUNCTION1, FUNCTION2 = @FUN" & _ - "CTION2, TEXT1 = @TEXT1, TEXT2 = @TEXT2, TEXT3 = @TEXT3, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " " & _ - " SEQUENCE = @SEQUENCE, CHANGED_WHO = @CHANGED_WHO" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @GUID)" & _ - "" + Me._adapter.UpdateCommand.CommandText = "UPDATE TBDD_INDEX_MAN_POSTPROCESSING"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET IDXMAN_ID = @IDXMA"& _ + "N_ID, COMMENT = @COMMENT, TYPE = @TYPE, FUNCTION1 = @FUNCTION1, FUNCTION2 = @FUN"& _ + "CTION2, TEXT1 = @TEXT1, TEXT2 = @TEXT2, TEXT3 = @TEXT3, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _ + " SEQUENCE = @SEQUENCE, CHANGED_WHO = @CHANGED_WHO, VARIANT = @VARIANT"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _ + " (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IDXMAN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "IDXMAN_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYPE", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION1", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION2", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT1", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT2", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT3", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT3", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", 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("@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("@IDXMAN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "IDXMAN_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYPE", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION1", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION2", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT1", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT2", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT3", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", 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("@VARIANT", Global.System.Data.SqlDbType.VarChar, 20, Global.System.Data.ParameterDirection.Input, 0, 0, "VARIANT", Global.System.Data.DataRowVersion.Current, 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.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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 TBDD_INDEX_MAN_POSTPROCESSING.GUID, TBDD_INDEX_MAN_POSTPROCESSING.I" & _ - "DXMAN_ID, TBDD_INDEX_MAN_POSTPROCESSING.COMMENT, TBDD_INDEX_MAN_POSTPROCESSING.T" & _ - "YPE, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " TBDD_INDEX_MAN_POSTPROCESSING.FUNCTION1, TBDD_IN" & _ - "DEX_MAN_POSTPROCESSING.FUNCTION2, TBDD_INDEX_MAN_POSTPROCESSING.TEXT1, TBDD_INDE" & _ - "X_MAN_POSTPROCESSING.TEXT2, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " TBDD_INDEX_MAN_POSTPROCES" & _ - "SING.TEXT3, TBDD_INDEX_MAN_POSTPROCESSING.SEQUENCE, TBDD_INDEX_MAN_POSTPROCESSIN" & _ - "G.ADDED_WHO, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " TBDD_INDEX_MAN_POSTPROCESSING.ADDED_WHEN" & _ - ", TBDD_INDEX_MAN_POSTPROCESSING.CHANGED_WHO, TBDD_INDEX_MAN_POSTPROCESSING.CHANG" & _ - "ED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBDD_INDEX_MAN_POSTPROCESSING INNER JOIN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " " & _ - " TBDD_INDEX_MAN ON TBDD_INDEX_MAN_POSTPROCESSING.IDXMAN_ID = TBDD_IND" & _ - "EX_MAN.GUID" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (TBDD_INDEX_MAN.DOK_ID = @DOK_ID)" + Me._commandCollection(0).CommandText = "SELECT TBDD_INDEX_MAN_POSTPROCESSING.GUID, TBDD_INDEX_MAN_POSTPROCESSING.I"& _ + "DXMAN_ID, TBDD_INDEX_MAN_POSTPROCESSING.COMMENT, TBDD_INDEX_MAN_POSTPROCESSING.T"& _ + "YPE, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" TBDD_INDEX_MAN_POSTPROCESSING.FUNCTION1, TBDD_IN"& _ + "DEX_MAN_POSTPROCESSING.FUNCTION2, TBDD_INDEX_MAN_POSTPROCESSING.TEXT1, TBDD_INDE"& _ + "X_MAN_POSTPROCESSING.TEXT2, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" TBDD_INDEX_MAN_POSTPROCES"& _ + "SING.TEXT3, TBDD_INDEX_MAN_POSTPROCESSING.SEQUENCE, TBDD_INDEX_MAN_POSTPROCESSIN"& _ + "G.ADDED_WHO, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" TBDD_INDEX_MAN_POSTPROCESSING.ADDED_WHEN"& _ + ", TBDD_INDEX_MAN_POSTPROCESSING.CHANGED_WHO, TBDD_INDEX_MAN_POSTPROCESSING.CHANG"& _ + "ED_WHEN, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" TBDD_INDEX_MAN_POSTPROCESSING.VARIANT"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM "& _ + " TBDD_INDEX_MAN_POSTPROCESSING INNER JOIN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" TB"& _ + "DD_INDEX_MAN ON TBDD_INDEX_MAN_POSTPROCESSING.IDXMAN_ID = TBDD_INDEX_MAN.GUID"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"W"& _ + "HERE (TBDD_INDEX_MAN.DOK_ID = @DOK_ID)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOK_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOK_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOK_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOK_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable, ByVal DOK_ID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable, ByVal DOK_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal DOK_ID As Integer) As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable + + _ + Public Overloads Overridable Function GetData(ByVal DOK_ID As Integer) As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID,Integer) Dim dataTable As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable = New MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_INDEX_MAN_POSTPROCESSING") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function End Class - + ''' '''Represents the connection and commands used to retrieve and save data. ''' - _ + _ Partial Public Class TBWHDD_INDEX_MANTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -22992,66 +23095,66 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + Set Me._clearBeforeFill = value End Set End Property - - _ - Private Sub InitAdapter() + + _ + 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" @@ -23060,103 +23163,103 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("NAME", "NAME") Me._adapter.TableMappings.Add(tableMapping) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBDD_INDEX_MAN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (DOK_ID = " & _ - "@DOK_ID)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ORDER BY NAME" + Me._commandCollection(0).CommandText = "SELECT GUID, NAME"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBDD_INDEX_MAN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (DOK_ID = "& _ + "@DOK_ID)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"ORDER BY NAME" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOK_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOK_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOK_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOK_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBWHDD_INDEX_MANDataTable, ByVal DOK_ID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBWHDD_INDEX_MANDataTable, ByVal DOK_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal DOK_ID As Integer) As MyDataset.TBWHDD_INDEX_MANDataTable + + _ + Public Overloads Overridable Function GetData(ByVal DOK_ID As Integer) As MyDataset.TBWHDD_INDEX_MANDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOK_ID,Integer) Dim dataTable As MyDataset.TBWHDD_INDEX_MANDataTable = New MyDataset.TBWHDD_INDEX_MANDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class - + ''' '''Represents the connection and commands used to retrieve and save data. ''' - _ + _ Partial Public Class TBDD_USER_GROUPSTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -23170,65 +23273,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -23243,281 +23346,281 @@ Namespace MyDatasetTableAdapters 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_USER_GROUPS] WHERE (([GUID] = @Original_GUID) AND ((@IsNull_NAM" & _ - "E = 1 AND [NAME] IS NULL) OR ([NAME] = @Original_NAME)) AND ([ADDED_WHO] = @Orig" & _ - "inal_ADDED_WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDE" & _ - "D_WHEN] = @Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO]" & _ - " IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN" & _ + Me._adapter.DeleteCommand.CommandText = "DELETE FROM [TBDD_USER_GROUPS] WHERE (([GUID] = @Original_GUID) AND ((@IsNull_NAM"& _ + "E = 1 AND [NAME] IS NULL) OR ([NAME] = @Original_NAME)) AND ([ADDED_WHO] = @Orig"& _ + "inal_ADDED_WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDE"& _ + "D_WHEN] = @Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO]"& _ + " IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN"& _ " = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHANGED_WHEN)))" 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, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_NAME", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_NAME", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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_USER_GROUPS" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (NAME, ADDED_WHO)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES " & _ - " (@NAME,@ADDED_WHO); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, NAME, ADDED_WHO, ADDED_WHEN, CHANGED_W" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBDD_USER_GROUPS"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (NAME, ADDED_WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES "& _ + " (@NAME,@ADDED_WHO); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, NAME, ADDED_WHO, ADDED_WHEN, CHANGED_W"& _ "HO, CHANGED_WHEN FROM TBDD_USER_GROUPS 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("@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("@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("@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.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection - Me._adapter.UpdateCommand.CommandText = "UPDATE TBDD_USER_GROUPS" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET NAME = @NAME, CHANGED_WHO = @CH" & _ - "ANGED_WHO" & 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, ADDED_WHO," & _ - " ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBDD_USER_GROUPS WHERE (GUID = @GUID" & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE TBDD_USER_GROUPS"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET NAME = @NAME, CHANGED_WHO = @CH"& _ + "ANGED_WHO"&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, ADDED_WHO,"& _ + " ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBDD_USER_GROUPS 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("@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("@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, "", "", "")) + 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("@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("@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.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM " & _ + Me._commandCollection(0).CommandText = "SELECT GUID, NAME, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM "& _ " TBDD_USER_GROUPS" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBDD_USER_GROUPSDataTable) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_USER_GROUPSDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData() As MyDataset.TBDD_USER_GROUPSDataTable + + _ + Public Overloads Overridable Function GetData() As MyDataset.TBDD_USER_GROUPSDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As MyDataset.TBDD_USER_GROUPSDataTable = New MyDataset.TBDD_USER_GROUPSDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_USER_GROUPSDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_USER_GROUPSDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_USER_GROUPS") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Integer, ByVal Original_NAME As String, ByVal Original_ADDED_WHO As String, ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), ByVal Original_CHANGED_WHO As String, ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) + + _ + Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer, ByVal Original_NAME As String, ByVal Original_ADDED_WHO As String, ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), ByVal Original_CHANGED_WHO As String, ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer + Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) If (Original_NAME Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_NAME, String) + Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_NAME,String) End If If (Original_ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_ADDED_WHO") Else - Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_ADDED_WHO, String) + Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_ADDED_WHO,String) End If - If (Original_ADDED_WHEN.HasValue = True) Then - Me.Adapter.DeleteCommand.Parameters(4).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_ADDED_WHEN.Value, Date) + If (Original_ADDED_WHEN.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(4).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_ADDED_WHEN.Value,Date) Else - Me.Adapter.DeleteCommand.Parameters(4).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(4).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (Original_CHANGED_WHO Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(6).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(7).Value = Global.System.DBNull.Value Else - Me.Adapter.DeleteCommand.Parameters(6).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_CHANGED_WHO, String) + Me.Adapter.DeleteCommand.Parameters(6).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_CHANGED_WHO,String) End If - If (Original_CHANGED_WHEN.HasValue = True) Then - Me.Adapter.DeleteCommand.Parameters(8).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(9).Value = CType(Original_CHANGED_WHEN.Value, Date) + If (Original_CHANGED_WHEN.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(8).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(9).Value = CType(Original_CHANGED_WHEN.Value,Date) Else - Me.Adapter.DeleteCommand.Parameters(8).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(9).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State - If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal NAME As String, ByVal ADDED_WHO As String) As Integer + + _ + Public Overloads Overridable Function Insert(ByVal NAME As String, ByVal ADDED_WHO 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) + Me.Adapter.InsertCommand.Parameters(0).Value = CType(NAME,String) End If If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(1).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(ADDED_WHO,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) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update(ByVal NAME As String, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + + _ + Public Overloads Overridable Function Update(ByVal NAME As String, ByVal CHANGED_WHO 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) + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(NAME,String) End If If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(CHANGED_WHO,String) End If - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_GUID, Integer) - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(3).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + 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 TBDD_GROUPS_USERTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -23531,65 +23634,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -23605,271 +23708,271 @@ Namespace MyDatasetTableAdapters 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_GROUPS_USER" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Original_GUID)" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBDD_GROUPS_USER"&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.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_GROUPS_USER" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (USER_ID, GROUP_ID, ADDED_" & _ - "WHO)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES (@USER_ID,@GROUP_ID,@ADDED_WHO); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, USER_ID, GRO" & _ - "UP_ID, ADDED_WHEN, ADDED_WHO, CHANGED_WHO, CHANGED_WHEN FROM TBDD_GROUPS_USER WH" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBDD_GROUPS_USER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (USER_ID, GROUP_ID, ADDED_"& _ + "WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@USER_ID,@GROUP_ID,@ADDED_WHO); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, USER_ID, GRO"& _ + "UP_ID, ADDED_WHEN, ADDED_WHO, CHANGED_WHO, CHANGED_WHEN FROM TBDD_GROUPS_USER WH"& _ "ERE (GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GROUP_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GROUP_ID", 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("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GROUP_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GROUP_ID", 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.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection - Me._adapter.UpdateCommand.CommandText = "UPDATE TBDD_GROUPS_USER" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET USER_ID = @USER_ID, GROUP_ID = " & _ - "@GROUP_ID, CHANGED_WHO = @CHANGED_WHO" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Original_GUID); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "S" & _ - "ELECT GUID, USER_ID, GROUP_ID, ADDED_WHEN, ADDED_WHO, CHANGED_WHO, CHANGED_WHEN " & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE TBDD_GROUPS_USER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET USER_ID = @USER_ID, GROUP_ID = "& _ + "@GROUP_ID, CHANGED_WHO = @CHANGED_WHO"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Original_GUID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"S"& _ + "ELECT GUID, USER_ID, GROUP_ID, ADDED_WHEN, ADDED_WHO, CHANGED_WHO, CHANGED_WHEN "& _ "FROM TBDD_GROUPS_USER WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GROUP_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GROUP_ID", 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("@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, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GROUP_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GROUP_ID", 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("@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.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, USER_ID, GROUP_ID, ADDED_WHEN, ADDED_WHO, CHANGED_WHO, CHANGE" & _ - "D_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBDD_GROUPS_USER" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (USER_ID = @USER_ID)" + Me._commandCollection(0).CommandText = "SELECT GUID, USER_ID, GROUP_ID, ADDED_WHEN, ADDED_WHO, CHANGED_WHO, CHANGE"& _ + "D_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBDD_GROUPS_USER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (USER_ID = @USER_ID)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_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 = "INSERT INTO TBDD_GROUPS_USER" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (USER_ID, GROUP_ID, ADDED_" & _ - "WHO)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES (@USER_ID,@GROUP_ID,@ADDED_WHO)" + Me._commandCollection(1).CommandText = "INSERT INTO TBDD_GROUPS_USER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (USER_ID, GROUP_ID, ADDED_"& _ + "WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@USER_ID,@GROUP_ID,@ADDED_WHO)" Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GROUP_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GROUP_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(1).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._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GROUP_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GROUP_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(1).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, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBDD_GROUPS_USERDataTable, ByVal USER_ID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_GROUPS_USERDataTable, ByVal USER_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal USER_ID As Integer) As MyDataset.TBDD_GROUPS_USERDataTable + + _ + Public Overloads Overridable Function GetData(ByVal USER_ID As Integer) As MyDataset.TBDD_GROUPS_USERDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID,Integer) Dim dataTable As MyDataset.TBDD_GROUPS_USERDataTable = New MyDataset.TBDD_GROUPS_USERDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_GROUPS_USERDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_GROUPS_USERDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_GROUPS_USER") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) + + _ + 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) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal USER_ID As Integer, ByVal GROUP_ID As Integer, ByVal ADDED_WHO As String) As Integer - Me.Adapter.InsertCommand.Parameters(0).Value = CType(USER_ID, Integer) - Me.Adapter.InsertCommand.Parameters(1).Value = CType(GROUP_ID, Integer) + + _ + Public Overloads Overridable Function Insert(ByVal USER_ID As Integer, ByVal GROUP_ID As Integer, ByVal ADDED_WHO As String) As Integer + Me.Adapter.InsertCommand.Parameters(0).Value = CType(USER_ID,Integer) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(GROUP_ID,Integer) If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(ADDED_WHO,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) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update(ByVal USER_ID As Integer, ByVal GROUP_ID As Integer, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(USER_ID, Integer) - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(GROUP_ID, Integer) + + _ + Public Overloads Overridable Function Update(ByVal USER_ID As Integer, ByVal GROUP_ID As Integer, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(USER_ID,Integer) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(GROUP_ID,Integer) If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(CHANGED_WHO,String) End If - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_GUID, Integer) - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(4).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function cmdinsert(ByVal USER_ID As Integer, ByVal GROUP_ID As Integer, ByVal ADDED_WHO As String) As Integer + + _ + Public Overloads Overridable Function cmdinsert(ByVal USER_ID As Integer, ByVal GROUP_ID As Integer, ByVal ADDED_WHO As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1) - command.Parameters(0).Value = CType(USER_ID, Integer) - command.Parameters(1).Value = CType(GROUP_ID, Integer) + command.Parameters(0).Value = CType(USER_ID,Integer) + command.Parameters(1).Value = CType(GROUP_ID,Integer) If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - command.Parameters(2).Value = CType(ADDED_WHO, String) + command.Parameters(2).Value = CType(ADDED_WHO,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State - If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - command.Connection.Open() + command.Connection.Open End If Dim returnValue As Integer - Try + Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - command.Connection.Close() + 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 VWGI_USER_GROUPS_RELATIONTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -23883,65 +23986,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -23958,103 +24061,103 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("CHANGED_WHEN", "CHANGED_WHEN") Me._adapter.TableMappings.Add(tableMapping) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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 VWGI_USER_GROUPS_RELATION.*" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM VWGI_USER_GROUPS_RELAT" & _ - "ION" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (USER_ID = @USER_ID) ORDER BY NAME" + Me._commandCollection(0).CommandText = "SELECT VWGI_USER_GROUPS_RELATION.*"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM VWGI_USER_GROUPS_RELAT"& _ + "ION"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (USER_ID = @USER_ID) ORDER BY NAME" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.VWGI_USER_GROUPS_RELATIONDataTable, ByVal USER_ID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.VWGI_USER_GROUPS_RELATIONDataTable, ByVal USER_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal USER_ID As Integer) As MyDataset.VWGI_USER_GROUPS_RELATIONDataTable + + _ + Public Overloads Overridable Function GetData(ByVal USER_ID As Integer) As MyDataset.VWGI_USER_GROUPS_RELATIONDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID,Integer) Dim dataTable As MyDataset.VWGI_USER_GROUPS_RELATIONDataTable = New MyDataset.VWGI_USER_GROUPS_RELATIONDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class - + ''' '''Represents the connection and commands used to retrieve and save data. ''' - _ + _ Partial Public Class VWGI_DOCTYPE_GROUPTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -24068,65 +24171,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -24142,169 +24245,169 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("CHANGED_WHEN", "CHANGED_WHEN") Me._adapter.TableMappings.Add(tableMapping) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString End Sub - - _ + + _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(2) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection - Me._commandCollection(0).CommandText = "SELECT GUID, DOCTYPE_ID, DOCTYPE, GROUP_ID, [GROUP], ADDED_WHO, ADDED_WHEN" & _ - ", CHANGED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM VWGI_DOCTYPE_GROUP" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (DOCTYPE_ID = @" & _ - "DOCTYPE_ID)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ORDER BY DOCTYPE" + Me._commandCollection(0).CommandText = "SELECT GUID, DOCTYPE_ID, DOCTYPE, GROUP_ID, [GROUP], ADDED_WHO, ADDED_WHEN"& _ + ", CHANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM VWGI_DOCTYPE_GROUP"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (DOCTYPE_ID = @"& _ + "DOCTYPE_ID)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"ORDER BY DOCTYPE" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_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 TBDD_USRGRP_DOKTYPE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @ID)" + Me._commandCollection(1).CommandText = "DELETE FROM TBDD_USRGRP_DOKTYPE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @ID)" Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) + Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(2).Connection = Me.Connection - Me._commandCollection(2).CommandText = "INSERT INTO TBDD_USRGRP_DOKTYPE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (DOCTYPE_ID, GROUP_ID, " & _ - "ADDED_WHO)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES (@DOCTYPE_ID,@GROUP_ID,@ADDED_WHO)" + Me._commandCollection(2).CommandText = "INSERT INTO TBDD_USRGRP_DOKTYPE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (DOCTYPE_ID, GROUP_ID, "& _ + "ADDED_WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@DOCTYPE_ID,@GROUP_ID,@ADDED_WHO)" Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GROUP_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GROUP_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(2).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._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DOCTYPE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "DOCTYPE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GROUP_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GROUP_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(2).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, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.VWGI_DOCTYPE_GROUPDataTable, ByVal DOCTYPE_ID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.VWGI_DOCTYPE_GROUPDataTable, ByVal DOCTYPE_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal DOCTYPE_ID As Integer) As MyDataset.VWGI_DOCTYPE_GROUPDataTable + + _ + Public Overloads Overridable Function GetData(ByVal DOCTYPE_ID As Integer) As MyDataset.VWGI_DOCTYPE_GROUPDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(DOCTYPE_ID,Integer) Dim dataTable As MyDataset.VWGI_DOCTYPE_GROUPDataTable = New MyDataset.VWGI_DOCTYPE_GROUPDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function cmdDelete(ByVal ID As Integer) As Integer + + _ + Public Overloads Overridable Function cmdDelete(ByVal ID As Integer) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1) - command.Parameters(0).Value = CType(ID, Integer) + command.Parameters(0).Value = CType(ID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State - If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - command.Connection.Open() + command.Connection.Open End If Dim returnValue As Integer - Try + Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - command.Connection.Close() + command.Connection.Close End If End Try Return returnValue End Function - - _ - Public Overridable Overloads Function cmdInsert(ByVal DOCTYPE_ID As Integer, ByVal GROUP_ID As Integer, ByVal ADDED_WHO As String) As Integer + + _ + Public Overloads Overridable Function cmdInsert(ByVal DOCTYPE_ID As Integer, ByVal GROUP_ID As Integer, ByVal ADDED_WHO As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(2) - command.Parameters(0).Value = CType(DOCTYPE_ID, Integer) - command.Parameters(1).Value = CType(GROUP_ID, Integer) + command.Parameters(0).Value = CType(DOCTYPE_ID,Integer) + command.Parameters(1).Value = CType(GROUP_ID,Integer) If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - command.Parameters(2).Value = CType(ADDED_WHO, String) + command.Parameters(2).Value = CType(ADDED_WHO,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State - If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - command.Connection.Open() + command.Connection.Open End If Dim returnValue As Integer - Try + Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - command.Connection.Close() + 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 TBHOTKEY_PROFILETableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -24318,65 +24421,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -24397,630 +24500,630 @@ Namespace MyDatasetTableAdapters 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 [TBHOTKEY_PROFILE] WHERE (([GUID] = @Original_GUID) AND ([NAME] = @Or" & _ - "iginal_NAME) AND ([OBJECTTYPE] = @Original_OBJECTTYPE) AND ([WD_SEARCH] = @Origi" & _ - "nal_WD_SEARCH) AND ([HOTKEY1] = @Original_HOTKEY1) AND ([HOTKEY2] = @Original_HO" & _ - "TKEY2) AND ([WINDOW_NAME] = @Original_WINDOW_NAME) AND ([ADDED_WHO] = @Original_" & _ - "ADDED_WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDED_WHE" & _ - "N] = @Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS N" & _ - "ULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 " & _ + Me._adapter.DeleteCommand.CommandText = "DELETE FROM [TBHOTKEY_PROFILE] WHERE (([GUID] = @Original_GUID) AND ([NAME] = @Or"& _ + "iginal_NAME) AND ([OBJECTTYPE] = @Original_OBJECTTYPE) AND ([WD_SEARCH] = @Origi"& _ + "nal_WD_SEARCH) AND ([HOTKEY1] = @Original_HOTKEY1) AND ([HOTKEY2] = @Original_HO"& _ + "TKEY2) AND ([WINDOW_NAME] = @Original_WINDOW_NAME) AND ([ADDED_WHO] = @Original_"& _ + "ADDED_WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDED_WHE"& _ + "N] = @Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS N"& _ + "ULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 "& _ "AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHANGED_WHEN)))" 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, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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 TBHOTKEY_PROFILE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (NAME, OBJECTTYPE, WD_SEAR" & _ - "CH, HOTKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES (@NAME,@OBJECTTYPE," & _ - "@WD_SEARCH,@HOTKEY1,@HOTKEY2,@WINDOW_NAME,@ADDED_WHO); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, NAME, NAME" & _ - " + ', Hotkey: ' + HOTKEY1 + ' & ' + HOTKEY2 AS String, OBJECTTYPE, WD_SEARCH, HO" & _ - "TKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FR" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBHOTKEY_PROFILE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (NAME, OBJECTTYPE, WD_SEAR"& _ + "CH, HOTKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@NAME,@OBJECTTYPE,"& _ + "@WD_SEARCH,@HOTKEY1,@HOTKEY2,@WINDOW_NAME,@ADDED_WHO); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, NAME, NAME"& _ + " + ', Hotkey: ' + HOTKEY1 + ' & ' + HOTKEY2 AS String, OBJECTTYPE, WD_SEARCH, HO"& _ + "TKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FR"& _ "OM TBHOTKEY_PROFILE 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("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 5, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", 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("@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("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 5, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", 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.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection - Me._adapter.UpdateCommand.CommandText = "UPDATE [TBHOTKEY_PROFILE] SET [NAME] = @NAME, [OBJECTTYPE] = @OBJECTTYPE, [WD_SEA" & _ - "RCH] = @WD_SEARCH, [HOTKEY1] = @HOTKEY1, [HOTKEY2] = @HOTKEY2, [WINDOW_NAME] = @" & _ - "WINDOW_NAME, [ADDED_WHO] = @ADDED_WHO, [ADDED_WHEN] = @ADDED_WHEN, [CHANGED_WHO]" & _ - " = @CHANGED_WHO, [CHANGED_WHEN] = @CHANGED_WHEN WHERE (([GUID] = @Original_GUID)" & _ - " AND ([NAME] = @Original_NAME) AND ([OBJECTTYPE] = @Original_OBJECTTYPE) AND ([W" & _ - "D_SEARCH] = @Original_WD_SEARCH) AND ([HOTKEY1] = @Original_HOTKEY1) AND ([HOTKE" & _ - "Y2] = @Original_HOTKEY2) AND ([WINDOW_NAME] = @Original_WINDOW_NAME) AND ([ADDED" & _ - "_WHO] = @Original_ADDED_WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NU" & _ - "LL) OR ([ADDED_WHEN] = @Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND " & _ - "[CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull" & _ - "_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHA" & _ - "NGED_WHEN)));" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, NAME, NAME + ', Hotkey: ' + HOTKEY1 + ' & ' + HOTKEY" & _ - "2 AS String, OBJECTTYPE, WD_SEARCH, HOTKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO, AD" & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE [TBHOTKEY_PROFILE] SET [NAME] = @NAME, [OBJECTTYPE] = @OBJECTTYPE, [WD_SEA"& _ + "RCH] = @WD_SEARCH, [HOTKEY1] = @HOTKEY1, [HOTKEY2] = @HOTKEY2, [WINDOW_NAME] = @"& _ + "WINDOW_NAME, [ADDED_WHO] = @ADDED_WHO, [ADDED_WHEN] = @ADDED_WHEN, [CHANGED_WHO]"& _ + " = @CHANGED_WHO, [CHANGED_WHEN] = @CHANGED_WHEN WHERE (([GUID] = @Original_GUID)"& _ + " AND ([NAME] = @Original_NAME) AND ([OBJECTTYPE] = @Original_OBJECTTYPE) AND ([W"& _ + "D_SEARCH] = @Original_WD_SEARCH) AND ([HOTKEY1] = @Original_HOTKEY1) AND ([HOTKE"& _ + "Y2] = @Original_HOTKEY2) AND ([WINDOW_NAME] = @Original_WINDOW_NAME) AND ([ADDED"& _ + "_WHO] = @Original_ADDED_WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NU"& _ + "LL) OR ([ADDED_WHEN] = @Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND "& _ + "[CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull"& _ + "_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHA"& _ + "NGED_WHEN)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, NAME, NAME + ', Hotkey: ' + HOTKEY1 + ' & ' + HOTKEY"& _ + "2 AS String, OBJECTTYPE, WD_SEARCH, HOTKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO, AD"& _ "DED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBHOTKEY_PROFILE 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, 0, 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("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", 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, 0, 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("@CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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, 0, 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("@Original_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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.Current, False, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", 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, 0, 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("@CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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, 0, 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("@Original_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "NAME", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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.Current, false, Nothing, "", "", "")) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString End Sub - - _ + + _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(2) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection - Me._commandCollection(0).CommandText = "SELECT GUID, NAME, NAME + ', Hotkey: ' + HOTKEY1 + ' & ' + HOTKEY2 AS Stri" & _ - "ng, OBJECTTYPE, WD_SEARCH, HOTKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO, ADDED_WHEN," & _ - " CHANGED_WHO, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " CHANGED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBHOTKEY_" & _ + Me._commandCollection(0).CommandText = "SELECT GUID, NAME, NAME + ', Hotkey: ' + HOTKEY1 + ' & ' + HOTKEY2 AS Stri"& _ + "ng, OBJECTTYPE, WD_SEARCH, HOTKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO, ADDED_WHEN,"& _ + " CHANGED_WHO, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CHANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBHOTKEY_"& _ "PROFILE" 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 TBHOTKEY_PROFILE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET NAME = @NAME, OBJECTTYPE = @OBJ" & _ - "ECTTYPE, WD_SEARCH = @WD_SEARCH, HOTKEY1 = @HOTKEY1, HOTKEY2 = @HOTKEY2, WINDOW_" & _ - "NAME = @WINDOW_NAME, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " CHANGED_WHO = @CHANGED_WHO" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHER" & _ + Me._commandCollection(1).CommandText = "UPDATE TBHOTKEY_PROFILE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET NAME = @NAME, OBJECTTYPE = @OBJ"& _ + "ECTTYPE, WD_SEARCH = @WD_SEARCH, HOTKEY1 = @HOTKEY1, HOTKEY2 = @HOTKEY2, WINDOW_"& _ + "NAME = @WINDOW_NAME, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CHANGED_WHO = @CHANGED_WHO"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHER"& _ "E (GUID = @Original_GUID)" Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(1).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._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 5, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(1).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._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, "", "", "")) + Me._commandCollection(1).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._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJECTTYPE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECTTYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 5, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_NAME", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_NAME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(1).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._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, "", "", "")) Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(2).Connection = Me.Connection - Me._commandCollection(2).CommandText = "SELECT GUID, NAME, NAME + ', Hotkey: ' + HOTKEY1 + ' & ' + HOTKEY2 AS Stri" & _ - "ng, OBJECTTYPE, WD_SEARCH, HOTKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO, ADDED_WHEN," & _ - " CHANGED_WHO, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " CHANGED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBHOTKEY_" & _ + Me._commandCollection(2).CommandText = "SELECT GUID, NAME, NAME + ', Hotkey: ' + HOTKEY1 + ' & ' + HOTKEY2 AS Stri"& _ + "ng, OBJECTTYPE, WD_SEARCH, HOTKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO, ADDED_WHEN,"& _ + " CHANGED_WHO, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CHANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBHOTKEY_"& _ "PROFILE where GUID = @HK_ID" Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HK_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HK_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData() As MyDataset.TBHOTKEY_PROFILEDataTable + + _ + Public Overloads Overridable Function GetData() As MyDataset.TBHOTKEY_PROFILEDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As MyDataset.TBHOTKEY_PROFILEDataTable = New MyDataset.TBHOTKEY_PROFILEDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function FillByID(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable, ByVal HK_ID As Integer) As Integer + + _ + Public Overloads Overridable Function FillByID(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable, ByVal HK_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(2) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(HK_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(HK_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetDataByID(ByVal HK_ID As Integer) As MyDataset.TBHOTKEY_PROFILEDataTable + + _ + Public Overloads Overridable Function GetDataByID(ByVal HK_ID As Integer) As MyDataset.TBHOTKEY_PROFILEDataTable Me.Adapter.SelectCommand = Me.CommandCollection(2) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(HK_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(HK_ID,Integer) Dim dataTable As MyDataset.TBHOTKEY_PROFILEDataTable = New MyDataset.TBHOTKEY_PROFILEDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBHOTKEY_PROFILE") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Integer, ByVal Original_NAME As String, ByVal Original_OBJECTTYPE As String, ByVal Original_WD_SEARCH As String, ByVal Original_HOTKEY1 As String, ByVal Original_HOTKEY2 As String, ByVal Original_WINDOW_NAME As String, ByVal Original_ADDED_WHO As String, ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), ByVal Original_CHANGED_WHO As String, ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) + + _ + Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer, ByVal Original_NAME As String, ByVal Original_OBJECTTYPE As String, ByVal Original_WD_SEARCH As String, ByVal Original_HOTKEY1 As String, ByVal Original_HOTKEY2 As String, ByVal Original_WINDOW_NAME As String, ByVal Original_ADDED_WHO As String, ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), ByVal Original_CHANGED_WHO As String, ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer + Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) If (Original_NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_NAME") Else - Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_NAME, String) + Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_NAME,String) End If If (Original_OBJECTTYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_OBJECTTYPE") Else - Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_OBJECTTYPE, String) + Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_OBJECTTYPE,String) End If If (Original_WD_SEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_WD_SEARCH") Else - Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_WD_SEARCH, String) + Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_WD_SEARCH,String) End If If (Original_HOTKEY1 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_HOTKEY1") Else - Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_HOTKEY1, String) + Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_HOTKEY1,String) End If If (Original_HOTKEY2 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_HOTKEY2") Else - Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_HOTKEY2, String) + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_HOTKEY2,String) End If If (Original_WINDOW_NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_WINDOW_NAME") Else - Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_WINDOW_NAME, String) + Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_WINDOW_NAME,String) End If If (Original_ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_ADDED_WHO") Else - Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_ADDED_WHO, String) + Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_ADDED_WHO,String) End If - If (Original_ADDED_WHEN.HasValue = True) Then - Me.Adapter.DeleteCommand.Parameters(8).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(9).Value = CType(Original_ADDED_WHEN.Value, Date) + If (Original_ADDED_WHEN.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(8).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(9).Value = CType(Original_ADDED_WHEN.Value,Date) Else - Me.Adapter.DeleteCommand.Parameters(8).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_CHANGED_WHO Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(10).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(11).Value = Global.System.DBNull.Value Else - Me.Adapter.DeleteCommand.Parameters(10).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(11).Value = CType(Original_CHANGED_WHO, String) + Me.Adapter.DeleteCommand.Parameters(10).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(11).Value = CType(Original_CHANGED_WHO,String) End If - If (Original_CHANGED_WHEN.HasValue = True) Then - Me.Adapter.DeleteCommand.Parameters(12).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(13).Value = CType(Original_CHANGED_WHEN.Value, Date) + If (Original_CHANGED_WHEN.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(12).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(13).Value = CType(Original_CHANGED_WHEN.Value,Date) Else - Me.Adapter.DeleteCommand.Parameters(12).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(13).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State - If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal NAME As String, ByVal OBJECTTYPE As String, ByVal WD_SEARCH As String, ByVal HOTKEY1 As String, ByVal HOTKEY2 As String, ByVal WINDOW_NAME As String, ByVal ADDED_WHO As String) As Integer + + _ + Public Overloads Overridable Function Insert(ByVal NAME As String, ByVal OBJECTTYPE As String, ByVal WD_SEARCH As String, ByVal HOTKEY1 As String, ByVal HOTKEY2 As String, ByVal WINDOW_NAME As String, ByVal ADDED_WHO As String) As Integer If (NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("NAME") Else - Me.Adapter.InsertCommand.Parameters(0).Value = CType(NAME, String) + Me.Adapter.InsertCommand.Parameters(0).Value = CType(NAME,String) End If If (OBJECTTYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("OBJECTTYPE") Else - Me.Adapter.InsertCommand.Parameters(1).Value = CType(OBJECTTYPE, String) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(OBJECTTYPE,String) End If If (WD_SEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("WD_SEARCH") Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(WD_SEARCH, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(WD_SEARCH,String) End If If (HOTKEY1 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY1") Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(HOTKEY1, String) + Me.Adapter.InsertCommand.Parameters(3).Value = CType(HOTKEY1,String) End If If (HOTKEY2 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY2") Else - Me.Adapter.InsertCommand.Parameters(4).Value = CType(HOTKEY2, String) + Me.Adapter.InsertCommand.Parameters(4).Value = CType(HOTKEY2,String) End If If (WINDOW_NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("WINDOW_NAME") Else - Me.Adapter.InsertCommand.Parameters(5).Value = CType(WINDOW_NAME, String) + Me.Adapter.InsertCommand.Parameters(5).Value = CType(WINDOW_NAME,String) End If If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(6).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(6).Value = CType(ADDED_WHO,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) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update( _ - ByVal NAME As String, _ - ByVal OBJECTTYPE As String, _ - ByVal WD_SEARCH As String, _ - ByVal HOTKEY1 As String, _ - ByVal HOTKEY2 As String, _ - ByVal WINDOW_NAME As String, _ - ByVal ADDED_WHO As String, _ - ByVal ADDED_WHEN As Global.System.Nullable(Of Date), _ - ByVal CHANGED_WHO As String, _ - ByVal CHANGED_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_GUID As Integer, _ - ByVal Original_NAME As String, _ - ByVal Original_OBJECTTYPE As String, _ - ByVal Original_WD_SEARCH As String, _ - ByVal Original_HOTKEY1 As String, _ - ByVal Original_HOTKEY2 As String, _ - ByVal Original_WINDOW_NAME As String, _ - ByVal Original_ADDED_WHO As String, _ - ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_CHANGED_WHO As String, _ - ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date), _ + + _ + Public Overloads Overridable Function Update( _ + ByVal NAME As String, _ + ByVal OBJECTTYPE As String, _ + ByVal WD_SEARCH As String, _ + ByVal HOTKEY1 As String, _ + ByVal HOTKEY2 As String, _ + ByVal WINDOW_NAME As String, _ + ByVal ADDED_WHO As String, _ + ByVal ADDED_WHEN As Global.System.Nullable(Of Date), _ + ByVal CHANGED_WHO As String, _ + ByVal CHANGED_WHEN As Global.System.Nullable(Of Date), _ + ByVal Original_GUID As Integer, _ + ByVal Original_NAME As String, _ + ByVal Original_OBJECTTYPE As String, _ + ByVal Original_WD_SEARCH As String, _ + ByVal Original_HOTKEY1 As String, _ + ByVal Original_HOTKEY2 As String, _ + ByVal Original_WINDOW_NAME As String, _ + ByVal Original_ADDED_WHO As String, _ + ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), _ + ByVal Original_CHANGED_WHO As String, _ + ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date), _ ByVal GUID As Integer) As Integer If (NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("NAME") Else - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(NAME, String) + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(NAME,String) End If If (OBJECTTYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("OBJECTTYPE") Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(OBJECTTYPE, String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(OBJECTTYPE,String) End If If (WD_SEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("WD_SEARCH") Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(WD_SEARCH, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(WD_SEARCH,String) End If If (HOTKEY1 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY1") Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(HOTKEY1, String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(HOTKEY1,String) End If If (HOTKEY2 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY2") Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(HOTKEY2, String) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(HOTKEY2,String) End If If (WINDOW_NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("WINDOW_NAME") Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(WINDOW_NAME, String) + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(WINDOW_NAME,String) End If If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(ADDED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(ADDED_WHO,String) End If - If (ADDED_WHEN.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(7).Value = CType(ADDED_WHEN.Value, Date) + If (ADDED_WHEN.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(ADDED_WHEN.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(8).Value = CType(CHANGED_WHO,String) End If - If (CHANGED_WHEN.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(9).Value = CType(CHANGED_WHEN.Value, Date) + If (CHANGED_WHEN.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(9).Value = CType(CHANGED_WHEN.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If - Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_GUID,Integer) If (Original_NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_NAME") Else - Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_NAME, String) + Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_NAME,String) End If If (Original_OBJECTTYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_OBJECTTYPE") Else - Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_OBJECTTYPE, String) + Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_OBJECTTYPE,String) End If If (Original_WD_SEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_WD_SEARCH") Else - Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_WD_SEARCH, String) + Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_WD_SEARCH,String) End If If (Original_HOTKEY1 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_HOTKEY1") Else - Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_HOTKEY1, String) + Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_HOTKEY1,String) End If If (Original_HOTKEY2 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_HOTKEY2") Else - Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_HOTKEY2, String) + Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_HOTKEY2,String) End If If (Original_WINDOW_NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_WINDOW_NAME") Else - Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_WINDOW_NAME, String) + Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_WINDOW_NAME,String) End If If (Original_ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_ADDED_WHO") Else - Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_ADDED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_ADDED_WHO,String) End If - If (Original_ADDED_WHEN.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0, Object) - Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_ADDED_WHEN.Value, Date) + If (Original_ADDED_WHEN.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_ADDED_WHEN.Value,Date) Else - Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1, Object) + Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (Original_CHANGED_WHO Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1, Object) + Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0, Object) - Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_CHANGED_WHO,String) End If - If (Original_CHANGED_WHEN.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0, Object) - Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_CHANGED_WHEN.Value, Date) + If (Original_CHANGED_WHEN.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_CHANGED_WHEN.Value,Date) Else - Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1, Object) + Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = Global.System.DBNull.Value End If - Me.Adapter.UpdateCommand.Parameters(24).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(24).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update( _ - ByVal NAME As String, _ - ByVal OBJECTTYPE As String, _ - ByVal WD_SEARCH As String, _ - ByVal HOTKEY1 As String, _ - ByVal HOTKEY2 As String, _ - ByVal WINDOW_NAME As String, _ - ByVal ADDED_WHO As String, _ - ByVal ADDED_WHEN As Global.System.Nullable(Of Date), _ - ByVal CHANGED_WHO As String, _ - ByVal CHANGED_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_GUID As Integer, _ - ByVal Original_NAME As String, _ - ByVal Original_OBJECTTYPE As String, _ - ByVal Original_WD_SEARCH As String, _ - ByVal Original_HOTKEY1 As String, _ - ByVal Original_HOTKEY2 As String, _ - ByVal Original_WINDOW_NAME As String, _ - ByVal Original_ADDED_WHO As String, _ - ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_CHANGED_WHO As String, _ + + _ + Public Overloads Overridable Function Update( _ + ByVal NAME As String, _ + ByVal OBJECTTYPE As String, _ + ByVal WD_SEARCH As String, _ + ByVal HOTKEY1 As String, _ + ByVal HOTKEY2 As String, _ + ByVal WINDOW_NAME As String, _ + ByVal ADDED_WHO As String, _ + ByVal ADDED_WHEN As Global.System.Nullable(Of Date), _ + ByVal CHANGED_WHO As String, _ + ByVal CHANGED_WHEN As Global.System.Nullable(Of Date), _ + ByVal Original_GUID As Integer, _ + ByVal Original_NAME As String, _ + ByVal Original_OBJECTTYPE As String, _ + ByVal Original_WD_SEARCH As String, _ + ByVal Original_HOTKEY1 As String, _ + ByVal Original_HOTKEY2 As String, _ + ByVal Original_WINDOW_NAME As String, _ + ByVal Original_ADDED_WHO As String, _ + ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), _ + ByVal Original_CHANGED_WHO As String, _ ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer Return Me.Update(NAME, OBJECTTYPE, WD_SEARCH, HOTKEY1, HOTKEY2, WINDOW_NAME, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, Original_GUID, Original_NAME, Original_OBJECTTYPE, Original_WD_SEARCH, Original_HOTKEY1, Original_HOTKEY2, Original_WINDOW_NAME, Original_ADDED_WHO, Original_ADDED_WHEN, Original_CHANGED_WHO, Original_CHANGED_WHEN, Original_GUID) End Function - - _ - Public Overridable Overloads Function cmdUpdate(ByVal NAME As String, ByVal OBJECTTYPE As String, ByVal WD_SEARCH As String, ByVal HOTKEY1 As String, ByVal HOTKEY2 As String, ByVal WINDOW_NAME As String, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer) As Integer + + _ + Public Overloads Overridable Function cmdUpdate(ByVal NAME As String, ByVal OBJECTTYPE As String, ByVal WD_SEARCH As String, ByVal HOTKEY1 As String, ByVal HOTKEY2 As String, ByVal WINDOW_NAME As String, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1) If (NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("NAME") Else - command.Parameters(0).Value = CType(NAME, String) + command.Parameters(0).Value = CType(NAME,String) End If If (OBJECTTYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("OBJECTTYPE") Else - command.Parameters(1).Value = CType(OBJECTTYPE, String) + command.Parameters(1).Value = CType(OBJECTTYPE,String) End If If (WD_SEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("WD_SEARCH") Else - command.Parameters(2).Value = CType(WD_SEARCH, String) + command.Parameters(2).Value = CType(WD_SEARCH,String) End If If (HOTKEY1 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY1") Else - command.Parameters(3).Value = CType(HOTKEY1, String) + command.Parameters(3).Value = CType(HOTKEY1,String) End If If (HOTKEY2 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY2") Else - command.Parameters(4).Value = CType(HOTKEY2, String) + command.Parameters(4).Value = CType(HOTKEY2,String) End If If (WINDOW_NAME Is Nothing) Then Throw New Global.System.ArgumentNullException("WINDOW_NAME") Else - command.Parameters(5).Value = CType(WINDOW_NAME, String) + command.Parameters(5).Value = CType(WINDOW_NAME,String) End If If (CHANGED_WHO Is Nothing) Then command.Parameters(6).Value = Global.System.DBNull.Value Else - command.Parameters(6).Value = CType(CHANGED_WHO, String) + command.Parameters(6).Value = CType(CHANGED_WHO,String) End If - command.Parameters(7).Value = CType(Original_GUID, Integer) + command.Parameters(7).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) _ + If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - command.Connection.Open() + command.Connection.Open End If Dim returnValue As Integer - Try + Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - command.Connection.Close() + 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 TBHOTKEY_PATTERNSTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -25034,65 +25137,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -25110,275 +25213,275 @@ Namespace MyDatasetTableAdapters 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 TBHOTKEY_PATTERNS" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Original_GUID)" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBHOTKEY_PATTERNS"&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.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 TBHOTKEY_PATTERNS" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (HKPROFILE_ID, PATTERN_WD" & _ - "SEARCH, WINDOW_CONTROL, ADDED_WHO, SEQUENCE_NUMBER)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES (@HKPROFILE_I" & _ - "D,@PATTERN_WDSEARCH,@WINDOW_CONTROL,@ADDED_WHO,@SEQUENCE_NUMBER); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID" & _ - ", HKPROFILE_ID, PATTERN_WDSEARCH, WINDOW_CONTROL, ADDED_WHO, ADDED_WHEN, CHANGED" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBHOTKEY_PATTERNS"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (HKPROFILE_ID, PATTERN_WD"& _ + "SEARCH, WINDOW_CONTROL, ADDED_WHO, SEQUENCE_NUMBER)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@HKPROFILE_I"& _ + "D,@PATTERN_WDSEARCH,@WINDOW_CONTROL,@ADDED_WHO,@SEQUENCE_NUMBER); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID"& _ + ", HKPROFILE_ID, PATTERN_WDSEARCH, WINDOW_CONTROL, ADDED_WHO, ADDED_WHEN, CHANGED"& _ "_WHO, CHANGED_WHEN FROM TBHOTKEY_PATTERNS WHERE (GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PATTERN_WDSEARCH", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "PATTERN_WDSEARCH", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_CONTROL", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_CONTROL", 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("@SEQUENCE_NUMBER", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE_NUMBER", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PATTERN_WDSEARCH", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "PATTERN_WDSEARCH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_CONTROL", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_CONTROL", 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("@SEQUENCE_NUMBER", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE_NUMBER", 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 TBHOTKEY_PATTERNS" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET HKPROFILE_ID = @HKPROFILE_ID, " & _ - "PATTERN_WDSEARCH = @PATTERN_WDSEARCH, WINDOW_CONTROL = @WINDOW_CONTROL, ADDED_WH" & _ - "O = @ADDED_WHO, ADDED_WHEN = @ADDED_WHEN, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " CHANGED_WHO" & _ - " = @CHANGED_WHO, SEQUENCE_NUMBER = @SEQUENCE_NUMBER" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Origi" & _ - "nal_GUID); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, HKPROFILE_ID, PATTERN_WDSEARCH, WINDOW_CONTROL, ADDED_" & _ - "WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBHOTKEY_PATTERNS WHERE (GUID = " & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE TBHOTKEY_PATTERNS"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET HKPROFILE_ID = @HKPROFILE_ID, "& _ + "PATTERN_WDSEARCH = @PATTERN_WDSEARCH, WINDOW_CONTROL = @WINDOW_CONTROL, ADDED_WH"& _ + "O = @ADDED_WHO, ADDED_WHEN = @ADDED_WHEN, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CHANGED_WHO"& _ + " = @CHANGED_WHO, SEQUENCE_NUMBER = @SEQUENCE_NUMBER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Origi"& _ + "nal_GUID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, HKPROFILE_ID, PATTERN_WDSEARCH, WINDOW_CONTROL, ADDED_"& _ + "WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBHOTKEY_PATTERNS WHERE (GUID = "& _ "@GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PATTERN_WDSEARCH", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "PATTERN_WDSEARCH", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_CONTROL", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_CONTROL", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.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.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", 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("@SEQUENCE_NUMBER", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE_NUMBER", 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, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PATTERN_WDSEARCH", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "PATTERN_WDSEARCH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WINDOW_CONTROL", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "WINDOW_CONTROL", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.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.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", 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("@SEQUENCE_NUMBER", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE_NUMBER", 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.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, HKPROFILE_ID, PATTERN_WDSEARCH, WINDOW_CONTROL, ADDED_WHO, AD" & _ - "DED_WHEN, CHANGED_WHO, CHANGED_WHEN, SEQUENCE_NUMBER" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBHOTKEY_P" & _ - "ATTERNS" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (HKPROFILE_ID = @ID)" + Me._commandCollection(0).CommandText = "SELECT GUID, HKPROFILE_ID, PATTERN_WDSEARCH, WINDOW_CONTROL, ADDED_WHO, AD"& _ + "DED_WHEN, CHANGED_WHO, CHANGED_WHEN, SEQUENCE_NUMBER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBHOTKEY_P"& _ + "ATTERNS"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (HKPROFILE_ID = @ID)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNSDataTable, ByVal ID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNSDataTable, ByVal ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal ID As Integer) As MyDataset.TBHOTKEY_PATTERNSDataTable + + _ + Public Overloads Overridable Function GetData(ByVal ID As Integer) As MyDataset.TBHOTKEY_PATTERNSDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID,Integer) Dim dataTable As MyDataset.TBHOTKEY_PATTERNSDataTable = New MyDataset.TBHOTKEY_PATTERNSDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNSDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNSDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBHOTKEY_PATTERNS") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer - Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) - End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) + + _ + 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) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal HKPROFILE_ID As Integer, ByVal PATTERN_WDSEARCH As String, ByVal WINDOW_CONTROL As String, ByVal ADDED_WHO As String, ByVal SEQUENCE_NUMBER As Integer) As Integer - Me.Adapter.InsertCommand.Parameters(0).Value = CType(HKPROFILE_ID, Integer) + + _ + Public Overloads Overridable Function Insert(ByVal HKPROFILE_ID As Integer, ByVal PATTERN_WDSEARCH As String, ByVal WINDOW_CONTROL As String, ByVal ADDED_WHO As String, ByVal SEQUENCE_NUMBER As Integer) As Integer + Me.Adapter.InsertCommand.Parameters(0).Value = CType(HKPROFILE_ID,Integer) If (PATTERN_WDSEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("PATTERN_WDSEARCH") Else - Me.Adapter.InsertCommand.Parameters(1).Value = CType(PATTERN_WDSEARCH, String) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(PATTERN_WDSEARCH,String) End If If (WINDOW_CONTROL Is Nothing) Then Throw New Global.System.ArgumentNullException("WINDOW_CONTROL") Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(WINDOW_CONTROL, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(WINDOW_CONTROL,String) End If If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(3).Value = CType(ADDED_WHO,String) End If - Me.Adapter.InsertCommand.Parameters(4).Value = CType(SEQUENCE_NUMBER, Integer) + Me.Adapter.InsertCommand.Parameters(4).Value = CType(SEQUENCE_NUMBER,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State - If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update(ByVal HKPROFILE_ID As Integer, ByVal PATTERN_WDSEARCH As String, ByVal WINDOW_CONTROL As String, ByVal ADDED_WHO As String, ByVal ADDED_WHEN As Global.System.Nullable(Of Date), ByVal CHANGED_WHO As String, ByVal SEQUENCE_NUMBER As Integer, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(HKPROFILE_ID, Integer) + + _ + Public Overloads Overridable Function Update(ByVal HKPROFILE_ID As Integer, ByVal PATTERN_WDSEARCH As String, ByVal WINDOW_CONTROL As String, ByVal ADDED_WHO As String, ByVal ADDED_WHEN As Global.System.Nullable(Of Date), ByVal CHANGED_WHO As String, ByVal SEQUENCE_NUMBER As Integer, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(HKPROFILE_ID,Integer) If (PATTERN_WDSEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("PATTERN_WDSEARCH") Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(PATTERN_WDSEARCH, String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(PATTERN_WDSEARCH,String) End If If (WINDOW_CONTROL Is Nothing) Then Throw New Global.System.ArgumentNullException("WINDOW_CONTROL") Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(WINDOW_CONTROL, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(WINDOW_CONTROL,String) End If If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(ADDED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(ADDED_WHO,String) End If - If (ADDED_WHEN.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(ADDED_WHEN.Value, Date) + If (ADDED_WHEN.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(ADDED_WHEN.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(CHANGED_WHO,String) End If - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(SEQUENCE_NUMBER, Integer) - Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_GUID, Integer) - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(SEQUENCE_NUMBER,Integer) + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(8).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + 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 TBMYHOTKEYSTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -25392,65 +25495,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -25460,107 +25563,107 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("String", "String") Me._adapter.TableMappings.Add(tableMapping) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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 T1.GUID, T.NAME + ', Hotkey: ' + T1.HOTKEY1 + ' & ' + T1.HOTKEY2 AS" & _ - " String" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBHOTKEY_PROFILE AS T INNER JOIN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " " & _ - " TBHOTKEY_USER_PROFILE AS T1 ON T.GUID = T1.HKPROFILE_ID" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (T.GUI" & _ - "D IN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (SELECT HKPROFILE_ID" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " " & _ - " FROM TBHOTKEY_USER_PROFILE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " " & _ + Me._commandCollection(0).CommandText = "SELECT T1.GUID, T.NAME + ', Hotkey: ' + T1.HOTKEY1 + ' & ' + T1.HOTKEY2 AS"& _ + " String"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBHOTKEY_PROFILE AS T INNER JOIN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _ + " TBHOTKEY_USER_PROFILE AS T1 ON T.GUID = T1.HKPROFILE_ID"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (T.GUI"& _ + "D IN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (SELECT HKPROFILE_ID"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _ + " FROM TBHOTKEY_USER_PROFILE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _ " WHERE (USER_ID = @USERID))) AND (T1.USER_ID = @USERID)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USERID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USERID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBMYHOTKEYSDataTable, ByVal USERID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBMYHOTKEYSDataTable, ByVal USERID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USERID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USERID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal USERID As Integer) As MyDataset.TBMYHOTKEYSDataTable + + _ + Public Overloads Overridable Function GetData(ByVal USERID As Integer) As MyDataset.TBMYHOTKEYSDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USERID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USERID,Integer) Dim dataTable As MyDataset.TBMYHOTKEYSDataTable = New MyDataset.TBMYHOTKEYSDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class - + ''' '''Represents the connection and commands used to retrieve and save data. ''' - _ + _ Partial Public Class TBHOTKEY_USER_PROFILETableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -25574,65 +25677,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -25651,490 +25754,490 @@ Namespace MyDatasetTableAdapters 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 TBHOTKEY_USER_PROFILE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Original_GUID)" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBHOTKEY_USER_PROFILE"&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.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 [TBHOTKEY_USER_PROFILE] ([HKPROFILE_ID], [USER_ID], [WD_SEARCH], [HOT" & _ - "KEY1], [HOTKEY2], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALU" & _ - "ES (@HKPROFILE_ID, @USER_ID, @WD_SEARCH, @HOTKEY1, @HOTKEY2, @ADDED_WHO, @ADDED_" & _ - "WHEN, @CHANGED_WHO, @CHANGED_WHEN);" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, HKPROFILE_ID, USER_ID, WD_SEAR" & _ - "CH, HOTKEY1, HOTKEY2, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBHO" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO [TBHOTKEY_USER_PROFILE] ([HKPROFILE_ID], [USER_ID], [WD_SEARCH], [HOT"& _ + "KEY1], [HOTKEY2], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALU"& _ + "ES (@HKPROFILE_ID, @USER_ID, @WD_SEARCH, @HOTKEY1, @HOTKEY2, @ADDED_WHO, @ADDED_"& _ + "WHEN, @CHANGED_WHO, @CHANGED_WHEN);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, HKPROFILE_ID, USER_ID, WD_SEAR"& _ + "CH, HOTKEY1, HOTKEY2, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBHO"& _ "TKEY_USER_PROFILE WHERE (GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", 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, 0, 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("@ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", 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, 0, 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("@ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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 [TBHOTKEY_USER_PROFILE] SET [HKPROFILE_ID] = @HKPROFILE_ID, [USER_ID] = @U" & _ - "SER_ID, [WD_SEARCH] = @WD_SEARCH, [HOTKEY1] = @HOTKEY1, [HOTKEY2] = @HOTKEY2, [A" & _ - "DDED_WHO] = @ADDED_WHO, [ADDED_WHEN] = @ADDED_WHEN, [CHANGED_WHO] = @CHANGED_WHO" & _ - ", [CHANGED_WHEN] = @CHANGED_WHEN WHERE (([GUID] = @Original_GUID) AND ([HKPROFIL" & _ - "E_ID] = @Original_HKPROFILE_ID) AND ([USER_ID] = @Original_USER_ID) AND ([WD_SEA" & _ - "RCH] = @Original_WD_SEARCH) AND ([HOTKEY1] = @Original_HOTKEY1) AND ([HOTKEY2] =" & _ - " @Original_HOTKEY2) AND ([ADDED_WHO] = @Original_ADDED_WHO) AND ((@IsNull_ADDED_" & _ - "WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDED_WHEN] = @Original_ADDED_WHEN)) AND" & _ - " ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Origi" & _ - "nal_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR " & _ - "([CHANGED_WHEN] = @Original_CHANGED_WHEN)));" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, HKPROFILE_ID, USER_ID" & _ - ", WD_SEARCH, HOTKEY1, HOTKEY2, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN " & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE [TBHOTKEY_USER_PROFILE] SET [HKPROFILE_ID] = @HKPROFILE_ID, [USER_ID] = @U"& _ + "SER_ID, [WD_SEARCH] = @WD_SEARCH, [HOTKEY1] = @HOTKEY1, [HOTKEY2] = @HOTKEY2, [A"& _ + "DDED_WHO] = @ADDED_WHO, [ADDED_WHEN] = @ADDED_WHEN, [CHANGED_WHO] = @CHANGED_WHO"& _ + ", [CHANGED_WHEN] = @CHANGED_WHEN WHERE (([GUID] = @Original_GUID) AND ([HKPROFIL"& _ + "E_ID] = @Original_HKPROFILE_ID) AND ([USER_ID] = @Original_USER_ID) AND ([WD_SEA"& _ + "RCH] = @Original_WD_SEARCH) AND ([HOTKEY1] = @Original_HOTKEY1) AND ([HOTKEY2] ="& _ + " @Original_HOTKEY2) AND ([ADDED_WHO] = @Original_ADDED_WHO) AND ((@IsNull_ADDED_"& _ + "WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDED_WHEN] = @Original_ADDED_WHEN)) AND"& _ + " ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Origi"& _ + "nal_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR "& _ + "([CHANGED_WHEN] = @Original_CHANGED_WHEN)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, HKPROFILE_ID, USER_ID"& _ + ", WD_SEARCH, HOTKEY1, HOTKEY2, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN "& _ "FROM TBHOTKEY_USER_PROFILE WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", 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, 0, 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("@CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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, 0, 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("@Original_HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_USER_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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.Current, False, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", 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, 0, 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("@CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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, 0, 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("@Original_HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_USER_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_WD_SEARCH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WD_SEARCH", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HOTKEY2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HOTKEY2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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.Current, false, Nothing, "", "", "")) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString End Sub - - _ + + _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(2) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection - Me._commandCollection(0).CommandText = "SELECT GUID, HKPROFILE_ID, USER_ID, WD_SEARCH, HOTKEY1, HOTKEY2, ADDED_WHO" & _ - ", ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBHOTKEY_USER_PROFILE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & _ + Me._commandCollection(0).CommandText = "SELECT GUID, HKPROFILE_ID, USER_ID, WD_SEARCH, HOTKEY1, HOTKEY2, ADDED_WHO"& _ + ", ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBHOTKEY_USER_PROFILE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)& _ "WHERE (GUID = @TBHOTKEY_USER_PROFILE_GUID)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TBHOTKEY_USER_PROFILE_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TBHOTKEY_USER_PROFILE_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", 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 = "INSERT INTO TBHOTKEY_USER_PROFILE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (HKPROFILE_ID, USER_I" & _ - "D, WD_SEARCH, HOTKEY1, HOTKEY2, ADDED_WHO)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, @USER_ID AS Expr" & _ - "1, WD_SEARCH, HOTKEY1, HOTKEY2, 'INSERT_FRONTEND' AS Expr2" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBHO" & _ - "TKEY_PROFILE" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @PROFILE_ID)" + Me._commandCollection(1).CommandText = "INSERT INTO TBHOTKEY_USER_PROFILE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (HKPROFILE_ID, USER_I"& _ + "D, WD_SEARCH, HOTKEY1, HOTKEY2, ADDED_WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, @USER_ID AS Expr"& _ + "1, WD_SEARCH, HOTKEY1, HOTKEY2, 'INSERT_FRONTEND' AS Expr2"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBHO"& _ + "TKEY_PROFILE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @PROFILE_ID)" Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.VarChar, 1024, Global.System.Data.ParameterDirection.Input, 0, 0, "", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.VarChar, 1024, Global.System.Data.ParameterDirection.Input, 0, 0, "", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(2).Connection = Me.Connection - Me._commandCollection(2).CommandText = "SELECT ADDED_WHEN, ADDED_WHO, CHANGED_WHEN, CHANGED_WHO, GUID, HKPROFILE_ID, HOTK" & _ - "EY1, HOTKEY2, USER_ID, WD_SEARCH FROM TBHOTKEY_USER_PROFILE WHERE (USER_ID = @US" & _ + Me._commandCollection(2).CommandText = "SELECT ADDED_WHEN, ADDED_WHO, CHANGED_WHEN, CHANGED_WHO, GUID, HKPROFILE_ID, HOTK"& _ + "EY1, HOTKEY2, USER_ID, WD_SEARCH FROM TBHOTKEY_USER_PROFILE WHERE (USER_ID = @US"& _ "ER_ID)" Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USER_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "USER_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable, ByVal TBHOTKEY_USER_PROFILE_GUID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable, ByVal TBHOTKEY_USER_PROFILE_GUID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(TBHOTKEY_USER_PROFILE_GUID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(TBHOTKEY_USER_PROFILE_GUID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal TBHOTKEY_USER_PROFILE_GUID As Integer) As MyDataset.TBHOTKEY_USER_PROFILEDataTable + + _ + Public Overloads Overridable Function GetData(ByVal TBHOTKEY_USER_PROFILE_GUID As Integer) As MyDataset.TBHOTKEY_USER_PROFILEDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(TBHOTKEY_USER_PROFILE_GUID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(TBHOTKEY_USER_PROFILE_GUID,Integer) Dim dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable = New MyDataset.TBHOTKEY_USER_PROFILEDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function FillByUser(ByVal dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable, ByVal USER_ID As Integer) As Integer + + _ + Public Overloads Overridable Function FillByUser(ByVal dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable, ByVal USER_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(2) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetDataByUser(ByVal USER_ID As Integer) As MyDataset.TBHOTKEY_USER_PROFILEDataTable + + _ + Public Overloads Overridable Function GetDataByUser(ByVal USER_ID As Integer) As MyDataset.TBHOTKEY_USER_PROFILEDataTable Me.Adapter.SelectCommand = Me.CommandCollection(2) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USER_ID,Integer) Dim dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable = New MyDataset.TBHOTKEY_USER_PROFILEDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBHOTKEY_USER_PROFILE") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) + + _ + 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) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal HKPROFILE_ID As Integer, ByVal USER_ID As Integer, ByVal WD_SEARCH As String, ByVal HOTKEY1 As String, ByVal HOTKEY2 As String, ByVal ADDED_WHO As String, ByVal ADDED_WHEN As Global.System.Nullable(Of Date), ByVal CHANGED_WHO As String, ByVal CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer - Me.Adapter.InsertCommand.Parameters(0).Value = CType(HKPROFILE_ID, Integer) - Me.Adapter.InsertCommand.Parameters(1).Value = CType(USER_ID, Integer) + + _ + Public Overloads Overridable Function Insert(ByVal HKPROFILE_ID As Integer, ByVal USER_ID As Integer, ByVal WD_SEARCH As String, ByVal HOTKEY1 As String, ByVal HOTKEY2 As String, ByVal ADDED_WHO As String, ByVal ADDED_WHEN As Global.System.Nullable(Of Date), ByVal CHANGED_WHO As String, ByVal CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer + Me.Adapter.InsertCommand.Parameters(0).Value = CType(HKPROFILE_ID,Integer) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(USER_ID,Integer) If (WD_SEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("WD_SEARCH") Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(WD_SEARCH, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(WD_SEARCH,String) End If If (HOTKEY1 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY1") Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(HOTKEY1, String) + Me.Adapter.InsertCommand.Parameters(3).Value = CType(HOTKEY1,String) End If If (HOTKEY2 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY2") Else - Me.Adapter.InsertCommand.Parameters(4).Value = CType(HOTKEY2, String) + Me.Adapter.InsertCommand.Parameters(4).Value = CType(HOTKEY2,String) End If If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(5).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(5).Value = CType(ADDED_WHO,String) End If - If (ADDED_WHEN.HasValue = True) Then - Me.Adapter.InsertCommand.Parameters(6).Value = CType(ADDED_WHEN.Value, Date) + If (ADDED_WHEN.HasValue = true) Then + Me.Adapter.InsertCommand.Parameters(6).Value = CType(ADDED_WHEN.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (CHANGED_WHO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(7).Value = CType(CHANGED_WHO, String) + Me.Adapter.InsertCommand.Parameters(7).Value = CType(CHANGED_WHO,String) End If - If (CHANGED_WHEN.HasValue = True) Then - Me.Adapter.InsertCommand.Parameters(8).Value = CType(CHANGED_WHEN.Value, Date) + If (CHANGED_WHEN.HasValue = true) Then + Me.Adapter.InsertCommand.Parameters(8).Value = CType(CHANGED_WHEN.Value,Date) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value 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) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update( _ - ByVal HKPROFILE_ID As Integer, _ - ByVal USER_ID As Integer, _ - ByVal WD_SEARCH As String, _ - ByVal HOTKEY1 As String, _ - ByVal HOTKEY2 As String, _ - ByVal ADDED_WHO As String, _ - ByVal ADDED_WHEN As Global.System.Nullable(Of Date), _ - ByVal CHANGED_WHO As String, _ - ByVal CHANGED_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_GUID As Integer, _ - ByVal Original_HKPROFILE_ID As Integer, _ - ByVal Original_USER_ID As Integer, _ - ByVal Original_WD_SEARCH As String, _ - ByVal Original_HOTKEY1 As String, _ - ByVal Original_HOTKEY2 As String, _ - ByVal Original_ADDED_WHO As String, _ - ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_CHANGED_WHO As String, _ - ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date), _ + + _ + Public Overloads Overridable Function Update( _ + ByVal HKPROFILE_ID As Integer, _ + ByVal USER_ID As Integer, _ + ByVal WD_SEARCH As String, _ + ByVal HOTKEY1 As String, _ + ByVal HOTKEY2 As String, _ + ByVal ADDED_WHO As String, _ + ByVal ADDED_WHEN As Global.System.Nullable(Of Date), _ + ByVal CHANGED_WHO As String, _ + ByVal CHANGED_WHEN As Global.System.Nullable(Of Date), _ + ByVal Original_GUID As Integer, _ + ByVal Original_HKPROFILE_ID As Integer, _ + ByVal Original_USER_ID As Integer, _ + ByVal Original_WD_SEARCH As String, _ + ByVal Original_HOTKEY1 As String, _ + ByVal Original_HOTKEY2 As String, _ + ByVal Original_ADDED_WHO As String, _ + ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), _ + ByVal Original_CHANGED_WHO As String, _ + ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date), _ ByVal GUID As Integer) As Integer - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(HKPROFILE_ID, Integer) - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(USER_ID, Integer) + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(HKPROFILE_ID,Integer) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(USER_ID,Integer) If (WD_SEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("WD_SEARCH") Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(WD_SEARCH, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(WD_SEARCH,String) End If If (HOTKEY1 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY1") Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(HOTKEY1, String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(HOTKEY1,String) End If If (HOTKEY2 Is Nothing) Then Throw New Global.System.ArgumentNullException("HOTKEY2") Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(HOTKEY2, String) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(HOTKEY2,String) End If If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(ADDED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(ADDED_WHO,String) End If - If (ADDED_WHEN.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(ADDED_WHEN.Value, Date) + If (ADDED_WHEN.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(ADDED_WHEN.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If 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) + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(CHANGED_WHO,String) End If - If (CHANGED_WHEN.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(CHANGED_WHEN.Value, Date) + If (CHANGED_WHEN.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(8).Value = CType(CHANGED_WHEN.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If - Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_GUID, Integer) - Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_HKPROFILE_ID, Integer) - Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_USER_ID, Integer) + Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_HKPROFILE_ID,Integer) + Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_USER_ID,Integer) If (Original_WD_SEARCH Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_WD_SEARCH") Else - Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_WD_SEARCH, String) + Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_WD_SEARCH,String) End If If (Original_HOTKEY1 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_HOTKEY1") Else - Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_HOTKEY1, String) + Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_HOTKEY1,String) End If If (Original_HOTKEY2 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_HOTKEY2") Else - Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_HOTKEY2, String) + Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_HOTKEY2,String) End If If (Original_ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_ADDED_WHO") Else - Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_ADDED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_ADDED_WHO,String) End If - If (Original_ADDED_WHEN.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0, Object) - Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_ADDED_WHEN.Value, Date) + If (Original_ADDED_WHEN.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_ADDED_WHEN.Value,Date) Else - Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1, Object) + Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (Original_CHANGED_WHO Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1, Object) + Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0, Object) - Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_CHANGED_WHO,String) End If - If (Original_CHANGED_WHEN.HasValue = True) Then - Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0, Object) - Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_CHANGED_WHEN.Value, Date) + If (Original_CHANGED_WHEN.HasValue = true) Then + Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) + Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_CHANGED_WHEN.Value,Date) Else - Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1, Object) + Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value End If - Me.Adapter.UpdateCommand.Parameters(22).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(22).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update( _ - ByVal HKPROFILE_ID As Integer, _ - ByVal USER_ID As Integer, _ - ByVal WD_SEARCH As String, _ - ByVal HOTKEY1 As String, _ - ByVal HOTKEY2 As String, _ - ByVal ADDED_WHO As String, _ - ByVal ADDED_WHEN As Global.System.Nullable(Of Date), _ - ByVal CHANGED_WHO As String, _ - ByVal CHANGED_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_GUID As Integer, _ - ByVal Original_HKPROFILE_ID As Integer, _ - ByVal Original_USER_ID As Integer, _ - ByVal Original_WD_SEARCH As String, _ - ByVal Original_HOTKEY1 As String, _ - ByVal Original_HOTKEY2 As String, _ - ByVal Original_ADDED_WHO As String, _ - ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_CHANGED_WHO As String, _ + + _ + Public Overloads Overridable Function Update( _ + ByVal HKPROFILE_ID As Integer, _ + ByVal USER_ID As Integer, _ + ByVal WD_SEARCH As String, _ + ByVal HOTKEY1 As String, _ + ByVal HOTKEY2 As String, _ + ByVal ADDED_WHO As String, _ + ByVal ADDED_WHEN As Global.System.Nullable(Of Date), _ + ByVal CHANGED_WHO As String, _ + ByVal CHANGED_WHEN As Global.System.Nullable(Of Date), _ + ByVal Original_GUID As Integer, _ + ByVal Original_HKPROFILE_ID As Integer, _ + ByVal Original_USER_ID As Integer, _ + ByVal Original_WD_SEARCH As String, _ + ByVal Original_HOTKEY1 As String, _ + ByVal Original_HOTKEY2 As String, _ + ByVal Original_ADDED_WHO As String, _ + ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), _ + ByVal Original_CHANGED_WHO As String, _ ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer Return Me.Update(HKPROFILE_ID, USER_ID, WD_SEARCH, HOTKEY1, HOTKEY2, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, Original_GUID, Original_HKPROFILE_ID, Original_USER_ID, Original_WD_SEARCH, Original_HOTKEY1, Original_HOTKEY2, Original_ADDED_WHO, Original_ADDED_WHEN, Original_CHANGED_WHO, Original_CHANGED_WHEN, Original_GUID) End Function - - _ - Public Overridable Overloads Function cmdInsert(ByVal USER_ID As String, ByVal PROFILE_ID As Integer) As Integer + + _ + Public Overloads Overridable Function cmdInsert(ByVal USER_ID As String, ByVal PROFILE_ID As Integer) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1) If (USER_ID Is Nothing) Then Throw New Global.System.ArgumentNullException("USER_ID") Else - command.Parameters(0).Value = CType(USER_ID, String) + command.Parameters(0).Value = CType(USER_ID,String) End If - command.Parameters(1).Value = CType(PROFILE_ID, Integer) + command.Parameters(1).Value = CType(PROFILE_ID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State - If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - command.Connection.Open() + command.Connection.Open End If Dim returnValue As Integer - Try + Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - command.Connection.Close() + 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 TBHOTKEY_PATTERNS_REWORKTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -26148,65 +26251,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -26227,388 +26330,388 @@ Namespace MyDatasetTableAdapters 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 [TBHOTKEY_PATTERNS_REWORK] WHERE (([GUID] = @Original_GUID) AND ([HKP" & _ - "ATTERN_ID] = @Original_HKPATTERN_ID) AND ([TYPE] = @Original_TYPE) AND ((@IsNull" & _ - "_FUNCTION1 = 1 AND [FUNCTION1] IS NULL) OR ([FUNCTION1] = @Original_FUNCTION1)) " & _ - "AND ((@IsNull_FUNCTION2 = 1 AND [FUNCTION2] IS NULL) OR ([FUNCTION2] = @Original" & _ - "_FUNCTION2)) AND ((@IsNull_TEXT1 = 1 AND [TEXT1] IS NULL) OR ([TEXT1] = @Origina" & _ - "l_TEXT1)) AND ((@IsNull_TEXT2 = 1 AND [TEXT2] IS NULL) OR ([TEXT2] = @Original_T" & _ - "EXT2)) AND ([SEQUENCE] = @Original_SEQUENCE) AND ([ADDED_WHO] = @Original_ADDED_" & _ - "WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDED_WHEN] = @" & _ - "Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) O" & _ - "R ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [C" & _ + Me._adapter.DeleteCommand.CommandText = "DELETE FROM [TBHOTKEY_PATTERNS_REWORK] WHERE (([GUID] = @Original_GUID) AND ([HKP"& _ + "ATTERN_ID] = @Original_HKPATTERN_ID) AND ([TYPE] = @Original_TYPE) AND ((@IsNull"& _ + "_FUNCTION1 = 1 AND [FUNCTION1] IS NULL) OR ([FUNCTION1] = @Original_FUNCTION1)) "& _ + "AND ((@IsNull_FUNCTION2 = 1 AND [FUNCTION2] IS NULL) OR ([FUNCTION2] = @Original"& _ + "_FUNCTION2)) AND ((@IsNull_TEXT1 = 1 AND [TEXT1] IS NULL) OR ([TEXT1] = @Origina"& _ + "l_TEXT1)) AND ((@IsNull_TEXT2 = 1 AND [TEXT2] IS NULL) OR ([TEXT2] = @Original_T"& _ + "EXT2)) AND ([SEQUENCE] = @Original_SEQUENCE) AND ([ADDED_WHO] = @Original_ADDED_"& _ + "WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDED_WHEN] = @"& _ + "Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) O"& _ + "R ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [C"& _ "HANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHANGED_WHEN)))" 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, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HKPATTERN_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPATTERN_ID", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_TYPE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_FUNCTION1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_FUNCTION1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_FUNCTION2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_FUNCTION2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_TEXT1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_TEXT1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_TEXT2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_TEXT2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_SEQUENCE", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, True, Nothing, "", "", "")) - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HKPATTERN_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPATTERN_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_TYPE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_FUNCTION1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_FUNCTION1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_FUNCTION2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_FUNCTION2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_TEXT1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_TEXT1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_TEXT2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_TEXT2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_SEQUENCE", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ADDED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", 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 TBHOTKEY_PATTERNS_REWORK" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (HKPATTERN_ID, TYP" & _ - "E, FUNCTION1, FUNCTION2, TEXT1, TEXT2, SEQUENCE, ADDED_WHO)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES (@HKP" & _ - "ATTERN_ID,@TYPE,@FUNCTION1,@FUNCTION2,@TEXT1,@TEXT2,@SEQUENCE,@ADDED_WHO); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SEL" & _ - "ECT GUID, HKPATTERN_ID, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, SEQUENCE, ADDE" & _ - "D_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBHOTKEY_PATTERNS_REWORK WHERE" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBHOTKEY_PATTERNS_REWORK"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (HKPATTERN_ID, TYP"& _ + "E, FUNCTION1, FUNCTION2, TEXT1, TEXT2, SEQUENCE, ADDED_WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@HKP"& _ + "ATTERN_ID,@TYPE,@FUNCTION1,@FUNCTION2,@TEXT1,@TEXT2,@SEQUENCE,@ADDED_WHO); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SEL"& _ + "ECT GUID, HKPATTERN_ID, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, SEQUENCE, ADDE"& _ + "D_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBHOTKEY_PATTERNS_REWORK WHERE"& _ " (GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPATTERN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPATTERN_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYPE", Global.System.Data.SqlDbType.VarChar, 30, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION1", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION2", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT1", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT2", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", 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("@HKPATTERN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPATTERN_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYPE", Global.System.Data.SqlDbType.VarChar, 30, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION1", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION2", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT1", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT2", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", 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.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection - Me._adapter.UpdateCommand.CommandText = "UPDATE TBHOTKEY_PATTERNS_REWORK" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET HKPATTERN_ID = @HKPATTE" & _ - "RN_ID, TYPE = @TYPE, FUNCTION1 = @FUNCTION1, FUNCTION2 = @FUNCTION2, TEXT1 = @TE" & _ - "XT1, TEXT2 = @TEXT2, SEQUENCE = @SEQUENCE, " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " CHANGED_WH" & _ - "O = @CHANGED_WHO" & 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, HKPATTERN" & _ - "_ID, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, SEQUENCE, ADDED_WHO, ADDED_WHEN, " & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE TBHOTKEY_PATTERNS_REWORK"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET HKPATTERN_ID = @HKPATTE"& _ + "RN_ID, TYPE = @TYPE, FUNCTION1 = @FUNCTION1, FUNCTION2 = @FUNCTION2, TEXT1 = @TE"& _ + "XT1, TEXT2 = @TEXT2, SEQUENCE = @SEQUENCE, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CHANGED_WH"& _ + "O = @CHANGED_WHO"&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, HKPATTERN"& _ + "_ID, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, SEQUENCE, ADDED_WHO, ADDED_WHEN, "& _ "CHANGED_WHO, CHANGED_WHEN FROM TBHOTKEY_PATTERNS_REWORK WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPATTERN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPATTERN_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYPE", Global.System.Data.SqlDbType.VarChar, 30, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION1", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION2", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT1", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT2", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", 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("@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, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPATTERN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPATTERN_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYPE", Global.System.Data.SqlDbType.VarChar, 30, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION1", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FUNCTION2", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "FUNCTION2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT1", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TEXT2", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "TEXT2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE", 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("@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.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, HKPATTERN_ID, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, SEQUE" & _ - "NCE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBHOTKEY_" & _ - "PATTERNS_REWORK" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (HKPATTERN_ID = @HKPATTERN_ID)" + Me._commandCollection(0).CommandText = "SELECT GUID, HKPATTERN_ID, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, SEQUE"& _ + "NCE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBHOTKEY_"& _ + "PATTERNS_REWORK"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (HKPATTERN_ID = @HKPATTERN_ID)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPATTERN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPATTERN_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPATTERN_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPATTERN_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable, ByVal HKPATTERN_ID As Integer) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable, ByVal HKPATTERN_ID As Integer) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(HKPATTERN_ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + Me.Adapter.SelectCommand.Parameters(0).Value = CType(HKPATTERN_ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal HKPATTERN_ID As Integer) As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable + + _ + Public Overloads Overridable Function GetData(ByVal HKPATTERN_ID As Integer) As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(HKPATTERN_ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(HKPATTERN_ID,Integer) Dim dataTable As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable = New MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBHOTKEY_PATTERNS_REWORK") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Integer, ByVal Original_HKPATTERN_ID As Integer, ByVal Original_TYPE As String, ByVal Original_FUNCTION1 As String, ByVal Original_FUNCTION2 As String, ByVal Original_TEXT1 As String, ByVal Original_TEXT2 As String, ByVal Original_SEQUENCE As Integer, ByVal Original_ADDED_WHO As String, ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), ByVal Original_CHANGED_WHO As String, ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) - Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_HKPATTERN_ID, Integer) + + _ + Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer, ByVal Original_HKPATTERN_ID As Integer, ByVal Original_TYPE As String, ByVal Original_FUNCTION1 As String, ByVal Original_FUNCTION2 As String, ByVal Original_TEXT1 As String, ByVal Original_TEXT2 As String, ByVal Original_SEQUENCE As Integer, ByVal Original_ADDED_WHO As String, ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), ByVal Original_CHANGED_WHO As String, ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer + Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) + Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_HKPATTERN_ID,Integer) If (Original_TYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_TYPE") Else - Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_TYPE, String) + Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_TYPE,String) End If If (Original_FUNCTION1 Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_FUNCTION1, String) + Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_FUNCTION1,String) End If If (Original_FUNCTION2 Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else - Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_FUNCTION2, String) + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_FUNCTION2,String) End If If (Original_TEXT1 Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else - Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_TEXT1, String) + Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_TEXT1,String) End If If (Original_TEXT2 Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else - Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_TEXT2, String) + Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_TEXT2,String) End If - Me.Adapter.DeleteCommand.Parameters(11).Value = CType(Original_SEQUENCE, Integer) + Me.Adapter.DeleteCommand.Parameters(11).Value = CType(Original_SEQUENCE,Integer) If (Original_ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_ADDED_WHO") Else - Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_ADDED_WHO, String) + Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_ADDED_WHO,String) End If - If (Original_ADDED_WHEN.HasValue = True) Then - Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_ADDED_WHEN.Value, Date) + If (Original_ADDED_WHEN.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_ADDED_WHEN.Value,Date) Else - Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_CHANGED_WHO Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value Else - Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_CHANGED_WHO, String) + Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_CHANGED_WHO,String) End If - If (Original_CHANGED_WHEN.HasValue = True) Then - Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0, Object) - Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_CHANGED_WHEN.Value, Date) + If (Original_CHANGED_WHEN.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_CHANGED_WHEN.Value,Date) Else - Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State - If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal HKPATTERN_ID As Integer, ByVal TYPE As String, ByVal FUNCTION1 As String, ByVal FUNCTION2 As String, ByVal TEXT1 As String, ByVal TEXT2 As String, ByVal SEQUENCE As Integer, ByVal ADDED_WHO As String) As Integer - Me.Adapter.InsertCommand.Parameters(0).Value = CType(HKPATTERN_ID, Integer) + + _ + Public Overloads Overridable Function Insert(ByVal HKPATTERN_ID As Integer, ByVal TYPE As String, ByVal FUNCTION1 As String, ByVal FUNCTION2 As String, ByVal TEXT1 As String, ByVal TEXT2 As String, ByVal SEQUENCE As Integer, ByVal ADDED_WHO As String) As Integer + Me.Adapter.InsertCommand.Parameters(0).Value = CType(HKPATTERN_ID,Integer) If (TYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("TYPE") Else - Me.Adapter.InsertCommand.Parameters(1).Value = CType(TYPE, String) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(TYPE,String) End If If (FUNCTION1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(FUNCTION1, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(FUNCTION1,String) End If If (FUNCTION2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(FUNCTION2, String) + Me.Adapter.InsertCommand.Parameters(3).Value = CType(FUNCTION2,String) End If If (TEXT1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(4).Value = CType(TEXT1, String) + Me.Adapter.InsertCommand.Parameters(4).Value = CType(TEXT1,String) End If If (TEXT2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(5).Value = CType(TEXT2, String) + Me.Adapter.InsertCommand.Parameters(5).Value = CType(TEXT2,String) End If - Me.Adapter.InsertCommand.Parameters(6).Value = CType(SEQUENCE, Integer) + Me.Adapter.InsertCommand.Parameters(6).Value = CType(SEQUENCE,Integer) If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(7).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(7).Value = CType(ADDED_WHO,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) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update(ByVal HKPATTERN_ID As Integer, ByVal TYPE As String, ByVal FUNCTION1 As String, ByVal FUNCTION2 As String, ByVal TEXT1 As String, ByVal TEXT2 As String, ByVal SEQUENCE As Integer, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(HKPATTERN_ID, Integer) + + _ + Public Overloads Overridable Function Update(ByVal HKPATTERN_ID As Integer, ByVal TYPE As String, ByVal FUNCTION1 As String, ByVal FUNCTION2 As String, ByVal TEXT1 As String, ByVal TEXT2 As String, ByVal SEQUENCE As Integer, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(HKPATTERN_ID,Integer) If (TYPE Is Nothing) Then Throw New Global.System.ArgumentNullException("TYPE") Else - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(TYPE, String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(TYPE,String) End If If (FUNCTION1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(FUNCTION1, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(FUNCTION1,String) End If If (FUNCTION2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(FUNCTION2, String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(FUNCTION2,String) End If If (TEXT1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(TEXT1, String) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(TEXT1,String) End If If (TEXT2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(TEXT2, String) + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(TEXT2,String) End If - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(SEQUENCE, Integer) + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(SEQUENCE,Integer) 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) + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(CHANGED_WHO,String) End If - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_GUID, Integer) - Me.Adapter.UpdateCommand.Parameters(9).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(9).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + 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 TBHOTKEY_WINDOW_HOOKTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -26622,65 +26725,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -26697,249 +26800,249 @@ Namespace MyDatasetTableAdapters 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 TBHOTKEY_WINDOW_HOOK" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (GUID = @Original_GUID)" + Me._adapter.DeleteCommand.CommandText = "DELETE FROM TBHOTKEY_WINDOW_HOOK"&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.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 TBHOTKEY_WINDOW_HOOK" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " (HKPROFILE_ID, SEQUENC" & _ - "E_NUMBER, CONTROL_VALUE, ADDED_WHO)" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "VALUES (@HKPROFILE_ID,@SEQUENCE_NUMB" & _ - "ER,@CONTROL_VALUE,@ADDED_WHO); " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SELECT GUID, HKPROFILE_ID, SEQUENCE_NUMBER, CON" & _ - "TROL_VALUE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBHOTKEY_WINDO" & _ + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBHOTKEY_WINDOW_HOOK"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (HKPROFILE_ID, SEQUENC"& _ + "E_NUMBER, CONTROL_VALUE, ADDED_WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@HKPROFILE_ID,@SEQUENCE_NUMB"& _ + "ER,@CONTROL_VALUE,@ADDED_WHO); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, HKPROFILE_ID, SEQUENCE_NUMBER, CON"& _ + "TROL_VALUE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBHOTKEY_WINDO"& _ "W_HOOK WHERE (GUID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE_NUMBER", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE_NUMBER", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CONTROL_VALUE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "CONTROL_VALUE", 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("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE_NUMBER", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE_NUMBER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CONTROL_VALUE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "CONTROL_VALUE", 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.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection - Me._adapter.UpdateCommand.CommandText = "UPDATE TBHOTKEY_WINDOW_HOOK" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "SET HKPROFILE_ID = @HKPROFILE_I" & _ - "D, SEQUENCE_NUMBER = @SEQUENCE_NUMBER, CONTROL_VALUE = @CONTROL_VALUE, CHANGED_W" & _ - "HO = @CHANGED_WHO" & 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, HKPROFIL" & _ - "E_ID, SEQUENCE_NUMBER, CONTROL_VALUE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGE" & _ + Me._adapter.UpdateCommand.CommandText = "UPDATE TBHOTKEY_WINDOW_HOOK"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET HKPROFILE_ID = @HKPROFILE_I"& _ + "D, SEQUENCE_NUMBER = @SEQUENCE_NUMBER, CONTROL_VALUE = @CONTROL_VALUE, CHANGED_W"& _ + "HO = @CHANGED_WHO"&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, HKPROFIL"& _ + "E_ID, SEQUENCE_NUMBER, CONTROL_VALUE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGE"& _ "D_WHEN FROM TBHOTKEY_WINDOW_HOOK WHERE (GUID = @GUID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE_NUMBER", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE_NUMBER", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) - Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CONTROL_VALUE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "CONTROL_VALUE", 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("@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, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HKPROFILE_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SEQUENCE_NUMBER", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "SEQUENCE_NUMBER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CONTROL_VALUE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "CONTROL_VALUE", 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("@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.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, HKPROFILE_ID, SEQUENCE_NUMBER, CONTROL_VALUE, ADDED_WHO, ADDE" & _ - "D_WHEN, CHANGED_WHO, CHANGED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBHOTKEY_WINDOW_HOOK" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE " & _ + Me._commandCollection(0).CommandText = "SELECT GUID, HKPROFILE_ID, SEQUENCE_NUMBER, CONTROL_VALUE, ADDED_WHO, ADDE"& _ + "D_WHEN, CHANGED_WHO, CHANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBHOTKEY_WINDOW_HOOK"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _ " (HKPROFILE_ID = @ID)" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "HKPROFILE_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable, ByVal ID As Integer) As Integer - Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID, Integer) - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() - End If - Dim returnValue As Integer = Me.Adapter.Fill(dataTable) - Return returnValue + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable, ByVal ID As Integer) As Integer + Me.Adapter.SelectCommand = Me.CommandCollection(0) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear + End If + Dim returnValue As Integer = Me.Adapter.Fill(dataTable) + Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal ID As Integer) As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable + + _ + Public Overloads Overridable Function GetData(ByVal ID As Integer) As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID, Integer) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID,Integer) Dim dataTable As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable = New MyDataset.TBHOTKEY_WINDOW_HOOKDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function - - _ - Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBHOTKEY_WINDOW_HOOK") End Function - - _ - Public Overridable Overloads Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overridable Overloads Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID, Integer) + + _ + 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) _ + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open() + Me.Adapter.DeleteCommand.Connection.Open End If - Try + 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() + Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Insert(ByVal HKPROFILE_ID As Integer, ByVal SEQUENCE_NUMBER As Integer, ByVal CONTROL_VALUE As String, ByVal ADDED_WHO As String) As Integer - Me.Adapter.InsertCommand.Parameters(0).Value = CType(HKPROFILE_ID, Integer) - Me.Adapter.InsertCommand.Parameters(1).Value = CType(SEQUENCE_NUMBER, Integer) + + _ + Public Overloads Overridable Function Insert(ByVal HKPROFILE_ID As Integer, ByVal SEQUENCE_NUMBER As Integer, ByVal CONTROL_VALUE As String, ByVal ADDED_WHO As String) As Integer + Me.Adapter.InsertCommand.Parameters(0).Value = CType(HKPROFILE_ID,Integer) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(SEQUENCE_NUMBER,Integer) If (CONTROL_VALUE Is Nothing) Then Throw New Global.System.ArgumentNullException("CONTROL_VALUE") Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(CONTROL_VALUE, String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(CONTROL_VALUE,String) End If If (ADDED_WHO Is Nothing) Then Throw New Global.System.ArgumentNullException("ADDED_WHO") Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(ADDED_WHO, String) + Me.Adapter.InsertCommand.Parameters(3).Value = CType(ADDED_WHO,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) _ + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open() + Me.Adapter.InsertCommand.Connection.Open End If - Try + 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() + Me.Adapter.InsertCommand.Connection.Close End If End Try End Function - - _ - Public Overridable Overloads Function Update(ByVal HKPROFILE_ID As Integer, ByVal SEQUENCE_NUMBER As Integer, ByVal CONTROL_VALUE As String, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer - Me.Adapter.UpdateCommand.Parameters(0).Value = CType(HKPROFILE_ID, Integer) - Me.Adapter.UpdateCommand.Parameters(1).Value = CType(SEQUENCE_NUMBER, Integer) + + _ + Public Overloads Overridable Function Update(ByVal HKPROFILE_ID As Integer, ByVal SEQUENCE_NUMBER As Integer, ByVal CONTROL_VALUE As String, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(HKPROFILE_ID,Integer) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(SEQUENCE_NUMBER,Integer) If (CONTROL_VALUE Is Nothing) Then Throw New Global.System.ArgumentNullException("CONTROL_VALUE") Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(CONTROL_VALUE, String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(CONTROL_VALUE,String) End If If (CHANGED_WHO Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(CHANGED_WHO, String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(CHANGED_WHO,String) End If - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_GUID, Integer) - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(GUID, Integer) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(5).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) _ + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open() + Me.Adapter.UpdateCommand.Connection.Open End If - Try + 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() + 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 TBGI_FILES_USERTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -26953,65 +27056,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -27026,112 +27129,112 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("FILENAME_ONLY", "FILENAME_ONLY") Me._adapter.TableMappings.Add(tableMapping) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString 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, FILENAME2WORK, USER@WORK, WORKED, ADDED_WHEN, HANDLE_TYPE, FI" & _ - "LENAME_ONLY" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM TBGI_FILES_USER" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (WORKED = 0) AND (UPP" & _ + Me._commandCollection(0).CommandText = "SELECT GUID, FILENAME2WORK, USER@WORK, WORKED, ADDED_WHEN, HANDLE_TYPE, FI"& _ + "LENAME_ONLY"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBGI_FILES_USER"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (WORKED = 0) AND (UPP"& _ "ER(USER@WORK) = UPPER(@USERNAME))" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USERNAME", Global.System.Data.SqlDbType.VarChar, 1024, Global.System.Data.ParameterDirection.Input, 0, 0, "", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USERNAME", Global.System.Data.SqlDbType.VarChar, 1024, Global.System.Data.ParameterDirection.Input, 0, 0, "", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBGI_FILES_USERDataTable, ByVal USERNAME As String) As Integer + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBGI_FILES_USERDataTable, ByVal USERNAME As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (USERNAME Is Nothing) Then Throw New Global.System.ArgumentNullException("USERNAME") Else - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USERNAME, String) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USERNAME,String) End If - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal USERNAME As String) As MyDataset.TBGI_FILES_USERDataTable + + _ + Public Overloads Overridable Function GetData(ByVal USERNAME As String) As MyDataset.TBGI_FILES_USERDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (USERNAME Is Nothing) Then Throw New Global.System.ArgumentNullException("USERNAME") Else - Me.Adapter.SelectCommand.Parameters(0).Value = CType(USERNAME, String) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(USERNAME,String) End If Dim dataTable As MyDataset.TBGI_FILES_USERDataTable = New MyDataset.TBGI_FILES_USERDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class - + ''' '''Represents the connection and commands used to retrieve and save data. ''' - _ + _ Partial Public Class TBGI_HISTORYTableAdapter 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 + 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() + 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() + Me.InitConnection End If Return Me._connection End Get - Set(value As Global.System.Data.SqlClient.SqlConnection) + Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -27145,65 +27248,65 @@ Namespace MyDatasetTableAdapters 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 + 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(value As Global.System.Data.SqlClient.SqlTransaction) + 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) _ + 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) _ + 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) _ + 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() + Me.InitCommandCollection End If Return Me._commandCollection End Get End Property - - _ + + _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get - Set(value As Boolean) + 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() @@ -27215,55 +27318,95 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("ADDED_WHEN", "ADDED_WHEN") Me._adapter.TableMappings.Add(tableMapping) End Sub - - _ + + _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Global_Indexer.My.MySettings.Default.DD_ECMConnectionString End Sub - - _ + + _ Private Sub InitCommandCollection() - Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} + 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, FILENAME_ORIGINAL, FILENAME_NEW, ADDED_WHEN" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FROM " & _ - "TBGI_HISTORY" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (ADDED_WHO = @User) AND (CONVERT(DATE, ADDED_WHEN) = " & _ - "CONVERT(DATE, GETDATE()))" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ORDER BY GUID DESC" + Me._commandCollection(0).CommandText = "SELECT GUID, FILENAME_ORIGINAL, FILENAME_NEW, ADDED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM "& _ + "TBGI_HISTORY"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (ADDED_WHO = @User) AND (CONVERT(DATE, ADDED_WHEN) = "& _ + "CONVERT(DATE, GETDATE()))"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"ORDER BY GUID DESC" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text - Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@User", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@User", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", 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 = "SELECT GUID, FILENAME_ORIGINAL, FILENAME_NEW, ADDED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM "& _ + "TBGI_HISTORY"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (ADDED_WHO = @User) "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"ORDER BY GUID DESC" + Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text + Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@User", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub - - _ - Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBGI_HISTORYDataTable, ByVal User As String) As Integer + + _ + Public Overloads Overridable Function FillToday(ByVal dataTable As MyDataset.TBGI_HISTORYDataTable, ByVal User As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (User Is Nothing) Then Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value Else - Me.Adapter.SelectCommand.Parameters(0).Value = CType(User, String) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(User,String) End If - If (Me.ClearBeforeFill = True) Then - dataTable.Clear() + If (Me.ClearBeforeFill = true) Then + dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function - - _ - Public Overridable Overloads Function GetData(ByVal User As String) As MyDataset.TBGI_HISTORYDataTable + + _ + Public Overloads Overridable Function GetData(ByVal User As String) As MyDataset.TBGI_HISTORYDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (User Is Nothing) Then Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value Else - Me.Adapter.SelectCommand.Parameters(0).Value = CType(User, String) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(User,String) + End If + Dim dataTable As MyDataset.TBGI_HISTORYDataTable = New MyDataset.TBGI_HISTORYDataTable() + Me.Adapter.Fill(dataTable) + Return dataTable + End Function + + _ + Public Overloads Overridable Function FillByAll(ByVal dataTable As MyDataset.TBGI_HISTORYDataTable, ByVal User As String) As Integer + Me.Adapter.SelectCommand = Me.CommandCollection(1) + If (User Is Nothing) Then + Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value + Else + Me.Adapter.SelectCommand.Parameters(0).Value = CType(User,String) + 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 GetDataByAll(ByVal User As String) As MyDataset.TBGI_HISTORYDataTable + Me.Adapter.SelectCommand = Me.CommandCollection(1) + If (User Is Nothing) Then + Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value + Else + Me.Adapter.SelectCommand.Parameters(0).Value = CType(User,String) End If Dim dataTable As MyDataset.TBGI_HISTORYDataTable = New MyDataset.TBGI_HISTORYDataTable() Me.Adapter.Fill(dataTable) diff --git a/Global_Indexer/MyDataset.xsc b/Global_Indexer/MyDataset.xsc index 137b380..12593e4 100644 --- a/Global_Indexer/MyDataset.xsc +++ b/Global_Indexer/MyDataset.xsc @@ -212,24 +212,39 @@ - + + - + + - + + - + + - + + - + + - + + - + + + + + + + + + diff --git a/Global_Indexer/MyDataset.xsd b/Global_Indexer/MyDataset.xsd index e7909b7..2e8d860 100644 --- a/Global_Indexer/MyDataset.xsd +++ b/Global_Indexer/MyDataset.xsd @@ -548,8 +548,9 @@ WHERE (DOK_ID = @DokID) - - SELECT GUID, INDEXNAME, COMMENT, DOCTYPE_ID, DOKUMENTART, KURZNAME, CONNECTION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASSWORD, SQL_RESULT,VALUE + + SELECT GUID, INDEXNAME, COMMENT, DOCTYPE_ID, DOKUMENTART, KURZNAME, CONNECTION_ID, CONNECTION, SQL_PROVIDER, SERVER, DATENBANK, USERNAME, PASSWORD, SQL_RESULT, VALUE, + SQL_ACTIVE FROM VWDDINDEX_AUTOM WHERE (DOCTYPE_ID = @DOCTYPE) @@ -575,6 +576,7 @@ WHERE (DOCTYPE_ID = @DOCTYPE) + @@ -788,19 +790,19 @@ SELECT GUID, OBJECTTYPE, IDX_EMAIL_ID, IDX_EMAIL_FROM, IDX_EMAIL_TO, IDX_EMAIL_S - + DELETE FROM TBDD_INDEX_MAN_POSTPROCESSING WHERE (GUID = @GUID) - + INSERT INTO TBDD_INDEX_MAN_POSTPROCESSING - (IDXMAN_ID, COMMENT, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, TEXT3, SEQUENCE, ADDED_WHO) -VALUES (@IDXMAN_ID,@COMMENT,@TYPE,@FUNCTION1,@FUNCTION2,@TEXT1,@TEXT2,@TEXT3,@SEQUENCE,@ADDED_WHO) + (IDXMAN_ID, COMMENT, TYPE, FUNCTION1, FUNCTION2, TEXT1, TEXT2, TEXT3, SEQUENCE, ADDED_WHO, VARIANT) +VALUES (@IDXMAN_ID,@COMMENT,@TYPE,@FUNCTION1,@FUNCTION2,@TEXT1,@TEXT2,@TEXT3,@SEQUENCE,@ADDED_WHO,@VARIANT) @@ -812,15 +814,17 @@ VALUES (@IDXMAN_ID,@COMMENT,@TYPE,@FUNCTION1,@FUNCTION2,@TEXT1,@TEXT2,@TE + - + SELECT TBDD_INDEX_MAN_POSTPROCESSING.GUID, TBDD_INDEX_MAN_POSTPROCESSING.IDXMAN_ID, TBDD_INDEX_MAN_POSTPROCESSING.COMMENT, TBDD_INDEX_MAN_POSTPROCESSING.TYPE, TBDD_INDEX_MAN_POSTPROCESSING.FUNCTION1, TBDD_INDEX_MAN_POSTPROCESSING.FUNCTION2, TBDD_INDEX_MAN_POSTPROCESSING.TEXT1, TBDD_INDEX_MAN_POSTPROCESSING.TEXT2, TBDD_INDEX_MAN_POSTPROCESSING.TEXT3, TBDD_INDEX_MAN_POSTPROCESSING.SEQUENCE, TBDD_INDEX_MAN_POSTPROCESSING.ADDED_WHO, - TBDD_INDEX_MAN_POSTPROCESSING.ADDED_WHEN, TBDD_INDEX_MAN_POSTPROCESSING.CHANGED_WHO, TBDD_INDEX_MAN_POSTPROCESSING.CHANGED_WHEN + TBDD_INDEX_MAN_POSTPROCESSING.ADDED_WHEN, TBDD_INDEX_MAN_POSTPROCESSING.CHANGED_WHO, TBDD_INDEX_MAN_POSTPROCESSING.CHANGED_WHEN, + TBDD_INDEX_MAN_POSTPROCESSING.VARIANT FROM TBDD_INDEX_MAN_POSTPROCESSING INNER JOIN TBDD_INDEX_MAN ON TBDD_INDEX_MAN_POSTPROCESSING.IDXMAN_ID = TBDD_INDEX_MAN.GUID WHERE (TBDD_INDEX_MAN.DOK_ID = @DOK_ID) @@ -833,7 +837,7 @@ WHERE (TBDD_INDEX_MAN.DOK_ID = @DOK_ID) UPDATE TBDD_INDEX_MAN_POSTPROCESSING SET IDXMAN_ID = @IDXMAN_ID, COMMENT = @COMMENT, TYPE = @TYPE, FUNCTION1 = @FUNCTION1, FUNCTION2 = @FUNCTION2, TEXT1 = @TEXT1, TEXT2 = @TEXT2, TEXT3 = @TEXT3, - SEQUENCE = @SEQUENCE, CHANGED_WHO = @CHANGED_WHO + SEQUENCE = @SEQUENCE, CHANGED_WHO = @CHANGED_WHO, VARIANT = @VARIANT WHERE (GUID = @GUID) @@ -846,6 +850,7 @@ WHERE (GUID = @GUID) + @@ -867,6 +872,7 @@ WHERE (GUID = @GUID) + @@ -1649,7 +1655,7 @@ WHERE (WORKED = 0) AND (UPPER(USER@WORK) = UPPER(@USERNAME)) - + SELECT GUID, FILENAME_ORIGINAL, FILENAME_NEW, ADDED_WHEN @@ -1669,7 +1675,21 @@ ORDER BY GUID DESC - + + + + + SELECT GUID, FILENAME_ORIGINAL, FILENAME_NEW, ADDED_WHEN +FROM TBGI_HISTORY +WHERE (ADDED_WHO = @User) +ORDER BY GUID DESC + + + + + + + @@ -2141,6 +2161,7 @@ ORDER BY GUID DESC + @@ -2236,6 +2257,7 @@ ORDER BY GUID DESC + @@ -2495,6 +2517,13 @@ ORDER BY GUID DESC + + + + + + + diff --git a/Global_Indexer/MyDataset.xss b/Global_Indexer/MyDataset.xss index a48da6d..3503d4b 100644 --- a/Global_Indexer/MyDataset.xss +++ b/Global_Indexer/MyDataset.xss @@ -6,36 +6,37 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 431 @@ -47,7 +48,7 @@ - + 543 @@ -59,7 +60,7 @@ - + 397 @@ -71,7 +72,7 @@ - + 605 @@ -87,7 +88,7 @@ - + 959 @@ -99,7 +100,7 @@ - + 1193 @@ -115,7 +116,7 @@ - + 871 @@ -127,7 +128,7 @@ - + 94 @@ -147,7 +148,7 @@ - + 129 @@ -163,7 +164,7 @@ - + 183 @@ -175,7 +176,7 @@ - + 88 @@ -195,7 +196,7 @@ - + 117 @@ -215,7 +216,7 @@ - + 765 @@ -231,7 +232,7 @@ - + 409 @@ -251,7 +252,7 @@ - + 38 diff --git a/Global_Indexer/frmAdministration.Designer.vb b/Global_Indexer/frmAdministration.Designer.vb index 9dacb0e..71383d3 100644 --- a/Global_Indexer/frmAdministration.Designer.vb +++ b/Global_Indexer/frmAdministration.Designer.vb @@ -92,6 +92,7 @@ Partial Class frmAdministration Dim CHANGED_WHOLabel5 As System.Windows.Forms.Label Dim CHANGED_WHENLabel5 As System.Windows.Forms.Label Dim SEQUENCELabel3 As System.Windows.Forms.Label + Dim VARIANTLabel As System.Windows.Forms.Label Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAdministration)) Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl() @@ -136,9 +137,10 @@ Partial Class frmAdministration Me.ToolStripButton7 = New System.Windows.Forms.ToolStripButton() Me.GUIDTextBox1 = New System.Windows.Forms.TextBox() Me.XtraTabPage6 = New DevExpress.XtraTab.XtraTabPage() + Me.VARIANTComboBox = New System.Windows.Forms.ComboBox() + Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.lblsavePostProcess = New System.Windows.Forms.Label() Me.ComboBox2 = New System.Windows.Forms.ComboBox() - Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.TBWHDD_INDEX_MANBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.Function2Label = New System.Windows.Forms.Label() Me.Function1Label = New System.Windows.Forms.Label() @@ -173,6 +175,8 @@ Partial Class frmAdministration Me.ToolStripButton30 = New System.Windows.Forms.ToolStripButton() Me.ToolStripButton31 = New System.Windows.Forms.ToolStripButton() Me.XtraTabPage4 = New DevExpress.XtraTab.XtraTabPage() + Me.lblWindowParameter = New System.Windows.Forms.Label() + Me.lbFileparameter = New System.Windows.Forms.ListBox() Me.ListBox6 = New System.Windows.Forms.ListBox() Me.TBDD_INDEX_AUTOMBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.lblValue = New System.Windows.Forms.Label() @@ -447,6 +451,7 @@ Partial Class frmAdministration CHANGED_WHOLabel5 = New System.Windows.Forms.Label() CHANGED_WHENLabel5 = New System.Windows.Forms.Label() SEQUENCELabel3 = New System.Windows.Forms.Label() + VARIANTLabel = New System.Windows.Forms.Label() CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.XtraTabControl1.SuspendLayout() Me.XtraTabPage1.SuspendLayout() @@ -625,7 +630,7 @@ Partial Class frmAdministration 'WD_INDEXLabel ' WD_INDEXLabel.AutoSize = True - WD_INDEXLabel.Location = New System.Drawing.Point(395, 30) + WD_INDEXLabel.Location = New System.Drawing.Point(439, 30) WD_INDEXLabel.Name = "WD_INDEXLabel" WD_INDEXLabel.Size = New System.Drawing.Size(62, 15) WD_INDEXLabel.TabIndex = 5 @@ -661,7 +666,7 @@ Partial Class frmAdministration 'SEQUENCELabel ' SEQUENCELabel.AutoSize = True - SEQUENCELabel.Location = New System.Drawing.Point(635, 30) + SEQUENCELabel.Location = New System.Drawing.Point(674, 30) SEQUENCELabel.Name = "SEQUENCELabel" SEQUENCELabel.Size = New System.Drawing.Size(73, 15) SEQUENCELabel.TabIndex = 16 @@ -979,7 +984,7 @@ Partial Class frmAdministration ' ADDED_WHOLabel3.AutoSize = True ADDED_WHOLabel3.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - ADDED_WHOLabel3.Location = New System.Drawing.Point(164, 168) + ADDED_WHOLabel3.Location = New System.Drawing.Point(164, 209) ADDED_WHOLabel3.Name = "ADDED_WHOLabel3" ADDED_WHOLabel3.Size = New System.Drawing.Size(67, 15) ADDED_WHOLabel3.TabIndex = 18 @@ -989,7 +994,7 @@ Partial Class frmAdministration ' ADDED_WHENLabel3.AutoSize = True ADDED_WHENLabel3.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - ADDED_WHENLabel3.Location = New System.Drawing.Point(354, 168) + ADDED_WHENLabel3.Location = New System.Drawing.Point(354, 209) ADDED_WHENLabel3.Name = "ADDED_WHENLabel3" ADDED_WHENLabel3.Size = New System.Drawing.Size(78, 15) ADDED_WHENLabel3.TabIndex = 20 @@ -999,7 +1004,7 @@ Partial Class frmAdministration ' CHANGED_WHOLabel3.AutoSize = True CHANGED_WHOLabel3.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - CHANGED_WHOLabel3.Location = New System.Drawing.Point(164, 210) + CHANGED_WHOLabel3.Location = New System.Drawing.Point(531, 209) CHANGED_WHOLabel3.Name = "CHANGED_WHOLabel3" CHANGED_WHOLabel3.Size = New System.Drawing.Size(81, 15) CHANGED_WHOLabel3.TabIndex = 22 @@ -1009,7 +1014,7 @@ Partial Class frmAdministration ' CHANGED_WHENLabel3.AutoSize = True CHANGED_WHENLabel3.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - CHANGED_WHENLabel3.Location = New System.Drawing.Point(354, 210) + CHANGED_WHENLabel3.Location = New System.Drawing.Point(691, 209) CHANGED_WHENLabel3.Name = "CHANGED_WHENLabel3" CHANGED_WHENLabel3.Size = New System.Drawing.Size(92, 15) CHANGED_WHENLabel3.TabIndex = 24 @@ -1037,7 +1042,7 @@ Partial Class frmAdministration 'COMMENTLabel2 ' COMMENTLabel2.AutoSize = True - COMMENTLabel2.Location = New System.Drawing.Point(384, 36) + COMMENTLabel2.Location = New System.Drawing.Point(381, 36) COMMENTLabel2.Name = "COMMENTLabel2" COMMENTLabel2.Size = New System.Drawing.Size(73, 15) COMMENTLabel2.TabIndex = 6 @@ -1175,6 +1180,15 @@ Partial Class frmAdministration SEQUENCELabel3.TabIndex = 90 SEQUENCELabel3.Text = "Reihenfolge:" ' + 'VARIANTLabel + ' + VARIANTLabel.AutoSize = True + VARIANTLabel.Location = New System.Drawing.Point(556, 81) + VARIANTLabel.Name = "VARIANTLabel" + VARIANTLabel.Size = New System.Drawing.Size(122, 15) + VARIANTLabel.TabIndex = 80 + VARIANTLabel.Text = "Anwendungsvariante:" + ' 'StatusStrip1 ' Me.StatusStrip1.Location = New System.Drawing.Point(0, 632) @@ -1257,10 +1271,11 @@ Partial Class frmAdministration 'SEQUENCENumericUpDown ' Me.SEQUENCENumericUpDown.DataBindings.Add(New System.Windows.Forms.Binding("Value", Me.TBDD_DOKUMENTARTBindingSource, "SEQUENCE", True)) + Me.SEQUENCENumericUpDown.Enabled = False Me.SEQUENCENumericUpDown.Font = New System.Drawing.Font("Segoe UI Semibold", 9.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.SEQUENCENumericUpDown.Location = New System.Drawing.Point(896, 45) Me.SEQUENCENumericUpDown.Name = "SEQUENCENumericUpDown" - Me.SEQUENCENumericUpDown.Size = New System.Drawing.Size(70, 24) + Me.SEQUENCENumericUpDown.Size = New System.Drawing.Size(67, 24) Me.SEQUENCENumericUpDown.TabIndex = 91 ' 'TBDD_DOKUMENTARTBindingSource @@ -1276,6 +1291,7 @@ Partial Class frmAdministration 'WINDREAM_DIRECTCheckBox ' Me.WINDREAM_DIRECTCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_DOKUMENTARTBindingSource, "WINDREAM_DIRECT", True)) + Me.WINDREAM_DIRECTCheckBox.Enabled = False Me.WINDREAM_DIRECTCheckBox.Font = New System.Drawing.Font("Segoe UI", 9.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.WINDREAM_DIRECTCheckBox.Location = New System.Drawing.Point(386, 93) Me.WINDREAM_DIRECTCheckBox.Name = "WINDREAM_DIRECTCheckBox" @@ -1315,7 +1331,7 @@ Partial Class frmAdministration Me.XtraTabControl2.Location = New System.Drawing.Point(266, 315) Me.XtraTabControl2.Name = "XtraTabControl2" Me.XtraTabControl2.SelectedTabPage = Me.XtraTabPage3 - Me.XtraTabControl2.Size = New System.Drawing.Size(846, 281) + Me.XtraTabControl2.Size = New System.Drawing.Size(862, 281) Me.XtraTabControl2.TabIndex = 86 Me.XtraTabControl2.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage3, Me.XtraTabPage6, Me.XtraTabPage4, Me.XtraTabPage9, Me.XtraTabPage10}) ' @@ -1352,12 +1368,13 @@ Partial Class frmAdministration Me.XtraTabPage3.Controls.Add(GUIDLabel1) Me.XtraTabPage3.Controls.Add(Me.GUIDTextBox1) Me.XtraTabPage3.Name = "XtraTabPage3" - Me.XtraTabPage3.Size = New System.Drawing.Size(840, 253) + Me.XtraTabPage3.Size = New System.Drawing.Size(856, 253) Me.XtraTabPage3.Text = "manuelle Indexe" ' 'OPTIONALCheckBox ' Me.OPTIONALCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_INDEX_MANBindingSource, "OPTIONAL", True)) + Me.OPTIONALCheckBox.Enabled = False Me.OPTIONALCheckBox.Location = New System.Drawing.Point(638, 91) Me.OPTIONALCheckBox.Name = "OPTIONALCheckBox" Me.OPTIONALCheckBox.Size = New System.Drawing.Size(77, 24) @@ -1384,6 +1401,7 @@ Partial Class frmAdministration ' 'btnSQLView ' + Me.btnSQLView.Enabled = False Me.btnSQLView.Image = Global.Global_Indexer.My.Resources.Resources.database_go Me.btnSQLView.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.btnSQLView.Location = New System.Drawing.Point(507, 135) @@ -1397,7 +1415,6 @@ Partial Class frmAdministration ' 'lblSaveIndexMan ' - Me.lblSaveIndexMan.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lblSaveIndexMan.AutoSize = True Me.lblSaveIndexMan.BackColor = System.Drawing.Color.Yellow Me.lblSaveIndexMan.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) @@ -1447,7 +1464,8 @@ Partial Class frmAdministration 'ACTIVECheckBox ' Me.ACTIVECheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_INDEX_MANBindingSource, "ACTIVE", True)) - Me.ACTIVECheckBox.Location = New System.Drawing.Point(723, 47) + Me.ACTIVECheckBox.Enabled = False + Me.ACTIVECheckBox.Location = New System.Drawing.Point(753, 47) Me.ACTIVECheckBox.Name = "ACTIVECheckBox" Me.ACTIVECheckBox.Size = New System.Drawing.Size(61, 24) Me.ACTIVECheckBox.TabIndex = 19 @@ -1457,7 +1475,8 @@ Partial Class frmAdministration 'SEQUENCETextBox ' Me.SEQUENCETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MANBindingSource, "SEQUENCE", True)) - Me.SEQUENCETextBox.Location = New System.Drawing.Point(638, 48) + Me.SEQUENCETextBox.Enabled = False + Me.SEQUENCETextBox.Location = New System.Drawing.Point(677, 48) Me.SEQUENCETextBox.Name = "SEQUENCETextBox" Me.SEQUENCETextBox.Size = New System.Drawing.Size(70, 23) Me.SEQUENCETextBox.TabIndex = 17 @@ -1465,6 +1484,7 @@ Partial Class frmAdministration 'DEFAULT_VALUETextBox ' Me.DEFAULT_VALUETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MANBindingSource, "DEFAULT_VALUE", True)) + Me.DEFAULT_VALUETextBox.Enabled = False Me.DEFAULT_VALUETextBox.Location = New System.Drawing.Point(162, 180) Me.DEFAULT_VALUETextBox.Name = "DEFAULT_VALUETextBox" Me.DEFAULT_VALUETextBox.Size = New System.Drawing.Size(318, 23) @@ -1473,6 +1493,7 @@ Partial Class frmAdministration 'SUGGESTIONCheckBox ' Me.SUGGESTIONCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_INDEX_MANBindingSource, "SUGGESTION", True)) + Me.SUGGESTIONCheckBox.Enabled = False Me.SUGGESTIONCheckBox.Location = New System.Drawing.Point(338, 136) Me.SUGGESTIONCheckBox.Name = "SUGGESTIONCheckBox" Me.SUGGESTIONCheckBox.Size = New System.Drawing.Size(163, 24) @@ -1483,6 +1504,7 @@ Partial Class frmAdministration 'DATATYPEComboBox ' Me.DATATYPEComboBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MANBindingSource, "DATATYPE", True)) + Me.DATATYPEComboBox.Enabled = False Me.DATATYPEComboBox.FormattingEnabled = True Me.DATATYPEComboBox.Items.AddRange(New Object() {"DATE", "INTEGER", "VARCHAR"}) Me.DATATYPEComboBox.Location = New System.Drawing.Point(162, 136) @@ -1493,6 +1515,7 @@ Partial Class frmAdministration 'COMMENTTextBox ' Me.COMMENTTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MANBindingSource, "COMMENT", True)) + Me.COMMENTTextBox.Enabled = False Me.COMMENTTextBox.Location = New System.Drawing.Point(162, 92) Me.COMMENTTextBox.Name = "COMMENTTextBox" Me.COMMENTTextBox.Size = New System.Drawing.Size(467, 23) @@ -1501,8 +1524,9 @@ Partial Class frmAdministration 'WD_INDEXComboBox ' Me.WD_INDEXComboBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MANBindingSource, "WD_INDEX", True)) + Me.WD_INDEXComboBox.Enabled = False Me.WD_INDEXComboBox.FormattingEnabled = True - Me.WD_INDEXComboBox.Location = New System.Drawing.Point(398, 48) + Me.WD_INDEXComboBox.Location = New System.Drawing.Point(440, 47) Me.WD_INDEXComboBox.Name = "WD_INDEXComboBox" Me.WD_INDEXComboBox.Size = New System.Drawing.Size(231, 23) Me.WD_INDEXComboBox.TabIndex = 6 @@ -1510,9 +1534,10 @@ Partial Class frmAdministration 'NAMETextBox ' Me.NAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MANBindingSource, "NAME", True)) + Me.NAMETextBox.Enabled = False Me.NAMETextBox.Location = New System.Drawing.Point(162, 48) Me.NAMETextBox.Name = "NAMETextBox" - Me.NAMETextBox.Size = New System.Drawing.Size(230, 23) + Me.NAMETextBox.Size = New System.Drawing.Size(263, 23) Me.NAMETextBox.TabIndex = 4 ' 'TBDD_INDEX_MANBindingNav @@ -1530,7 +1555,7 @@ Partial Class frmAdministration Me.TBDD_INDEX_MANBindingNav.MovePreviousItem = Me.ToolStripButton4 Me.TBDD_INDEX_MANBindingNav.Name = "TBDD_INDEX_MANBindingNav" Me.TBDD_INDEX_MANBindingNav.PositionItem = Me.ToolStripTextBox1 - Me.TBDD_INDEX_MANBindingNav.Size = New System.Drawing.Size(840, 25) + Me.TBDD_INDEX_MANBindingNav.Size = New System.Drawing.Size(856, 25) Me.TBDD_INDEX_MANBindingNav.TabIndex = 3 Me.TBDD_INDEX_MANBindingNav.Text = "BindingNavigator1" ' @@ -1641,6 +1666,8 @@ Partial Class frmAdministration 'XtraTabPage6 ' Me.XtraTabPage6.AutoScroll = True + Me.XtraTabPage6.Controls.Add(VARIANTLabel) + Me.XtraTabPage6.Controls.Add(Me.VARIANTComboBox) Me.XtraTabPage6.Controls.Add(Me.lblsavePostProcess) Me.XtraTabPage6.Controls.Add(Me.ComboBox2) Me.XtraTabPage6.Controls.Add(Me.Function2Label) @@ -1672,16 +1699,35 @@ Partial Class frmAdministration Me.XtraTabPage6.Controls.Add(Me.GUIDTextBox4) Me.XtraTabPage6.Controls.Add(Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingNavigator) Me.XtraTabPage6.Name = "XtraTabPage6" - Me.XtraTabPage6.Size = New System.Drawing.Size(840, 253) + Me.XtraTabPage6.Size = New System.Drawing.Size(856, 253) Me.XtraTabPage6.Text = "Nachbearbeitungsfunktionen manueller Index" ' + 'VARIANTComboBox + ' + Me.VARIANTComboBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "VARIANT", True)) + Me.VARIANTComboBox.DataBindings.Add(New System.Windows.Forms.Binding("SelectedValue", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "VARIANT", True)) + Me.VARIANTComboBox.DataSource = Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource + Me.VARIANTComboBox.DisplayMember = "VARIANT" + Me.VARIANTComboBox.Enabled = False + Me.VARIANTComboBox.FormattingEnabled = True + Me.VARIANTComboBox.Location = New System.Drawing.Point(559, 99) + Me.VARIANTComboBox.Name = "VARIANTComboBox" + Me.VARIANTComboBox.Size = New System.Drawing.Size(202, 23) + Me.VARIANTComboBox.TabIndex = 81 + Me.VARIANTComboBox.ValueMember = "VARIANT" + ' + 'TBDD_INDEX_MAN_POSTPROCESSINGBindingSource + ' + Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource.DataMember = "TBDD_INDEX_MAN_POSTPROCESSING" + Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource.DataSource = Me.MyDataset + ' 'lblsavePostProcess ' Me.lblsavePostProcess.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lblsavePostProcess.AutoSize = True Me.lblsavePostProcess.BackColor = System.Drawing.Color.Yellow Me.lblsavePostProcess.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblsavePostProcess.Location = New System.Drawing.Point(384, 186) + Me.lblsavePostProcess.Location = New System.Drawing.Point(384, 185) Me.lblsavePostProcess.Name = "lblsavePostProcess" Me.lblsavePostProcess.Size = New System.Drawing.Size(213, 17) Me.lblsavePostProcess.TabIndex = 80 @@ -1693,6 +1739,7 @@ Partial Class frmAdministration Me.ComboBox2.DataBindings.Add(New System.Windows.Forms.Binding("SelectedValue", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "IDXMAN_ID", True)) Me.ComboBox2.DataSource = Me.TBWHDD_INDEX_MANBindingSource Me.ComboBox2.DisplayMember = "NAME" + Me.ComboBox2.Enabled = False Me.ComboBox2.FormattingEnabled = True Me.ComboBox2.Location = New System.Drawing.Point(71, 53) Me.ComboBox2.Name = "ComboBox2" @@ -1700,11 +1747,6 @@ Partial Class frmAdministration Me.ComboBox2.TabIndex = 34 Me.ComboBox2.ValueMember = "GUID" ' - 'TBDD_INDEX_MAN_POSTPROCESSINGBindingSource - ' - Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource.DataMember = "TBDD_INDEX_MAN_POSTPROCESSING" - Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource.DataSource = Me.MyDataset - ' 'TBWHDD_INDEX_MANBindingSource ' Me.TBWHDD_INDEX_MANBindingSource.DataMember = "TBWHDD_INDEX_MAN" @@ -1713,7 +1755,7 @@ Partial Class frmAdministration 'Function2Label ' Me.Function2Label.AutoSize = True - Me.Function2Label.Location = New System.Drawing.Point(388, 79) + Me.Function2Label.Location = New System.Drawing.Point(212, 166) Me.Function2Label.Name = "Function2Label" Me.Function2Label.Size = New System.Drawing.Size(13, 15) Me.Function2Label.TabIndex = 33 @@ -1722,7 +1764,7 @@ Partial Class frmAdministration 'Function1Label ' Me.Function1Label.AutoSize = True - Me.Function1Label.Location = New System.Drawing.Point(13, 79) + Me.Function1Label.Location = New System.Drawing.Point(116, 166) Me.Function1Label.Name = "Function1Label" Me.Function1Label.Size = New System.Drawing.Size(13, 15) Me.Function1Label.TabIndex = 32 @@ -1731,7 +1773,7 @@ Partial Class frmAdministration 'Text3Label ' Me.Text3Label.AutoSize = True - Me.Text3Label.Location = New System.Drawing.Point(384, 123) + Me.Text3Label.Location = New System.Drawing.Point(381, 81) Me.Text3Label.Name = "Text3Label" Me.Text3Label.Size = New System.Drawing.Size(41, 15) Me.Text3Label.TabIndex = 31 @@ -1740,7 +1782,7 @@ Partial Class frmAdministration 'Text2Label ' Me.Text2Label.AutoSize = True - Me.Text2Label.Location = New System.Drawing.Point(184, 123) + Me.Text2Label.Location = New System.Drawing.Point(184, 81) Me.Text2Label.Name = "Text2Label" Me.Text2Label.Size = New System.Drawing.Size(41, 15) Me.Text2Label.TabIndex = 30 @@ -1749,7 +1791,7 @@ Partial Class frmAdministration 'Text1Label ' Me.Text1Label.AutoSize = True - Me.Text1Label.Location = New System.Drawing.Point(16, 123) + Me.Text1Label.Location = New System.Drawing.Point(16, 81) Me.Text1Label.Name = "Text1Label" Me.Text1Label.Size = New System.Drawing.Size(41, 15) Me.Text1Label.TabIndex = 29 @@ -1798,6 +1840,7 @@ Partial Class frmAdministration 'SEQUENCETextBox1 ' Me.SEQUENCETextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "SEQUENCE", True)) + Me.SEQUENCETextBox1.Enabled = False Me.SEQUENCETextBox1.Location = New System.Drawing.Point(16, 185) Me.SEQUENCETextBox1.Name = "SEQUENCETextBox1" Me.SEQUENCETextBox1.Size = New System.Drawing.Size(78, 23) @@ -1806,7 +1849,8 @@ Partial Class frmAdministration 'TEXT3TextBox ' Me.TEXT3TextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "TEXT3", True)) - Me.TEXT3TextBox.Location = New System.Drawing.Point(387, 141) + Me.TEXT3TextBox.Enabled = False + Me.TEXT3TextBox.Location = New System.Drawing.Point(384, 99) Me.TEXT3TextBox.Name = "TEXT3TextBox" Me.TEXT3TextBox.Size = New System.Drawing.Size(169, 23) Me.TEXT3TextBox.TabIndex = 18 @@ -1814,7 +1858,8 @@ Partial Class frmAdministration 'TEXT2TextBox ' Me.TEXT2TextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "TEXT2", True)) - Me.TEXT2TextBox.Location = New System.Drawing.Point(187, 141) + Me.TEXT2TextBox.Enabled = False + Me.TEXT2TextBox.Location = New System.Drawing.Point(187, 99) Me.TEXT2TextBox.Name = "TEXT2TextBox" Me.TEXT2TextBox.Size = New System.Drawing.Size(191, 23) Me.TEXT2TextBox.TabIndex = 16 @@ -1822,7 +1867,8 @@ Partial Class frmAdministration 'TEXT1TextBox ' Me.TEXT1TextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "TEXT1", True)) - Me.TEXT1TextBox.Location = New System.Drawing.Point(16, 141) + Me.TEXT1TextBox.Enabled = False + Me.TEXT1TextBox.Location = New System.Drawing.Point(16, 99) Me.TEXT1TextBox.Name = "TEXT1TextBox" Me.TEXT1TextBox.Size = New System.Drawing.Size(167, 23) Me.TEXT1TextBox.TabIndex = 14 @@ -1830,24 +1876,27 @@ Partial Class frmAdministration 'FUNCTION2TextBox ' Me.FUNCTION2TextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "FUNCTION2", True)) - Me.FUNCTION2TextBox.Location = New System.Drawing.Point(387, 97) + Me.FUNCTION2TextBox.Enabled = False + Me.FUNCTION2TextBox.Location = New System.Drawing.Point(211, 184) Me.FUNCTION2TextBox.Name = "FUNCTION2TextBox" - Me.FUNCTION2TextBox.Size = New System.Drawing.Size(381, 23) + Me.FUNCTION2TextBox.Size = New System.Drawing.Size(70, 23) Me.FUNCTION2TextBox.TabIndex = 12 ' 'FUNCTION1TextBox ' Me.FUNCTION1TextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "FUNCTION1", True)) - Me.FUNCTION1TextBox.Location = New System.Drawing.Point(16, 97) + Me.FUNCTION1TextBox.Enabled = False + Me.FUNCTION1TextBox.Location = New System.Drawing.Point(119, 184) Me.FUNCTION1TextBox.Name = "FUNCTION1TextBox" - Me.FUNCTION1TextBox.Size = New System.Drawing.Size(362, 23) + Me.FUNCTION1TextBox.Size = New System.Drawing.Size(70, 23) Me.FUNCTION1TextBox.TabIndex = 10 ' 'TYPEComboBox ' Me.TYPEComboBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "TYPE", True)) + Me.TYPEComboBox.Enabled = False Me.TYPEComboBox.FormattingEnabled = True - Me.TYPEComboBox.Items.AddRange(New Object() {"VBREPLACE", "VBSPLIT"}) + Me.TYPEComboBox.Items.AddRange(New Object() {"VBREPLACE", "VBSPLIT", "REG. EXPRESSION"}) Me.TYPEComboBox.Location = New System.Drawing.Point(257, 53) Me.TYPEComboBox.Name = "TYPEComboBox" Me.TYPEComboBox.Size = New System.Drawing.Size(121, 23) @@ -1856,7 +1905,8 @@ Partial Class frmAdministration 'COMMENTTextBox2 ' Me.COMMENTTextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingSource, "COMMENT", True)) - Me.COMMENTTextBox2.Location = New System.Drawing.Point(387, 54) + Me.COMMENTTextBox2.Enabled = False + Me.COMMENTTextBox2.Location = New System.Drawing.Point(384, 54) Me.COMMENTTextBox2.Name = "COMMENTTextBox2" Me.COMMENTTextBox2.Size = New System.Drawing.Size(381, 23) Me.COMMENTTextBox2.TabIndex = 7 @@ -1886,7 +1936,7 @@ Partial Class frmAdministration Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingNavigator.MovePreviousItem = Me.ToolStripButton27 Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingNavigator.Name = "TBDD_INDEX_MAN_POSTPROCESSINGBindingNavigator" Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingNavigator.PositionItem = Me.ToolStripTextBox4 - Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingNavigator.Size = New System.Drawing.Size(840, 25) + Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingNavigator.Size = New System.Drawing.Size(856, 25) Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingNavigator.TabIndex = 4 Me.TBDD_INDEX_MAN_POSTPROCESSINGBindingNavigator.Text = "BindingNavigator1" ' @@ -1999,6 +2049,8 @@ Partial Class frmAdministration Me.XtraTabPage4.Appearance.Header.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical Me.XtraTabPage4.Appearance.HeaderActive.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical Me.XtraTabPage4.AutoScroll = True + Me.XtraTabPage4.Controls.Add(Me.lblWindowParameter) + Me.XtraTabPage4.Controls.Add(Me.lbFileparameter) Me.XtraTabPage4.Controls.Add(Me.ListBox6) Me.XtraTabPage4.Controls.Add(Me.lblValue) Me.XtraTabPage4.Controls.Add(Me.INDEXNAME_AutoIndexCMB) @@ -2025,8 +2077,28 @@ Partial Class frmAdministration Me.XtraTabPage4.Controls.Add(Me.INDEXNAME_AutoIndexTXT) Me.XtraTabPage4.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.XtraTabPage4.Name = "XtraTabPage4" - Me.XtraTabPage4.Size = New System.Drawing.Size(840, 253) - Me.XtraTabPage4.Text = "automatische Indexe" + Me.XtraTabPage4.Size = New System.Drawing.Size(856, 253) + Me.XtraTabPage4.Text = "automatische/feste Indexe" + ' + 'lblWindowParameter + ' + Me.lblWindowParameter.AutoSize = True + Me.lblWindowParameter.Location = New System.Drawing.Point(602, 47) + Me.lblWindowParameter.Name = "lblWindowParameter" + Me.lblWindowParameter.Size = New System.Drawing.Size(118, 15) + Me.lblWindowParameter.TabIndex = 88 + Me.lblWindowParameter.Text = "Windows-Parameter:" + ' + 'lbFileparameter + ' + Me.lbFileparameter.Enabled = False + Me.lbFileparameter.FormattingEnabled = True + Me.lbFileparameter.ItemHeight = 15 + Me.lbFileparameter.Items.AddRange(New Object() {"Dateiname (mit Endung)", "Dateiname (ohne Endung)", "Datei Erstelldatum", "Datei Erstellt wer", "Aktuelles Datum (DD.MM.YYYY)"}) + Me.lbFileparameter.Location = New System.Drawing.Point(602, 64) + Me.lbFileparameter.Name = "lbFileparameter" + Me.lbFileparameter.Size = New System.Drawing.Size(178, 109) + Me.lbFileparameter.TabIndex = 87 ' 'ListBox6 ' @@ -2037,7 +2109,7 @@ Partial Class frmAdministration Me.ListBox6.ItemHeight = 15 Me.ListBox6.Location = New System.Drawing.Point(6, 94) Me.ListBox6.Name = "ListBox6" - Me.ListBox6.Size = New System.Drawing.Size(146, 154) + Me.ListBox6.Size = New System.Drawing.Size(155, 154) Me.ListBox6.TabIndex = 86 Me.ListBox6.ValueMember = "GUID" ' @@ -2049,7 +2121,7 @@ Partial Class frmAdministration 'lblValue ' Me.lblValue.AutoSize = True - Me.lblValue.Location = New System.Drawing.Point(353, 47) + Me.lblValue.Location = New System.Drawing.Point(374, 47) Me.lblValue.Name = "lblValue" Me.lblValue.Size = New System.Drawing.Size(69, 15) Me.lblValue.TabIndex = 85 @@ -2058,10 +2130,11 @@ Partial Class frmAdministration 'INDEXNAME_AutoIndexCMB ' Me.INDEXNAME_AutoIndexCMB.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_AUTOMBindingSource, "INDEXNAME", True)) + Me.INDEXNAME_AutoIndexCMB.Enabled = False Me.INDEXNAME_AutoIndexCMB.FormattingEnabled = True - Me.INDEXNAME_AutoIndexCMB.Location = New System.Drawing.Point(167, 64) + Me.INDEXNAME_AutoIndexCMB.Location = New System.Drawing.Point(167, 63) Me.INDEXNAME_AutoIndexCMB.Name = "INDEXNAME_AutoIndexCMB" - Me.INDEXNAME_AutoIndexCMB.Size = New System.Drawing.Size(183, 23) + Me.INDEXNAME_AutoIndexCMB.Size = New System.Drawing.Size(198, 23) Me.INDEXNAME_AutoIndexCMB.TabIndex = 84 ' 'Label6 @@ -2080,7 +2153,7 @@ Partial Class frmAdministration Me.lblsaveAutoIndex.AutoSize = True Me.lblsaveAutoIndex.BackColor = System.Drawing.Color.Yellow Me.lblsaveAutoIndex.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblsaveAutoIndex.Location = New System.Drawing.Point(601, 66) + Me.lblsaveAutoIndex.Location = New System.Drawing.Point(531, 192) Me.lblsaveAutoIndex.Name = "lblsaveAutoIndex" Me.lblsaveAutoIndex.Size = New System.Drawing.Size(192, 17) Me.lblsaveAutoIndex.TabIndex = 82 @@ -2089,6 +2162,7 @@ Partial Class frmAdministration ' 'btnSQLViewAuto ' + Me.btnSQLViewAuto.Enabled = False Me.btnSQLViewAuto.Image = Global.Global_Indexer.My.Resources.Resources.database_go Me.btnSQLViewAuto.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.btnSQLViewAuto.Location = New System.Drawing.Point(377, 138) @@ -2103,6 +2177,7 @@ Partial Class frmAdministration 'SQL_ACTIVECheckBox ' Me.SQL_ACTIVECheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_INDEX_AUTOMBindingSource, "SQL_ACTIVE", True)) + Me.SQL_ACTIVECheckBox.Enabled = False Me.SQL_ACTIVECheckBox.Location = New System.Drawing.Point(167, 141) Me.SQL_ACTIVECheckBox.Name = "SQL_ACTIVECheckBox" Me.SQL_ACTIVECheckBox.Size = New System.Drawing.Size(198, 24) @@ -2123,14 +2198,16 @@ Partial Class frmAdministration 'VALUETextBox ' Me.VALUETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_AUTOMBindingSource, "VALUE", True)) - Me.VALUETextBox.Location = New System.Drawing.Point(356, 65) + Me.VALUETextBox.Enabled = False + Me.VALUETextBox.Location = New System.Drawing.Point(377, 63) Me.VALUETextBox.Name = "VALUETextBox" - Me.VALUETextBox.Size = New System.Drawing.Size(171, 23) + Me.VALUETextBox.Size = New System.Drawing.Size(209, 23) Me.VALUETextBox.TabIndex = 11 ' 'COMMENTTextBox1 ' Me.COMMENTTextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_AUTOMBindingSource, "COMMENT", True)) + Me.COMMENTTextBox1.Enabled = False Me.COMMENTTextBox1.Location = New System.Drawing.Point(167, 111) Me.COMMENTTextBox1.Name = "COMMENTTextBox1" Me.COMMENTTextBox1.Size = New System.Drawing.Size(419, 23) @@ -2139,7 +2216,7 @@ Partial Class frmAdministration 'ACTIVECheckBox1 ' Me.ACTIVECheckBox1.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_INDEX_AUTOMBindingSource, "ACTIVE", True)) - Me.ACTIVECheckBox1.Location = New System.Drawing.Point(533, 64) + Me.ACTIVECheckBox1.Location = New System.Drawing.Point(786, 63) Me.ACTIVECheckBox1.Name = "ACTIVECheckBox1" Me.ACTIVECheckBox1.Size = New System.Drawing.Size(63, 24) Me.ACTIVECheckBox1.TabIndex = 17 @@ -2150,40 +2227,40 @@ Partial Class frmAdministration ' Me.ADDED_WHOTextBox3.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_AUTOMBindingSource, "ADDED_WHO", True)) Me.ADDED_WHOTextBox3.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ADDED_WHOTextBox3.Location = New System.Drawing.Point(167, 184) + Me.ADDED_WHOTextBox3.Location = New System.Drawing.Point(167, 225) Me.ADDED_WHOTextBox3.Name = "ADDED_WHOTextBox3" Me.ADDED_WHOTextBox3.ReadOnly = True - Me.ADDED_WHOTextBox3.Size = New System.Drawing.Size(172, 23) + Me.ADDED_WHOTextBox3.Size = New System.Drawing.Size(155, 23) Me.ADDED_WHOTextBox3.TabIndex = 19 ' 'ADDED_WHENTextBox3 ' Me.ADDED_WHENTextBox3.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_AUTOMBindingSource, "ADDED_WHEN", True)) Me.ADDED_WHENTextBox3.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ADDED_WHENTextBox3.Location = New System.Drawing.Point(357, 184) + Me.ADDED_WHENTextBox3.Location = New System.Drawing.Point(356, 225) Me.ADDED_WHENTextBox3.Name = "ADDED_WHENTextBox3" Me.ADDED_WHENTextBox3.ReadOnly = True - Me.ADDED_WHENTextBox3.Size = New System.Drawing.Size(168, 23) + Me.ADDED_WHENTextBox3.Size = New System.Drawing.Size(155, 23) Me.ADDED_WHENTextBox3.TabIndex = 21 ' 'CHANGED_WHOTextBox3 ' Me.CHANGED_WHOTextBox3.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_AUTOMBindingSource, "CHANGED_WHO", True)) Me.CHANGED_WHOTextBox3.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.CHANGED_WHOTextBox3.Location = New System.Drawing.Point(167, 228) + Me.CHANGED_WHOTextBox3.Location = New System.Drawing.Point(533, 225) Me.CHANGED_WHOTextBox3.Name = "CHANGED_WHOTextBox3" Me.CHANGED_WHOTextBox3.ReadOnly = True - Me.CHANGED_WHOTextBox3.Size = New System.Drawing.Size(172, 23) + Me.CHANGED_WHOTextBox3.Size = New System.Drawing.Size(155, 23) Me.CHANGED_WHOTextBox3.TabIndex = 23 ' 'CHANGED_WHENTextBox3 ' Me.CHANGED_WHENTextBox3.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_AUTOMBindingSource, "CHANGED_WHEN", True)) Me.CHANGED_WHENTextBox3.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.CHANGED_WHENTextBox3.Location = New System.Drawing.Point(357, 228) + Me.CHANGED_WHENTextBox3.Location = New System.Drawing.Point(694, 225) Me.CHANGED_WHENTextBox3.Name = "CHANGED_WHENTextBox3" Me.CHANGED_WHENTextBox3.ReadOnly = True - Me.CHANGED_WHENTextBox3.Size = New System.Drawing.Size(168, 23) + Me.CHANGED_WHENTextBox3.Size = New System.Drawing.Size(155, 23) Me.CHANGED_WHENTextBox3.TabIndex = 25 ' 'BindingNavigator2 @@ -2202,7 +2279,7 @@ Partial Class frmAdministration Me.BindingNavigator2.MovePreviousItem = Me.ToolStripButton19 Me.BindingNavigator2.Name = "BindingNavigator2" Me.BindingNavigator2.PositionItem = Me.ToolStripTextBox3 - Me.BindingNavigator2.Size = New System.Drawing.Size(840, 25) + Me.BindingNavigator2.Size = New System.Drawing.Size(856, 25) Me.BindingNavigator2.TabIndex = 4 Me.BindingNavigator2.Text = "BindingNavigator1" ' @@ -2304,9 +2381,10 @@ Partial Class frmAdministration 'INDEXNAME_AutoIndexTXT ' Me.INDEXNAME_AutoIndexTXT.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_INDEX_AUTOMBindingSource, "INDEXNAME", True)) + Me.INDEXNAME_AutoIndexTXT.Enabled = False Me.INDEXNAME_AutoIndexTXT.Location = New System.Drawing.Point(167, 64) Me.INDEXNAME_AutoIndexTXT.Name = "INDEXNAME_AutoIndexTXT" - Me.INDEXNAME_AutoIndexTXT.Size = New System.Drawing.Size(183, 23) + Me.INDEXNAME_AutoIndexTXT.Size = New System.Drawing.Size(198, 23) Me.INDEXNAME_AutoIndexTXT.TabIndex = 28 ' 'XtraTabPage9 @@ -2316,7 +2394,7 @@ Partial Class frmAdministration Me.XtraTabPage9.Controls.Add(Me.Label8) Me.XtraTabPage9.Controls.Add(Me.ListBoxDokartzuordnung) Me.XtraTabPage9.Name = "XtraTabPage9" - Me.XtraTabPage9.Size = New System.Drawing.Size(840, 253) + Me.XtraTabPage9.Size = New System.Drawing.Size(856, 253) Me.XtraTabPage9.Text = "Zuordnung Dokumentenart-Gruppe" ' 'Button2 @@ -2429,7 +2507,7 @@ Partial Class frmAdministration ' Me.XtraTabPage10.Controls.Add(Me.GroupBox4) Me.XtraTabPage10.Name = "XtraTabPage10" - Me.XtraTabPage10.Size = New System.Drawing.Size(840, 253) + Me.XtraTabPage10.Size = New System.Drawing.Size(856, 253) Me.XtraTabPage10.Text = "Create Folder for Index" ' 'GroupBox4 @@ -2575,6 +2653,7 @@ Partial Class frmAdministration Me.ComboBox1.DataBindings.Add(New System.Windows.Forms.Binding("SelectedValue", Me.TBDD_DOKUMENTARTBindingSource, "EINGANGSART_ID", True)) Me.ComboBox1.DataSource = Me.TBDD_EINGANGSARTENBindingSource Me.ComboBox1.DisplayMember = "BEZEICHNUNG" + Me.ComboBox1.Enabled = False Me.ComboBox1.FormattingEnabled = True Me.ComboBox1.Location = New System.Drawing.Point(621, 46) Me.ComboBox1.Name = "ComboBox1" @@ -2652,11 +2731,10 @@ Partial Class frmAdministration ' 'lblSaveDokart ' - Me.lblSaveDokart.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lblSaveDokart.AutoSize = True Me.lblSaveDokart.BackColor = System.Drawing.Color.Yellow Me.lblSaveDokart.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblSaveDokart.Location = New System.Drawing.Point(845, 231) + Me.lblSaveDokart.Location = New System.Drawing.Point(842, 231) Me.lblSaveDokart.Name = "lblSaveDokart" Me.lblSaveDokart.Size = New System.Drawing.Size(240, 17) Me.lblSaveDokart.TabIndex = 78 @@ -2665,6 +2743,7 @@ Partial Class frmAdministration ' 'btnNamenkonvention ' + Me.btnNamenkonvention.Enabled = False Me.btnNamenkonvention.Image = Global.Global_Indexer.My.Resources.Resources.database_go Me.btnNamenkonvention.Location = New System.Drawing.Point(621, 232) Me.btnNamenkonvention.Name = "btnNamenkonvention" @@ -2674,6 +2753,7 @@ Partial Class frmAdministration ' 'Button1 ' + Me.Button1.Enabled = False Me.Button1.Location = New System.Drawing.Point(858, 142) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(31, 23) @@ -2684,6 +2764,7 @@ Partial Class frmAdministration 'NAMENKONVENTIONTextBox ' Me.NAMENKONVENTIONTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_DOKUMENTARTBindingSource, "NAMENKONVENTION", True)) + Me.NAMENKONVENTIONTextBox.Enabled = False Me.NAMENKONVENTIONTextBox.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.NAMENKONVENTIONTextBox.Location = New System.Drawing.Point(267, 231) Me.NAMENKONVENTIONTextBox.Name = "NAMENKONVENTIONTextBox" @@ -2850,6 +2931,7 @@ Partial Class frmAdministration 'BEZEICHNUNGTextBox ' Me.BEZEICHNUNGTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_DOKUMENTARTBindingSource, "BEZEICHNUNG", True)) + Me.BEZEICHNUNGTextBox.Enabled = False Me.BEZEICHNUNGTextBox.Location = New System.Drawing.Point(330, 46) Me.BEZEICHNUNGTextBox.Name = "BEZEICHNUNGTextBox" Me.BEZEICHNUNGTextBox.Size = New System.Drawing.Size(287, 23) @@ -2858,6 +2940,7 @@ Partial Class frmAdministration 'KURZNAMETextBox ' Me.KURZNAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_DOKUMENTARTBindingSource, "KURZNAME", True)) + Me.KURZNAMETextBox.Enabled = False Me.KURZNAMETextBox.Location = New System.Drawing.Point(267, 94) Me.KURZNAMETextBox.Name = "KURZNAMETextBox" Me.KURZNAMETextBox.Size = New System.Drawing.Size(94, 23) @@ -2866,6 +2949,7 @@ Partial Class frmAdministration 'ZIEL_PFADTextBox ' Me.ZIEL_PFADTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_DOKUMENTARTBindingSource, "ZIEL_PFAD", True)) + Me.ZIEL_PFADTextBox.Enabled = False Me.ZIEL_PFADTextBox.Location = New System.Drawing.Point(267, 142) Me.ZIEL_PFADTextBox.Name = "ZIEL_PFADTextBox" Me.ZIEL_PFADTextBox.Size = New System.Drawing.Size(585, 23) @@ -2874,6 +2958,7 @@ Partial Class frmAdministration 'BESCHREIBUNGTextBox ' Me.BESCHREIBUNGTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_DOKUMENTARTBindingSource, "BESCHREIBUNG", True)) + Me.BESCHREIBUNGTextBox.Enabled = False Me.BESCHREIBUNGTextBox.Location = New System.Drawing.Point(267, 186) Me.BESCHREIBUNGTextBox.Name = "BESCHREIBUNGTextBox" Me.BESCHREIBUNGTextBox.Size = New System.Drawing.Size(622, 23) @@ -2882,6 +2967,7 @@ Partial Class frmAdministration 'AKTIVCheckBox ' Me.AKTIVCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_DOKUMENTARTBindingSource, "AKTIV", True)) + Me.AKTIVCheckBox.Enabled = False Me.AKTIVCheckBox.Location = New System.Drawing.Point(554, 93) Me.AKTIVCheckBox.Name = "AKTIVCheckBox" Me.AKTIVCheckBox.Size = New System.Drawing.Size(63, 24) @@ -2932,10 +3018,11 @@ Partial Class frmAdministration 'OBJEKTTYPComboBox ' Me.OBJEKTTYPComboBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_DOKUMENTARTBindingSource, "OBJEKTTYP", True)) + Me.OBJEKTTYPComboBox.Enabled = False Me.OBJEKTTYPComboBox.FormattingEnabled = True Me.OBJEKTTYPComboBox.Location = New System.Drawing.Point(621, 94) Me.OBJEKTTYPComboBox.Name = "OBJEKTTYPComboBox" - Me.OBJEKTTYPComboBox.Size = New System.Drawing.Size(345, 23) + Me.OBJEKTTYPComboBox.Size = New System.Drawing.Size(342, 23) Me.OBJEKTTYPComboBox.TabIndex = 25 ' 'XtraTabPage2 @@ -3373,6 +3460,7 @@ Partial Class frmAdministration 'PRENAMETextBox ' Me.PRENAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "PRENAME", True)) + Me.PRENAMETextBox.Enabled = False Me.PRENAMETextBox.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.PRENAMETextBox.Location = New System.Drawing.Point(90, 51) Me.PRENAMETextBox.Name = "PRENAMETextBox" @@ -3382,6 +3470,7 @@ Partial Class frmAdministration 'NAMETextBox1 ' Me.NAMETextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "NAME", True)) + Me.NAMETextBox1.Enabled = False Me.NAMETextBox1.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.NAMETextBox1.Location = New System.Drawing.Point(299, 51) Me.NAMETextBox1.Name = "NAMETextBox1" @@ -3391,6 +3480,7 @@ Partial Class frmAdministration 'USERNAMETextBox ' Me.USERNAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "USERNAME", True)) + Me.USERNAMETextBox.Enabled = False Me.USERNAMETextBox.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.USERNAMETextBox.Location = New System.Drawing.Point(562, 51) Me.USERNAMETextBox.Name = "USERNAMETextBox" @@ -3400,6 +3490,7 @@ Partial Class frmAdministration 'EMAILTextBox ' Me.EMAILTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "EMAIL", True)) + Me.EMAILTextBox.Enabled = False Me.EMAILTextBox.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.EMAILTextBox.Location = New System.Drawing.Point(90, 92) Me.EMAILTextBox.Name = "EMAILTextBox" @@ -3451,6 +3542,7 @@ Partial Class frmAdministration 'GI_ADMINCheckBox ' Me.GI_ADMINCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_USERBindingSource, "GI_ADMIN", True)) + Me.GI_ADMINCheckBox.Enabled = False Me.GI_ADMINCheckBox.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.GI_ADMINCheckBox.Location = New System.Drawing.Point(562, 90) Me.GI_ADMINCheckBox.Name = "GI_ADMINCheckBox" @@ -4369,4 +4461,7 @@ Partial Class frmAdministration Friend WithEvents tsbtnCopyDoctype As System.Windows.Forms.ToolStripButton Friend WithEvents SEQUENCENumericUpDown As System.Windows.Forms.NumericUpDown Friend WithEvents ListBox6 As System.Windows.Forms.ListBox + Friend WithEvents lblWindowParameter As System.Windows.Forms.Label + Friend WithEvents lbFileparameter As System.Windows.Forms.ListBox + Friend WithEvents VARIANTComboBox As System.Windows.Forms.ComboBox End Class diff --git a/Global_Indexer/frmAdministration.resx b/Global_Indexer/frmAdministration.resx index 387cafc..98014f6 100644 --- a/Global_Indexer/frmAdministration.resx +++ b/Global_Indexer/frmAdministration.resx @@ -324,6 +324,9 @@ False + + False + 17, 17 diff --git a/Global_Indexer/frmAdministration.vb b/Global_Indexer/frmAdministration.vb index f7ada6a..e72a2c6 100644 --- a/Global_Indexer/frmAdministration.vb +++ b/Global_Indexer/frmAdministration.vb @@ -49,6 +49,9 @@ Else Me.TBDD_DOKUMENTARTTableAdapter.Fill(Me.MyDataset.TBDD_DOKUMENTART) End If + If MyDataset.TBDD_DOKUMENTART.Rows.Count > 0 Then + enableControls(XtraTabPage1) + End If If Me.DOKART_GUIDTextBox.Text <> "" Then Load_TabData() End If @@ -159,6 +162,7 @@ Private Sub TBDD_DOKUMENTARTBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBDD_DOKUMENTARTBindingSource.AddingNew MyDataset.TBDD_DOKUMENTART.ERSTELLTWERColumn.DefaultValue = Environment.UserName + enableControls(XtraTabPage1) IsInsert = True End Sub @@ -256,6 +260,9 @@ Private Sub Load_INDEXMAN(DA_ID As Integer) Try Me.TBDD_INDEX_MANTableAdapter.Fill(Me.MyDataset.TBDD_INDEX_MAN, DA_ID) + If MyDataset.TBDD_INDEX_MAN.Rows.Count > 0 Then + enableControls(XtraTabPage3) + End If Catch ex As System.Exception MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in Load IndexeManuell: ") End Try @@ -264,6 +271,9 @@ Private Sub Load_INDEXE_AUTO(DA_ID As Integer) Try Me.TBDD_INDEX_AUTOMTableAdapter.Fill(Me.MyDataset.TBDD_INDEX_AUTOM, DA_ID) + If MyDataset.TBDD_INDEX_AUTOM.Rows.Count > 0 Then + enableControls(XtraTabPage4) + End If CheckIndexAutoWD() Catch ex As System.Exception MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in Load Indexe Auto: ") @@ -272,8 +282,11 @@ End Sub Private Sub Load_PostProcessing(DA_ID As Integer) Try - Me.TBDD_INDEX_MAN_POSTPROCESSINGTableAdapter.Fill(Me.MyDataset.TBDD_INDEX_MAN_POSTPROCESSING, DA_ID) Me.TBWHDD_INDEX_MANTableAdapter.Fill(Me.MyDataset.TBWHDD_INDEX_MAN, DA_ID) + Me.TBDD_INDEX_MAN_POSTPROCESSINGTableAdapter.Fill(Me.MyDataset.TBDD_INDEX_MAN_POSTPROCESSING, DA_ID) + If MyDataset.TBDD_INDEX_MAN_POSTPROCESSING.Rows.Count > 0 Then + enableControls(XtraTabPage6) + End If Catch ex As System.Exception MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in Load Postprocessing-Values: ") End Try @@ -296,6 +309,7 @@ IsInsert = True MyDataset.TBDD_INDEX_MAN.ADDED_WHOColumn.DefaultValue = Environment.UserName MyDataset.TBDD_INDEX_MAN.DOK_IDColumn.DefaultValue = Me.DOKART_GUIDTextBox.Text + enableControls(XtraTabPage3) If GI_withWindream = True Then Load_INDEXMAN(Me.DOKART_GUIDTextBox.Text) End If @@ -350,6 +364,7 @@ If SUGGESTIONCheckBox.CheckState = CheckState.Checked Then btnSQLView.Visible = True Else + btnSQLView.Visible = False End If If IsInsert = False Then @@ -373,7 +388,9 @@ Else Me.TBDD_USERTableAdapter.Fill(Me.MyDataset.TBDD_USER) End If - + If MyDataset.TBDD_USER.Rows.Count > 0 Then + enableControls(XtraTabPage2) + End If Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in Refresh_User: ") End Try @@ -524,6 +541,7 @@ Try MyDataset.TBDD_INDEX_AUTOM.ADDED_WHOColumn.DefaultValue = Environment.UserName MyDataset.TBDD_INDEX_AUTOM.DOCTYPE_IDColumn.DefaultValue = Me.DOKART_GUIDTextBox.Text + enableControls(XtraTabPage4) IsInsert = True Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in Add IndexeAuto: ") @@ -543,11 +561,15 @@ Me.lblValue.Visible = False VALUETextBox.Visible = False VALUETextBox.Text = "" + lblWindowParameter.Visible = False + lbFileparameter.Visible = False Else Me.lblValue.Visible = True VALUETextBox.Visible = True VALUETextBox.Text = "" btnSQLViewAuto.Visible = False + lblWindowParameter.Visible = True + lbFileparameter.Visible = True End If If IsInsert = False Then Save_IndexAuto() @@ -638,8 +660,22 @@ Me.Function2Label.Visible = False Me.FUNCTION1TextBox.Visible = False Me.FUNCTION2TextBox.Visible = False - Case Else + Case "REG. EXPRESSION" + Me.Text1Label.Text = "Regulärer Ausdruck:" + Me.TEXT1TextBox.Visible = True + Me.Text2Label.Visible = False + Me.TEXT2TextBox.Visible = False + Me.Text3Label.Visible = False + Me.TEXT3TextBox.Visible = False + Me.FUNCTION1TextBox.Visible = False + Me.FUNCTION2TextBox.Visible = False + Me.Function1Label.Visible = False + Me.Function2Label.Visible = False + Me.Function1Label.Visible = False + Me.Function2Label.Visible = False + Me.FUNCTION1TextBox.Visible = False + Me.FUNCTION2TextBox.Visible = False End Select End If @@ -665,10 +701,18 @@ End Sub Private Sub TBDD_INDEX_MAN_POSTPROCESSINGBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBDD_INDEX_MAN_POSTPROCESSINGBindingSource.AddingNew + + enableControls(XtraTabPage6) MyDataset.TBDD_INDEX_MAN_POSTPROCESSING.ADDED_WHOColumn.DefaultValue = Environment.UserName MyDataset.TBDD_INDEX_MAN_POSTPROCESSING.SEQUENCEColumn.DefaultValue = 1 End Sub - + Sub enableControls(obj As Object) + For Each element In obj.Controls + If element.enabled = False Then + element.enabled = True + End If + Next + End Sub Private Sub ToolStripButton31_Click(sender As Object, e As EventArgs) Handles ToolStripButton31.Click Load_PostProcessing(Me.DOKART_GUIDTextBox.Text) End Sub @@ -924,4 +968,34 @@ Private Sub XtraTabControl2_SelectedPageChanging(sender As Object, e As DevExpress.XtraTab.TabPageChangingEventArgs) Handles XtraTabControl2.SelectedPageChanging Save_Dokumentart() End Sub + + Private Sub lblFileparameter_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lbFileparameter.SelectedIndexChanged + If Not lbFileparameter.SelectedItem Is Nothing Then + If GUIDAUTO_INDEXTextbox.Text <> "" Then + Dim value As String + Select Case lbFileparameter.SelectedItem.ToString.ToUpper + Case "Dateiname (mit Endung)".ToUpper + value = "$filename_ext" + Case "Dateiname (ohne Endung)".ToUpper + value = "$filename" + Case "Datei Erstelldatum".ToUpper + value = "$FileCreateDate" + Case "Datei Erstellt wer".ToUpper + value = "$FileCreatedWho" + Case "Aktuelles Datum (DD.MM.YYYY)".ToUpper + value = "$DateDDMMYYY" + End Select + If value <> "" Then + VALUETextBox.Text = value + Save_IndexAuto() + End If + Else + MsgBox("Bitte fügen Sie zuerst einen neuen Index hinzu!", MsgBoxStyle.Information) + End If + End If + End Sub + + Private Sub TBDD_USERBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBDD_USERBindingSource.AddingNew + enableControls(XtraTabPage2) + End Sub End Class \ No newline at end of file diff --git a/Global_Indexer/frmConfig_Basic.designer.vb b/Global_Indexer/frmConfig_Basic.designer.vb index 49d9149..690745e 100644 --- a/Global_Indexer/frmConfig_Basic.designer.vb +++ b/Global_Indexer/frmConfig_Basic.designer.vb @@ -36,7 +36,10 @@ Partial Class frmConfig_Basic Me.txtServer = New System.Windows.Forms.TextBox() Me.txtUser = New System.Windows.Forms.TextBox() Me.txtPasswort = New System.Windows.Forms.TextBox() + Me.BtnConnect = New System.Windows.Forms.Button() Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.btnApplicationFolder = New System.Windows.Forms.Button() + Me.btnopenlog = New System.Windows.Forms.Button() Me.CheckBox1 = New System.Windows.Forms.CheckBox() Me.Button1 = New System.Windows.Forms.Button() Me.txtuniversalViewer = New System.Windows.Forms.TextBox() @@ -50,14 +53,11 @@ Partial Class frmConfig_Basic Me.btnFW_Desktop = New System.Windows.Forms.Button() Me.txtFolderWatch = New System.Windows.Forms.TextBox() Me.Label6 = New System.Windows.Forms.Label() + Me.btnstartstop2 = New System.Windows.Forms.Button() + Me.btnstartstop1 = New System.Windows.Forms.Button() Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() Me.CheckBox3 = New System.Windows.Forms.CheckBox() Me.CheckBox2 = New System.Windows.Forms.CheckBox() - Me.BtnConnect = New System.Windows.Forms.Button() - Me.btnApplicationFolder = New System.Windows.Forms.Button() - Me.btnopenlog = New System.Windows.Forms.Button() - Me.btnstartstop2 = New System.Windows.Forms.Button() - Me.btnstartstop1 = New System.Windows.Forms.Button() Me.TabControl1.SuspendLayout() Me.TabPage1.SuspendLayout() Me.TabPage2.SuspendLayout() @@ -197,6 +197,18 @@ Partial Class frmConfig_Basic Me.txtPasswort.TabIndex = 38 Me.txtPasswort.UseSystemPasswordChar = True ' + 'BtnConnect + ' + Me.BtnConnect.Image = Global.Global_Indexer.My.Resources.Resources.database_go + Me.BtnConnect.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.BtnConnect.Location = New System.Drawing.Point(302, 82) + Me.BtnConnect.Name = "BtnConnect" + Me.BtnConnect.Size = New System.Drawing.Size(253, 25) + Me.BtnConnect.TabIndex = 40 + Me.BtnConnect.Text = "Verbindung zur Datenbank herstellen" + Me.BtnConnect.TextAlign = System.Drawing.ContentAlignment.MiddleRight + Me.BtnConnect.UseVisualStyleBackColor = True + ' 'TabPage2 ' Me.TabPage2.Controls.Add(Me.CheckBox3) @@ -215,6 +227,30 @@ Partial Class frmConfig_Basic Me.TabPage2.Text = "Diverse Einstellungen" Me.TabPage2.UseVisualStyleBackColor = True ' + 'btnApplicationFolder + ' + Me.btnApplicationFolder.Image = Global.Global_Indexer.My.Resources.Resources.folder_go + Me.btnApplicationFolder.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.btnApplicationFolder.Location = New System.Drawing.Point(11, 134) + Me.btnApplicationFolder.Name = "btnApplicationFolder" + Me.btnApplicationFolder.Size = New System.Drawing.Size(165, 23) + Me.btnApplicationFolder.TabIndex = 5 + Me.btnApplicationFolder.Text = "Öffne AppFolder User" + Me.btnApplicationFolder.TextAlign = System.Drawing.ContentAlignment.MiddleRight + Me.btnApplicationFolder.UseVisualStyleBackColor = True + ' + 'btnopenlog + ' + Me.btnopenlog.Image = Global.Global_Indexer.My.Resources.Resources.folder_go + Me.btnopenlog.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.btnopenlog.Location = New System.Drawing.Point(11, 163) + Me.btnopenlog.Name = "btnopenlog" + Me.btnopenlog.Size = New System.Drawing.Size(165, 23) + Me.btnopenlog.TabIndex = 4 + Me.btnopenlog.Text = "Öffne Log-Verzeichnis" + Me.btnopenlog.TextAlign = System.Drawing.ContentAlignment.MiddleRight + Me.btnopenlog.UseVisualStyleBackColor = True + ' 'CheckBox1 ' Me.CheckBox1.AutoSize = True @@ -340,6 +376,32 @@ Partial Class frmConfig_Basic Me.Label6.TabIndex = 0 Me.Label6.Text = "Definieren Sie hier den Ordner welcher überwacht wird:" ' + 'btnstartstop2 + ' + Me.btnstartstop2.Image = Global.Global_Indexer.My.Resources.Resources.bell_go + Me.btnstartstop2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.btnstartstop2.Location = New System.Drawing.Point(408, 169) + Me.btnstartstop2.Margin = New System.Windows.Forms.Padding(4) + Me.btnstartstop2.Name = "btnstartstop2" + Me.btnstartstop2.Size = New System.Drawing.Size(205, 25) + Me.btnstartstop2.TabIndex = 9 + Me.btnstartstop2.Text = "Überwachung starten" + Me.btnstartstop2.TextAlign = System.Drawing.ContentAlignment.MiddleRight + Me.btnstartstop2.UseVisualStyleBackColor = True + ' + 'btnstartstop1 + ' + Me.btnstartstop1.Image = Global.Global_Indexer.My.Resources.Resources.bell_go + Me.btnstartstop1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.btnstartstop1.Location = New System.Drawing.Point(408, 57) + Me.btnstartstop1.Margin = New System.Windows.Forms.Padding(4) + Me.btnstartstop1.Name = "btnstartstop1" + Me.btnstartstop1.Size = New System.Drawing.Size(205, 25) + Me.btnstartstop1.TabIndex = 5 + Me.btnstartstop1.Text = "Überwachung starten" + Me.btnstartstop1.TextAlign = System.Drawing.ContentAlignment.MiddleRight + Me.btnstartstop1.UseVisualStyleBackColor = True + ' 'OpenFileDialog1 ' Me.OpenFileDialog1.FileName = "OpenFileDialog1" @@ -369,68 +431,6 @@ Partial Class frmConfig_Basic Me.CheckBox2.Text = "Meldungsfenster nach Erfolg anzeigen?" Me.CheckBox2.UseVisualStyleBackColor = True ' - 'BtnConnect - ' - Me.BtnConnect.Image = Global.Global_Indexer.My.Resources.Resources.database_go - Me.BtnConnect.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.BtnConnect.Location = New System.Drawing.Point(302, 82) - Me.BtnConnect.Name = "BtnConnect" - Me.BtnConnect.Size = New System.Drawing.Size(253, 25) - Me.BtnConnect.TabIndex = 40 - Me.BtnConnect.Text = "Verbindung zur Datenbank herstellen" - Me.BtnConnect.TextAlign = System.Drawing.ContentAlignment.MiddleRight - Me.BtnConnect.UseVisualStyleBackColor = True - ' - 'btnApplicationFolder - ' - Me.btnApplicationFolder.Image = Global.Global_Indexer.My.Resources.Resources.folder_go - Me.btnApplicationFolder.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btnApplicationFolder.Location = New System.Drawing.Point(11, 134) - Me.btnApplicationFolder.Name = "btnApplicationFolder" - Me.btnApplicationFolder.Size = New System.Drawing.Size(165, 23) - Me.btnApplicationFolder.TabIndex = 5 - Me.btnApplicationFolder.Text = "Öffne AppFolder User" - Me.btnApplicationFolder.TextAlign = System.Drawing.ContentAlignment.MiddleRight - Me.btnApplicationFolder.UseVisualStyleBackColor = True - ' - 'btnopenlog - ' - Me.btnopenlog.Image = Global.Global_Indexer.My.Resources.Resources.folder_go - Me.btnopenlog.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btnopenlog.Location = New System.Drawing.Point(11, 163) - Me.btnopenlog.Name = "btnopenlog" - Me.btnopenlog.Size = New System.Drawing.Size(165, 23) - Me.btnopenlog.TabIndex = 4 - Me.btnopenlog.Text = "Öffne Log-Verzeichnis" - Me.btnopenlog.TextAlign = System.Drawing.ContentAlignment.MiddleRight - Me.btnopenlog.UseVisualStyleBackColor = True - ' - 'btnstartstop2 - ' - Me.btnstartstop2.Image = Global.Global_Indexer.My.Resources.Resources.bell_go - Me.btnstartstop2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btnstartstop2.Location = New System.Drawing.Point(408, 169) - Me.btnstartstop2.Margin = New System.Windows.Forms.Padding(4) - Me.btnstartstop2.Name = "btnstartstop2" - Me.btnstartstop2.Size = New System.Drawing.Size(205, 25) - Me.btnstartstop2.TabIndex = 9 - Me.btnstartstop2.Text = "Überwachung starten" - Me.btnstartstop2.TextAlign = System.Drawing.ContentAlignment.MiddleRight - Me.btnstartstop2.UseVisualStyleBackColor = True - ' - 'btnstartstop1 - ' - Me.btnstartstop1.Image = Global.Global_Indexer.My.Resources.Resources.bell_go - Me.btnstartstop1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btnstartstop1.Location = New System.Drawing.Point(408, 57) - Me.btnstartstop1.Margin = New System.Windows.Forms.Padding(4) - Me.btnstartstop1.Name = "btnstartstop1" - Me.btnstartstop1.Size = New System.Drawing.Size(205, 25) - Me.btnstartstop1.TabIndex = 5 - Me.btnstartstop1.Text = "Überwachung starten" - Me.btnstartstop1.TextAlign = System.Drawing.ContentAlignment.MiddleRight - Me.btnstartstop1.UseVisualStyleBackColor = True - ' 'frmConfig_Basic ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/Global_Indexer/frmHistory.Designer.vb b/Global_Indexer/frmHistory.Designer.vb index 9942722..47eee71 100644 --- a/Global_Indexer/frmHistory.Designer.vb +++ b/Global_Indexer/frmHistory.Designer.vb @@ -36,6 +36,9 @@ Partial Class frmHistory Me.BindingNavigatorMoveNextItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorMoveLastItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorSeparator2 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton() + Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton() + Me.ToolStripButton3 = New System.Windows.Forms.ToolStripButton() Me.TBGI_HISTORYTableAdapter = New Global_Indexer.MyDatasetTableAdapters.TBGI_HISTORYTableAdapter() Me.TableAdapterManager = New Global_Indexer.MyDatasetTableAdapters.TableAdapterManager() Me.GridControl1 = New DevExpress.XtraGrid.GridControl() @@ -44,8 +47,6 @@ Partial Class frmHistory Me.colFILENAME_ORIGINAL = New DevExpress.XtraGrid.Columns.GridColumn() Me.colFILENAME_NEW = New DevExpress.XtraGrid.Columns.GridColumn() Me.colADDED_WHEN = New DevExpress.XtraGrid.Columns.GridColumn() - Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton() - Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton() CType(Me.TBGI_HISTORYBindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit() Me.TBGI_HISTORYBindingNavigator.SuspendLayout() CType(Me.TBGI_HISTORYBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() @@ -59,9 +60,9 @@ Partial Class frmHistory Me.TBGI_HISTORYBindingNavigator.AddNewItem = Nothing Me.TBGI_HISTORYBindingNavigator.BindingSource = Me.TBGI_HISTORYBindingSource Me.TBGI_HISTORYBindingNavigator.CountItem = Me.BindingNavigatorCountItem - Me.TBGI_HISTORYBindingNavigator.CountItemFormat = "von {0} heute indexierten Dateien" + Me.TBGI_HISTORYBindingNavigator.CountItemFormat = "von {0} indexierten Dateien" Me.TBGI_HISTORYBindingNavigator.DeleteItem = Nothing - Me.TBGI_HISTORYBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.ToolStripButton1, Me.ToolStripButton2}) + Me.TBGI_HISTORYBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.ToolStripButton1, Me.ToolStripButton2, Me.ToolStripButton3}) Me.TBGI_HISTORYBindingNavigator.Location = New System.Drawing.Point(0, 0) Me.TBGI_HISTORYBindingNavigator.MoveFirstItem = Me.BindingNavigatorMoveFirstItem Me.TBGI_HISTORYBindingNavigator.MoveLastItem = Me.BindingNavigatorMoveLastItem @@ -86,8 +87,8 @@ Partial Class frmHistory 'BindingNavigatorCountItem ' Me.BindingNavigatorCountItem.Name = "BindingNavigatorCountItem" - Me.BindingNavigatorCountItem.Size = New System.Drawing.Size(181, 22) - Me.BindingNavigatorCountItem.Text = "von {0} heute indexierten Dateien" + Me.BindingNavigatorCountItem.Size = New System.Drawing.Size(148, 22) + Me.BindingNavigatorCountItem.Text = "von {0} indexierten Dateien" Me.BindingNavigatorCountItem.ToolTipText = "Die Gesamtanzahl der Elemente." ' 'BindingNavigatorMoveFirstItem @@ -150,6 +151,31 @@ Partial Class frmHistory Me.BindingNavigatorSeparator2.Name = "BindingNavigatorSeparator2" Me.BindingNavigatorSeparator2.Size = New System.Drawing.Size(6, 25) ' + 'ToolStripButton1 + ' + Me.ToolStripButton1.Image = Global.Global_Indexer.My.Resources.Resources.refresh_16xLG + Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripButton1.Name = "ToolStripButton1" + Me.ToolStripButton1.Size = New System.Drawing.Size(122, 22) + Me.ToolStripButton1.Text = "Alle Dateien laden" + ' + 'ToolStripButton2 + ' + Me.ToolStripButton2.Image = Global.Global_Indexer.My.Resources.Resources.refresh_16xLG + Me.ToolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripButton2.Name = "ToolStripButton2" + Me.ToolStripButton2.Size = New System.Drawing.Size(144, 22) + Me.ToolStripButton2.Text = "Heutige Dateien laden" + ' + 'ToolStripButton3 + ' + Me.ToolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripButton3.Image = Global.Global_Indexer.My.Resources.Resources.Excel_25ixel + Me.ToolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripButton3.Name = "ToolStripButton3" + Me.ToolStripButton3.Size = New System.Drawing.Size(23, 22) + Me.ToolStripButton3.Text = "Export Excel" + ' 'TBGI_HISTORYTableAdapter ' Me.TBGI_HISTORYTableAdapter.ClearBeforeFill = True @@ -236,22 +262,6 @@ Partial Class frmHistory Me.colADDED_WHEN.VisibleIndex = 3 Me.colADDED_WHEN.Width = 140 ' - 'ToolStripButton1 - ' - Me.ToolStripButton1.Image = Global.Global_Indexer.My.Resources.Resources.refresh_16xLG - Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripButton1.Name = "ToolStripButton1" - Me.ToolStripButton1.Size = New System.Drawing.Size(122, 22) - Me.ToolStripButton1.Text = "Alle Dateien laden" - ' - 'ToolStripButton2 - ' - Me.ToolStripButton2.Image = Global.Global_Indexer.My.Resources.Resources.refresh_16xLG - Me.ToolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripButton2.Name = "ToolStripButton2" - Me.ToolStripButton2.Size = New System.Drawing.Size(117, 22) - Me.ToolStripButton2.Text = "ToolStripButton2" - ' 'frmHistory ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -295,4 +305,5 @@ Partial Class frmHistory Friend WithEvents colADDED_WHEN As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton Friend WithEvents ToolStripButton2 As System.Windows.Forms.ToolStripButton + Friend WithEvents ToolStripButton3 As System.Windows.Forms.ToolStripButton End Class diff --git a/Global_Indexer/frmHistory.vb b/Global_Indexer/frmHistory.vb index a13f5fd..2b3bb62 100644 --- a/Global_Indexer/frmHistory.vb +++ b/Global_Indexer/frmHistory.vb @@ -1,10 +1,54 @@ Public Class frmHistory Private Sub frmHistory_Load(sender As Object, e As EventArgs) Handles MyBase.Load - 'TODO: Diese Codezeile lädt Daten in die Tabelle "MyDataset.TBGI_HISTORY". Sie können sie bei Bedarf verschieben oder entfernen. - Dim user As String = Environment.UserDomainName & "\" & Environment.UserName - TBGI_HISTORYTableAdapter.Connection.ConnectionString = MyConnectionString - Me.TBGI_HISTORYTableAdapter.Fill(Me.MyDataset.TBGI_HISTORY, user) + LoadData_Today() + End Sub + + Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click + Try + 'TODO: Diese Codezeile lädt Daten in die Tabelle "MyDataset.TBGI_HISTORY". Sie können sie bei Bedarf verschieben oder entfernen. + Dim user As String = Environment.UserDomainName & "\" & Environment.UserName + TBGI_HISTORYTableAdapter.Connection.ConnectionString = MyConnectionString + Me.TBGI_HISTORYTableAdapter.FillByAll(Me.MyDataset.TBGI_HISTORY, user) + Catch ex As Exception + MsgBox("Error loading All Data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + End Try + End Sub + + Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles ToolStripButton2.Click + LoadData_Today() + End Sub + Sub LoadData_Today() + Try + 'TODO: Diese Codezeile lädt Daten in die Tabelle "MyDataset.TBGI_HISTORY". Sie können sie bei Bedarf verschieben oder entfernen. + Dim user As String = Environment.UserDomainName & "\" & Environment.UserName + TBGI_HISTORYTableAdapter.Connection.ConnectionString = MyConnectionString + Me.TBGI_HISTORYTableAdapter.FillToday(Me.MyDataset.TBGI_HISTORY, user) + Catch ex As Exception + MsgBox("Error loading Today Data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + End Try + End Sub + + Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs) Handles ToolStripButton3.Click + Dim saveFileDialog1 As New SaveFileDialog + saveFileDialog1.Filter = "Excel (*.xls)|*.xls|Excel (*.xlsx)|*.xlsx" + saveFileDialog1.Title = "Export to Excel:" + saveFileDialog1.ShowDialog() + If saveFileDialog1.FileName <> "" Then + Cursor = Cursors.WaitCursor + If saveFileDialog1.FileName.EndsWith("xlsx") Then + GridView1.ExportToXlsx(saveFileDialog1.FileName) + Else + GridView1.ExportToXls(saveFileDialog1.FileName) + End If + Dim result As MsgBoxResult + result = MessageBox.Show("Datei wurde erstellt! Wollen Sie diese nun öffnen?", "Erfolgsmeldung:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + If result = MsgBoxResult.Yes Then + Process.Start(saveFileDialog1.FileName) + End If + + End If + Cursor = Cursors.Default End Sub End Class \ No newline at end of file diff --git a/Global_Indexer/frmIndex.designer.vb b/Global_Indexer/frmIndex.designer.vb index 9b0a8f8..4415c54 100644 --- a/Global_Indexer/frmIndex.designer.vb +++ b/Global_Indexer/frmIndex.designer.vb @@ -38,7 +38,7 @@ Partial Class frmIndex Me.chkdelete_origin = New System.Windows.Forms.CheckBox() Me.Label2 = New System.Windows.Forms.Label() Me.txtIndexfilepath = New System.Windows.Forms.TextBox() - Me.OK_Button = New System.Windows.Forms.Button() + Me.btnOK = New System.Windows.Forms.Button() Me.MyDataset = New Global_Indexer.MyDataset() Me.VWDDINDEX_MANBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.VWDDINDEX_MANTableAdapter = New Global_Indexer.MyDatasetTableAdapters.VWDDINDEX_MANTableAdapter() @@ -220,7 +220,7 @@ Partial Class frmIndex Me.Panel2.Controls.Add(Me.chkdelete_origin) Me.Panel2.Controls.Add(Me.Label2) Me.Panel2.Controls.Add(Me.txtIndexfilepath) - Me.Panel2.Controls.Add(Me.OK_Button) + Me.Panel2.Controls.Add(Me.btnOK) Me.Panel2.Dock = System.Windows.Forms.DockStyle.Bottom Me.Panel2.Location = New System.Drawing.Point(0, 373) Me.Panel2.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) @@ -277,19 +277,19 @@ Partial Class frmIndex Me.txtIndexfilepath.Size = New System.Drawing.Size(519, 34) Me.txtIndexfilepath.TabIndex = 1 ' - 'OK_Button + 'btnOK ' - Me.OK_Button.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.OK_Button.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.OK_Button.Image = Global.Global_Indexer.My.Resources.Resources.Go - Me.OK_Button.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.OK_Button.Location = New System.Drawing.Point(387, 6) - Me.OK_Button.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) - Me.OK_Button.Name = "OK_Button" - Me.OK_Button.Size = New System.Drawing.Size(134, 30) - Me.OK_Button.TabIndex = 0 - Me.OK_Button.Text = "Indexiere Datei" - Me.OK_Button.TextAlign = System.Drawing.ContentAlignment.MiddleRight + Me.btnOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnOK.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.btnOK.Image = Global.Global_Indexer.My.Resources.Resources.Go + Me.btnOK.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.btnOK.Location = New System.Drawing.Point(354, 6) + Me.btnOK.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) + Me.btnOK.Name = "btnOK" + Me.btnOK.Size = New System.Drawing.Size(167, 30) + Me.btnOK.TabIndex = 0 + Me.btnOK.Text = "Indexiere Datei" + Me.btnOK.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'MyDataset ' @@ -697,10 +697,10 @@ Partial Class frmIndex CType(Me.PdfBarController1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PdfBarController2, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) - Me.PerformLayout + Me.PerformLayout() -End Sub - Friend WithEvents OK_Button As System.Windows.Forms.Button + End Sub + Friend WithEvents btnOK As System.Windows.Forms.Button Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents cmbDokumentart As System.Windows.Forms.ComboBox diff --git a/Global_Indexer/frmIndex.resx b/Global_Indexer/frmIndex.resx index e9170d3..5f2afa0 100644 --- a/Global_Indexer/frmIndex.resx +++ b/Global_Indexer/frmIndex.resx @@ -120,6 +120,9 @@ 17, 212 + + 17, 212 + 17, 17 @@ -147,6 +150,12 @@ 1212, 173 + + 1477, 173 + + + 1212, 173 + 244, 56 diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb index c1bb607..40993cd 100644 --- a/Global_Indexer/frmIndex.vb +++ b/Global_Indexer/frmIndex.vb @@ -5,6 +5,8 @@ Imports System.Text.RegularExpressions Imports Independentsoft Imports Oracle.ManagedDataAccess.Client Imports System.Text +Imports System.Security.AccessControl +Imports System.Security.Principal Public Class frmIndex #Region "+++++ Variablen ++++++" @@ -155,7 +157,7 @@ Public Class frmIndex g.Dispose() End If Get_NextComboBoxResults(cmb) - + SendKeys.Send("{TAB}") End If @@ -334,7 +336,7 @@ Public Class frmIndex ' Return 99 ' End Try ' End Function - Function GetManIndex_Value(indexname As String) + Function GetManIndex_Value(indexname As String, RequestFor As String) Try Dim DT As DataTable Dim DR As DataRow @@ -342,18 +344,40 @@ Public Class frmIndex For Each DR In DT.Rows If DR.Item("INDEXNAME").ToString.ToLower = indexname.ToLower Then If DR.Item("Indexiert") = True Then - If DR.Item("Indexwert").ToString <> String.Empty Then - If LogErrorsOnly = False Then ClassLogger.Add(" ...Manueller Index: " & indexname, False) - If LogErrorsOnly = False Then ClassLogger.Add(" ...Zurückgegebener manueller Indexwert: " & DR.Item("Indexwert"), False) - Return DR.Item("Indexwert") - Else - Dim optional_index As Boolean = ClassDatabase.Execute_Scalar("SELECT OPTIONAL FROM TBDD_INDEX_MAN WHERE DOK_ID = " & CURRENT_DOKART_ID & " AND UPPER(NAME) = UPPER('" & indexname & "')", MyConnectionString, True) - If optional_index = False Then - ClassLogger.Add(" >> Achtung, der Indexwert des manuellen Indexes '" & indexname & "' ist String.empty!", False) - showlblhinweis("Indexiert = True - Der Index: " & DR.Item("INDEXNAME") & " wurde nicht ordnungsgemäss indexiert! - Automatischer Index konnte nicht gesetzt werden!") - End If - Return "" - End If + If LogErrorsOnly = False Then ClassLogger.Add(" ...Manueller Index: " & indexname, False) + Select Case RequestFor + Case "FILE" + If DR.Item("Indexwert_File").ToString <> String.Empty Then + If LogErrorsOnly = False Then ClassLogger.Add(" ...Es liegt ein separater nachbearbeiteter Wert für die Dateibenennung vor: " & DR.Item("Indexwert_File").ToString, False) + If LogErrorsOnly = False Then ClassLogger.Add(" ...Zurückgegebener NachbearbeitungsWert: " & DR.Item("Indexwert_File"), False) + Return DR.Item("Indexwert_File") + Else + If DR.Item("Indexwert").ToString <> String.Empty Then + If LogErrorsOnly = False Then ClassLogger.Add(" ...Zurückgegebener manueller Indexwert: " & DR.Item("Indexwert"), False) + Console.WriteLine("Rückgabe manueller wert: " & DR.Item("Indexwert")) + Return DR.Item("Indexwert") + Else + Dim optional_index As Boolean = ClassDatabase.Execute_Scalar("SELECT OPTIONAL FROM TBDD_INDEX_MAN WHERE DOK_ID = " & CURRENT_DOKART_ID & " AND UPPER(NAME) = UPPER('" & indexname & "')", MyConnectionString, True) + If optional_index = False Then + ClassLogger.Add(" >> Achtung, der Indexwert des manuellen Indexes '" & indexname & "' ist String.empty!", False) + showlblhinweis("Indexiert = True - Der Index: " & DR.Item("INDEXNAME") & " wurde nicht ordnungsgemäss indexiert! - Automatischer Index konnte nicht gesetzt werden!") + End If + Return "" + End If + End If + Case Else + If DR.Item("Indexwert").ToString <> String.Empty Then + If LogErrorsOnly = False Then ClassLogger.Add(" ...Zurückgegebener manueller Indexwert: " & DR.Item("Indexwert"), False) + Return DR.Item("Indexwert") + Else + Dim optional_index As Boolean = ClassDatabase.Execute_Scalar("SELECT OPTIONAL FROM TBDD_INDEX_MAN WHERE DOK_ID = " & CURRENT_DOKART_ID & " AND UPPER(NAME) = UPPER('" & indexname & "')", MyConnectionString, True) + If optional_index = False Then + ClassLogger.Add(" >> Achtung, der Indexwert des manuellen Indexes '" & indexname & "' ist String.empty!", False) + showlblhinweis("Indexiert = True - Der Index: " & DR.Item("INDEXNAME") & " wurde nicht ordnungsgemäss indexiert! - Automatischer Index konnte nicht gesetzt werden!") + End If + Return "" + End If + End Select Else showlblhinweis("Der Index: " & DR.Item("INDEXNAME") & " wurde nicht ordnungsgemäss indexiert! - Automatischer Index konnte nicht gesetzt werden!") Return "" @@ -467,7 +491,7 @@ Public Class frmIndex runinLZ = True If LogErrorsOnly = False Then ClassLogger.Add(" ...sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False) End If - + Dim newCMB As ComboBox @@ -529,9 +553,9 @@ Public Class frmIndex End If End If - - - + + + End If @@ -717,25 +741,39 @@ Public Class frmIndex End Function - Sub Indexwert_Postprocessing(indexname As String, wert As String) + Sub Indexwert_Postprocessing(indexname As String, wert_in As String) Try Dim DT As DataTable Dim DR As DataRow DT = MyDataset.VWDDINDEX_MAN + Dim value_post As String = "" For Each DR In DT.Rows If DR.Item("INDEXNAME") = indexname Then Dim idxid As Integer = DR.Item("GUID") If idxid > 0 Then + ' In jedem Fall schon mal den Wert einfügen + DR.Item("Indexwert") = wert_in 'Die Nachbearbeitungsschritte laden - Dim DTNB As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING WHERE IDXMAN_ID = " & idxid & " ORDER BY SEQUENCE") + 'FILE AND INDEX + 'Zuerst nur die Fälle für die Variante ONLY FILE/FOLDER + Dim DTNB As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING WHERE IDXMAN_ID = " & idxid & " AND VARIANT = 'ONLY FILE/FOLDER' ORDER BY SEQUENCE") If DTNB Is Nothing = False Then If DTNB.Rows.Count > 0 Then - wert = ClassPostprocessing.Get_Nachbearbeitung_Wert(wert, DTNB) + value_post = ClassPostprocessing.Get_Nachbearbeitung_Wert(wert_in, DTNB) + DR.Item("Indexwert") = wert_in + DR.Item("Indexwert_File") = value_post + End If + End If + 'Jetzt die Fälle für die Variante FILE AND INDEX + DTNB = Nothing + DTNB = ClassDatabase.Return_Datatable("SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING WHERE IDXMAN_ID = " & idxid & " AND VARIANT = 'FILE AND INDEX' ORDER BY SEQUENCE") + If DTNB Is Nothing = False Then + If DTNB.Rows.Count > 0 Then + value_post = ClassPostprocessing.Get_Nachbearbeitung_Wert(wert_in, DTNB) + DR.Item("Indexwert") = value_post End If End If - End If - DR.Item("Indexwert") = wert DR.Item("Indexiert") = True End If Next @@ -823,7 +861,7 @@ Public Class frmIndex Case "M" If LogErrorsOnly = False Then ClassLogger.Add(" ...Manueller Index wird geprüft...", False) Dim Indexname = element.Value.Substring(3, element.Value.Length - 4) - Dim value As String = GetManIndex_Value(element.Value.Substring(3, element.Value.Length - 4)) + Dim value As String = GetManIndex_Value(element.Value.Substring(3, element.Value.Length - 4), "FILE") If value <> String.Empty Then DATEINAME = DATEINAME.Replace(element.Value, value) NewFileString = DATEINAME @@ -848,7 +886,7 @@ Public Class frmIndex AnzahlIndexe += 1 sql_history_Index_Values = sql_history_Index_Values & ", '" & value & "'" End If - + Else ClassLogger.Add(" >> Der Indexvalue für Index '" & Indexname & "' ist String.Empty", False) err = True @@ -945,9 +983,12 @@ Public Class frmIndex 'Manuelle Indexe Indexieren Dim DTMan As DataTable = MyDataset.VWDDINDEX_MAN If DTMan.Rows.Count > 0 Then + Dim Count As Integer = 0 For Each row As DataRow In DTMan.Rows - If CBool(row.Item("Indexiert")) = True And row.Item("Indexwert").ToString <> "" Then + Dim idxvalue = row.Item("Indexwert") + Dim indexname = row.Item("WD_INDEX").ToString + If CBool(row.Item("Indexiert")) = True And idxvalue.ToString <> "" Then 'Den Indexwert zwischenspeichern Dim DTTemp As DataTable = MyDataset.TBTEMP_INDEXRESULTS Dim rowexists As Boolean = False @@ -969,8 +1010,8 @@ Public Class frmIndex End If - Dim indexname = row.Item("WD_INDEX").ToString - Dim idxvalue = row.Item("Indexwert") + + If LogErrorsOnly = False Then ClassLogger.Add(" ...Manueller Indexvalue: " & idxvalue.ToString, False) Count += 1 indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, idxvalue) @@ -988,8 +1029,6 @@ Public Class frmIndex If DTAut.Rows.Count > 0 Then Dim Count As Integer = 0 For Each row As DataRow In DTAut.Rows - Console.WriteLine(row.Item("Indexwert")) - Console.WriteLine(row.Item("Indexiert").ToString) If CBool(row.Item("Indexiert")) = True And row.Item("Indexwert").ToString <> "" Then Dim indexname = row.Item("INDEXNAME").ToString Dim idxvalue = row.Item("Indexwert") @@ -1299,7 +1338,7 @@ Public Class frmIndex 'If Not IsNothing(DocView) And viewer_string <> "" Then ' DocView.CloseView(viewer_string, 0) 'Else - + 'End If End Sub Private Sub frmIndex_Load(sender As Object, e As System.EventArgs) Handles Me.Load @@ -1339,6 +1378,7 @@ Public Class frmIndex End If Load_String() MULTIFILES = ClassDatabase.Execute_Scalar("SELECT COUNT(*) FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')", MyConnectionString, True) + MULTIINDEXING_ACTIVE = False If MULTIFILES > 0 Then chkMultiIndexer.Text = "Multi-Indexing - Alle nachfolgenden Dateien (" & MULTIFILES & ") identisch indexieren" chkMultiIndexer.Checked = False @@ -1505,12 +1545,6 @@ Public Class frmIndex cmbName.Items.Add(Value) End Sub - ' - - ' Private Sub lblhinweis_Click(sender As System.Object, e As System.EventArgs) Handles lblhinweis.Click - - ' End Sub - Function FillIndexe_Autom(dokart_id As Integer) Try Me.VWINDEX_AUTOMTableAdapter.Fill(Me.MyDataset.VWDDINDEX_AUTOM, CURRENT_DOKART_ID) @@ -1518,8 +1552,9 @@ Public Class frmIndex If DT_INDEXAUTOM.Rows.Count > 0 Then ' MsgBox(DT.Rows.Count.ToString) For Each DR_AUTOINDEX As DataRow In DT_INDEXAUTOM.Rows - If LogErrorsOnly = False Then ClassLogger.Add(" ...Build Automatischer Index '" & DR_AUTOINDEX.Item("INDEXNAME") & "'", False) - If DR_AUTOINDEX.Item("SQL_RESULT").ToString <> String.Empty Then + Dim indexname As String = DR_AUTOINDEX.Item("INDEXNAME") + If LogErrorsOnly = False Then ClassLogger.Add(" ...Build Automatischer Index '" & indexname & "'", False) + If DR_AUTOINDEX.Item("SQL_RESULT").ToString <> String.Empty And CBool(DR_AUTOINDEX.Item("SQL_ACTIVE")) = True Then ' Regulären Ausdruck zum Auslesen der windream-Indexe definieren Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}" ' SQL-String für aktuellen INdex laden @@ -1538,7 +1573,7 @@ Public Class frmIndex Dim elementOhneSonderzeichen As String = element.Value.Substring(2, element.Value.Length - 3) If LogErrorsOnly = False Then ClassLogger.Add(" ...elementOhneSonderzeichen: '" & elementOhneSonderzeichen & "'", False) 'den Platzhalter im SQL-String durch den Wert ersetzen - Dim manIndexwert As String = GetManIndex_Value(elementOhneSonderzeichen) + Dim manIndexwert As String = GetManIndex_Value(elementOhneSonderzeichen, "IDX_AUTO") If manIndexwert <> "" Then SqlString = SqlString.Replace(element.Value, manIndexwert) If LogErrorsOnly = False Then ClassLogger.Add(" ...zusammengesetzter SQL-String: " & SqlString, False) @@ -1562,10 +1597,35 @@ Public Class frmIndex Else If Not IsDBNull(DR_AUTOINDEX.Item("VALUE")) Then If DR_AUTOINDEX.Item("VALUE") <> "" Then - If LogErrorsOnly = False Then ClassLogger.Add(" ...Manueller Indexwert wird gespeichert: " & DR_AUTOINDEX.Item("VALUE"), False) - Console.WriteLine(DR_AUTOINDEX.Item("VALUE")) + Dim DEFAULTVALUE As String = DR_AUTOINDEX.Item("VALUE") + 'Indexierung mit WindowsVariable + If DEFAULTVALUE.StartsWith("$") Then + If LogErrorsOnly = False Then ClassLogger.Add(" ...Indexierung mit einer Windowsvariable: '" & DEFAULTVALUE & "'", False) + Select Case DEFAULTVALUE.ToUpper + Case "$filename_ext".ToUpper + DEFAULTVALUE = Path.GetFileName(CURRENT_WORKFILE) + Case "$filename".ToUpper + DEFAULTVALUE = Path.GetFileNameWithoutExtension(CURRENT_WORKFILE) + Case "$FileCreateDate".ToUpper + Dim FI As New FileInfo(CURRENT_WORKFILE) + Dim CreationDate As Date = FI.CreationTime + DEFAULTVALUE = CreationDate.ToShortDateString + Case "$FileCreatedWho".ToUpper + Dim fs As FileSecurity = File.GetAccessControl(CURRENT_WORKFILE) + Dim sid As IdentityReference = fs.GetOwner(GetType(SecurityIdentifier)) + Dim ntaccount As IdentityReference = sid.Translate(GetType(NTAccount)) + Dim owner As String = ntaccount.ToString() + DEFAULTVALUE = owner + Case "$DateDDMMYYY".ToUpper + DEFAULTVALUE = System.DateTime.Now.ToShortDateString + End Select + If LogErrorsOnly = False Then ClassLogger.Add(" ...Ergebnis der Windowsvariable: '" & DEFAULTVALUE & "'", False) + Else + If LogErrorsOnly = False Then ClassLogger.Add(" ...Indexierung mit einem Festen Wert: '" & DEFAULTVALUE & "'", False) + End If + 'Den Wert in der Zwischentabelle speichern DR_AUTOINDEX.Item("Indexiert") = True - DR_AUTOINDEX.Item("Indexwert") = DR_AUTOINDEX.Item("VALUE") + DR_AUTOINDEX.Item("Indexwert") = DEFAULTVALUE End If End If End If @@ -1585,7 +1645,7 @@ Public Class frmIndex Private Sub btnVorschau_Click(sender As System.Object, e As System.EventArgs) PreviewFile() End Sub - + Sub PreviewFile() Try Dim Proc As New System.Diagnostics.Process @@ -1770,7 +1830,7 @@ Public Class frmIndex Return False End Try End Function - Private Sub OK_Button_Click(sender As Object, e As EventArgs) Handles OK_Button.Click + Private Sub OK_Button_Click(sender As Object, e As EventArgs) Handles btnOK.Click lblhinweis.Visible = False lblerror.Visible = False Me.Cursor = Cursors.WaitCursor @@ -1800,7 +1860,7 @@ Public Class frmIndex Next Me.Cursor = Cursors.Default If err = False Then - MsgBox("Alle Dateien wurden mit Multiindexing erfolgreich verarbeitet!", MsgBoxStyle.Information, "Erfolgsmeldung:") + MsgBox("Alle Dateien wurden mit Multiindexing erfolgreich verarbeitet!", MsgBoxStyle.Information, "Erfolgsmeldung:") Me.Close() End If End If @@ -1846,7 +1906,7 @@ Public Class frmIndex CrFolderForIndex(CURRENT_NEWFILENAME, Folder_for_index) End If End If - + 'Kein Fehler in Setzen der windream-Indizes Dim Insert_String As String @@ -1873,7 +1933,7 @@ Public Class frmIndex End Try End If End If - + Catch ex As Exception MsgBox("Error in Insert-History - View logfile: " & ex.Message, MsgBoxStyle.Critical) ClassLogger.Add(" - Fehler bei Insert-History - Fehler: " & vbNewLine & ex.Message) @@ -1944,7 +2004,7 @@ Public Class frmIndex Case "M" Dim ManIndexname = element.Value.Substring(3, element.Value.Length - 4) If LogErrorsOnly = False Then ClassLogger.Add(" ...Versuch den Indexwert aus '" & ManIndexname & "' auszulesen.", False) - Dim ManIndex_Value As String = GetManIndex_Value(ManIndexname) + Dim ManIndex_Value As String = GetManIndex_Value(ManIndexname, "FILE") If LogErrorsOnly = False Then ClassLogger.Add(" ...Ergebnis/Wert für neuen Ordner: '" & ManIndexname & "'", False) If Not ManIndex_Value = String.Empty Then If IsDate(ManIndex_Value) Then @@ -2163,4 +2223,14 @@ Public Class frmIndex End Select Me.Close() End Sub + + Private Sub chkMultiIndexer_CheckedChanged(sender As Object, e As EventArgs) Handles chkMultiIndexer.CheckedChanged + If chkMultiIndexer.Checked Then + Me.btnOK.Text = "Dateien indexieren" + MULTIINDEXING_ACTIVE = True + Else + Me.btnOK.Text = "Indexiere Datei" + MULTIINDEXING_ACTIVE = False + End If + End Sub End Class diff --git a/Global_Indexer/frmSQLSuggestion.vb b/Global_Indexer/frmSQLSuggestion.vb index 6973496..a307dc5 100644 --- a/Global_Indexer/frmSQLSuggestion.vb +++ b/Global_Indexer/frmSQLSuggestion.vb @@ -111,6 +111,7 @@ Public Class frmSQLSuggestion Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Try + ClassDatabase.Init() Dim origresultstring = ClassDatabase.Execute_Scalar("SELECT SQL_RESULT FROM TBDD_INDEX_MAN WHERE GUID = " & CURRENT_INDEXMAN, True) Dim origcheckstring = ClassDatabase.Execute_Scalar("SELECT SQL_CHECK FROM TBDD_INDEX_MAN WHERE GUID = " & CURRENT_INDEXMAN, True) Dim origConnection = ClassDatabase.Execute_Scalar("SELECT CONNECTION_ID FROM TBDD_INDEX_MAN WHERE GUID = " & CURRENT_INDEXMAN, True) diff --git a/Global_Indexer/frmStart.Designer.vb b/Global_Indexer/frmStart.Designer.vb index 60bca4c..9b8e1fe 100644 --- a/Global_Indexer/frmStart.Designer.vb +++ b/Global_Indexer/frmStart.Designer.vb @@ -32,7 +32,7 @@ Partial Class frmStart Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.GrundeinstellungenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.FrmHotkeyAddToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.AApiToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.HistoryIndexierteDateienToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.tslblstatus = New System.Windows.Forms.ToolStripStatusLabel() Me.tslblFW = New System.Windows.Forms.ToolStripStatusLabel() @@ -43,7 +43,7 @@ Partial Class frmStart Me.TimerFolderWatch = New System.Windows.Forms.Timer(Me.components) Me.TimerClose3Minutes = New System.Windows.Forms.Timer(Me.components) Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon(Me.components) - Me.HistoryIndexierteDateienToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.InfoToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.MenuStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout() CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).BeginInit() @@ -62,7 +62,7 @@ Partial Class frmStart 'KonfigurationToolStripMenuItem ' Me.KonfigurationToolStripMenuItem.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right - Me.KonfigurationToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AdministrationToolStripMenuItem, Me.ToolStripSeparator1, Me.GrundeinstellungenToolStripMenuItem, Me.FrmHotkeyAddToolStripMenuItem, Me.AApiToolStripMenuItem, Me.HistoryIndexierteDateienToolStripMenuItem}) + Me.KonfigurationToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AdministrationToolStripMenuItem, Me.ToolStripSeparator1, Me.GrundeinstellungenToolStripMenuItem, Me.FrmHotkeyAddToolStripMenuItem, Me.HistoryIndexierteDateienToolStripMenuItem, Me.InfoToolStripMenuItem}) Me.KonfigurationToolStripMenuItem.Image = Global.Global_Indexer.My.Resources.Resources.gear_32xLG Me.KonfigurationToolStripMenuItem.Name = "KonfigurationToolStripMenuItem" Me.KonfigurationToolStripMenuItem.Size = New System.Drawing.Size(108, 20) @@ -108,12 +108,11 @@ Partial Class frmStart Me.FrmHotkeyAddToolStripMenuItem.Size = New System.Drawing.Size(217, 22) Me.FrmHotkeyAddToolStripMenuItem.Text = "Hotkey-Funktion User" ' - 'AApiToolStripMenuItem + 'HistoryIndexierteDateienToolStripMenuItem ' - Me.AApiToolStripMenuItem.Name = "AApiToolStripMenuItem" - Me.AApiToolStripMenuItem.Size = New System.Drawing.Size(217, 22) - Me.AApiToolStripMenuItem.Text = "AApi" - Me.AApiToolStripMenuItem.Visible = False + Me.HistoryIndexierteDateienToolStripMenuItem.Name = "HistoryIndexierteDateienToolStripMenuItem" + Me.HistoryIndexierteDateienToolStripMenuItem.Size = New System.Drawing.Size(217, 22) + Me.HistoryIndexierteDateienToolStripMenuItem.Text = "History - Indexierte Dateien" ' 'StatusStrip1 ' @@ -190,11 +189,11 @@ Partial Class frmStart Me.NotifyIcon1.Icon = CType(resources.GetObject("NotifyIcon1.Icon"), System.Drawing.Icon) Me.NotifyIcon1.Text = "GlobalIndexer" ' - 'HistoryIndexierteDateienToolStripMenuItem + 'InfoToolStripMenuItem ' - Me.HistoryIndexierteDateienToolStripMenuItem.Name = "HistoryIndexierteDateienToolStripMenuItem" - Me.HistoryIndexierteDateienToolStripMenuItem.Size = New System.Drawing.Size(217, 22) - Me.HistoryIndexierteDateienToolStripMenuItem.Text = "History - Indexierte Dateien" + Me.InfoToolStripMenuItem.Name = "InfoToolStripMenuItem" + Me.InfoToolStripMenuItem.Size = New System.Drawing.Size(217, 22) + Me.InfoToolStripMenuItem.Text = "Info" ' 'frmStart ' @@ -229,7 +228,6 @@ Partial Class frmStart Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator Friend WithEvents GrundeinstellungenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents FrmHotkeyAddToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents AApiToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip Friend WithEvents tslblstatus As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents tslblFW As System.Windows.Forms.ToolStripStatusLabel @@ -241,4 +239,5 @@ Partial Class frmStart Friend WithEvents TimerClose3Minutes As System.Windows.Forms.Timer Friend WithEvents NotifyIcon1 As System.Windows.Forms.NotifyIcon Friend WithEvents HistoryIndexierteDateienToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents InfoToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem End Class diff --git a/Global_Indexer/frmStart.vb b/Global_Indexer/frmStart.vb index 773dfde..1b6c9ad 100644 --- a/Global_Indexer/frmStart.vb +++ b/Global_Indexer/frmStart.vb @@ -103,15 +103,15 @@ Public Class frmStart Next Me.TopMost = True Dim sql As String = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')" - Dim DTFiles As DataTable = ClassDatabase.Return_Datatable(sql, True) - - If DTFiles.Rows.Count > 1 Then + DTACTUAL_FILES = Nothing + DTACTUAL_FILES = ClassDatabase.Return_Datatable(sql, True) + If DTACTUAL_FILES.Rows.Count > 1 Then frmIndexFileList.ShowDialog() - - DTFiles = ClassDatabase.Return_Datatable(sql, True) + DTACTUAL_FILES = Nothing + DTACTUAL_FILES = ClassDatabase.Return_Datatable(sql, True) End If - For Each Filerow As DataRow In DTFiles.Rows + For Each Filerow As DataRow In DTACTUAL_FILES.Rows Dim filestring As String = Filerow.Item("FILENAME2WORK") CURRENT_FILENAME = Filerow.Item("FILENAME2WORK") CURRENT_WORKFILE_GUID = Filerow.Item(0) @@ -119,40 +119,13 @@ Public Class frmStart If LogErrorsOnly = False Then ClassLogger.Add(">> CURRENT_WORKFILE: " & CURRENT_WORKFILE, False) If File.Exists(CURRENT_WORKFILE) Then Open_IndexDialog() + Else + Console.WriteLine("File existiert nicht mehr!") End If Next - - ''Prüfen ob alle Files abgearbeitet wurden - 'Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND HANDLE_TYPE not like '%@FW%' AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')") - 'If DT.Rows.Count > 0 Then - ' For Each row As DataRow In DT.Rows - ' Dim filestring As String = row.Item(1) - ' filestring = filestring.Substring(filestring.LastIndexOf("@") + 1) - ' Select Case CURRENT_ABBRUCH - ' Case 0 - ' CURRENT_ABBRUCH = 1 - ' Case 1 - ' CURRENT_ABBRUCH = 2 - ' Case 2 - ' CURRENT_ABBRUCH = 0 - ' End Select - ' If File.Exists(filestring) Then - ' MsgBox("Es sind noch Dateien zum Indexieren vorhanden:" & vbNewLine & "Bitte indexieren Sie die folgende Datei vollständig:", MsgBoxStyle.Exclamation) - ' CURRENT_WORKFILE = row.Item(1) - ' CURRENT_FILENAME = row.Item(1) - ' CURRENT_WORKFILE_GUID = row.Item(0) - ' Open_IndexDialog() - ' Else - ' ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE GUID = " & row.Item(0)) - ' End If - ' Next - 'End If - 'Catch ex As Exception - ' MsgBox("Check_Dropped_Files: " & ex.Message, MsgBoxStyle.Critical) - 'End Try End Sub - + Sub Open_IndexDialog() Try Me.Hide() @@ -169,7 +142,21 @@ Public Class frmStart Dim result As MsgBoxResult result = MessageBox.Show("Sie brechen nun zum zweiten Mal den Indexierungsvorgang ab!" & vbNewLine & "Wollen Sie die Indexierung aller Dateien abbrechen?", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If result = MsgBoxResult.Yes Then - ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')", True) + Try + 'Zuerst die Daten des Ablaufs löschen + ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')", True) + For Each Filerow As DataRow In DTACTUAL_FILES.Rows + Dim filestring As String = Filerow.Item("FILENAME2WORK") + Dim handletype As String = Filerow.Item("HANDLE_TYPE") + If handletype = "@MSGONLY@" Or handletype = "@ATTMNTEXTRACTED@" Then + System.IO.File.Delete(filestring) + End If + Next + Catch ex As Exception + MsgBox("Fehler bei Abbruch der Indexierung: " & vbNewLine & ex.Message, MsgBoxStyle.Critical) + End Try + + CURRENT_ABBRUCH = 0 Exit Sub Else @@ -185,18 +172,26 @@ Public Class frmStart Private Sub frmStart_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Try - Dim sql = sql_User_Login - sql = sql.Replace("@LogInOut", 0) - sql = sql.Replace("@ANGEMELDETWO", "''") - sql = sql.Replace("@user", Environment.UserName) - ClassDatabase.Execute_non_Query(sql) - sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_GUID & " AND MODULE = 'Global-Indexer'" - ClassDatabase.Execute_non_Query(sql) + ClassLogger.Add("", False) + If START_INCOMPLETE = False Then + Dim sql = sql_User_Login + sql = sql.Replace("@LogInOut", 0) + sql = sql.Replace("@ANGEMELDETWO", "''") + sql = sql.Replace("@user", Environment.UserName) + ClassDatabase.Execute_non_Query(sql) + If Not USER_GUID Is Nothing Then + sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_GUID & " AND MODULE = 'Global-Indexer'" + ClassDatabase.Execute_non_Query(sql) + End If + End If ClassWindowLocation.SaveFormLocationSize(Me) Catch ex As Exception End Try - Unregister_Hotkeys() + If Not USER_GUID Is Nothing Then + Unregister_Hotkeys() + End If + End Sub Sub Refresh_Licence() @@ -234,16 +229,12 @@ Public Class frmStart 'Me.TransparencyKey = Color.Transparent ' Me.BackColor = Color.Transparent Try - If Environment.UserName.ToLower = "schreiberm" Then - AApiToolStripMenuItem.Visible = True - Else - AApiToolStripMenuItem.Visible = False - End If Me.Opacity = 30 ClassWindowLocation.LoadFormLocationSize(Me) Dim sql = sql_UserID sql = sql.Replace("@user", Environment.UserName) ClassLogger.Init("", "log_" & Environment.UserName) + ClassLogger.Add(">> Programmstart: " & Now, False) ClassLogger.Add(">> Username: " & Environment.UserName, False) LoadMyConfig() @@ -251,21 +242,31 @@ Public Class frmStart frmConfig_Basic.ShowDialog() End If If ClassDatabase.Init() = False Then - MsgBox("Es konnte keine Datenbankverbindung aufgebaut werden!" & vbNewLine & "Bitte prüfen Sie die Einstellungen und den Datenbankserver", MsgBoxStyle.Critical) - Me.Close() + MsgBox("Es konnte keine Datenbankverbindung aufgebaut werden!" & vbNewLine & "Bitte prüfen Sie die Konfiguration der Datenbankverbindung und ggfls. den Datenbankserver", MsgBoxStyle.Critical) + frmConfig_Basic.ShowDialog() + End If + If ClassDatabase.Init() = False Then + ClassLogger.Add(" >> Global Indexer wird geschlossen!", False) + START_INCOMPLETE = True + Exit Sub End If If UniversalViewer = String.Empty And My.Settings.DoNot_Show_Documents = False Then frmConfig_Basic.ShowDialog() End If + If MyConnectionString = String.Empty Then - Me.Close() + ClassLogger.Add(" >> Kein Connection-String definiert - Global Indexer wird geschlossen!", False) + START_INCOMPLETE = True + Exit Sub End If Refresh_Licence() USER_GUID = ClassDatabase.Execute_Scalar(sql, MyConnectionString) If USER_GUID Is Nothing Then - ClassLogger.Add(" - User: " & Environment.UserName & " nicht in der Userverwaltung hinterlegt!", False) + ClassLogger.Add(" - ACHTUNG: User '" & Environment.UserName & "' nicht in der Userverwaltung hinterlegt!", False) MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:") - Me.Close() + ClassLogger.Add(" >> Global Indexer wird geschlossen!", False) + START_INCOMPLETE = True + Exit Sub Else CURRENT_USERID = USER_GUID Dim folderwatch = ClassDatabase.Execute_Scalar("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & CURRENT_USERID, MyConnectionString) @@ -284,7 +285,8 @@ Public Class frmStart If ClassDatabase.Execute_Scalar(sql, MyConnectionString, True) = False Then ClassLogger.Add(" - User: " & Environment.UserName & " nicht für Modul freigegben!", False) MsgBox("Achtung: Sie sind nicht für die Nutzung dieses Moduls freigeschaltet." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:") - Me.Close() + START_INCOMPLETE = True + Exit Sub Else 'Am System anmelden sql = sql_User_Login @@ -292,7 +294,8 @@ Public Class frmStart sql = sql.Replace("@ANGEMELDETWO", Environment.MachineName) sql = sql.Replace("@user", Environment.UserName) If ClassDatabase.Execute_non_Query(sql, True) = False Then - Me.Close() + START_INCOMPLETE = True + Exit Sub End If sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_GUID & " AND MODULE= 'Global-Indexer'" ClassDatabase.Execute_non_Query(sql, True) @@ -312,7 +315,8 @@ Public Class frmStart 'Lizenz abgellaufen, überprüfen ob User Admin ist If License_Expired And ISUserAdmin = False Then ' wenn ja dann schliessen - Me.Close() + START_INCOMPLETE = True + Exit Sub Else 'ansonsten timer starten TimerClose3Minutes.Start() @@ -323,7 +327,8 @@ Public Class frmStart MsgBox("Die Anzahl der aktuell angemeldeten User (" & UserLoggedin.ToString & ") überschreitet die Anzahl der aktuellen Lizenzen!" & vbNewLine & "Anzahl der Lizenzen: " & License_Anzahl.ToString & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:") ClassLogger.Add(" - Die Anzahl der aktuell angemeldeten User (" & UserLoggedin.ToString & ") überschreitet die Anzahl der Lizenzen für Process-Manager!", False) If ISUserAdmin = False Then - Me.Close() + START_INCOMPLETE = True + Exit Sub Else 'ansonsten timer starten If TimerClose3Minutes.Enabled = False Then @@ -336,7 +341,8 @@ Public Class frmStart ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')", True) If LogErrorsOnly = False Then ClassLogger.Add(" - Anzahl Angemeldete User: " & anzahl.ToString, False) If Load_BasicConfig() = False Then - Me.Close() + START_INCOMPLETE = True + Exit Sub End If Unregister_Hotkeys() Load_Hotkeys() @@ -443,10 +449,15 @@ Public Class frmStart ' Dim fil As String Me.TimerFolderWatch.Stop() For Each row As DataRow In DT.Rows - CURRENT_WORKFILE = row.Item(1) - CURRENT_FILENAME = row.Item(1) - CURRENT_WORKFILE_GUID = row.Item("GUID") - Open_IndexDialog() + If ClassFilehandle.IsFileInUse(row.Item(1)) = True Then + CURRENT_WORKFILE = row.Item(1) + CURRENT_FILENAME = row.Item(1) + CURRENT_WORKFILE_GUID = row.Item("GUID") + Open_IndexDialog() + Else + ClassLogger.Add(">> Datei '" & row.Item(1) & "' kann nicht exclusiv geöffnet werden!", False) + End If + Next Me.TimerFolderWatch.Start() End If @@ -458,15 +469,16 @@ Public Class frmStart MsgBox("Error in Work FolderWatch-File:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) End Try End Sub - Private Sub TimerClose3Minutes_Tick(sender As Object, e As EventArgs) Handles TimerClose3Minutes.Tick If License_Expired = True Or License_Anzahl < UserLoggedin Then MsgBox("Global Indexer wird nun geschlossen, weil keine neue Lizenzdaten eingegeben wurden!", MsgBoxStyle.Information) Me.Close() End If End Sub - Private Sub frmStart_Shown(sender As Object, e As EventArgs) Handles Me.Shown + If START_INCOMPLETE = True Then + Me.Close() + End If loaded = True Opacity = 0.65 TimerFolderWatch.Start() @@ -475,4 +487,8 @@ Public Class frmStart Private Sub HistoryIndexierteDateienToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles HistoryIndexierteDateienToolStripMenuItem.Click frmHistory.ShowDialog() End Sub + + Private Sub InfoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles InfoToolStripMenuItem.Click + AboutBox1.ShowDialog() + End Sub End Class \ No newline at end of file diff --git a/SetupWix/Product.wxs b/SetupWix/Product.wxs index c00d6cb..087402c 100644 --- a/SetupWix/Product.wxs +++ b/SetupWix/Product.wxs @@ -1,7 +1,7 @@ - + @@ -47,11 +47,10 @@ - - + @@ -64,8 +63,8 @@ - - + +