From d23e44524b1840bacb18c0f3d5fc9aba273b5f2c Mon Sep 17 00:00:00 2001 From: SchreiberM Date: Fri, 24 Jul 2015 10:45:41 +0200 Subject: [PATCH] MS 24.07 --- Global_Indexer/App.config | 6 + Global_Indexer/ClassFolderWatcher.vb | 100 +- Global_Indexer/ClassWindream.vb | 2 +- Global_Indexer/Global_Indexer.vbproj | 20 + Global_Indexer/ModuleCURRENT.vb | 2 + Global_Indexer/ModuleMySettings.vb | 14 + .../My Project/Resources.Designer.vb | 10 + Global_Indexer/My Project/Resources.resx | 27 +- .../My Project/Settings.Designer.vb | 24 + Global_Indexer/My Project/Settings.settings | 6 + Global_Indexer/MyDataset.Designer.vb | 9236 ++++++++++------- Global_Indexer/MyDataset.xsc | 18 +- Global_Indexer/MyDataset.xsd | 191 +- Global_Indexer/MyDataset.xss | 100 +- Global_Indexer/frmConfig_Basic.designer.vb | 179 +- Global_Indexer/frmConfig_Basic.vb | 83 +- Global_Indexer/frmHistory.resx | 179 + Global_Indexer/frmIndex.designer.vb | 125 +- Global_Indexer/frmIndex.vb | 235 +- Global_Indexer/frmStart.Designer.vb | 20 +- Global_Indexer/frmStart.vb | 219 +- 21 files changed, 6432 insertions(+), 4364 deletions(-) create mode 100644 Global_Indexer/frmHistory.resx diff --git a/Global_Indexer/App.config b/Global_Indexer/App.config index abe144e..4971a51 100644 --- a/Global_Indexer/App.config +++ b/Global_Indexer/App.config @@ -21,6 +21,12 @@ True + + True + + + False + \ No newline at end of file diff --git a/Global_Indexer/ClassFolderWatcher.vb b/Global_Indexer/ClassFolderWatcher.vb index 3c3c629..d04cb28 100644 --- a/Global_Indexer/ClassFolderWatcher.vb +++ b/Global_Indexer/ClassFolderWatcher.vb @@ -4,6 +4,7 @@ Imports System.Threading Public Class ClassFolderWatcher Public Shared FolderWatcher As FileSystemWatcher + Public Shared FolderWatcher_SCAN As FileSystemWatcher Public Shared Function Restart_FolderWatch() If FolderWatcher.EnableRaisingEvents = True Then 'Gestartet also Stoppen @@ -19,6 +20,21 @@ Public Class ClassFolderWatcher SaveConfigValue("FW_started", "True") End If End Function + Public Shared Function Restart_FolderWatchSCAN() + If FolderWatcher_SCAN.EnableRaisingEvents = True Then + 'Gestartet also Stoppen + FolderWatcher_SCAN.EnableRaisingEvents = False + FWSCAN_started = False + 'FolderWatch neu instanzieren + FolderWatcher_SCAN = New System.IO.FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*") + ClassLogger.Add(" >> FolderWatchScan neu instanziert", False) + FolderWatcher_SCAN.IncludeSubdirectories = False + FolderWatcher_SCAN.EnableRaisingEvents = True + AddHandler FolderWatcher_SCAN.Created, AddressOf OnCreated + FWSCAN_started = True + SaveConfigValue("FWSCAN_started", "True") + End If + End Function Public Shared Function StartStop_FolderWatch() Try If CURRENT_FOLDERWATCH = "" Then @@ -71,39 +87,64 @@ Public Class ClassFolderWatcher Return 99 End Try End Function - 'Private Sub folder_watch_Created(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles vFolderWatch.Created - ' Try - ' 'ersten Dateinamen übergeben - ' If LogErrorsOnly = False Then - ' ClassLogger.Add(" >> vFolderWatch1.Created " & e.Name, False) - ' End If - ' CURRENT_FILENAME = e.Name - - ' Catch ex As Exception - ' MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei folder_watch_Created") - ' End Try - - 'End Sub + Public Shared Function StartStop_FolderWatchSCAN() + Try + If CURRENT_SCAN_FOLDERWATCH = "" Then + MsgBox("Bitte definieren Sie einen Überwachungsordner für Scan-Eingänge:", MsgBoxStyle.Exclamation) + Return False + End If + If FolderWatcher_SCAN Is Nothing Then + FolderWatcher_SCAN = New System.IO.FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*") + ClassLogger.Add(" >> FolderWatch Scan Gestartet", False) + FolderWatcher_SCAN.IncludeSubdirectories = False + FolderWatcher_SCAN.EnableRaisingEvents = True + AddHandler FolderWatcher_SCAN.Created, AddressOf OnCreated + FWSCAN_started = True + SaveConfigValue("FWSCAN_started", "True") + Return 1 + End If + If FolderWatcher_SCAN.EnableRaisingEvents = False Then + ' Dim watcher As New FileSystemWatcher() + ' watcher.Path = CURRENT_FOLDERWATCH + FolderWatcher_SCAN = New System.IO.FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*") + ClassLogger.Add(" >> FolderWatch Scan Gestartet", False) + FolderWatcher_SCAN.IncludeSubdirectories = False + FolderWatcher_SCAN.EnableRaisingEvents = True + AddHandler FolderWatcher_SCAN.Created, AddressOf OnCreated + FWSCAN_started = True + SaveConfigValue("FWSCAN_started", "True") + Return 1 + Else + 'Gestartet also Stoppen + FolderWatcher_SCAN.EnableRaisingEvents = False + FWSCAN_started = False + ClassLogger.Add(" >> FolderWatch Scan gestoppt", False) + SaveConfigValue("FWSCAN_started", "False") + Return 0 + End If + + Catch ex As Exception + MsgBox("Error in StartStop_FolderWatchSCAN:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + Return 99 + End Try + End Function Private Shared Sub OnCreated(source As Object, e As FileSystemEventArgs) Try If e.FullPath.Contains("Thumbs.") Or e.FullPath.EndsWith(".tmp") Or e.FullPath.Contains("\~$") Then Exit Sub End If - Dim praefix As String + Dim handleType As String If e.FullPath.EndsWith(".msg") Then - praefix = "@FW_OUTLOOK_MESSAGE@" + handleType = "@FW_OUTLOOK_MESSAGE@" Else - praefix = "@FW_SIMPLEINDEXER@" + handleType = "@FW_SIMPLEINDEXER@" End If - 'ersten Dateinamen übergeben - CURRENT_FILENAME = e.FullPath - ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND USER@WORK = '" & Environment.UserName & "'", True) + 'Die Datei übergeben If LogErrorsOnly = False Then ClassLogger.Add(">> OnCreated-File:" & CURRENT_FILENAME, False) If ClassIndexFunctions.FileExistsinDropTable(CURRENT_FILENAME) = False Then - Dim ins As String = "INSERT INTO TBGI_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE) VALUES ('" & CURRENT_FILENAME & "','" & Environment.UserName & "','" & praefix & "')" - ClassDatabase.Execute_non_Query(ins, True) + ClassFilehandle.Decide_FileHandle(e.FullPath, handleType) Else - Console.WriteLine("File existiert bereeits") + Console.WriteLine("File existiert bereits") End If 'frmMain.MyNewTimer() @@ -145,18 +186,5 @@ Public Class ClassFolderWatcher End Try End Sub - Sub Check_Dropped_Files() - Try - - - Catch ex As Exception - MsgBox("Check_Dropped_Files: " & ex.Message, MsgBoxStyle.Critical) - End Try - - End Sub - _ - Public Shared Sub ShowIndexForm() - Dim frm As New frmIndex - frm.ShowDialog() - End Sub + End Class diff --git a/Global_Indexer/ClassWindream.vb b/Global_Indexer/ClassWindream.vb index c5a054a..4f0e967 100644 --- a/Global_Indexer/ClassWindream.vb +++ b/Global_Indexer/ClassWindream.vb @@ -995,7 +995,7 @@ Public Class ClassWindream convertValue = value Case WMObjectVariableValueTypeTimeStamp If LogErrorsOnly = False Then ClassLogger.Add(" ...Typ des windream-Indexes: WMObjectVariableValueTypeTimeStamp", False) - convertValue = CDbl(value) + convertValue = value Case WMObjectVariableValueTypeCurrency If LogErrorsOnly = False Then ClassLogger.Add(" - Typ des windream-Indexes: WMObjectVariableValueTypeCurrency", False) 'Wegen currency muß ein eigenes Objekt vom typ Variant erzeugt werden diff --git a/Global_Indexer/Global_Indexer.vbproj b/Global_Indexer/Global_Indexer.vbproj index 3087e9a..1e8ce9a 100644 --- a/Global_Indexer/Global_Indexer.vbproj +++ b/Global_Indexer/Global_Indexer.vbproj @@ -125,6 +125,7 @@ + @@ -154,6 +155,12 @@ Form + + frmHistory.vb + + + Form + frmHotKey_Add.vb @@ -172,6 +179,12 @@ Form + + frmIndexFileList.vb + + + Form + frmLicense.vb @@ -257,6 +270,9 @@ frmConnections.vb + + frmHistory.vb + frmHotKey_Add.vb @@ -267,6 +283,9 @@ frmIndex.vb Designer + + frmIndexFileList.vb + frmLicense.vb @@ -497,6 +516,7 @@ + diff --git a/Global_Indexer/ModuleCURRENT.vb b/Global_Indexer/ModuleCURRENT.vb index 5803fc0..e5edfbc 100644 --- a/Global_Indexer/ModuleCURRENT.vb +++ b/Global_Indexer/ModuleCURRENT.vb @@ -13,8 +13,10 @@ Public FILE_DELIMITER As String Public CURRENT_MESSAGEID As String Public CURRENT_MESSAGEDATE As String + Public CURRENT_ISATTACHMENT As Boolean = False Public CURRENT_USERID As Integer Public CURRENT_FOLDERWATCH As String = "" + Public CURRENT_SCAN_FOLDERWATCH As String = "" Public CURR_DOKART_WD_DIRECT As Boolean = False Public CURR_DOKART_OBJECTTYPE As String Public CURRENT_WD_TEMPSEARCH As String = "" diff --git a/Global_Indexer/ModuleMySettings.vb b/Global_Indexer/ModuleMySettings.vb index 725ad1f..3d41c3e 100644 --- a/Global_Indexer/ModuleMySettings.vb +++ b/Global_Indexer/ModuleMySettings.vb @@ -10,6 +10,7 @@ Module ModuleMySettings Public Preview As Boolean = True Public UniversalViewer As String Public FW_started As Boolean = False + Public FWSCAN_started As Boolean = False Public Delete_OriginFile As Boolean = False Public Function LoadMyConfig() @@ -57,6 +58,8 @@ Module ModuleMySettings UniversalViewer = Row.Item("Value") Case "FW_started" FW_started = CBool(Row.Item("Value")) + Case "FWSCAN_started" + FWSCAN_started = CBool(Row.Item("Value")) Case "Delete_OriginFile" Delete_OriginFile = CBool(Row.Item("Value")) End Select @@ -78,6 +81,13 @@ Module ModuleMySettings DT.Rows.Add(newRow) DT.WriteXml(ConfigPath) End If + If rowresult.Contains("FWSCAN_started") = False Then + Dim newRow As DataRow = DT.NewRow() + newRow("ConfigName") = "FWSCAN_started" + newRow("Value") = "False" + DT.Rows.Add(newRow) + DT.WriteXml(ConfigPath) + End If Catch ex As Exception MsgBox("Error in MySettings-LoadMyConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical) Return False @@ -134,6 +144,10 @@ Module ModuleMySettings newRow4("ConfigName") = "FW_started" newRow4("Value") = "False" table.Rows.Add(newRow4) + Dim newRow5 As DataRow = table.NewRow() + newRow5("ConfigName") = "FWSCAN_started" + newRow5("Value") = "False" + table.Rows.Add(newRow5) table.AcceptChanges() Return table Catch ex As Exception diff --git a/Global_Indexer/My Project/Resources.Designer.vb b/Global_Indexer/My Project/Resources.Designer.vb index 20807b2..861d866 100644 --- a/Global_Indexer/My Project/Resources.Designer.vb +++ b/Global_Indexer/My Project/Resources.Designer.vb @@ -180,6 +180,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property cancel() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("cancel", 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 10b7db2..6db75b8 100644 --- a/Global_Indexer/My Project/Resources.resx +++ b/Global_Indexer/My Project/Resources.resx @@ -139,6 +139,9 @@ ..\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 @@ -166,9 +169,6 @@ ..\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,9 +178,6 @@ ..\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 @@ -205,12 +202,15 @@ ..\Resources\CheckOutforEdit_13187_32x.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\save_16xLG.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 @@ -232,6 +232,9 @@ ..\Resources\folder_link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\refresh_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\handdrawn_arrow_left_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -241,13 +244,13 @@ ..\Resources\gear_32xLG.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\Save_6530.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\refresh_16xLG.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 \ No newline at end of file diff --git a/Global_Indexer/My Project/Settings.Designer.vb b/Global_Indexer/My Project/Settings.Designer.vb index 5aea6ac..38da9fc 100644 --- a/Global_Indexer/My Project/Settings.Designer.vb +++ b/Global_Indexer/My Project/Settings.Designer.vb @@ -88,6 +88,30 @@ Namespace My Me("WDSearch_maximized") = value End Set End Property + + _ + Public Property Show_IndexResult() As Boolean + Get + Return CType(Me("Show_IndexResult"),Boolean) + End Get + Set + Me("Show_IndexResult") = value + End Set + End Property + + _ + Public Property DoNot_Show_Documents() As Boolean + Get + Return CType(Me("DoNot_Show_Documents"),Boolean) + End Get + Set + Me("DoNot_Show_Documents") = value + End Set + End Property End Class End Namespace diff --git a/Global_Indexer/My Project/Settings.settings b/Global_Indexer/My Project/Settings.settings index 8ab03e3..a821ad5 100644 --- a/Global_Indexer/My Project/Settings.settings +++ b/Global_Indexer/My Project/Settings.settings @@ -16,5 +16,11 @@ True + + True + + + False + \ No newline at end of file diff --git a/Global_Indexer/MyDataset.Designer.vb b/Global_Indexer/MyDataset.Designer.vb index 70fea0b..539049b 100644 --- a/Global_Indexer/MyDataset.Designer.vb +++ b/Global_Indexer/MyDataset.Designer.vb @@ -73,6 +73,10 @@ Partial Public Class MyDataset Private tableTBHOTKEY_WINDOW_HOOK As TBHOTKEY_WINDOW_HOOKDataTable + Private tableTBGI_FILES_USER As TBGI_FILES_USERDataTable + + Private tableTBGI_HISTORY As TBGI_HISTORYDataTable + Private tableTBTempFiles2Index As TBTempFiles2IndexDataTable Private tableTBTEMP_INDEXRESULTS As TBTEMP_INDEXRESULTSDataTable @@ -208,6 +212,12 @@ Partial Public Class MyDataset If (Not (ds.Tables("TBHOTKEY_WINDOW_HOOK")) Is Nothing) Then MyBase.Tables.Add(New TBHOTKEY_WINDOW_HOOKDataTable(ds.Tables("TBHOTKEY_WINDOW_HOOK"))) End If + If (Not (ds.Tables("TBGI_FILES_USER")) Is Nothing) Then + MyBase.Tables.Add(New TBGI_FILES_USERDataTable(ds.Tables("TBGI_FILES_USER"))) + End If + If (Not (ds.Tables("TBGI_HISTORY")) Is Nothing) Then + MyBase.Tables.Add(New TBGI_HISTORYDataTable(ds.Tables("TBGI_HISTORY"))) + End If If (Not (ds.Tables("TBTempFiles2Index")) Is Nothing) Then MyBase.Tables.Add(New TBTempFiles2IndexDataTable(ds.Tables("TBTempFiles2Index"))) End If @@ -471,6 +481,26 @@ Partial Public Class MyDataset End Get End Property + _ + Public ReadOnly Property TBGI_FILES_USER() As TBGI_FILES_USERDataTable + Get + Return Me.tableTBGI_FILES_USER + End Get + End Property + + _ + Public ReadOnly Property TBGI_HISTORY() As TBGI_HISTORYDataTable + Get + Return Me.tableTBGI_HISTORY + End Get + End Property + _ + Private Function ShouldSerializeTBGI_FILES_USER() As Boolean + Return false + End Function + + _ + Private Function ShouldSerializeTBGI_HISTORY() As Boolean + Return false + End Function + _ Private Function ShouldSerializeTBTempFiles2Index() As Boolean @@ -1219,6 +1283,12 @@ Partial Public Class MyDataset _ Public Delegate Sub TBHOTKEY_WINDOW_HOOKRowChangeEventHandler(ByVal sender As Object, ByVal e As TBHOTKEY_WINDOW_HOOKRowChangeEvent) + _ + Public Delegate Sub TBGI_FILES_USERRowChangeEventHandler(ByVal sender As Object, ByVal e As TBGI_FILES_USERRowChangeEvent) + + _ + Public Delegate Sub TBGI_HISTORYRowChangeEventHandler(ByVal sender As Object, ByVal e As TBGI_HISTORYRowChangeEvent) + _ Public Delegate Sub TBTempFiles2IndexRowChangeEventHandler(ByVal sender As Object, ByVal e As TBTempFiles2IndexRowChangeEvent) @@ -10759,18 +10829,30 @@ Partial Public Class MyDataset ''' _ - Partial Public Class TBTempFiles2IndexDataTable - Inherits Global.System.Data.TypedTableBase(Of TBTempFiles2IndexRow) + Partial Public Class TBGI_FILES_USERDataTable + Inherits Global.System.Data.TypedTableBase(Of TBGI_FILES_USERRow) - Private columnFilestring As Global.System.Data.DataColumn + Private columnGUID As Global.System.Data.DataColumn - Private columnWorked As Global.System.Data.DataColumn + Private columnFILENAME2WORK As Global.System.Data.DataColumn + + Private _columnUSER_WORK As Global.System.Data.DataColumn + + Private columnWORKED As Global.System.Data.DataColumn + + Private columnADDED_WHEN As Global.System.Data.DataColumn + + Private columnHANDLE_TYPE As Global.System.Data.DataColumn + + Private columnDelete As Global.System.Data.DataColumn + + Private columnFILENAME_ONLY As Global.System.Data.DataColumn _ Public Sub New() MyBase.New - Me.TableName = "TBTempFiles2Index" + Me.TableName = "TBGI_FILES_USER" Me.BeginInit Me.InitClass Me.EndInit @@ -10803,17 +10885,65 @@ Partial Public Class MyDataset _ - Public ReadOnly Property FilestringColumn() As Global.System.Data.DataColumn + Public ReadOnly Property GUIDColumn() As Global.System.Data.DataColumn Get - Return Me.columnFilestring + Return Me.columnGUID End Get End Property _ - Public ReadOnly Property WorkedColumn() As Global.System.Data.DataColumn + Public ReadOnly Property FILENAME2WORKColumn() As Global.System.Data.DataColumn Get - Return Me.columnWorked + Return Me.columnFILENAME2WORK + End Get + End Property + + _ + Public ReadOnly Property _USER_WORKColumn() As Global.System.Data.DataColumn + Get + Return Me._columnUSER_WORK + End Get + End Property + + _ + Public ReadOnly Property WORKEDColumn() As Global.System.Data.DataColumn + Get + Return Me.columnWORKED + End Get + End Property + + _ + Public ReadOnly Property ADDED_WHENColumn() As Global.System.Data.DataColumn + Get + Return Me.columnADDED_WHEN + End Get + End Property + + _ + Public ReadOnly Property HANDLE_TYPEColumn() As Global.System.Data.DataColumn + Get + Return Me.columnHANDLE_TYPE + End Get + End Property + + _ + Public ReadOnly Property DeleteColumn() As Global.System.Data.DataColumn + Get + Return Me.columnDelete + End Get + End Property + + _ + Public ReadOnly Property FILENAME_ONLYColumn() As Global.System.Data.DataColumn + Get + Return Me.columnFILENAME_ONLY End Get End Property @@ -10828,44 +10958,50 @@ Partial Public Class MyDataset _ - Public Default ReadOnly Property Item(ByVal index As Integer) As TBTempFiles2IndexRow + Public Default ReadOnly Property Item(ByVal index As Integer) As TBGI_FILES_USERRow Get - Return CType(Me.Rows(index),TBTempFiles2IndexRow) + Return CType(Me.Rows(index),TBGI_FILES_USERRow) End Get End Property _ - Public Event TBTempFiles2IndexRowChanging As TBTempFiles2IndexRowChangeEventHandler + Public Event TBGI_FILES_USERRowChanging As TBGI_FILES_USERRowChangeEventHandler _ - Public Event TBTempFiles2IndexRowChanged As TBTempFiles2IndexRowChangeEventHandler + Public Event TBGI_FILES_USERRowChanged As TBGI_FILES_USERRowChangeEventHandler _ - Public Event TBTempFiles2IndexRowDeleting As TBTempFiles2IndexRowChangeEventHandler + Public Event TBGI_FILES_USERRowDeleting As TBGI_FILES_USERRowChangeEventHandler _ - Public Event TBTempFiles2IndexRowDeleted As TBTempFiles2IndexRowChangeEventHandler + Public Event TBGI_FILES_USERRowDeleted As TBGI_FILES_USERRowChangeEventHandler _ - Public Overloads Sub AddTBTempFiles2IndexRow(ByVal row As TBTempFiles2IndexRow) + Public Overloads Sub AddTBGI_FILES_USERRow(ByVal row As TBGI_FILES_USERRow) Me.Rows.Add(row) End Sub _ - Public Overloads Function AddTBTempFiles2IndexRow(ByVal Filestring As String, ByVal Worked As Boolean) As TBTempFiles2IndexRow - Dim rowTBTempFiles2IndexRow As TBTempFiles2IndexRow = CType(Me.NewRow,TBTempFiles2IndexRow) - Dim columnValuesArray() As Object = New Object() {Filestring, Worked} - rowTBTempFiles2IndexRow.ItemArray = columnValuesArray - Me.Rows.Add(rowTBTempFiles2IndexRow) - Return rowTBTempFiles2IndexRow + Public Overloads Function AddTBGI_FILES_USERRow(ByVal FILENAME2WORK As String, ByVal _USER_WORK As String, ByVal WORKED As Boolean, ByVal ADDED_WHEN As Date, ByVal HANDLE_TYPE As String, ByVal Delete As Boolean, ByVal FILENAME_ONLY As String) As TBGI_FILES_USERRow + Dim rowTBGI_FILES_USERRow As TBGI_FILES_USERRow = CType(Me.NewRow,TBGI_FILES_USERRow) + Dim columnValuesArray() As Object = New Object() {Nothing, FILENAME2WORK, _USER_WORK, WORKED, ADDED_WHEN, HANDLE_TYPE, Delete, FILENAME_ONLY} + rowTBGI_FILES_USERRow.ItemArray = columnValuesArray + Me.Rows.Add(rowTBGI_FILES_USERRow) + Return rowTBGI_FILES_USERRow + End Function + + _ + Public Function FindByGUID(ByVal GUID As Integer) As TBGI_FILES_USERRow + Return CType(Me.Rows.Find(New Object() {GUID}),TBGI_FILES_USERRow) End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable - Dim cln As TBTempFiles2IndexDataTable = CType(MyBase.Clone,TBTempFiles2IndexDataTable) + Dim cln As TBGI_FILES_USERDataTable = CType(MyBase.Clone,TBGI_FILES_USERDataTable) cln.InitVars Return cln End Function @@ -10873,50 +11009,86 @@ Partial Public Class MyDataset _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable - Return New TBTempFiles2IndexDataTable() + Return New TBGI_FILES_USERDataTable() End Function _ Friend Sub InitVars() - Me.columnFilestring = MyBase.Columns("Filestring") - Me.columnWorked = MyBase.Columns("Worked") + Me.columnGUID = MyBase.Columns("GUID") + Me.columnFILENAME2WORK = MyBase.Columns("FILENAME2WORK") + Me._columnUSER_WORK = MyBase.Columns("USER@WORK") + Me.columnWORKED = MyBase.Columns("WORKED") + Me.columnADDED_WHEN = MyBase.Columns("ADDED_WHEN") + Me.columnHANDLE_TYPE = MyBase.Columns("HANDLE_TYPE") + Me.columnDelete = MyBase.Columns("Delete") + Me.columnFILENAME_ONLY = MyBase.Columns("FILENAME_ONLY") End Sub _ Private Sub InitClass() - Me.columnFilestring = New Global.System.Data.DataColumn("Filestring", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnFilestring) - Me.columnWorked = New Global.System.Data.DataColumn("Worked", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnWorked) - Me.columnWorked.DefaultValue = CType(false,Boolean) + Me.columnGUID = New Global.System.Data.DataColumn("GUID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnGUID) + Me.columnFILENAME2WORK = New Global.System.Data.DataColumn("FILENAME2WORK", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnFILENAME2WORK) + Me._columnUSER_WORK = New Global.System.Data.DataColumn("USER@WORK", GetType(String), Nothing, Global.System.Data.MappingType.Element) + Me._columnUSER_WORK.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnUSER_WORK") + Me._columnUSER_WORK.ExtendedProperties.Add("Generator_UserColumnName", "USER@WORK") + MyBase.Columns.Add(Me._columnUSER_WORK) + Me.columnWORKED = New Global.System.Data.DataColumn("WORKED", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnWORKED) + Me.columnADDED_WHEN = New Global.System.Data.DataColumn("ADDED_WHEN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnADDED_WHEN) + Me.columnHANDLE_TYPE = New Global.System.Data.DataColumn("HANDLE_TYPE", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnHANDLE_TYPE) + Me.columnDelete = New Global.System.Data.DataColumn("Delete", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnDelete) + Me.columnFILENAME_ONLY = New Global.System.Data.DataColumn("FILENAME_ONLY", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnFILENAME_ONLY) + Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnGUID}, true)) + Me.columnGUID.AutoIncrement = true + Me.columnGUID.AutoIncrementSeed = -1 + Me.columnGUID.AutoIncrementStep = -1 + Me.columnGUID.AllowDBNull = false + Me.columnGUID.ReadOnly = true + Me.columnGUID.Unique = true + Me.columnFILENAME2WORK.AllowDBNull = false + Me.columnFILENAME2WORK.MaxLength = 500 + Me._columnUSER_WORK.AllowDBNull = false + Me._columnUSER_WORK.MaxLength = 50 + Me.columnWORKED.AllowDBNull = false + Me.columnADDED_WHEN.AllowDBNull = false + Me.columnHANDLE_TYPE.MaxLength = 50 + Me.columnDelete.DefaultValue = CType(false,Boolean) + Me.columnFILENAME_ONLY.AllowDBNull = false + Me.columnFILENAME_ONLY.MaxLength = 250 End Sub _ - Public Function NewTBTempFiles2IndexRow() As TBTempFiles2IndexRow - Return CType(Me.NewRow,TBTempFiles2IndexRow) + Public Function NewTBGI_FILES_USERRow() As TBGI_FILES_USERRow + Return CType(Me.NewRow,TBGI_FILES_USERRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow - Return New TBTempFiles2IndexRow(builder) + Return New TBGI_FILES_USERRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type - Return GetType(TBTempFiles2IndexRow) + Return GetType(TBGI_FILES_USERRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) - If (Not (Me.TBTempFiles2IndexRowChangedEvent) Is Nothing) Then - RaiseEvent TBTempFiles2IndexRowChanged(Me, New TBTempFiles2IndexRowChangeEvent(CType(e.Row,TBTempFiles2IndexRow), e.Action)) + If (Not (Me.TBGI_FILES_USERRowChangedEvent) Is Nothing) Then + RaiseEvent TBGI_FILES_USERRowChanged(Me, New TBGI_FILES_USERRowChangeEvent(CType(e.Row,TBGI_FILES_USERRow), e.Action)) End If End Sub @@ -10924,8 +11096,8 @@ Partial Public Class MyDataset Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) - If (Not (Me.TBTempFiles2IndexRowChangingEvent) Is Nothing) Then - RaiseEvent TBTempFiles2IndexRowChanging(Me, New TBTempFiles2IndexRowChangeEvent(CType(e.Row,TBTempFiles2IndexRow), e.Action)) + If (Not (Me.TBGI_FILES_USERRowChangingEvent) Is Nothing) Then + RaiseEvent TBGI_FILES_USERRowChanging(Me, New TBGI_FILES_USERRowChangeEvent(CType(e.Row,TBGI_FILES_USERRow), e.Action)) End If End Sub @@ -10933,8 +11105,8 @@ Partial Public Class MyDataset Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) - If (Not (Me.TBTempFiles2IndexRowDeletedEvent) Is Nothing) Then - RaiseEvent TBTempFiles2IndexRowDeleted(Me, New TBTempFiles2IndexRowChangeEvent(CType(e.Row,TBTempFiles2IndexRow), e.Action)) + If (Not (Me.TBGI_FILES_USERRowDeletedEvent) Is Nothing) Then + RaiseEvent TBGI_FILES_USERRowDeleted(Me, New TBGI_FILES_USERRowChangeEvent(CType(e.Row,TBGI_FILES_USERRow), e.Action)) End If End Sub @@ -10942,14 +11114,14 @@ Partial Public Class MyDataset Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) - If (Not (Me.TBTempFiles2IndexRowDeletingEvent) Is Nothing) Then - RaiseEvent TBTempFiles2IndexRowDeleting(Me, New TBTempFiles2IndexRowChangeEvent(CType(e.Row,TBTempFiles2IndexRow), e.Action)) + If (Not (Me.TBGI_FILES_USERRowDeletingEvent) Is Nothing) Then + RaiseEvent TBGI_FILES_USERRowDeleting(Me, New TBGI_FILES_USERRowChangeEvent(CType(e.Row,TBGI_FILES_USERRow), e.Action)) End If End Sub _ - Public Sub RemoveTBTempFiles2IndexRow(ByVal row As TBTempFiles2IndexRow) + Public Sub RemoveTBGI_FILES_USERRow(ByVal row As TBGI_FILES_USERRow) Me.Rows.Remove(row) End Sub @@ -10976,7 +11148,7 @@ Partial Public Class MyDataset type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" - attribute2.FixedValue = "TBTempFiles2IndexDataTable" + attribute2.FixedValue = "TBGI_FILES_USERDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable @@ -11025,20 +11197,22 @@ Partial Public Class MyDataset ''' _ - Partial Public Class TBTEMP_INDEXRESULTSDataTable - Inherits Global.System.Data.TypedTableBase(Of TBTEMP_INDEXRESULTSRow) + Partial Public Class TBGI_HISTORYDataTable + Inherits Global.System.Data.TypedTableBase(Of TBGI_HISTORYRow) - Private columnIndexname As Global.System.Data.DataColumn + Private columnGUID As Global.System.Data.DataColumn - Private columnValue As Global.System.Data.DataColumn + Private columnFILENAME_ORIGINAL As Global.System.Data.DataColumn - Private columnDokumentart As Global.System.Data.DataColumn + Private columnFILENAME_NEW As Global.System.Data.DataColumn + + Private columnADDED_WHEN As Global.System.Data.DataColumn _ Public Sub New() MyBase.New - Me.TableName = "TBTEMP_INDEXRESULTS" + Me.TableName = "TBGI_HISTORY" Me.BeginInit Me.InitClass Me.EndInit @@ -11071,25 +11245,33 @@ Partial Public Class MyDataset _ - Public ReadOnly Property IndexnameColumn() As Global.System.Data.DataColumn + Public ReadOnly Property GUIDColumn() As Global.System.Data.DataColumn Get - Return Me.columnIndexname + Return Me.columnGUID End Get End Property _ - Public ReadOnly Property ValueColumn() As Global.System.Data.DataColumn + Public ReadOnly Property FILENAME_ORIGINALColumn() As Global.System.Data.DataColumn Get - Return Me.columnValue + Return Me.columnFILENAME_ORIGINAL End Get End Property _ - Public ReadOnly Property DokumentartColumn() As Global.System.Data.DataColumn + Public ReadOnly Property FILENAME_NEWColumn() As Global.System.Data.DataColumn Get - Return Me.columnDokumentart + Return Me.columnFILENAME_NEW + End Get + End Property + + _ + Public ReadOnly Property ADDED_WHENColumn() As Global.System.Data.DataColumn + Get + Return Me.columnADDED_WHEN End Get End Property @@ -11104,44 +11286,50 @@ Partial Public Class MyDataset _ - Public Default ReadOnly Property Item(ByVal index As Integer) As TBTEMP_INDEXRESULTSRow + Public Default ReadOnly Property Item(ByVal index As Integer) As TBGI_HISTORYRow Get - Return CType(Me.Rows(index),TBTEMP_INDEXRESULTSRow) + Return CType(Me.Rows(index),TBGI_HISTORYRow) End Get End Property _ - Public Event TBTEMP_INDEXRESULTSRowChanging As TBTEMP_INDEXRESULTSRowChangeEventHandler + Public Event TBGI_HISTORYRowChanging As TBGI_HISTORYRowChangeEventHandler _ - Public Event TBTEMP_INDEXRESULTSRowChanged As TBTEMP_INDEXRESULTSRowChangeEventHandler + Public Event TBGI_HISTORYRowChanged As TBGI_HISTORYRowChangeEventHandler _ - Public Event TBTEMP_INDEXRESULTSRowDeleting As TBTEMP_INDEXRESULTSRowChangeEventHandler + Public Event TBGI_HISTORYRowDeleting As TBGI_HISTORYRowChangeEventHandler _ - Public Event TBTEMP_INDEXRESULTSRowDeleted As TBTEMP_INDEXRESULTSRowChangeEventHandler + Public Event TBGI_HISTORYRowDeleted As TBGI_HISTORYRowChangeEventHandler _ - Public Overloads Sub AddTBTEMP_INDEXRESULTSRow(ByVal row As TBTEMP_INDEXRESULTSRow) + Public Overloads Sub AddTBGI_HISTORYRow(ByVal row As TBGI_HISTORYRow) Me.Rows.Add(row) End Sub _ - Public Overloads Function AddTBTEMP_INDEXRESULTSRow(ByVal Indexname As String, ByVal Value As String, ByVal Dokumentart As String) As TBTEMP_INDEXRESULTSRow - Dim rowTBTEMP_INDEXRESULTSRow As TBTEMP_INDEXRESULTSRow = CType(Me.NewRow,TBTEMP_INDEXRESULTSRow) - Dim columnValuesArray() As Object = New Object() {Indexname, Value, Dokumentart} - rowTBTEMP_INDEXRESULTSRow.ItemArray = columnValuesArray - Me.Rows.Add(rowTBTEMP_INDEXRESULTSRow) - Return rowTBTEMP_INDEXRESULTSRow + Public Overloads Function AddTBGI_HISTORYRow(ByVal FILENAME_ORIGINAL As String, ByVal FILENAME_NEW As String, ByVal ADDED_WHEN As Date) As TBGI_HISTORYRow + Dim rowTBGI_HISTORYRow As TBGI_HISTORYRow = CType(Me.NewRow,TBGI_HISTORYRow) + Dim columnValuesArray() As Object = New Object() {Nothing, FILENAME_ORIGINAL, FILENAME_NEW, ADDED_WHEN} + rowTBGI_HISTORYRow.ItemArray = columnValuesArray + Me.Rows.Add(rowTBGI_HISTORYRow) + Return rowTBGI_HISTORYRow + End Function + + _ + Public Function FindByGUID(ByVal GUID As Integer) As TBGI_HISTORYRow + Return CType(Me.Rows.Find(New Object() {GUID}),TBGI_HISTORYRow) End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable - Dim cln As TBTEMP_INDEXRESULTSDataTable = CType(MyBase.Clone,TBTEMP_INDEXRESULTSDataTable) + Dim cln As TBGI_HISTORYDataTable = CType(MyBase.Clone,TBGI_HISTORYDataTable) cln.InitVars Return cln End Function @@ -11149,52 +11337,65 @@ Partial Public Class MyDataset _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable - Return New TBTEMP_INDEXRESULTSDataTable() + Return New TBGI_HISTORYDataTable() End Function _ Friend Sub InitVars() - Me.columnIndexname = MyBase.Columns("Indexname") - Me.columnValue = MyBase.Columns("Value") - Me.columnDokumentart = MyBase.Columns("Dokumentart") + Me.columnGUID = MyBase.Columns("GUID") + Me.columnFILENAME_ORIGINAL = MyBase.Columns("FILENAME_ORIGINAL") + Me.columnFILENAME_NEW = MyBase.Columns("FILENAME_NEW") + Me.columnADDED_WHEN = MyBase.Columns("ADDED_WHEN") End Sub _ Private Sub InitClass() - Me.columnIndexname = New Global.System.Data.DataColumn("Indexname", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnIndexname) - Me.columnValue = New Global.System.Data.DataColumn("Value", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnValue) - Me.columnDokumentart = New Global.System.Data.DataColumn("Dokumentart", GetType(String), Nothing, Global.System.Data.MappingType.Element) - MyBase.Columns.Add(Me.columnDokumentart) + Me.columnGUID = New Global.System.Data.DataColumn("GUID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnGUID) + Me.columnFILENAME_ORIGINAL = New Global.System.Data.DataColumn("FILENAME_ORIGINAL", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnFILENAME_ORIGINAL) + Me.columnFILENAME_NEW = New Global.System.Data.DataColumn("FILENAME_NEW", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnFILENAME_NEW) + Me.columnADDED_WHEN = New Global.System.Data.DataColumn("ADDED_WHEN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnADDED_WHEN) + Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnGUID}, true)) + Me.columnGUID.AutoIncrement = true + Me.columnGUID.AutoIncrementSeed = -1 + Me.columnGUID.AutoIncrementStep = -1 + Me.columnGUID.AllowDBNull = false + Me.columnGUID.ReadOnly = true + Me.columnGUID.Unique = true + Me.columnFILENAME_ORIGINAL.MaxLength = 250 + Me.columnFILENAME_NEW.MaxLength = 250 + Me.columnADDED_WHEN.AllowDBNull = false End Sub _ - Public Function NewTBTEMP_INDEXRESULTSRow() As TBTEMP_INDEXRESULTSRow - Return CType(Me.NewRow,TBTEMP_INDEXRESULTSRow) + Public Function NewTBGI_HISTORYRow() As TBGI_HISTORYRow + Return CType(Me.NewRow,TBGI_HISTORYRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow - Return New TBTEMP_INDEXRESULTSRow(builder) + Return New TBGI_HISTORYRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type - Return GetType(TBTEMP_INDEXRESULTSRow) + Return GetType(TBGI_HISTORYRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) - If (Not (Me.TBTEMP_INDEXRESULTSRowChangedEvent) Is Nothing) Then - RaiseEvent TBTEMP_INDEXRESULTSRowChanged(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action)) + If (Not (Me.TBGI_HISTORYRowChangedEvent) Is Nothing) Then + RaiseEvent TBGI_HISTORYRowChanged(Me, New TBGI_HISTORYRowChangeEvent(CType(e.Row,TBGI_HISTORYRow), e.Action)) End If End Sub @@ -11202,8 +11403,8 @@ Partial Public Class MyDataset Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) - If (Not (Me.TBTEMP_INDEXRESULTSRowChangingEvent) Is Nothing) Then - RaiseEvent TBTEMP_INDEXRESULTSRowChanging(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action)) + If (Not (Me.TBGI_HISTORYRowChangingEvent) Is Nothing) Then + RaiseEvent TBGI_HISTORYRowChanging(Me, New TBGI_HISTORYRowChangeEvent(CType(e.Row,TBGI_HISTORYRow), e.Action)) End If End Sub @@ -11211,8 +11412,8 @@ Partial Public Class MyDataset Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) - If (Not (Me.TBTEMP_INDEXRESULTSRowDeletedEvent) Is Nothing) Then - RaiseEvent TBTEMP_INDEXRESULTSRowDeleted(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action)) + If (Not (Me.TBGI_HISTORYRowDeletedEvent) Is Nothing) Then + RaiseEvent TBGI_HISTORYRowDeleted(Me, New TBGI_HISTORYRowChangeEvent(CType(e.Row,TBGI_HISTORYRow), e.Action)) End If End Sub @@ -11220,14 +11421,14 @@ Partial Public Class MyDataset Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) - If (Not (Me.TBTEMP_INDEXRESULTSRowDeletingEvent) Is Nothing) Then - RaiseEvent TBTEMP_INDEXRESULTSRowDeleting(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action)) + If (Not (Me.TBGI_HISTORYRowDeletingEvent) Is Nothing) Then + RaiseEvent TBGI_HISTORYRowDeleting(Me, New TBGI_HISTORYRowChangeEvent(CType(e.Row,TBGI_HISTORYRow), e.Action)) End If End Sub _ - Public Sub RemoveTBTEMP_INDEXRESULTSRow(ByVal row As TBTEMP_INDEXRESULTSRow) + Public Sub RemoveTBGI_HISTORYRow(ByVal row As TBGI_HISTORYRow) Me.Rows.Remove(row) End Sub @@ -11254,7 +11455,7 @@ Partial Public Class MyDataset type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" - attribute2.FixedValue = "TBTEMP_INDEXRESULTSDataTable" + attribute2.FixedValue = "TBGI_HISTORYDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable @@ -11299,670 +11500,879 @@ Partial Public Class MyDataset End Class ''' - '''Represents strongly named DataRow class. + '''Represents the strongly named DataTable class. ''' - Partial Public Class TBDD_USERRow - Inherits Global.System.Data.DataRow + _ + Partial Public Class TBTempFiles2IndexDataTable + Inherits Global.System.Data.TypedTableBase(Of TBTempFiles2IndexRow) - Private tableTBDD_USER As TBDD_USERDataTable + Private columnFilestring As Global.System.Data.DataColumn + + Private columnWorked As Global.System.Data.DataColumn _ - Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) - MyBase.New(rb) - Me.tableTBDD_USER = CType(Me.Table,TBDD_USERDataTable) + Public Sub New() + MyBase.New + Me.TableName = "TBTempFiles2Index" + Me.BeginInit + Me.InitClass + Me.EndInit End Sub _ - Public Property GUID() As Integer - Get - Return CType(Me(Me.tableTBDD_USER.GUIDColumn),Integer) - End Get - Set - Me(Me.tableTBDD_USER.GUIDColumn) = value - End Set - End Property + Friend Sub New(ByVal table As Global.System.Data.DataTable) + MyBase.New + Me.TableName = table.TableName + If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then + Me.CaseSensitive = table.CaseSensitive + End If + If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then + Me.Locale = table.Locale + End If + If (table.Namespace <> table.DataSet.Namespace) Then + Me.Namespace = table.Namespace + End If + Me.Prefix = table.Prefix + Me.MinimumCapacity = table.MinimumCapacity + End Sub _ - Public Property PRENAME() As String - Get - Try - Return CType(Me(Me.tableTBDD_USER.PRENAMEColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte PRENAME in Tabelle TBDD_USER ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_USER.PRENAMEColumn) = value - End Set - End Property + Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) + MyBase.New(info, context) + Me.InitVars + End Sub _ - Public Property NAME() As String + Public ReadOnly Property FilestringColumn() As Global.System.Data.DataColumn Get - Try - Return CType(Me(Me.tableTBDD_USER.NAMEColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAME in Tabelle TBDD_USER ist DBNull.", e) - End Try + Return Me.columnFilestring End Get - Set - Me(Me.tableTBDD_USER.NAMEColumn) = value - End Set End Property _ - Public Property USERNAME() As String + Public ReadOnly Property WorkedColumn() As Global.System.Data.DataColumn Get - Return CType(Me(Me.tableTBDD_USER.USERNAMEColumn),String) + Return Me.columnWorked End Get - Set - Me(Me.tableTBDD_USER.USERNAMEColumn) = value - End Set End Property _ - Public Property EMAIL() As String + Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ + Global.System.ComponentModel.Browsable(false)> _ + Public ReadOnly Property Count() As Integer Get - Try - Return CType(Me(Me.tableTBDD_USER.EMAILColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte EMAIL in Tabelle TBDD_USER ist DBNull.", e) - End Try + Return Me.Rows.Count End Get - Set - Me(Me.tableTBDD_USER.EMAILColumn) = value - End Set End Property _ - Public Property LOGGED_IN() As Boolean + Public Default ReadOnly Property Item(ByVal index As Integer) As TBTempFiles2IndexRow Get - Return CType(Me(Me.tableTBDD_USER.LOGGED_INColumn),Boolean) + Return CType(Me.Rows(index),TBTempFiles2IndexRow) End Get - Set - Me(Me.tableTBDD_USER.LOGGED_INColumn) = value - End Set End Property - _ - Public Property LOGGED_WHERE() As String - Get - Try - Return CType(Me(Me.tableTBDD_USER.LOGGED_WHEREColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte LOGGED_WHERE in Tabelle TBDD_USER ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_USER.LOGGED_WHEREColumn) = value - End Set - End Property + _ + Public Event TBTempFiles2IndexRowChanging As TBTempFiles2IndexRowChangeEventHandler - _ - Public Property LOG_IN_WHEN() As Date - Get - Try - Return CType(Me(Me.tableTBDD_USER.LOG_IN_WHENColumn),Date) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte LOG_IN_WHEN in Tabelle TBDD_USER ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_USER.LOG_IN_WHENColumn) = value - End Set - End Property + _ + Public Event TBTempFiles2IndexRowChanged As TBTempFiles2IndexRowChangeEventHandler + + _ + Public Event TBTempFiles2IndexRowDeleting As TBTempFiles2IndexRowChangeEventHandler + + _ + Public Event TBTempFiles2IndexRowDeleted As TBTempFiles2IndexRowChangeEventHandler _ - Public Property LOG_OUT_WHEN() As Date - Get - Try - Return CType(Me(Me.tableTBDD_USER.LOG_OUT_WHENColumn),Date) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte LOG_OUT_WHEN in Tabelle TBDD_USER ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_USER.LOG_OUT_WHENColumn) = value - End Set - End Property + Public Overloads Sub AddTBTempFiles2IndexRow(ByVal row As TBTempFiles2IndexRow) + Me.Rows.Add(row) + End Sub _ - Public Property GI_ADMIN() As Boolean - Get - Return CType(Me(Me.tableTBDD_USER.GI_ADMINColumn),Boolean) - End Get - Set - Me(Me.tableTBDD_USER.GI_ADMINColumn) = value - End Set - End Property + Public Overloads Function AddTBTempFiles2IndexRow(ByVal Filestring As String, ByVal Worked As Boolean) As TBTempFiles2IndexRow + Dim rowTBTempFiles2IndexRow As TBTempFiles2IndexRow = CType(Me.NewRow,TBTempFiles2IndexRow) + Dim columnValuesArray() As Object = New Object() {Filestring, Worked} + rowTBTempFiles2IndexRow.ItemArray = columnValuesArray + Me.Rows.Add(rowTBTempFiles2IndexRow) + Return rowTBTempFiles2IndexRow + End Function _ - Public Property ADDED_WHO() As String - Get - Return CType(Me(Me.tableTBDD_USER.ADDED_WHOColumn),String) - End Get - Set - Me(Me.tableTBDD_USER.ADDED_WHOColumn) = value - End Set - End Property + Public Overrides Function Clone() As Global.System.Data.DataTable + Dim cln As TBTempFiles2IndexDataTable = CType(MyBase.Clone,TBTempFiles2IndexDataTable) + cln.InitVars + Return cln + End Function _ - Public Property ADDED_WHEN() As Date - Get - Try - Return CType(Me(Me.tableTBDD_USER.ADDED_WHENColumn),Date) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ADDED_WHEN in Tabelle TBDD_USER ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_USER.ADDED_WHENColumn) = value - End Set - End Property + Protected Overrides Function CreateInstance() As Global.System.Data.DataTable + Return New TBTempFiles2IndexDataTable() + End Function _ - Public Property CHANGED_WHO() As String - Get - Try - Return CType(Me(Me.tableTBDD_USER.CHANGED_WHOColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHO in Tabelle TBDD_USER ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_USER.CHANGED_WHOColumn) = value - End Set - End Property + Friend Sub InitVars() + Me.columnFilestring = MyBase.Columns("Filestring") + Me.columnWorked = MyBase.Columns("Worked") + End Sub _ - Public Property CHANGED_WHEN() As Date - Get - Try - Return CType(Me(Me.tableTBDD_USER.CHANGED_WHENColumn),Date) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHEN in Tabelle TBDD_USER ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_USER.CHANGED_WHENColumn) = value - End Set - End Property + Private Sub InitClass() + Me.columnFilestring = New Global.System.Data.DataColumn("Filestring", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnFilestring) + Me.columnWorked = New Global.System.Data.DataColumn("Worked", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnWorked) + Me.columnWorked.DefaultValue = CType(false,Boolean) + End Sub _ - Public Function IsPRENAMENull() As Boolean - Return Me.IsNull(Me.tableTBDD_USER.PRENAMEColumn) + Public Function NewTBTempFiles2IndexRow() As TBTempFiles2IndexRow + Return CType(Me.NewRow,TBTempFiles2IndexRow) End Function _ - Public Sub SetPRENAMENull() - Me(Me.tableTBDD_USER.PRENAMEColumn) = Global.System.Convert.DBNull - End Sub + Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow + Return New TBTempFiles2IndexRow(builder) + End Function _ - Public Function IsNAMENull() As Boolean - Return Me.IsNull(Me.tableTBDD_USER.NAMEColumn) + Protected Overrides Function GetRowType() As Global.System.Type + Return GetType(TBTempFiles2IndexRow) End Function _ - Public Sub SetNAMENull() - Me(Me.tableTBDD_USER.NAMEColumn) = Global.System.Convert.DBNull + Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanged(e) + If (Not (Me.TBTempFiles2IndexRowChangedEvent) Is Nothing) Then + RaiseEvent TBTempFiles2IndexRowChanged(Me, New TBTempFiles2IndexRowChangeEvent(CType(e.Row,TBTempFiles2IndexRow), e.Action)) + End If End Sub _ - Public Function IsEMAILNull() As Boolean - Return Me.IsNull(Me.tableTBDD_USER.EMAILColumn) - End Function + Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanging(e) + If (Not (Me.TBTempFiles2IndexRowChangingEvent) Is Nothing) Then + RaiseEvent TBTempFiles2IndexRowChanging(Me, New TBTempFiles2IndexRowChangeEvent(CType(e.Row,TBTempFiles2IndexRow), e.Action)) + End If + End Sub _ - Public Sub SetEMAILNull() - Me(Me.tableTBDD_USER.EMAILColumn) = Global.System.Convert.DBNull + Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleted(e) + If (Not (Me.TBTempFiles2IndexRowDeletedEvent) Is Nothing) Then + RaiseEvent TBTempFiles2IndexRowDeleted(Me, New TBTempFiles2IndexRowChangeEvent(CType(e.Row,TBTempFiles2IndexRow), e.Action)) + End If End Sub _ - Public Function IsLOGGED_WHERENull() As Boolean - Return Me.IsNull(Me.tableTBDD_USER.LOGGED_WHEREColumn) - End Function + Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleting(e) + If (Not (Me.TBTempFiles2IndexRowDeletingEvent) Is Nothing) Then + RaiseEvent TBTempFiles2IndexRowDeleting(Me, New TBTempFiles2IndexRowChangeEvent(CType(e.Row,TBTempFiles2IndexRow), e.Action)) + End If + End Sub _ - Public Sub SetLOGGED_WHERENull() - Me(Me.tableTBDD_USER.LOGGED_WHEREColumn) = Global.System.Convert.DBNull + Public Sub RemoveTBTempFiles2IndexRow(ByVal row As TBTempFiles2IndexRow) + Me.Rows.Remove(row) End Sub _ - Public Function IsLOG_IN_WHENNull() As Boolean - Return Me.IsNull(Me.tableTBDD_USER.LOG_IN_WHENColumn) - End Function - - _ - Public Sub SetLOG_IN_WHENNull() - Me(Me.tableTBDD_USER.LOG_IN_WHENColumn) = Global.System.Convert.DBNull - End Sub - - _ - Public Function IsLOG_OUT_WHENNull() As Boolean - Return Me.IsNull(Me.tableTBDD_USER.LOG_OUT_WHENColumn) - End Function - - _ - Public Sub SetLOG_OUT_WHENNull() - Me(Me.tableTBDD_USER.LOG_OUT_WHENColumn) = Global.System.Convert.DBNull - End Sub - - _ - Public Function IsADDED_WHENNull() As Boolean - Return Me.IsNull(Me.tableTBDD_USER.ADDED_WHENColumn) + Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType + Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() + Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() + Dim ds As MyDataset = New MyDataset() + Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any1.Namespace = "http://www.w3.org/2001/XMLSchema" + any1.MinOccurs = New Decimal(0) + any1.MaxOccurs = Decimal.MaxValue + any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any1) + Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" + any2.MinOccurs = New Decimal(1) + any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any2) + Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute1.Name = "namespace" + attribute1.FixedValue = ds.Namespace + type.Attributes.Add(attribute1) + Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute2.Name = "tableTypeName" + attribute2.FixedValue = "TBTempFiles2IndexDataTable" + type.Attributes.Add(attribute2) + type.Particle = sequence + Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable + If xs.Contains(dsSchema.TargetNamespace) Then + Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Try + Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing + dsSchema.Write(s1) + Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator + Do While schemas.MoveNext + schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) + s2.SetLength(0) + schema.Write(s2) + If (s1.Length = s2.Length) Then + s1.Position = 0 + s2.Position = 0 + + Do While ((s1.Position <> s1.Length) _ + AndAlso (s1.ReadByte = s2.ReadByte)) + + + Loop + If (s1.Position = s1.Length) Then + Return type + End If + End If + + Loop + Finally + If (Not (s1) Is Nothing) Then + s1.Close + End If + If (Not (s2) Is Nothing) Then + s2.Close + End If + End Try + End If + xs.Add(dsSchema) + Return type End Function + End Class + + ''' + '''Represents the strongly named DataTable class. + ''' + _ + Partial Public Class TBTEMP_INDEXRESULTSDataTable + Inherits Global.System.Data.TypedTableBase(Of TBTEMP_INDEXRESULTSRow) - _ - Public Sub SetADDED_WHENNull() - Me(Me.tableTBDD_USER.ADDED_WHENColumn) = Global.System.Convert.DBNull - End Sub - - _ - Public Function IsCHANGED_WHONull() As Boolean - Return Me.IsNull(Me.tableTBDD_USER.CHANGED_WHOColumn) - End Function + Private columnIndexname As Global.System.Data.DataColumn - _ - Public Sub SetCHANGED_WHONull() - Me(Me.tableTBDD_USER.CHANGED_WHOColumn) = Global.System.Convert.DBNull - End Sub + Private columnValue As Global.System.Data.DataColumn - _ - Public Function IsCHANGED_WHENNull() As Boolean - Return Me.IsNull(Me.tableTBDD_USER.CHANGED_WHENColumn) - End Function + Private columnDokumentart As Global.System.Data.DataColumn _ - Public Sub SetCHANGED_WHENNull() - Me(Me.tableTBDD_USER.CHANGED_WHENColumn) = Global.System.Convert.DBNull + Public Sub New() + MyBase.New + Me.TableName = "TBTEMP_INDEXRESULTS" + Me.BeginInit + Me.InitClass + Me.EndInit End Sub _ - Public Function GetTBDD_GROUPS_USERRows() As TBDD_GROUPS_USERRow() - If (Me.Table.ChildRelations("FK_TBDD_GROUPS_USER_USER_ID") Is Nothing) Then - Return New TBDD_GROUPS_USERRow(-1) {} - Else - Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBDD_GROUPS_USER_USER_ID")),TBDD_GROUPS_USERRow()) + Friend Sub New(ByVal table As Global.System.Data.DataTable) + MyBase.New + Me.TableName = table.TableName + If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then + Me.CaseSensitive = table.CaseSensitive End If - End Function - - _ - Public Function GetTBHOTKEY_USER_PROFILERows() As TBHOTKEY_USER_PROFILERow() - If (Me.Table.ChildRelations("FK_TBHOTKEY_USER_PROFILE_USER_ID") Is Nothing) Then - Return New TBHOTKEY_USER_PROFILERow(-1) {} - Else - Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBHOTKEY_USER_PROFILE_USER_ID")),TBHOTKEY_USER_PROFILERow()) + If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then + Me.Locale = table.Locale End If - End Function - End Class - - ''' - '''Represents strongly named DataRow class. - ''' - Partial Public Class TBDD_DOKUMENTARTRow - Inherits Global.System.Data.DataRow - - Private tableTBDD_DOKUMENTART As TBDD_DOKUMENTARTDataTable + If (table.Namespace <> table.DataSet.Namespace) Then + Me.Namespace = table.Namespace + End If + Me.Prefix = table.Prefix + Me.MinimumCapacity = table.MinimumCapacity + End Sub _ - Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) - MyBase.New(rb) - Me.tableTBDD_DOKUMENTART = CType(Me.Table,TBDD_DOKUMENTARTDataTable) + Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) + MyBase.New(info, context) + Me.InitVars End Sub _ - Public Property GUID() As Integer + Public ReadOnly Property IndexnameColumn() As Global.System.Data.DataColumn Get - Return CType(Me(Me.tableTBDD_DOKUMENTART.GUIDColumn),Integer) + Return Me.columnIndexname End Get - Set - Me(Me.tableTBDD_DOKUMENTART.GUIDColumn) = value - End Set End Property _ - Public Property BEZEICHNUNG() As String + Public ReadOnly Property ValueColumn() As Global.System.Data.DataColumn Get - Return CType(Me(Me.tableTBDD_DOKUMENTART.BEZEICHNUNGColumn),String) + Return Me.columnValue End Get - Set - Me(Me.tableTBDD_DOKUMENTART.BEZEICHNUNGColumn) = value - End Set End Property _ - Public Property EINGANGSART_ID() As Byte + Public ReadOnly Property DokumentartColumn() As Global.System.Data.DataColumn Get - Return CType(Me(Me.tableTBDD_DOKUMENTART.EINGANGSART_IDColumn),Byte) + Return Me.columnDokumentart End Get - Set - Me(Me.tableTBDD_DOKUMENTART.EINGANGSART_IDColumn) = value - End Set End Property _ - Public Property KURZNAME() As String + Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ + Global.System.ComponentModel.Browsable(false)> _ + Public ReadOnly Property Count() As Integer Get - Return CType(Me(Me.tableTBDD_DOKUMENTART.KURZNAMEColumn),String) + Return Me.Rows.Count End Get - Set - Me(Me.tableTBDD_DOKUMENTART.KURZNAMEColumn) = value - End Set End Property _ - Public Property ZIEL_PFAD() As String + Public Default ReadOnly Property Item(ByVal index As Integer) As TBTEMP_INDEXRESULTSRow Get - Return CType(Me(Me.tableTBDD_DOKUMENTART.ZIEL_PFADColumn),String) + Return CType(Me.Rows(index),TBTEMP_INDEXRESULTSRow) End Get - Set - Me(Me.tableTBDD_DOKUMENTART.ZIEL_PFADColumn) = value - End Set End Property + _ + Public Event TBTEMP_INDEXRESULTSRowChanging As TBTEMP_INDEXRESULTSRowChangeEventHandler + + _ + Public Event TBTEMP_INDEXRESULTSRowChanged As TBTEMP_INDEXRESULTSRowChangeEventHandler + + _ + Public Event TBTEMP_INDEXRESULTSRowDeleting As TBTEMP_INDEXRESULTSRowChangeEventHandler + + _ + Public Event TBTEMP_INDEXRESULTSRowDeleted As TBTEMP_INDEXRESULTSRowChangeEventHandler + _ - Public Property BESCHREIBUNG() As String - Get - Try - Return CType(Me(Me.tableTBDD_DOKUMENTART.BESCHREIBUNGColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte BESCHREIBUNG in Tabelle TBDD_DOKUMENTART ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_DOKUMENTART.BESCHREIBUNGColumn) = value - End Set - End Property + Public Overloads Sub AddTBTEMP_INDEXRESULTSRow(ByVal row As TBTEMP_INDEXRESULTSRow) + Me.Rows.Add(row) + End Sub _ - Public Property AKTIV() As Boolean - Get - Return CType(Me(Me.tableTBDD_DOKUMENTART.AKTIVColumn),Boolean) - End Get - Set - Me(Me.tableTBDD_DOKUMENTART.AKTIVColumn) = value - End Set - End Property + Public Overloads Function AddTBTEMP_INDEXRESULTSRow(ByVal Indexname As String, ByVal Value As String, ByVal Dokumentart As String) As TBTEMP_INDEXRESULTSRow + Dim rowTBTEMP_INDEXRESULTSRow As TBTEMP_INDEXRESULTSRow = CType(Me.NewRow,TBTEMP_INDEXRESULTSRow) + Dim columnValuesArray() As Object = New Object() {Indexname, Value, Dokumentart} + rowTBTEMP_INDEXRESULTSRow.ItemArray = columnValuesArray + Me.Rows.Add(rowTBTEMP_INDEXRESULTSRow) + Return rowTBTEMP_INDEXRESULTSRow + End Function _ - Public Property NAMENKONVENTION() As String - Get - Try - Return CType(Me(Me.tableTBDD_DOKUMENTART.NAMENKONVENTIONColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAMENKONVENTION in Tabelle TBDD_DOKUMENTART ist DBNull.", e) + Public Overrides Function Clone() As Global.System.Data.DataTable + Dim cln As TBTEMP_INDEXRESULTSDataTable = CType(MyBase.Clone,TBTEMP_INDEXRESULTSDataTable) + cln.InitVars + Return cln + End Function + + _ + Protected Overrides Function CreateInstance() As Global.System.Data.DataTable + Return New TBTEMP_INDEXRESULTSDataTable() + End Function + + _ + Friend Sub InitVars() + Me.columnIndexname = MyBase.Columns("Indexname") + Me.columnValue = MyBase.Columns("Value") + Me.columnDokumentart = MyBase.Columns("Dokumentart") + End Sub + + _ + Private Sub InitClass() + Me.columnIndexname = New Global.System.Data.DataColumn("Indexname", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnIndexname) + Me.columnValue = New Global.System.Data.DataColumn("Value", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnValue) + Me.columnDokumentart = New Global.System.Data.DataColumn("Dokumentart", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnDokumentart) + End Sub + + _ + Public Function NewTBTEMP_INDEXRESULTSRow() As TBTEMP_INDEXRESULTSRow + Return CType(Me.NewRow,TBTEMP_INDEXRESULTSRow) + End Function + + _ + Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow + Return New TBTEMP_INDEXRESULTSRow(builder) + End Function + + _ + Protected Overrides Function GetRowType() As Global.System.Type + Return GetType(TBTEMP_INDEXRESULTSRow) + End Function + + _ + Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanged(e) + If (Not (Me.TBTEMP_INDEXRESULTSRowChangedEvent) Is Nothing) Then + RaiseEvent TBTEMP_INDEXRESULTSRowChanged(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanging(e) + If (Not (Me.TBTEMP_INDEXRESULTSRowChangingEvent) Is Nothing) Then + RaiseEvent TBTEMP_INDEXRESULTSRowChanging(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleted(e) + If (Not (Me.TBTEMP_INDEXRESULTSRowDeletedEvent) Is Nothing) Then + RaiseEvent TBTEMP_INDEXRESULTSRowDeleted(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleting(e) + If (Not (Me.TBTEMP_INDEXRESULTSRowDeletingEvent) Is Nothing) Then + RaiseEvent TBTEMP_INDEXRESULTSRowDeleting(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action)) + End If + End Sub + + _ + Public Sub RemoveTBTEMP_INDEXRESULTSRow(ByVal row As TBTEMP_INDEXRESULTSRow) + Me.Rows.Remove(row) + End Sub + + _ + Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType + Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() + Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() + Dim ds As MyDataset = New MyDataset() + Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any1.Namespace = "http://www.w3.org/2001/XMLSchema" + any1.MinOccurs = New Decimal(0) + any1.MaxOccurs = Decimal.MaxValue + any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any1) + Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" + any2.MinOccurs = New Decimal(1) + any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any2) + Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute1.Name = "namespace" + attribute1.FixedValue = ds.Namespace + type.Attributes.Add(attribute1) + Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute2.Name = "tableTypeName" + attribute2.FixedValue = "TBTEMP_INDEXRESULTSDataTable" + type.Attributes.Add(attribute2) + type.Particle = sequence + Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable + If xs.Contains(dsSchema.TargetNamespace) Then + Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Try + Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing + dsSchema.Write(s1) + Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator + Do While schemas.MoveNext + schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) + s2.SetLength(0) + schema.Write(s2) + If (s1.Length = s2.Length) Then + s1.Position = 0 + s2.Position = 0 + + Do While ((s1.Position <> s1.Length) _ + AndAlso (s1.ReadByte = s2.ReadByte)) + + + Loop + If (s1.Position = s1.Length) Then + Return type + End If + End If + + Loop + Finally + If (Not (s1) Is Nothing) Then + s1.Close + End If + If (Not (s2) Is Nothing) Then + s2.Close + End If End Try - End Get - Set - Me(Me.tableTBDD_DOKUMENTART.NAMENKONVENTIONColumn) = value - End Set - End Property + End If + xs.Add(dsSchema) + Return type + End Function + End Class + + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class TBDD_USERRow + Inherits Global.System.Data.DataRow + + Private tableTBDD_USER As TBDD_USERDataTable _ - Public Property ERSTELLTWER() As String + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTBDD_USER = CType(Me.Table,TBDD_USERDataTable) + End Sub + + _ + Public Property GUID() As Integer Get - Return CType(Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWERColumn),String) + Return CType(Me(Me.tableTBDD_USER.GUIDColumn),Integer) End Get Set - Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWERColumn) = value + Me(Me.tableTBDD_USER.GUIDColumn) = value End Set End Property _ - Public Property ERSTELLTWANN() As Date + Public Property PRENAME() As String Get Try - Return CType(Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWANNColumn),Date) + Return CType(Me(Me.tableTBDD_USER.PRENAMEColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWANN in Tabelle TBDD_DOKUMENTART ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte PRENAME in Tabelle TBDD_USER ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWANNColumn) = value + Me(Me.tableTBDD_USER.PRENAMEColumn) = value End Set End Property _ - Public Property GEANDERTWER() As String + Public Property NAME() As String Get Try - Return CType(Me(Me.tableTBDD_DOKUMENTART.GEANDERTWERColumn),String) + Return CType(Me(Me.tableTBDD_USER.NAMEColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEANDERTWER in Tabelle TBDD_DOKUMENTART ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAME in Tabelle TBDD_USER ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_DOKUMENTART.GEANDERTWERColumn) = value + Me(Me.tableTBDD_USER.NAMEColumn) = value End Set End Property _ - Public Property GEAENDERTWANN() As Date + Public Property USERNAME() As String Get - Try - Return CType(Me(Me.tableTBDD_DOKUMENTART.GEAENDERTWANNColumn),Date) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWANN in Tabelle TBDD_DOKUMENTART ist DBNull.", e) - End Try + Return CType(Me(Me.tableTBDD_USER.USERNAMEColumn),String) End Get Set - Me(Me.tableTBDD_DOKUMENTART.GEAENDERTWANNColumn) = value + Me(Me.tableTBDD_USER.USERNAMEColumn) = value End Set End Property _ - Public Property OBJEKTTYP() As String + Public Property EMAIL() As String Get Try - Return CType(Me(Me.tableTBDD_DOKUMENTART.OBJEKTTYPColumn),String) + Return CType(Me(Me.tableTBDD_USER.EMAILColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte OBJEKTTYP in Tabelle TBDD_DOKUMENTART ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte EMAIL in Tabelle TBDD_USER ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_DOKUMENTART.OBJEKTTYPColumn) = value + Me(Me.tableTBDD_USER.EMAILColumn) = value End Set End Property _ - Public Property WINDREAM_DIRECT() As Boolean + Public Property LOGGED_IN() As Boolean Get - Return CType(Me(Me.tableTBDD_DOKUMENTART.WINDREAM_DIRECTColumn),Boolean) + Return CType(Me(Me.tableTBDD_USER.LOGGED_INColumn),Boolean) End Get Set - Me(Me.tableTBDD_DOKUMENTART.WINDREAM_DIRECTColumn) = value + Me(Me.tableTBDD_USER.LOGGED_INColumn) = value End Set End Property _ - Public Property FOLDER_FOR_INDEX() As String + Public Property LOGGED_WHERE() As String Get Try - Return CType(Me(Me.tableTBDD_DOKUMENTART.FOLDER_FOR_INDEXColumn),String) + Return CType(Me(Me.tableTBDD_USER.LOGGED_WHEREColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte FOLDER_FOR_INDEX in Tabelle TBDD_DOKUMENTART ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte LOGGED_WHERE in Tabelle TBDD_USER ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_DOKUMENTART.FOLDER_FOR_INDEXColumn) = value + Me(Me.tableTBDD_USER.LOGGED_WHEREColumn) = value End Set End Property _ - Public Property SEQUENCE() As Integer + Public Property LOG_IN_WHEN() As Date Get - Return CType(Me(Me.tableTBDD_DOKUMENTART.SEQUENCEColumn),Integer) + Try + Return CType(Me(Me.tableTBDD_USER.LOG_IN_WHENColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte LOG_IN_WHEN in Tabelle TBDD_USER ist DBNull.", e) + End Try End Get Set - Me(Me.tableTBDD_DOKUMENTART.SEQUENCEColumn) = value + Me(Me.tableTBDD_USER.LOG_IN_WHENColumn) = value End Set End Property _ - Public Property TBDD_EINGANGSARTENRow() As TBDD_EINGANGSARTENRow + Public Property LOG_OUT_WHEN() As Date Get - Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_TBDD_DOKUMENTART_EINGID")),TBDD_EINGANGSARTENRow) + Try + Return CType(Me(Me.tableTBDD_USER.LOG_OUT_WHENColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte LOG_OUT_WHEN in Tabelle TBDD_USER ist DBNull.", e) + End Try End Get Set - Me.SetParentRow(value, Me.Table.ParentRelations("FK_TBDD_DOKUMENTART_EINGID")) + Me(Me.tableTBDD_USER.LOG_OUT_WHENColumn) = value End Set End Property _ - Public Function IsBESCHREIBUNGNull() As Boolean - Return Me.IsNull(Me.tableTBDD_DOKUMENTART.BESCHREIBUNGColumn) - End Function - + Public Property GI_ADMIN() As Boolean + Get + Return CType(Me(Me.tableTBDD_USER.GI_ADMINColumn),Boolean) + End Get + Set + Me(Me.tableTBDD_USER.GI_ADMINColumn) = value + End Set + End Property + _ - Public Sub SetBESCHREIBUNGNull() - Me(Me.tableTBDD_DOKUMENTART.BESCHREIBUNGColumn) = Global.System.Convert.DBNull + Public Property ADDED_WHO() As String + Get + Return CType(Me(Me.tableTBDD_USER.ADDED_WHOColumn),String) + End Get + Set + Me(Me.tableTBDD_USER.ADDED_WHOColumn) = value + End Set + End Property + + _ + Public Property ADDED_WHEN() As Date + Get + Try + Return CType(Me(Me.tableTBDD_USER.ADDED_WHENColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ADDED_WHEN in Tabelle TBDD_USER ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_USER.ADDED_WHENColumn) = value + End Set + End Property + + _ + Public Property CHANGED_WHO() As String + Get + Try + Return CType(Me(Me.tableTBDD_USER.CHANGED_WHOColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHO in Tabelle TBDD_USER ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_USER.CHANGED_WHOColumn) = value + End Set + End Property + + _ + Public Property CHANGED_WHEN() As Date + Get + Try + Return CType(Me(Me.tableTBDD_USER.CHANGED_WHENColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHEN in Tabelle TBDD_USER ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_USER.CHANGED_WHENColumn) = value + End Set + End Property + + _ + Public Function IsPRENAMENull() As Boolean + Return Me.IsNull(Me.tableTBDD_USER.PRENAMEColumn) + End Function + + _ + Public Sub SetPRENAMENull() + Me(Me.tableTBDD_USER.PRENAMEColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsNAMENKONVENTIONNull() As Boolean - Return Me.IsNull(Me.tableTBDD_DOKUMENTART.NAMENKONVENTIONColumn) + Public Function IsNAMENull() As Boolean + Return Me.IsNull(Me.tableTBDD_USER.NAMEColumn) End Function _ - Public Sub SetNAMENKONVENTIONNull() - Me(Me.tableTBDD_DOKUMENTART.NAMENKONVENTIONColumn) = Global.System.Convert.DBNull + Public Sub SetNAMENull() + Me(Me.tableTBDD_USER.NAMEColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsERSTELLTWANNNull() As Boolean - Return Me.IsNull(Me.tableTBDD_DOKUMENTART.ERSTELLTWANNColumn) + Public Function IsEMAILNull() As Boolean + Return Me.IsNull(Me.tableTBDD_USER.EMAILColumn) End Function _ - Public Sub SetERSTELLTWANNNull() - Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWANNColumn) = Global.System.Convert.DBNull + Public Sub SetEMAILNull() + Me(Me.tableTBDD_USER.EMAILColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsGEANDERTWERNull() As Boolean - Return Me.IsNull(Me.tableTBDD_DOKUMENTART.GEANDERTWERColumn) + Public Function IsLOGGED_WHERENull() As Boolean + Return Me.IsNull(Me.tableTBDD_USER.LOGGED_WHEREColumn) End Function _ - Public Sub SetGEANDERTWERNull() - Me(Me.tableTBDD_DOKUMENTART.GEANDERTWERColumn) = Global.System.Convert.DBNull + Public Sub SetLOGGED_WHERENull() + Me(Me.tableTBDD_USER.LOGGED_WHEREColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsGEAENDERTWANNNull() As Boolean - Return Me.IsNull(Me.tableTBDD_DOKUMENTART.GEAENDERTWANNColumn) + Public Function IsLOG_IN_WHENNull() As Boolean + Return Me.IsNull(Me.tableTBDD_USER.LOG_IN_WHENColumn) End Function _ - Public Sub SetGEAENDERTWANNNull() - Me(Me.tableTBDD_DOKUMENTART.GEAENDERTWANNColumn) = Global.System.Convert.DBNull + Public Sub SetLOG_IN_WHENNull() + Me(Me.tableTBDD_USER.LOG_IN_WHENColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsOBJEKTTYPNull() As Boolean - Return Me.IsNull(Me.tableTBDD_DOKUMENTART.OBJEKTTYPColumn) + Public Function IsLOG_OUT_WHENNull() As Boolean + Return Me.IsNull(Me.tableTBDD_USER.LOG_OUT_WHENColumn) End Function _ - Public Sub SetOBJEKTTYPNull() - Me(Me.tableTBDD_DOKUMENTART.OBJEKTTYPColumn) = Global.System.Convert.DBNull + Public Sub SetLOG_OUT_WHENNull() + Me(Me.tableTBDD_USER.LOG_OUT_WHENColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsFOLDER_FOR_INDEXNull() As Boolean - Return Me.IsNull(Me.tableTBDD_DOKUMENTART.FOLDER_FOR_INDEXColumn) + Public Function IsADDED_WHENNull() As Boolean + Return Me.IsNull(Me.tableTBDD_USER.ADDED_WHENColumn) End Function _ - Public Sub SetFOLDER_FOR_INDEXNull() - Me(Me.tableTBDD_DOKUMENTART.FOLDER_FOR_INDEXColumn) = Global.System.Convert.DBNull + Public Sub SetADDED_WHENNull() + Me(Me.tableTBDD_USER.ADDED_WHENColumn) = Global.System.Convert.DBNull End Sub _ - Public Function GetTBDD_INDEX_AUTOMRows() As TBDD_INDEX_AUTOMRow() - If (Me.Table.ChildRelations("FK_TBDD_INDEX_AUTOM_DOCID") Is Nothing) Then - Return New TBDD_INDEX_AUTOMRow(-1) {} + Public Function IsCHANGED_WHONull() As Boolean + Return Me.IsNull(Me.tableTBDD_USER.CHANGED_WHOColumn) + End Function + + _ + Public Sub SetCHANGED_WHONull() + Me(Me.tableTBDD_USER.CHANGED_WHOColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsCHANGED_WHENNull() As Boolean + Return Me.IsNull(Me.tableTBDD_USER.CHANGED_WHENColumn) + End Function + + _ + Public Sub SetCHANGED_WHENNull() + Me(Me.tableTBDD_USER.CHANGED_WHENColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function GetTBDD_GROUPS_USERRows() As TBDD_GROUPS_USERRow() + If (Me.Table.ChildRelations("FK_TBDD_GROUPS_USER_USER_ID") Is Nothing) Then + Return New TBDD_GROUPS_USERRow(-1) {} Else - Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBDD_INDEX_AUTOM_DOCID")),TBDD_INDEX_AUTOMRow()) + Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBDD_GROUPS_USER_USER_ID")),TBDD_GROUPS_USERRow()) End If End Function _ - Public Function GetTBDD_INDEX_MANRows() As TBDD_INDEX_MANRow() - If (Me.Table.ChildRelations("FK_TBDD_INDEX_MAN_DAID") Is Nothing) Then - Return New TBDD_INDEX_MANRow(-1) {} + Public Function GetTBHOTKEY_USER_PROFILERows() As TBHOTKEY_USER_PROFILERow() + If (Me.Table.ChildRelations("FK_TBHOTKEY_USER_PROFILE_USER_ID") Is Nothing) Then + Return New TBHOTKEY_USER_PROFILERow(-1) {} Else - Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBDD_INDEX_MAN_DAID")),TBDD_INDEX_MANRow()) + Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBHOTKEY_USER_PROFILE_USER_ID")),TBHOTKEY_USER_PROFILERow()) End If End Function End Class @@ -11970,26 +12380,26 @@ Partial Public Class MyDataset ''' '''Represents strongly named DataRow class. ''' - Partial Public Class TBDD_EINGANGSARTENRow + Partial Public Class TBDD_DOKUMENTARTRow Inherits Global.System.Data.DataRow - Private tableTBDD_EINGANGSARTEN As TBDD_EINGANGSARTENDataTable + Private tableTBDD_DOKUMENTART As TBDD_DOKUMENTARTDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) - Me.tableTBDD_EINGANGSARTEN = CType(Me.Table,TBDD_EINGANGSARTENDataTable) + Me.tableTBDD_DOKUMENTART = CType(Me.Table,TBDD_DOKUMENTARTDataTable) End Sub _ - Public Property GUID() As Byte + Public Property GUID() As Integer Get - Return CType(Me(Me.tableTBDD_EINGANGSARTEN.GUIDColumn),Byte) + Return CType(Me(Me.tableTBDD_DOKUMENTART.GUIDColumn),Integer) End Get Set - Me(Me.tableTBDD_EINGANGSARTEN.GUIDColumn) = value + Me(Me.tableTBDD_DOKUMENTART.GUIDColumn) = value End Set End Property @@ -11997,10 +12407,43 @@ Partial Public Class MyDataset Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property BEZEICHNUNG() As String Get - Return CType(Me(Me.tableTBDD_EINGANGSARTEN.BEZEICHNUNGColumn),String) + Return CType(Me(Me.tableTBDD_DOKUMENTART.BEZEICHNUNGColumn),String) End Get Set - Me(Me.tableTBDD_EINGANGSARTEN.BEZEICHNUNGColumn) = value + Me(Me.tableTBDD_DOKUMENTART.BEZEICHNUNGColumn) = value + End Set + End Property + + _ + Public Property EINGANGSART_ID() As Byte + Get + Return CType(Me(Me.tableTBDD_DOKUMENTART.EINGANGSART_IDColumn),Byte) + End Get + Set + Me(Me.tableTBDD_DOKUMENTART.EINGANGSART_IDColumn) = value + End Set + End Property + + _ + Public Property KURZNAME() As String + Get + Return CType(Me(Me.tableTBDD_DOKUMENTART.KURZNAMEColumn),String) + End Get + Set + Me(Me.tableTBDD_DOKUMENTART.KURZNAMEColumn) = value + End Set + End Property + + _ + Public Property ZIEL_PFAD() As String + Get + Return CType(Me(Me.tableTBDD_DOKUMENTART.ZIEL_PFADColumn),String) + End Get + Set + Me(Me.tableTBDD_DOKUMENTART.ZIEL_PFADColumn) = value End Set End Property @@ -12009,500 +12452,802 @@ Partial Public Class MyDataset Public Property BESCHREIBUNG() As String Get Try - Return CType(Me(Me.tableTBDD_EINGANGSARTEN.BESCHREIBUNGColumn),String) + Return CType(Me(Me.tableTBDD_DOKUMENTART.BESCHREIBUNGColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte BESCHREIBUNG in Tabelle TBDD_EINGANGSARTEN ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte BESCHREIBUNG in Tabelle TBDD_DOKUMENTART ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_EINGANGSARTEN.BESCHREIBUNGColumn) = value + Me(Me.tableTBDD_DOKUMENTART.BESCHREIBUNGColumn) = value End Set End Property _ - Public Property ERSTELLTWER() As String + Public Property AKTIV() As Boolean Get - Return CType(Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWERColumn),String) + Return CType(Me(Me.tableTBDD_DOKUMENTART.AKTIVColumn),Boolean) End Get Set - Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWERColumn) = value + Me(Me.tableTBDD_DOKUMENTART.AKTIVColumn) = value End Set End Property _ - Public Property ERSTELLTWANN() As Date + Public Property NAMENKONVENTION() As String Get Try - Return CType(Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWANNColumn),Date) + Return CType(Me(Me.tableTBDD_DOKUMENTART.NAMENKONVENTIONColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWANN in Tabelle TBDD_EINGANGSARTEN ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAMENKONVENTION in Tabelle TBDD_DOKUMENTART ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWANNColumn) = value + Me(Me.tableTBDD_DOKUMENTART.NAMENKONVENTIONColumn) = value End Set End Property _ - Public Property GEANDERTWER() As String + Public Property ERSTELLTWER() As String Get - Try - Return CType(Me(Me.tableTBDD_EINGANGSARTEN.GEANDERTWERColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEANDERTWER in Tabelle TBDD_EINGANGSARTEN ist DBNull.", e) - End Try + Return CType(Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWERColumn),String) End Get Set - Me(Me.tableTBDD_EINGANGSARTEN.GEANDERTWERColumn) = value + Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWERColumn) = value End Set End Property _ - Public Property GEAENDERTWANN() As Date + Public Property ERSTELLTWANN() As Date Get Try - Return CType(Me(Me.tableTBDD_EINGANGSARTEN.GEAENDERTWANNColumn),Date) + Return CType(Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWANNColumn),Date) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWANN in Tabelle TBDD_EINGANGSARTEN ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWANN in Tabelle TBDD_DOKUMENTART ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_EINGANGSARTEN.GEAENDERTWANNColumn) = value + Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWANNColumn) = value End Set End Property _ - Public Function IsBESCHREIBUNGNull() As Boolean - Return Me.IsNull(Me.tableTBDD_EINGANGSARTEN.BESCHREIBUNGColumn) - End Function - - _ - Public Sub SetBESCHREIBUNGNull() - Me(Me.tableTBDD_EINGANGSARTEN.BESCHREIBUNGColumn) = Global.System.Convert.DBNull - End Sub + Public Property GEANDERTWER() As String + Get + Try + Return CType(Me(Me.tableTBDD_DOKUMENTART.GEANDERTWERColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEANDERTWER in Tabelle TBDD_DOKUMENTART ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_DOKUMENTART.GEANDERTWERColumn) = value + End Set + End Property _ - Public Function IsERSTELLTWANNNull() As Boolean - Return Me.IsNull(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWANNColumn) - End Function + Public Property GEAENDERTWANN() As Date + Get + Try + Return CType(Me(Me.tableTBDD_DOKUMENTART.GEAENDERTWANNColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWANN in Tabelle TBDD_DOKUMENTART ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_DOKUMENTART.GEAENDERTWANNColumn) = value + End Set + End Property _ - Public Sub SetERSTELLTWANNNull() - Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWANNColumn) = Global.System.Convert.DBNull - End Sub + Public Property OBJEKTTYP() As String + Get + Try + Return CType(Me(Me.tableTBDD_DOKUMENTART.OBJEKTTYPColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte OBJEKTTYP in Tabelle TBDD_DOKUMENTART ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_DOKUMENTART.OBJEKTTYPColumn) = value + End Set + End Property _ - Public Function IsGEANDERTWERNull() As Boolean - Return Me.IsNull(Me.tableTBDD_EINGANGSARTEN.GEANDERTWERColumn) + Public Property WINDREAM_DIRECT() As Boolean + Get + Return CType(Me(Me.tableTBDD_DOKUMENTART.WINDREAM_DIRECTColumn),Boolean) + End Get + Set + Me(Me.tableTBDD_DOKUMENTART.WINDREAM_DIRECTColumn) = value + End Set + End Property + + _ + Public Property FOLDER_FOR_INDEX() As String + Get + Try + Return CType(Me(Me.tableTBDD_DOKUMENTART.FOLDER_FOR_INDEXColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte FOLDER_FOR_INDEX in Tabelle TBDD_DOKUMENTART ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_DOKUMENTART.FOLDER_FOR_INDEXColumn) = value + End Set + End Property + + _ + Public Property SEQUENCE() As Integer + Get + Return CType(Me(Me.tableTBDD_DOKUMENTART.SEQUENCEColumn),Integer) + End Get + Set + Me(Me.tableTBDD_DOKUMENTART.SEQUENCEColumn) = value + End Set + End Property + + _ + Public Property TBDD_EINGANGSARTENRow() As TBDD_EINGANGSARTENRow + Get + Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_TBDD_DOKUMENTART_EINGID")),TBDD_EINGANGSARTENRow) + End Get + Set + Me.SetParentRow(value, Me.Table.ParentRelations("FK_TBDD_DOKUMENTART_EINGID")) + End Set + End Property + + _ + Public Function IsBESCHREIBUNGNull() As Boolean + Return Me.IsNull(Me.tableTBDD_DOKUMENTART.BESCHREIBUNGColumn) End Function _ - Public Sub SetGEANDERTWERNull() - Me(Me.tableTBDD_EINGANGSARTEN.GEANDERTWERColumn) = Global.System.Convert.DBNull + Public Sub SetBESCHREIBUNGNull() + Me(Me.tableTBDD_DOKUMENTART.BESCHREIBUNGColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsGEAENDERTWANNNull() As Boolean - Return Me.IsNull(Me.tableTBDD_EINGANGSARTEN.GEAENDERTWANNColumn) + Public Function IsNAMENKONVENTIONNull() As Boolean + Return Me.IsNull(Me.tableTBDD_DOKUMENTART.NAMENKONVENTIONColumn) End Function _ - Public Sub SetGEAENDERTWANNNull() - Me(Me.tableTBDD_EINGANGSARTEN.GEAENDERTWANNColumn) = Global.System.Convert.DBNull + Public Sub SetNAMENKONVENTIONNull() + Me(Me.tableTBDD_DOKUMENTART.NAMENKONVENTIONColumn) = Global.System.Convert.DBNull End Sub _ - Public Function GetTBDD_DOKUMENTARTRows() As TBDD_DOKUMENTARTRow() - If (Me.Table.ChildRelations("FK_TBDD_DOKUMENTART_EINGID") Is Nothing) Then - Return New TBDD_DOKUMENTARTRow(-1) {} - Else - Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBDD_DOKUMENTART_EINGID")),TBDD_DOKUMENTARTRow()) - End If + Public Function IsERSTELLTWANNNull() As Boolean + Return Me.IsNull(Me.tableTBDD_DOKUMENTART.ERSTELLTWANNColumn) End Function - End Class - - ''' - '''Represents strongly named DataRow class. - ''' - Partial Public Class TBDD_DOKART_MODULERow - Inherits Global.System.Data.DataRow - - Private tableTBDD_DOKART_MODULE As TBDD_DOKART_MODULEDataTable _ - Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) - MyBase.New(rb) - Me.tableTBDD_DOKART_MODULE = CType(Me.Table,TBDD_DOKART_MODULEDataTable) + Public Sub SetERSTELLTWANNNull() + Me(Me.tableTBDD_DOKUMENTART.ERSTELLTWANNColumn) = Global.System.Convert.DBNull End Sub _ - Public Property ID() As Integer - Get - Return CType(Me(Me.tableTBDD_DOKART_MODULE.IDColumn),Integer) - End Get - Set - Me(Me.tableTBDD_DOKART_MODULE.IDColumn) = value - End Set - End Property + Public Function IsGEANDERTWERNull() As Boolean + Return Me.IsNull(Me.tableTBDD_DOKUMENTART.GEANDERTWERColumn) + End Function _ - Public Property NAME() As String - Get - Try - Return CType(Me(Me.tableTBDD_DOKART_MODULE.NAMEColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAME in Tabelle TBDD_DOKART_MODULE ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_DOKART_MODULE.NAMEColumn) = value - End Set - End Property + Public Sub SetGEANDERTWERNull() + Me(Me.tableTBDD_DOKUMENTART.GEANDERTWERColumn) = Global.System.Convert.DBNull + End Sub _ - Public Function IsNAMENull() As Boolean - Return Me.IsNull(Me.tableTBDD_DOKART_MODULE.NAMEColumn) + Public Function IsGEAENDERTWANNNull() As Boolean + Return Me.IsNull(Me.tableTBDD_DOKUMENTART.GEAENDERTWANNColumn) End Function _ - Public Sub SetNAMENull() - Me(Me.tableTBDD_DOKART_MODULE.NAMEColumn) = Global.System.Convert.DBNull + Public Sub SetGEAENDERTWANNNull() + Me(Me.tableTBDD_DOKUMENTART.GEAENDERTWANNColumn) = Global.System.Convert.DBNull End Sub - End Class - - ''' - '''Represents strongly named DataRow class. - ''' - Partial Public Class TBDD_MODULESRow - Inherits Global.System.Data.DataRow - Private tableTBDD_MODULES As TBDD_MODULESDataTable + _ + Public Function IsOBJEKTTYPNull() As Boolean + Return Me.IsNull(Me.tableTBDD_DOKUMENTART.OBJEKTTYPColumn) + End Function _ - Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) - MyBase.New(rb) - Me.tableTBDD_MODULES = CType(Me.Table,TBDD_MODULESDataTable) + Public Sub SetOBJEKTTYPNull() + Me(Me.tableTBDD_DOKUMENTART.OBJEKTTYPColumn) = Global.System.Convert.DBNull End Sub _ - Public Property GUID() As Integer - Get - Return CType(Me(Me.tableTBDD_MODULES.GUIDColumn),Integer) - End Get - Set - Me(Me.tableTBDD_MODULES.GUIDColumn) = value - End Set - End Property + Public Function IsFOLDER_FOR_INDEXNull() As Boolean + Return Me.IsNull(Me.tableTBDD_DOKUMENTART.FOLDER_FOR_INDEXColumn) + End Function _ - Public Property NAME() As String - Get - Try - Return CType(Me(Me.tableTBDD_MODULES.NAMEColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAME in Tabelle TBDD_MODULES ist DBNull.", e) - End Try - End Get - Set - Me(Me.tableTBDD_MODULES.NAMEColumn) = value - End Set - End Property + Public Sub SetFOLDER_FOR_INDEXNull() + Me(Me.tableTBDD_DOKUMENTART.FOLDER_FOR_INDEXColumn) = Global.System.Convert.DBNull + End Sub _ - Public Function IsNAMENull() As Boolean - Return Me.IsNull(Me.tableTBDD_MODULES.NAMEColumn) + Public Function GetTBDD_INDEX_AUTOMRows() As TBDD_INDEX_AUTOMRow() + If (Me.Table.ChildRelations("FK_TBDD_INDEX_AUTOM_DOCID") Is Nothing) Then + Return New TBDD_INDEX_AUTOMRow(-1) {} + Else + Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBDD_INDEX_AUTOM_DOCID")),TBDD_INDEX_AUTOMRow()) + End If End Function _ - Public Sub SetNAMENull() - Me(Me.tableTBDD_MODULES.NAMEColumn) = Global.System.Convert.DBNull - End Sub + Public Function GetTBDD_INDEX_MANRows() As TBDD_INDEX_MANRow() + If (Me.Table.ChildRelations("FK_TBDD_INDEX_MAN_DAID") Is Nothing) Then + Return New TBDD_INDEX_MANRow(-1) {} + Else + Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBDD_INDEX_MAN_DAID")),TBDD_INDEX_MANRow()) + End If + End Function End Class ''' '''Represents strongly named DataRow class. ''' - Partial Public Class TBDD_INDEX_MANRow + Partial Public Class TBDD_EINGANGSARTENRow Inherits Global.System.Data.DataRow - Private tableTBDD_INDEX_MAN As TBDD_INDEX_MANDataTable + Private tableTBDD_EINGANGSARTEN As TBDD_EINGANGSARTENDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) - Me.tableTBDD_INDEX_MAN = CType(Me.Table,TBDD_INDEX_MANDataTable) + Me.tableTBDD_EINGANGSARTEN = CType(Me.Table,TBDD_EINGANGSARTENDataTable) End Sub _ - Public Property GUID() As Integer + Public Property GUID() As Byte Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.GUIDColumn),Integer) + Return CType(Me(Me.tableTBDD_EINGANGSARTEN.GUIDColumn),Byte) End Get Set - Me(Me.tableTBDD_INDEX_MAN.GUIDColumn) = value + Me(Me.tableTBDD_EINGANGSARTEN.GUIDColumn) = value End Set End Property _ - Public Property DOK_ID() As Integer + Public Property BEZEICHNUNG() As String Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.DOK_IDColumn),Integer) + Return CType(Me(Me.tableTBDD_EINGANGSARTEN.BEZEICHNUNGColumn),String) End Get Set - Me(Me.tableTBDD_INDEX_MAN.DOK_IDColumn) = value + Me(Me.tableTBDD_EINGANGSARTEN.BEZEICHNUNGColumn) = value End Set End Property _ - Public Property NAME() As String + Public Property BESCHREIBUNG() As String Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.NAMEColumn),String) + Try + Return CType(Me(Me.tableTBDD_EINGANGSARTEN.BESCHREIBUNGColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte BESCHREIBUNG in Tabelle TBDD_EINGANGSARTEN ist DBNull.", e) + End Try End Get Set - Me(Me.tableTBDD_INDEX_MAN.NAMEColumn) = value + Me(Me.tableTBDD_EINGANGSARTEN.BESCHREIBUNGColumn) = value End Set End Property _ - Public Property WD_INDEX() As String + Public Property ERSTELLTWER() As String Get - Try - Return CType(Me(Me.tableTBDD_INDEX_MAN.WD_INDEXColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte WD_INDEX in Tabelle TBDD_INDEX_MAN ist DBNull.", e) - End Try + Return CType(Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWERColumn),String) End Get Set - Me(Me.tableTBDD_INDEX_MAN.WD_INDEXColumn) = value + Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWERColumn) = value End Set End Property _ - Public Property COMMENT() As String + Public Property ERSTELLTWANN() As Date Get Try - Return CType(Me(Me.tableTBDD_INDEX_MAN.COMMENTColumn),String) + Return CType(Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWANNColumn),Date) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte COMMENT in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ERSTELLTWANN in Tabelle TBDD_EINGANGSARTEN ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_INDEX_MAN.COMMENTColumn) = value + Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWANNColumn) = value End Set End Property _ - Public Property DATATYPE() As String + Public Property GEANDERTWER() As String Get Try - Return CType(Me(Me.tableTBDD_INDEX_MAN.DATATYPEColumn),String) + Return CType(Me(Me.tableTBDD_EINGANGSARTEN.GEANDERTWERColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte DATATYPE in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEANDERTWER in Tabelle TBDD_EINGANGSARTEN ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_INDEX_MAN.DATATYPEColumn) = value + Me(Me.tableTBDD_EINGANGSARTEN.GEANDERTWERColumn) = value End Set End Property _ - Public Property SUGGESTION() As Boolean + Public Property GEAENDERTWANN() As Date Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.SUGGESTIONColumn),Boolean) + Try + Return CType(Me(Me.tableTBDD_EINGANGSARTEN.GEAENDERTWANNColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte GEAENDERTWANN in Tabelle TBDD_EINGANGSARTEN ist DBNull.", e) + End Try End Get Set - Me(Me.tableTBDD_INDEX_MAN.SUGGESTIONColumn) = value + Me(Me.tableTBDD_EINGANGSARTEN.GEAENDERTWANNColumn) = value End Set End Property _ - Public Property DEFAULT_VALUE() As String + Public Function IsBESCHREIBUNGNull() As Boolean + Return Me.IsNull(Me.tableTBDD_EINGANGSARTEN.BESCHREIBUNGColumn) + End Function + + _ + Public Sub SetBESCHREIBUNGNull() + Me(Me.tableTBDD_EINGANGSARTEN.BESCHREIBUNGColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsERSTELLTWANNNull() As Boolean + Return Me.IsNull(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWANNColumn) + End Function + + _ + Public Sub SetERSTELLTWANNNull() + Me(Me.tableTBDD_EINGANGSARTEN.ERSTELLTWANNColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsGEANDERTWERNull() As Boolean + Return Me.IsNull(Me.tableTBDD_EINGANGSARTEN.GEANDERTWERColumn) + End Function + + _ + Public Sub SetGEANDERTWERNull() + Me(Me.tableTBDD_EINGANGSARTEN.GEANDERTWERColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsGEAENDERTWANNNull() As Boolean + Return Me.IsNull(Me.tableTBDD_EINGANGSARTEN.GEAENDERTWANNColumn) + End Function + + _ + Public Sub SetGEAENDERTWANNNull() + Me(Me.tableTBDD_EINGANGSARTEN.GEAENDERTWANNColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function GetTBDD_DOKUMENTARTRows() As TBDD_DOKUMENTARTRow() + If (Me.Table.ChildRelations("FK_TBDD_DOKUMENTART_EINGID") Is Nothing) Then + Return New TBDD_DOKUMENTARTRow(-1) {} + Else + Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TBDD_DOKUMENTART_EINGID")),TBDD_DOKUMENTARTRow()) + End If + End Function + End Class + + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class TBDD_DOKART_MODULERow + Inherits Global.System.Data.DataRow + + Private tableTBDD_DOKART_MODULE As TBDD_DOKART_MODULEDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTBDD_DOKART_MODULE = CType(Me.Table,TBDD_DOKART_MODULEDataTable) + End Sub + + _ + Public Property ID() As Integer Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.DEFAULT_VALUEColumn),String) + Return CType(Me(Me.tableTBDD_DOKART_MODULE.IDColumn),Integer) End Get Set - Me(Me.tableTBDD_INDEX_MAN.DEFAULT_VALUEColumn) = value + Me(Me.tableTBDD_DOKART_MODULE.IDColumn) = value End Set End Property _ - Public Property CONNECTION_ID() As Short + Public Property NAME() As String Get Try - Return CType(Me(Me.tableTBDD_INDEX_MAN.CONNECTION_IDColumn),Short) + Return CType(Me(Me.tableTBDD_DOKART_MODULE.NAMEColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CONNECTION_ID in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAME in Tabelle TBDD_DOKART_MODULE ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_INDEX_MAN.CONNECTION_IDColumn) = value + Me(Me.tableTBDD_DOKART_MODULE.NAMEColumn) = value End Set End Property _ - Public Property SEQUENCE() As Integer + Public Function IsNAMENull() As Boolean + Return Me.IsNull(Me.tableTBDD_DOKART_MODULE.NAMEColumn) + End Function + + _ + Public Sub SetNAMENull() + Me(Me.tableTBDD_DOKART_MODULE.NAMEColumn) = Global.System.Convert.DBNull + End Sub + End Class + + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class TBDD_MODULESRow + Inherits Global.System.Data.DataRow + + Private tableTBDD_MODULES As TBDD_MODULESDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTBDD_MODULES = CType(Me.Table,TBDD_MODULESDataTable) + End Sub + + _ + Public Property GUID() As Integer Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.SEQUENCEColumn),Integer) + Return CType(Me(Me.tableTBDD_MODULES.GUIDColumn),Integer) End Get Set - Me(Me.tableTBDD_INDEX_MAN.SEQUENCEColumn) = value + Me(Me.tableTBDD_MODULES.GUIDColumn) = value End Set End Property _ - Public Property SQL_RESULT() As String + Public Property NAME() As String Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.SQL_RESULTColumn),String) + Try + Return CType(Me(Me.tableTBDD_MODULES.NAMEColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAME in Tabelle TBDD_MODULES ist DBNull.", e) + End Try End Get Set - Me(Me.tableTBDD_INDEX_MAN.SQL_RESULTColumn) = value + Me(Me.tableTBDD_MODULES.NAMEColumn) = value End Set End Property _ - Public Property SQL_CHECK() As String + Public Function IsNAMENull() As Boolean + Return Me.IsNull(Me.tableTBDD_MODULES.NAMEColumn) + End Function + + _ + Public Sub SetNAMENull() + Me(Me.tableTBDD_MODULES.NAMEColumn) = Global.System.Convert.DBNull + End Sub + End Class + + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class TBDD_INDEX_MANRow + Inherits Global.System.Data.DataRow + + Private tableTBDD_INDEX_MAN As TBDD_INDEX_MANDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTBDD_INDEX_MAN = CType(Me.Table,TBDD_INDEX_MANDataTable) + End Sub + + _ + Public Property GUID() As Integer Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.SQL_CHECKColumn),String) + Return CType(Me(Me.tableTBDD_INDEX_MAN.GUIDColumn),Integer) End Get Set - Me(Me.tableTBDD_INDEX_MAN.SQL_CHECKColumn) = value + Me(Me.tableTBDD_INDEX_MAN.GUIDColumn) = value End Set End Property _ - Public Property ACTIVE() As Boolean + Public Property DOK_ID() As Integer Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.ACTIVEColumn),Boolean) + Return CType(Me(Me.tableTBDD_INDEX_MAN.DOK_IDColumn),Integer) End Get Set - Me(Me.tableTBDD_INDEX_MAN.ACTIVEColumn) = value + Me(Me.tableTBDD_INDEX_MAN.DOK_IDColumn) = value End Set End Property _ - Public Property ADDED_WHO() As String + Public Property NAME() As String Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.ADDED_WHOColumn),String) + Return CType(Me(Me.tableTBDD_INDEX_MAN.NAMEColumn),String) End Get Set - Me(Me.tableTBDD_INDEX_MAN.ADDED_WHOColumn) = value + Me(Me.tableTBDD_INDEX_MAN.NAMEColumn) = value End Set End Property _ - Public Property ADDED_WHEN() As Date + Public Property WD_INDEX() As String Get Try - Return CType(Me(Me.tableTBDD_INDEX_MAN.ADDED_WHENColumn),Date) + Return CType(Me(Me.tableTBDD_INDEX_MAN.WD_INDEXColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ADDED_WHEN in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte WD_INDEX in Tabelle TBDD_INDEX_MAN ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_INDEX_MAN.ADDED_WHENColumn) = value + Me(Me.tableTBDD_INDEX_MAN.WD_INDEXColumn) = value End Set End Property _ - Public Property CHANGED_WHO() As String + Public Property COMMENT() As String Get Try - Return CType(Me(Me.tableTBDD_INDEX_MAN.CHANGED_WHOColumn),String) + Return CType(Me(Me.tableTBDD_INDEX_MAN.COMMENTColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHO in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte COMMENT in Tabelle TBDD_INDEX_MAN ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_INDEX_MAN.CHANGED_WHOColumn) = value + Me(Me.tableTBDD_INDEX_MAN.COMMENTColumn) = value End Set End Property _ - Public Property CHANGED_WHEN() As Date + Public Property DATATYPE() As String Get Try - Return CType(Me(Me.tableTBDD_INDEX_MAN.CHANGED_WHENColumn),Date) + Return CType(Me(Me.tableTBDD_INDEX_MAN.DATATYPEColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHEN in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte DATATYPE in Tabelle TBDD_INDEX_MAN ist DBNull.", e) End Try End Get Set - Me(Me.tableTBDD_INDEX_MAN.CHANGED_WHENColumn) = value + Me(Me.tableTBDD_INDEX_MAN.DATATYPEColumn) = value End Set End Property _ - Public Property _OPTIONAL() As Boolean + Public Property SUGGESTION() As Boolean Get - Return CType(Me(Me.tableTBDD_INDEX_MAN.OPTIONALColumn),Boolean) + Return CType(Me(Me.tableTBDD_INDEX_MAN.SUGGESTIONColumn),Boolean) End Get Set - Me(Me.tableTBDD_INDEX_MAN.OPTIONALColumn) = value + Me(Me.tableTBDD_INDEX_MAN.SUGGESTIONColumn) = value End Set End Property _ - Public Property TBDD_CONNECTIONRow() As TBDD_CONNECTIONRow + Public Property DEFAULT_VALUE() As String Get - Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_TBDD_INDEX_MAN_CID")),TBDD_CONNECTIONRow) + Return CType(Me(Me.tableTBDD_INDEX_MAN.DEFAULT_VALUEColumn),String) End Get Set - Me.SetParentRow(value, Me.Table.ParentRelations("FK_TBDD_INDEX_MAN_CID")) + Me(Me.tableTBDD_INDEX_MAN.DEFAULT_VALUEColumn) = value End Set End Property _ - Public Property TBDD_DOKUMENTARTRow() As TBDD_DOKUMENTARTRow + Public Property CONNECTION_ID() As Short Get - Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_TBDD_INDEX_MAN_DAID")),TBDD_DOKUMENTARTRow) - End Get - Set - Me.SetParentRow(value, Me.Table.ParentRelations("FK_TBDD_INDEX_MAN_DAID")) - End Set + Try + Return CType(Me(Me.tableTBDD_INDEX_MAN.CONNECTION_IDColumn),Short) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CONNECTION_ID in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.CONNECTION_IDColumn) = value + End Set + End Property + + _ + Public Property SEQUENCE() As Integer + Get + Return CType(Me(Me.tableTBDD_INDEX_MAN.SEQUENCEColumn),Integer) + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.SEQUENCEColumn) = value + End Set + End Property + + _ + Public Property SQL_RESULT() As String + Get + Return CType(Me(Me.tableTBDD_INDEX_MAN.SQL_RESULTColumn),String) + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.SQL_RESULTColumn) = value + End Set + End Property + + _ + Public Property SQL_CHECK() As String + Get + Return CType(Me(Me.tableTBDD_INDEX_MAN.SQL_CHECKColumn),String) + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.SQL_CHECKColumn) = value + End Set + End Property + + _ + Public Property ACTIVE() As Boolean + Get + Return CType(Me(Me.tableTBDD_INDEX_MAN.ACTIVEColumn),Boolean) + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.ACTIVEColumn) = value + End Set + End Property + + _ + Public Property ADDED_WHO() As String + Get + Return CType(Me(Me.tableTBDD_INDEX_MAN.ADDED_WHOColumn),String) + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.ADDED_WHOColumn) = value + End Set + End Property + + _ + Public Property ADDED_WHEN() As Date + Get + Try + Return CType(Me(Me.tableTBDD_INDEX_MAN.ADDED_WHENColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ADDED_WHEN in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.ADDED_WHENColumn) = value + End Set + End Property + + _ + Public Property CHANGED_WHO() As String + Get + Try + Return CType(Me(Me.tableTBDD_INDEX_MAN.CHANGED_WHOColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHO in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.CHANGED_WHOColumn) = value + End Set + End Property + + _ + Public Property CHANGED_WHEN() As Date + Get + Try + Return CType(Me(Me.tableTBDD_INDEX_MAN.CHANGED_WHENColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHEN in Tabelle TBDD_INDEX_MAN ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.CHANGED_WHENColumn) = value + End Set + End Property + + _ + Public Property _OPTIONAL() As Boolean + Get + Return CType(Me(Me.tableTBDD_INDEX_MAN.OPTIONALColumn),Boolean) + End Get + Set + Me(Me.tableTBDD_INDEX_MAN.OPTIONALColumn) = value + End Set + End Property + + _ + Public Property TBDD_CONNECTIONRow() As TBDD_CONNECTIONRow + Get + Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_TBDD_INDEX_MAN_CID")),TBDD_CONNECTIONRow) + End Get + Set + Me.SetParentRow(value, Me.Table.ParentRelations("FK_TBDD_INDEX_MAN_CID")) + End Set + End Property + + _ + Public Property TBDD_DOKUMENTARTRow() As TBDD_DOKUMENTARTRow + Get + Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_TBDD_INDEX_MAN_DAID")),TBDD_DOKUMENTARTRow) + End Get + Set + Me.SetParentRow(value, Me.Table.ParentRelations("FK_TBDD_INDEX_MAN_DAID")) + End Set End Property '''Represents strongly named DataRow class. ''' - Partial Public Class TBTempFiles2IndexRow + Partial Public Class TBGI_FILES_USERRow Inherits Global.System.Data.DataRow - Private tableTBTempFiles2Index As TBTempFiles2IndexDataTable + Private tableTBGI_FILES_USER As TBGI_FILES_USERDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) - Me.tableTBTempFiles2Index = CType(Me.Table,TBTempFiles2IndexDataTable) + Me.tableTBGI_FILES_USER = CType(Me.Table,TBGI_FILES_USERDataTable) End Sub _ - Public Property Filestring() As String + Public Property GUID() As Integer + Get + Return CType(Me(Me.tableTBGI_FILES_USER.GUIDColumn),Integer) + End Get + Set + Me(Me.tableTBGI_FILES_USER.GUIDColumn) = value + End Set + End Property + + _ + Public Property FILENAME2WORK() As String + Get + Return CType(Me(Me.tableTBGI_FILES_USER.FILENAME2WORKColumn),String) + End Get + Set + Me(Me.tableTBGI_FILES_USER.FILENAME2WORKColumn) = value + End Set + End Property + + _ + Public Property _USER_WORK() As String + Get + Return CType(Me(Me.tableTBGI_FILES_USER._USER_WORKColumn),String) + End Get + Set + Me(Me.tableTBGI_FILES_USER._USER_WORKColumn) = value + End Set + End Property + + _ + Public Property WORKED() As Boolean + Get + Return CType(Me(Me.tableTBGI_FILES_USER.WORKEDColumn),Boolean) + End Get + Set + Me(Me.tableTBGI_FILES_USER.WORKEDColumn) = value + End Set + End Property + + _ + Public Property ADDED_WHEN() As Date + Get + Return CType(Me(Me.tableTBGI_FILES_USER.ADDED_WHENColumn),Date) + End Get + Set + Me(Me.tableTBGI_FILES_USER.ADDED_WHENColumn) = value + End Set + End Property + + _ + Public Property HANDLE_TYPE() As String Get Try - Return CType(Me(Me.tableTBTempFiles2Index.FilestringColumn),String) + Return CType(Me(Me.tableTBGI_FILES_USER.HANDLE_TYPEColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Filestring in Tabelle TBTempFiles2Index ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte HANDLE_TYPE in Tabelle TBGI_FILES_USER ist DBNull.", e) End Try End Get Set - Me(Me.tableTBTempFiles2Index.FilestringColumn) = value + Me(Me.tableTBGI_FILES_USER.HANDLE_TYPEColumn) = value End Set End Property _ - Public Property Worked() As Boolean + Public Property Delete() As Boolean Get Try - Return CType(Me(Me.tableTBTempFiles2Index.WorkedColumn),Boolean) + Return CType(Me(Me.tableTBGI_FILES_USER.DeleteColumn),Boolean) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Worked in Tabelle TBTempFiles2Index ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Delete in Tabelle TBGI_FILES_USER ist DBNull.", e) End Try End Get Set - Me(Me.tableTBTempFiles2Index.WorkedColumn) = value + Me(Me.tableTBGI_FILES_USER.DeleteColumn) = value End Set End Property _ - Public Function IsFilestringNull() As Boolean - Return Me.IsNull(Me.tableTBTempFiles2Index.FilestringColumn) + Public Property FILENAME_ONLY() As String + Get + Return CType(Me(Me.tableTBGI_FILES_USER.FILENAME_ONLYColumn),String) + End Get + Set + Me(Me.tableTBGI_FILES_USER.FILENAME_ONLYColumn) = value + End Set + End Property + + _ + Public Function IsHANDLE_TYPENull() As Boolean + Return Me.IsNull(Me.tableTBGI_FILES_USER.HANDLE_TYPEColumn) End Function _ - Public Sub SetFilestringNull() - Me(Me.tableTBTempFiles2Index.FilestringColumn) = Global.System.Convert.DBNull + Public Sub SetHANDLE_TYPENull() + Me(Me.tableTBGI_FILES_USER.HANDLE_TYPEColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsWorkedNull() As Boolean - Return Me.IsNull(Me.tableTBTempFiles2Index.WorkedColumn) + Public Function IsDeleteNull() As Boolean + Return Me.IsNull(Me.tableTBGI_FILES_USER.DeleteColumn) End Function _ - Public Sub SetWorkedNull() - Me(Me.tableTBTempFiles2Index.WorkedColumn) = Global.System.Convert.DBNull + Public Sub SetDeleteNull() + Me(Me.tableTBGI_FILES_USER.DeleteColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' - Partial Public Class TBTEMP_INDEXRESULTSRow + Partial Public Class TBGI_HISTORYRow Inherits Global.System.Data.DataRow - Private tableTBTEMP_INDEXRESULTS As TBTEMP_INDEXRESULTSDataTable + Private tableTBGI_HISTORY As TBGI_HISTORYDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) - Me.tableTBTEMP_INDEXRESULTS = CType(Me.Table,TBTEMP_INDEXRESULTSDataTable) + Me.tableTBGI_HISTORY = CType(Me.Table,TBGI_HISTORYDataTable) End Sub _ - Public Property Indexname() As String + Public Property GUID() As Integer Get - Try - Return CType(Me(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn),String) - Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Indexname in Tabelle TBTEMP_INDEXRESULTS ist DBNull.", e) - End Try + Return CType(Me(Me.tableTBGI_HISTORY.GUIDColumn),Integer) End Get Set - Me(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn) = value + Me(Me.tableTBGI_HISTORY.GUIDColumn) = value End Set End Property _ - Public Property Value() As String + Public Property FILENAME_ORIGINAL() As String Get Try - Return CType(Me(Me.tableTBTEMP_INDEXRESULTS.ValueColumn),String) + Return CType(Me(Me.tableTBGI_HISTORY.FILENAME_ORIGINALColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Value in Tabelle TBTEMP_INDEXRESULTS ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte FILENAME_ORIGINAL in Tabelle TBGI_HISTORY ist DBNull.", e) End Try End Get Set - Me(Me.tableTBTEMP_INDEXRESULTS.ValueColumn) = value + Me(Me.tableTBGI_HISTORY.FILENAME_ORIGINALColumn) = value End Set End Property _ - Public Property Dokumentart() As String + Public Property FILENAME_NEW() As String Get Try - Return CType(Me(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn),String) + Return CType(Me(Me.tableTBGI_HISTORY.FILENAME_NEWColumn),String) Catch e As Global.System.InvalidCastException - Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Dokumentart in Tabelle TBTEMP_INDEXRESULTS ist DBNull.", e) + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte FILENAME_NEW in Tabelle TBGI_HISTORY ist DBNull.", e) End Try End Get Set - Me(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn) = value + Me(Me.tableTBGI_HISTORY.FILENAME_NEWColumn) = value End Set End Property _ - Public Function IsIndexnameNull() As Boolean - Return Me.IsNull(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn) - End Function - - _ - Public Sub SetIndexnameNull() - Me(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn) = Global.System.Convert.DBNull - End Sub + Public Property ADDED_WHEN() As Date + Get + Return CType(Me(Me.tableTBGI_HISTORY.ADDED_WHENColumn),Date) + End Get + Set + Me(Me.tableTBGI_HISTORY.ADDED_WHENColumn) = value + End Set + End Property _ - Public Function IsValueNull() As Boolean - Return Me.IsNull(Me.tableTBTEMP_INDEXRESULTS.ValueColumn) + Public Function IsFILENAME_ORIGINALNull() As Boolean + Return Me.IsNull(Me.tableTBGI_HISTORY.FILENAME_ORIGINALColumn) End Function _ - Public Sub SetValueNull() - Me(Me.tableTBTEMP_INDEXRESULTS.ValueColumn) = Global.System.Convert.DBNull + Public Sub SetFILENAME_ORIGINALNull() + Me(Me.tableTBGI_HISTORY.FILENAME_ORIGINALColumn) = Global.System.Convert.DBNull End Sub _ - Public Function IsDokumentartNull() As Boolean - Return Me.IsNull(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn) + Public Function IsFILENAME_NEWNull() As Boolean + Return Me.IsNull(Me.tableTBGI_HISTORY.FILENAME_NEWColumn) End Function _ - Public Sub SetDokumentartNull() - Me(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn) = Global.System.Convert.DBNull + Public Sub SetFILENAME_NEWNull() + Me(Me.tableTBGI_HISTORY.FILENAME_NEWColumn) = Global.System.Convert.DBNull End Sub End Class ''' - '''Row event argument class + '''Represents strongly named DataRow class. ''' - _ + Partial Public Class TBTempFiles2IndexRow + Inherits Global.System.Data.DataRow + + Private tableTBTempFiles2Index As TBTempFiles2IndexDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTBTempFiles2Index = CType(Me.Table,TBTempFiles2IndexDataTable) + End Sub + + _ + Public Property Filestring() As String + Get + Try + Return CType(Me(Me.tableTBTempFiles2Index.FilestringColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Filestring in Tabelle TBTempFiles2Index ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBTempFiles2Index.FilestringColumn) = value + End Set + End Property + + _ + Public Property Worked() As Boolean + Get + Try + Return CType(Me(Me.tableTBTempFiles2Index.WorkedColumn),Boolean) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Worked in Tabelle TBTempFiles2Index ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBTempFiles2Index.WorkedColumn) = value + End Set + End Property + + _ + Public Function IsFilestringNull() As Boolean + Return Me.IsNull(Me.tableTBTempFiles2Index.FilestringColumn) + End Function + + _ + Public Sub SetFilestringNull() + Me(Me.tableTBTempFiles2Index.FilestringColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsWorkedNull() As Boolean + Return Me.IsNull(Me.tableTBTempFiles2Index.WorkedColumn) + End Function + + _ + Public Sub SetWorkedNull() + Me(Me.tableTBTempFiles2Index.WorkedColumn) = Global.System.Convert.DBNull + End Sub + End Class + + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class TBTEMP_INDEXRESULTSRow + Inherits Global.System.Data.DataRow + + Private tableTBTEMP_INDEXRESULTS As TBTEMP_INDEXRESULTSDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTBTEMP_INDEXRESULTS = CType(Me.Table,TBTEMP_INDEXRESULTSDataTable) + End Sub + + _ + Public Property Indexname() As String + Get + Try + Return CType(Me(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Indexname in Tabelle TBTEMP_INDEXRESULTS ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn) = value + End Set + End Property + + _ + Public Property Value() As String + Get + Try + Return CType(Me(Me.tableTBTEMP_INDEXRESULTS.ValueColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Value in Tabelle TBTEMP_INDEXRESULTS ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBTEMP_INDEXRESULTS.ValueColumn) = value + End Set + End Property + + _ + Public Property Dokumentart() As String + Get + Try + Return CType(Me(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Dokumentart in Tabelle TBTEMP_INDEXRESULTS ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn) = value + End Set + End Property + + _ + Public Function IsIndexnameNull() As Boolean + Return Me.IsNull(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn) + End Function + + _ + Public Sub SetIndexnameNull() + Me(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsValueNull() As Boolean + Return Me.IsNull(Me.tableTBTEMP_INDEXRESULTS.ValueColumn) + End Function + + _ + Public Sub SetValueNull() + Me(Me.tableTBTEMP_INDEXRESULTS.ValueColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsDokumentartNull() As Boolean + Return Me.IsNull(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn) + End Function + + _ + Public Sub SetDokumentartNull() + Me(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn) = Global.System.Convert.DBNull + End Sub + End Class + + ''' + '''Row event argument class + ''' + _ Public Class TBDD_USERRowChangeEvent Inherits Global.System.EventArgs @@ -17587,6 +18560,78 @@ Partial Public Class MyDataset End Property End Class + ''' + '''Row event argument class + ''' + _ + Public Class TBGI_FILES_USERRowChangeEvent + Inherits Global.System.EventArgs + + Private eventRow As TBGI_FILES_USERRow + + Private eventAction As Global.System.Data.DataRowAction + + _ + Public Sub New(ByVal row As TBGI_FILES_USERRow, ByVal action As Global.System.Data.DataRowAction) + MyBase.New + Me.eventRow = row + Me.eventAction = action + End Sub + + _ + Public ReadOnly Property Row() As TBGI_FILES_USERRow + Get + Return Me.eventRow + End Get + End Property + + _ + Public ReadOnly Property Action() As Global.System.Data.DataRowAction + Get + Return Me.eventAction + End Get + End Property + End Class + + ''' + '''Row event argument class + ''' + _ + Public Class TBGI_HISTORYRowChangeEvent + Inherits Global.System.EventArgs + + Private eventRow As TBGI_HISTORYRow + + Private eventAction As Global.System.Data.DataRowAction + + _ + Public Sub New(ByVal row As TBGI_HISTORYRow, ByVal action As Global.System.Data.DataRowAction) + MyBase.New + Me.eventRow = row + Me.eventAction = action + End Sub + + _ + Public ReadOnly Property Row() As TBGI_HISTORYRow + Get + Return Me.eventRow + End Get + End Property + + _ + Public ReadOnly Property Action() As Global.System.Data.DataRowAction + Get + Return Me.eventAction + End Get + End Property + End Class + ''' '''Row event argument class ''' @@ -19494,298 +20539,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)" + 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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_INDEX_MANDataTable, ByVal DOK_ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal DOK_ID As Integer) As MyDataset.TBDD_INDEX_MANDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_MANDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_MANDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_INDEX_MAN") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) + + _ + Public Overridable Overloads 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 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) + + _ + 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) 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 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, _ + + _ + 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, _ 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -19799,65 +20844,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -19879,315 +20924,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_CONNECTIONDataTable) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData() As MyDataset.TBDD_CONNECTIONDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_CONNECTIONDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_CONNECTIONDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_CONNECTION") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Short) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Short) + + _ + Public Overridable Overloads 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 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 + + _ + 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 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 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 + + _ + 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 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -20201,65 +21246,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -20286,105 +21331,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.VWDDINDEX_MANDataTable, ByVal DokID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal DokID As Integer) As MyDataset.VWDDINDEX_MANDataTable + + _ + Public Overridable Overloads 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -20398,65 +21443,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -20479,105 +21524,105 @@ Namespace MyDatasetTableAdapters tableMapping.ColumnMappings.Add("VALUE", "VALUE") 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) & "FROM VWDDINDEX_AUTOM" & 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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.VWDDINDEX_AUTOMDataTable, ByVal DOCTYPE As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal DOCTYPE As Integer) As MyDataset.VWDDINDEX_AUTOMDataTable + + _ + Public Overridable Overloads 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -20591,65 +21636,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -20671,304 +21716,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.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"& _ + 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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_INDEX_AUTOMDataTable, ByVal DOCTYPE_ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal DOCTYPE_ID As Integer) As MyDataset.TBDD_INDEX_AUTOMDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_AUTOMDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_AUTOMDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_INDEX_AUTOM") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) + + _ + Public Overridable Overloads 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 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) + + _ + 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) 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 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) + + _ + 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) 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -20982,65 +22027,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -21057,195 +22102,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBGI_CONFIGURATIONDataTable) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData() As MyDataset.TBGI_CONFIGURATIONDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBGI_CONFIGURATIONDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBGI_CONFIGURATIONDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBGI_CONFIGURATION") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Update(ByVal GUID As 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 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) 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -21259,65 +22304,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -21338,334 +22383,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable, ByVal Objecttype As String) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal Objecttype As String) As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBGI_OBJECTTYPE_EMAIL_INDEXDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBGI_OBJECTTYPE_EMAIL_INDEX") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) + + _ + Public Overridable Overloads 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 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 + + _ + 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 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 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 + + _ + 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 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -21679,65 +22724,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -21760,180 +22805,180 @@ 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_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"& _ + 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.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.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" & 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("@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) & "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).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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable, ByVal DOK_ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal DOK_ID As Integer) As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_INDEX_MAN_POSTPROCESSINGDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_INDEX_MAN_POSTPROCESSING") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -21947,65 +22992,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -22015,103 +23060,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBWHDD_INDEX_MANDataTable, ByVal DOK_ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal DOK_ID As Integer) As MyDataset.TBWHDD_INDEX_MANDataTable + + _ + Public Overridable Overloads 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -22125,65 +23170,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -22198,281 +23243,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_USER_GROUPSDataTable) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData() As MyDataset.TBDD_USER_GROUPSDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_USER_GROUPSDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_USER_GROUPSDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_USER_GROUPS") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer, 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 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) 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 Overloads Overridable Function Insert(ByVal NAME As String, ByVal ADDED_WHO As String) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal NAME As String, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + + _ + 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 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -22486,65 +23531,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -22560,271 +23605,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBDD_GROUPS_USERDataTable, ByVal USER_ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal USER_ID As Integer) As MyDataset.TBDD_GROUPS_USERDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBDD_GROUPS_USERDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBDD_GROUPS_USERDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBDD_GROUPS_USER") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) + + _ + Public Overridable Overloads 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 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) + + _ + 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) 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 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) + + _ + 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) 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 Overloads Overridable Function cmdinsert(ByVal USER_ID As Integer, ByVal GROUP_ID As Integer, ByVal ADDED_WHO As String) As Integer + + _ + Public Overridable Overloads 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -22838,65 +23883,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -22913,103 +23958,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.VWGI_USER_GROUPS_RELATIONDataTable, ByVal USER_ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal USER_ID As Integer) As MyDataset.VWGI_USER_GROUPS_RELATIONDataTable + + _ + Public Overridable Overloads 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -23023,65 +24068,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -23097,169 +24142,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.VWGI_DOCTYPE_GROUPDataTable, ByVal DOCTYPE_ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal DOCTYPE_ID As Integer) As MyDataset.VWGI_DOCTYPE_GROUPDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function cmdDelete(ByVal ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function cmdInsert(ByVal DOCTYPE_ID As Integer, ByVal GROUP_ID As Integer, ByVal ADDED_WHO As String) As Integer + + _ + Public Overridable Overloads 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -23273,65 +24318,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -23352,630 +24397,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData() As MyDataset.TBHOTKEY_PROFILEDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function FillByID(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable, ByVal HK_ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetDataByID(ByVal HK_ID As Integer) As MyDataset.TBHOTKEY_PROFILEDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PROFILEDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBHOTKEY_PROFILE") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer, 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 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) 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 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 + + _ + 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 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 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), _ + + _ + 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), _ 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 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, _ + + _ + 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)) 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 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 + + _ + 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 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -23989,65 +25034,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -24065,275 +25110,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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNSDataTable, ByVal ID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal ID As Integer) As MyDataset.TBHOTKEY_PATTERNSDataTable + + _ + Public Overridable Overloads 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNSDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNSDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer Return Me.Adapter.Update(dataSet, "TBHOTKEY_PATTERNS") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) + + _ + Public Overridable Overloads 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 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) + + _ + 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) 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 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) + + _ + 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) 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -24347,65 +25392,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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) 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() @@ -24415,107 +25460,681 @@ 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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBMYHOTKEYSDataTable, ByVal USERID As Integer) As Integer + + _ + Public Overridable Overloads 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 Overloads Overridable Function GetData(ByVal USERID As Integer) As MyDataset.TBMYHOTKEYSDataTable + + _ + Public Overridable Overloads 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() + End If + Return Me._adapter + End Get + End Property + + _ + Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection + Get + If (Me._connection Is Nothing) Then + Me.InitConnection() + End If + Return Me._connection + End Get + Set(value As Global.System.Data.SqlClient.SqlConnection) + Me._connection = value + If (Not (Me.Adapter.InsertCommand) Is Nothing) Then + Me.Adapter.InsertCommand.Connection = value + End If + If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then + Me.Adapter.DeleteCommand.Connection = value + End If + If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then + Me.Adapter.UpdateCommand.Connection = value + End If + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + If (Not (Me.CommandCollection(i)) Is Nothing) Then + CType(Me.CommandCollection(i), Global.System.Data.SqlClient.SqlCommand).Connection = value + End If + i = (i + 1) + Loop + End Set + End Property + + _ + Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction + Get + Return Me._transaction + End Get + Set(value As Global.System.Data.SqlClient.SqlTransaction) + Me._transaction = value + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + Me.CommandCollection(i).Transaction = Me._transaction + i = (i + 1) + Loop + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then + Me.Adapter.DeleteCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then + Me.Adapter.InsertCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then + Me.Adapter.UpdateCommand.Transaction = Me._transaction + End If + End Set + End Property + + _ + Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() + Get + If (Me._commandCollection Is Nothing) Then + Me.InitCommandCollection() + End If + Return Me._commandCollection + End Get + End Property + + _ + Public Property ClearBeforeFill() As Boolean + Get + Return Me._clearBeforeFill + End Get + Set(value As Boolean) + Me._clearBeforeFill = value + End Set + End Property + + _ + Private Sub InitAdapter() + Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() + Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() + tableMapping.SourceTable = "Table" + tableMapping.DataSetTable = "TBHOTKEY_USER_PROFILE" + tableMapping.ColumnMappings.Add("GUID", "GUID") + tableMapping.ColumnMappings.Add("HKPROFILE_ID", "HKPROFILE_ID") + tableMapping.ColumnMappings.Add("USER_ID", "USER_ID") + tableMapping.ColumnMappings.Add("WD_SEARCH", "WD_SEARCH") + tableMapping.ColumnMappings.Add("HOTKEY1", "HOTKEY1") + tableMapping.ColumnMappings.Add("HOTKEY2", "HOTKEY2") + tableMapping.ColumnMappings.Add("ADDED_WHO", "ADDED_WHO") + tableMapping.ColumnMappings.Add("ADDED_WHEN", "ADDED_WHEN") + tableMapping.ColumnMappings.Add("CHANGED_WHO", "CHANGED_WHO") + tableMapping.ColumnMappings.Add("CHANGED_WHEN", "CHANGED_WHEN") + 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.CommandType = Global.System.Data.CommandType.Text + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, False, Nothing, "", "", "")) + Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() + Me._adapter.InsertCommand.Connection = Me.Connection + Me._adapter.InsertCommand.CommandText = "INSERT INTO [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.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 " & _ + "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, "", "", "")) + 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) & _ + "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(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).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(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" & _ + "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, "", "", "")) + End Sub + + _ + Public Overridable Overloads 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() + 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 + Me.Adapter.SelectCommand = Me.CommandCollection(0) + 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 + Me.Adapter.SelectCommand = Me.CommandCollection(2) + 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 + Me.Adapter.SelectCommand = Me.CommandCollection(2) + 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 + Return Me.Adapter.Update(dataTable) + End Function + + _ + Public Overridable Overloads 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 + 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 + 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) + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.DeleteCommand.Connection.Open() + End If + Try + Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.DeleteCommand.Connection.Close() + End If + End Try + End Function + + _ + Public 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) + If (WD_SEARCH Is Nothing) Then + Throw New Global.System.ArgumentNullException("WD_SEARCH") + Else + 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) + End If + If (HOTKEY2 Is Nothing) Then + Throw New Global.System.ArgumentNullException("HOTKEY2") + Else + 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) + End If + 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) + End If + 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) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.InsertCommand.Connection.Open() + End If + Try + Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.InsertCommand.Connection.Close() + End If + End Try + End Function + + _ + Public 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), _ + 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) + If (WD_SEARCH Is Nothing) Then + Throw New Global.System.ArgumentNullException("WD_SEARCH") + Else + 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) + End If + If (HOTKEY2 Is Nothing) Then + Throw New Global.System.ArgumentNullException("HOTKEY2") + Else + 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) + End If + 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) + End If + 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) + 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) + 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) + 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) + 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) + 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) + Else + 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(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) + 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) + Else + 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) + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.UpdateCommand.Connection.Open() + End If + Try + Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.UpdateCommand.Connection.Close() + End If + End Try + End Function + + _ + Public 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)) 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 + 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) + End If + 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) _ + <> Global.System.Data.ConnectionState.Open) Then + command.Connection.Open() + End If + Dim returnValue As Integer + Try + returnValue = command.ExecuteNonQuery + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + command.Connection.Close() + End If + End Try + Return returnValue + End Function + End Class + + ''' + '''Represents the connection and commands used to retrieve and save data. + ''' + _ + Partial Public Class 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 + 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -24529,76 +26148,78 @@ 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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) Me._clearBeforeFill = value End Set End Property - - _ + + _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" - tableMapping.DataSetTable = "TBHOTKEY_USER_PROFILE" + tableMapping.DataSetTable = "TBHOTKEY_PATTERNS_REWORK" tableMapping.ColumnMappings.Add("GUID", "GUID") - tableMapping.ColumnMappings.Add("HKPROFILE_ID", "HKPROFILE_ID") - tableMapping.ColumnMappings.Add("USER_ID", "USER_ID") - tableMapping.ColumnMappings.Add("WD_SEARCH", "WD_SEARCH") - tableMapping.ColumnMappings.Add("HOTKEY1", "HOTKEY1") - tableMapping.ColumnMappings.Add("HOTKEY2", "HOTKEY2") + tableMapping.ColumnMappings.Add("HKPATTERN_ID", "HKPATTERN_ID") + tableMapping.ColumnMappings.Add("TYPE", "TYPE") + tableMapping.ColumnMappings.Add("FUNCTION1", "FUNCTION1") + tableMapping.ColumnMappings.Add("FUNCTION2", "FUNCTION2") + tableMapping.ColumnMappings.Add("TEXT1", "TEXT1") + tableMapping.ColumnMappings.Add("TEXT2", "TEXT2") + tableMapping.ColumnMappings.Add("SEQUENCE", "SEQUENCE") tableMapping.ColumnMappings.Add("ADDED_WHO", "ADDED_WHO") tableMapping.ColumnMappings.Add("ADDED_WHEN", "ADDED_WHEN") tableMapping.ColumnMappings.Add("CHANGED_WHO", "CHANGED_WHO") @@ -24606,490 +26227,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_USER_PROFILE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Original_GUID)" + 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, 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, 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_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.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("@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("@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_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.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("@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("@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(2) {} + 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, 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).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("@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).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(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"& _ - "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(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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable, ByVal TBHOTKEY_USER_PROFILE_GUID As Integer) As Integer + + _ + Public Overridable Overloads 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(TBHOTKEY_USER_PROFILE_GUID,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 Overloads Overridable Function GetData(ByVal TBHOTKEY_USER_PROFILE_GUID As Integer) As MyDataset.TBHOTKEY_USER_PROFILEDataTable + + _ + Public Overridable Overloads 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(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 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 - End If - Dim returnValue As Integer = Me.Adapter.Fill(dataTable) - Return returnValue - End Function - - _ - 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) - Dim dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable = New MyDataset.TBHOTKEY_USER_PROFILEDataTable() + 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_USER_PROFILEDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer - Return Me.Adapter.Update(dataSet, "TBHOTKEY_USER_PROFILE") + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + Return Me.Adapter.Update(dataSet, "TBHOTKEY_PATTERNS_REWORK") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) - Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State - If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ - <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open + + _ + 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) + If (Original_TYPE Is Nothing) Then + Throw New Global.System.ArgumentNullException("Original_TYPE") + Else + Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_TYPE, String) End If - Try - Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery - Return returnValue - Finally - If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - Me.Adapter.DeleteCommand.Connection.Close - End If - End Try - End Function - - _ - Public Overloads Overridable Function Insert(ByVal 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") + If (Original_FUNCTION1 Is Nothing) Then + Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(2).Value = CType(WD_SEARCH,String) + Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0, Object) + Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_FUNCTION1, String) End If - If (HOTKEY1 Is Nothing) Then - Throw New Global.System.ArgumentNullException("HOTKEY1") + If (Original_FUNCTION2 Is Nothing) Then + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(3).Value = CType(HOTKEY1,String) + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0, Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_FUNCTION2, String) End If - If (HOTKEY2 Is Nothing) Then - Throw New Global.System.ArgumentNullException("HOTKEY2") + If (Original_TEXT1 Is Nothing) Then + Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(4).Value = CType(HOTKEY2,String) + Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0, Object) + Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_TEXT1, String) End If - If (ADDED_WHO Is Nothing) Then - Throw New Global.System.ArgumentNullException("ADDED_WHO") + If (Original_TEXT2 Is Nothing) Then + Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1, Object) + Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(5).Value = CType(ADDED_WHO,String) + Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0, Object) + Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_TEXT2, String) End If - If (ADDED_WHEN.HasValue = true) Then - Me.Adapter.InsertCommand.Parameters(6).Value = CType(ADDED_WHEN.Value,Date) + 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.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value + Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_ADDED_WHO, String) End If - If (CHANGED_WHO Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value + 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(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(16).Value = Global.System.DBNull.Value Else - Me.Adapter.InsertCommand.Parameters(7).Value = CType(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 (CHANGED_WHEN.HasValue = true) Then - Me.Adapter.InsertCommand.Parameters(8).Value = CType(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.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value + 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.InsertCommand.Connection.State - If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open + Me.Adapter.DeleteCommand.Connection.Open() End If - Try - Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery + Try + Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - Me.Adapter.InsertCommand.Connection.Close + Me.Adapter.DeleteCommand.Connection.Close() End If End Try End Function - - _ - 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) - If (WD_SEARCH Is Nothing) Then - Throw New Global.System.ArgumentNullException("WD_SEARCH") - Else - Me.Adapter.UpdateCommand.Parameters(2).Value = CType(WD_SEARCH,String) - End If - If (HOTKEY1 Is Nothing) Then - Throw New Global.System.ArgumentNullException("HOTKEY1") + + _ + 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) + If (TYPE Is Nothing) Then + Throw New Global.System.ArgumentNullException("TYPE") Else - Me.Adapter.UpdateCommand.Parameters(3).Value = CType(HOTKEY1,String) + Me.Adapter.InsertCommand.Parameters(1).Value = CType(TYPE, String) End If - If (HOTKEY2 Is Nothing) Then - Throw New Global.System.ArgumentNullException("HOTKEY2") + If (FUNCTION1 Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(4).Value = CType(HOTKEY2,String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(FUNCTION1, String) End If - If (ADDED_WHO Is Nothing) Then - Throw New Global.System.ArgumentNullException("ADDED_WHO") + If (FUNCTION2 Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(ADDED_WHO,String) + Me.Adapter.InsertCommand.Parameters(3).Value = CType(FUNCTION2, String) End If - If (ADDED_WHEN.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(6).Value = CType(ADDED_WHEN.Value,Date) + If (TEXT1 Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value + Me.Adapter.InsertCommand.Parameters(4).Value = CType(TEXT1, String) End If - If (CHANGED_WHO Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value + If (TEXT2 Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(7).Value = CType(CHANGED_WHO,String) + Me.Adapter.InsertCommand.Parameters(5).Value = CType(TEXT2, String) End If - If (CHANGED_WHEN.HasValue = true) Then - Me.Adapter.UpdateCommand.Parameters(8).Value = CType(CHANGED_WHEN.Value,Date) + 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.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value + Me.Adapter.InsertCommand.Parameters(7).Value = CType(ADDED_WHO, String) 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) - 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) + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.InsertCommand.Connection.Open() End If - If (Original_HOTKEY1 Is Nothing) Then - Throw New Global.System.ArgumentNullException("Original_HOTKEY1") + Try + Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.InsertCommand.Connection.Close() + End If + End Try + End Function + + _ + Public 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) + If (TYPE Is Nothing) Then + Throw New Global.System.ArgumentNullException("TYPE") Else - Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_HOTKEY1,String) + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(TYPE, String) End If - If (Original_HOTKEY2 Is Nothing) Then - Throw New Global.System.ArgumentNullException("Original_HOTKEY2") + If (FUNCTION1 Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_HOTKEY2,String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(FUNCTION1, String) End If - If (Original_ADDED_WHO Is Nothing) Then - Throw New Global.System.ArgumentNullException("Original_ADDED_WHO") + If (FUNCTION2 Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_ADDED_WHO,String) + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(FUNCTION2, 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 (TEXT1 Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) - Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(TEXT1, String) End If - If (Original_CHANGED_WHO Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) - Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value + If (TEXT2 Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(5).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(5).Value = CType(TEXT2, 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) + 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(20).Value = CType(1,Object) - Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(CHANGED_WHO, String) End If - Me.Adapter.UpdateCommand.Parameters(22).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 - End If - End Try - End Function - - _ - 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 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) - End If - 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) _ - <> Global.System.Data.ConnectionState.Open) Then - command.Connection.Open - End If - Dim returnValue As Integer - Try - returnValue = command.ExecuteNonQuery - Finally - If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - command.Connection.Close + Me.Adapter.UpdateCommand.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 + _ + 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -25103,78 +26622,74 @@ 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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) Me._clearBeforeFill = value End Set End Property - - _ + + _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" - tableMapping.DataSetTable = "TBHOTKEY_PATTERNS_REWORK" + tableMapping.DataSetTable = "TBHOTKEY_WINDOW_HOOK" tableMapping.ColumnMappings.Add("GUID", "GUID") - tableMapping.ColumnMappings.Add("HKPATTERN_ID", "HKPATTERN_ID") - tableMapping.ColumnMappings.Add("TYPE", "TYPE") - tableMapping.ColumnMappings.Add("FUNCTION1", "FUNCTION1") - tableMapping.ColumnMappings.Add("FUNCTION2", "FUNCTION2") - tableMapping.ColumnMappings.Add("TEXT1", "TEXT1") - tableMapping.ColumnMappings.Add("TEXT2", "TEXT2") - tableMapping.ColumnMappings.Add("SEQUENCE", "SEQUENCE") + tableMapping.ColumnMappings.Add("HKPROFILE_ID", "HKPROFILE_ID") + tableMapping.ColumnMappings.Add("SEQUENCE_NUMBER", "SEQUENCE_NUMBER") + tableMapping.ColumnMappings.Add("CONTROL_VALUE", "CONTROL_VALUE") tableMapping.ColumnMappings.Add("ADDED_WHO", "ADDED_WHO") tableMapping.ColumnMappings.Add("ADDED_WHEN", "ADDED_WHEN") tableMapping.ColumnMappings.Add("CHANGED_WHO", "CHANGED_WHO") @@ -25182,388 +26697,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_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.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, 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, 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_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.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("@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("@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_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.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("@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("@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, 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, 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("@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("@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 Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable, ByVal HKPATTERN_ID As Integer) As Integer + + _ + 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(HKPATTERN_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 Overloads Overridable Function GetData(ByVal HKPATTERN_ID As Integer) As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable + + _ + Public Overridable Overloads Function GetData(ByVal ID As Integer) As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(HKPATTERN_ID,Integer) - Dim dataTable As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable = New MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable() + 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_PATTERNS_REWORKDataTable) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataTable As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer - Return Me.Adapter.Update(dataSet, "TBHOTKEY_PATTERNS_REWORK") + + _ + Public Overridable Overloads Function Update(ByVal dataSet As MyDataset) As Integer + Return Me.Adapter.Update(dataSet, "TBHOTKEY_WINDOW_HOOK") End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + + _ + 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 Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + + _ + Public Overridable Overloads Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer, 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) - End If - If (Original_FUNCTION1 Is Nothing) Then - 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) - End If - If (Original_FUNCTION2 Is Nothing) Then - 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) - End If - If (Original_TEXT1 Is Nothing) Then - 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) - End If - If (Original_TEXT2 Is Nothing) Then - 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) - End If - 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) - 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) - Else - 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(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) - 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) - Else - Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value - End If + + _ + Public Overridable Overloads 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 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) - 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) - 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) - 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) - End If - If (TEXT2 Is Nothing) Then - Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value + + _ + 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) + If (CONTROL_VALUE Is Nothing) Then + Throw New Global.System.ArgumentNullException("CONTROL_VALUE") Else - Me.Adapter.InsertCommand.Parameters(5).Value = CType(TEXT2,String) + Me.Adapter.InsertCommand.Parameters(2).Value = CType(CONTROL_VALUE, String) End If - 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(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 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) - 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) - 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) - 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) - End If - If (TEXT2 Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value + + _ + 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) + If (CONTROL_VALUE Is Nothing) Then + Throw New Global.System.ArgumentNullException("CONTROL_VALUE") Else - Me.Adapter.UpdateCommand.Parameters(5).Value = CType(TEXT2,String) + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(CONTROL_VALUE, String) End If - 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 + Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else - Me.Adapter.UpdateCommand.Parameters(7).Value = CType(CHANGED_WHO,String) + Me.Adapter.UpdateCommand.Parameters(3).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(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 TBHOTKEY_WINDOW_HOOKTableAdapter + _ + 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 + Set(value As Global.System.Data.SqlClient.SqlConnection) Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value @@ -25577,271 +26953,321 @@ 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 + Set(value As Global.System.Data.SqlClient.SqlTransaction) 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 + Set(value As Boolean) Me._clearBeforeFill = value End Set End Property - - _ + + _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" - tableMapping.DataSetTable = "TBHOTKEY_WINDOW_HOOK" + tableMapping.DataSetTable = "TBGI_FILES_USER" tableMapping.ColumnMappings.Add("GUID", "GUID") - tableMapping.ColumnMappings.Add("HKPROFILE_ID", "HKPROFILE_ID") - tableMapping.ColumnMappings.Add("SEQUENCE_NUMBER", "SEQUENCE_NUMBER") - tableMapping.ColumnMappings.Add("CONTROL_VALUE", "CONTROL_VALUE") - tableMapping.ColumnMappings.Add("ADDED_WHO", "ADDED_WHO") + tableMapping.ColumnMappings.Add("FILENAME2WORK", "FILENAME2WORK") + tableMapping.ColumnMappings.Add("USER@WORK", "USER@WORK") + tableMapping.ColumnMappings.Add("WORKED", "WORKED") tableMapping.ColumnMappings.Add("ADDED_WHEN", "ADDED_WHEN") - tableMapping.ColumnMappings.Add("CHANGED_WHO", "CHANGED_WHO") - tableMapping.ColumnMappings.Add("CHANGED_WHEN", "CHANGED_WHEN") + tableMapping.ColumnMappings.Add("HANDLE_TYPE", "HANDLE_TYPE") + tableMapping.ColumnMappings.Add("FILENAME_ONLY", "FILENAME_ONLY") 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.CommandType = Global.System.Data.CommandType.Text - Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) - Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() - Me._adapter.InsertCommand.Connection = Me.Connection - Me._adapter.InsertCommand.CommandText = "INSERT INTO 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.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"& _ - "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, "", "", "")) 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 "& _ - " (HKPROFILE_ID = @ID)" + 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("@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("@USERNAME", Global.System.Data.SqlDbType.VarChar, 1024, Global.System.Data.ParameterDirection.Input, 0, 0, "", Global.System.Data.DataRowVersion.Current, False, Nothing, "", "", "")) End Sub - - _ - Public Overloads Overridable Function Fill(ByVal dataTable As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable, ByVal ID As Integer) As Integer + + _ + Public Overridable Overloads 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) + End If + 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 + 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) + 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 + End Sub + + _ + Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter + Get + If (Me._adapter Is Nothing) Then + Me.InitAdapter() + End If + Return Me._adapter + End Get + End Property + + _ + Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection + Get + If (Me._connection Is Nothing) Then + Me.InitConnection() + End If + Return Me._connection + End Get + Set(value As Global.System.Data.SqlClient.SqlConnection) + Me._connection = value + If (Not (Me.Adapter.InsertCommand) Is Nothing) Then + Me.Adapter.InsertCommand.Connection = value + End If + If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then + Me.Adapter.DeleteCommand.Connection = value + End If + If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then + Me.Adapter.UpdateCommand.Connection = value + End If + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + If (Not (Me.CommandCollection(i)) Is Nothing) Then + CType(Me.CommandCollection(i), Global.System.Data.SqlClient.SqlCommand).Connection = value + End If + i = (i + 1) + Loop + End Set + End Property + + _ + Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction + Get + Return Me._transaction + End Get + Set(value As Global.System.Data.SqlClient.SqlTransaction) + Me._transaction = value + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + Me.CommandCollection(i).Transaction = Me._transaction + i = (i + 1) + Loop + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then + Me.Adapter.DeleteCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then + Me.Adapter.InsertCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then + Me.Adapter.UpdateCommand.Transaction = Me._transaction + End If + End Set + End Property + + _ + Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() + Get + If (Me._commandCollection Is Nothing) Then + Me.InitCommandCollection() + End If + Return Me._commandCollection + End Get + End Property + + _ + Public Property ClearBeforeFill() As Boolean + Get + Return Me._clearBeforeFill + End Get + Set(value As Boolean) + Me._clearBeforeFill = value + End Set + End Property + + _ + Private Sub InitAdapter() + Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() + Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() + tableMapping.SourceTable = "Table" + tableMapping.DataSetTable = "TBGI_HISTORY" + tableMapping.ColumnMappings.Add("GUID", "GUID") + tableMapping.ColumnMappings.Add("FILENAME_ORIGINAL", "FILENAME_ORIGINAL") + tableMapping.ColumnMappings.Add("FILENAME_NEW", "FILENAME_NEW") + 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(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).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, "", "", "")) + End Sub + + _ + Public Overridable Overloads Function Fill(ByVal dataTable As MyDataset.TBGI_HISTORYDataTable, ByVal User As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) - Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID,Integer) - If (Me.ClearBeforeFill = true) Then - dataTable.Clear + 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 GetData(ByVal ID As Integer) As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable + + _ + Public Overridable Overloads Function GetData(ByVal User As String) As MyDataset.TBGI_HISTORYDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) - 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 Overloads Overridable Function Update(ByVal dataTable As MyDataset.TBHOTKEY_WINDOW_HOOKDataTable) As Integer - Return Me.Adapter.Update(dataTable) - End Function - - _ - Public Overloads Overridable Function Update(ByVal dataSet As MyDataset) As Integer - Return Me.Adapter.Update(dataSet, "TBHOTKEY_WINDOW_HOOK") - End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer - Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) - End Function - - _ - Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer - Return Me.Adapter.Update(dataRows) - End Function - - _ - Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer - Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) - Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State - If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ - <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.DeleteCommand.Connection.Open - End If - Try - Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery - Return returnValue - Finally - If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - Me.Adapter.DeleteCommand.Connection.Close - End If - End Try - End Function - - _ - Public Overloads Overridable Function Insert(ByVal 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) - 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) - End If - Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State - If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ - <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.InsertCommand.Connection.Open - End If - Try - Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery - Return returnValue - Finally - If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - Me.Adapter.InsertCommand.Connection.Close - End If - End Try - End Function - - _ - Public Overloads Overridable Function Update(ByVal 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) - End If - If (CHANGED_WHO Is Nothing) Then - Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value + If (User Is Nothing) Then + Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value Else - 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) - Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State - If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ - <> Global.System.Data.ConnectionState.Open) Then - Me.Adapter.UpdateCommand.Connection.Open + Me.Adapter.SelectCommand.Parameters(0).Value = CType(User, String) End If - Try - Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery - Return returnValue - Finally - If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then - Me.Adapter.UpdateCommand.Connection.Close - End If - End Try + Dim dataTable As MyDataset.TBGI_HISTORYDataTable = New MyDataset.TBGI_HISTORYDataTable() + Me.Adapter.Fill(dataTable) + Return dataTable End Function End Class @@ -26356,75 +27782,75 @@ Namespace MyDatasetTableAdapters allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._tBHOTKEY_USER_PROFILETableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_USER_PROFILE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._tBHOTKEY_WINDOW_HOOKTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_WINDOW_HOOK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._tBHOTKEY_USER_PROFILETableAdapter.Update(updatedRows)) + result = (result + Me._tBHOTKEY_WINDOW_HOOKTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._tBDD_GROUPS_USERTableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBDD_GROUPS_USER.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._tBHOTKEY_PATTERNS_REWORKTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_PATTERNS_REWORK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._tBDD_GROUPS_USERTableAdapter.Update(updatedRows)) + result = (result + Me._tBHOTKEY_PATTERNS_REWORKTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBGI_OBJECTTYPE_EMAIL_INDEX.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._tBHOTKEY_USER_PROFILETableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_USER_PROFILE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter.Update(updatedRows)) + result = (result + Me._tBHOTKEY_USER_PROFILETableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._tBHOTKEY_PATTERNS_REWORKTableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_PATTERNS_REWORK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._tBDD_GROUPS_USERTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBDD_GROUPS_USER.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._tBHOTKEY_PATTERNS_REWORKTableAdapter.Update(updatedRows)) + result = (result + Me._tBDD_GROUPS_USERTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._tBGI_CONFIGURATIONTableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBGI_CONFIGURATION.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBDD_INDEX_MAN_POSTPROCESSING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._tBGI_CONFIGURATIONTableAdapter.Update(updatedRows)) + result = (result + Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._tBDD_INDEX_AUTOMTableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBDD_INDEX_AUTOM.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBGI_OBJECTTYPE_EMAIL_INDEX.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._tBDD_INDEX_AUTOMTableAdapter.Update(updatedRows)) + result = (result + Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBDD_INDEX_MAN_POSTPROCESSING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._tBGI_CONFIGURATIONTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBGI_CONFIGURATION.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter.Update(updatedRows)) + result = (result + Me._tBGI_CONFIGURATIONTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If - If (Not (Me._tBHOTKEY_WINDOW_HOOKTableAdapter) Is Nothing) Then - Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_WINDOW_HOOK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + If (Not (Me._tBDD_INDEX_AUTOMTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBDD_INDEX_AUTOM.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then - result = (result + Me._tBHOTKEY_WINDOW_HOOKTableAdapter.Update(updatedRows)) + result = (result + Me._tBDD_INDEX_AUTOMTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If @@ -26502,6 +27928,22 @@ Namespace MyDatasetTableAdapters allAddedRows.AddRange(addedRows) End If End If + If (Not (Me._tBHOTKEY_WINDOW_HOOKTableAdapter) Is Nothing) Then + Dim addedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_WINDOW_HOOK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) + If ((Not (addedRows) Is Nothing) _ + AndAlso (0 < addedRows.Length)) Then + result = (result + Me._tBHOTKEY_WINDOW_HOOKTableAdapter.Update(addedRows)) + allAddedRows.AddRange(addedRows) + End If + End If + If (Not (Me._tBHOTKEY_PATTERNS_REWORKTableAdapter) Is Nothing) Then + Dim addedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_PATTERNS_REWORK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) + If ((Not (addedRows) Is Nothing) _ + AndAlso (0 < addedRows.Length)) Then + result = (result + Me._tBHOTKEY_PATTERNS_REWORKTableAdapter.Update(addedRows)) + allAddedRows.AddRange(addedRows) + End If + End If If (Not (Me._tBHOTKEY_USER_PROFILETableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_USER_PROFILE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ @@ -26518,19 +27960,19 @@ Namespace MyDatasetTableAdapters allAddedRows.AddRange(addedRows) End If End If - If (Not (Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter) Is Nothing) Then - Dim addedRows() As Global.System.Data.DataRow = dataSet.TBGI_OBJECTTYPE_EMAIL_INDEX.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) + If (Not (Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter) Is Nothing) Then + Dim addedRows() As Global.System.Data.DataRow = dataSet.TBDD_INDEX_MAN_POSTPROCESSING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then - result = (result + Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter.Update(addedRows)) + result = (result + Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If - If (Not (Me._tBHOTKEY_PATTERNS_REWORKTableAdapter) Is Nothing) Then - Dim addedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_PATTERNS_REWORK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) + If (Not (Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter) Is Nothing) Then + Dim addedRows() As Global.System.Data.DataRow = dataSet.TBGI_OBJECTTYPE_EMAIL_INDEX.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then - result = (result + Me._tBHOTKEY_PATTERNS_REWORKTableAdapter.Update(addedRows)) + result = (result + Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If @@ -26550,22 +27992,6 @@ Namespace MyDatasetTableAdapters allAddedRows.AddRange(addedRows) End If End If - If (Not (Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter) Is Nothing) Then - Dim addedRows() As Global.System.Data.DataRow = dataSet.TBDD_INDEX_MAN_POSTPROCESSING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) - If ((Not (addedRows) Is Nothing) _ - AndAlso (0 < addedRows.Length)) Then - result = (result + Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter.Update(addedRows)) - allAddedRows.AddRange(addedRows) - End If - End If - If (Not (Me._tBHOTKEY_WINDOW_HOOKTableAdapter) Is Nothing) Then - Dim addedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_WINDOW_HOOK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) - If ((Not (addedRows) Is Nothing) _ - AndAlso (0 < addedRows.Length)) Then - result = (result + Me._tBHOTKEY_WINDOW_HOOKTableAdapter.Update(addedRows)) - allAddedRows.AddRange(addedRows) - End If - End If Return result End Function @@ -26576,22 +28002,6 @@ Namespace MyDatasetTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function UpdateDeletedRows(ByVal dataSet As MyDataset, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 - If (Not (Me._tBHOTKEY_WINDOW_HOOKTableAdapter) Is Nothing) Then - Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_WINDOW_HOOK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) - If ((Not (deletedRows) Is Nothing) _ - AndAlso (0 < deletedRows.Length)) Then - result = (result + Me._tBHOTKEY_WINDOW_HOOKTableAdapter.Update(deletedRows)) - allChangedRows.AddRange(deletedRows) - End If - End If - If (Not (Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter) Is Nothing) Then - Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBDD_INDEX_MAN_POSTPROCESSING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) - If ((Not (deletedRows) Is Nothing) _ - AndAlso (0 < deletedRows.Length)) Then - result = (result + Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter.Update(deletedRows)) - allChangedRows.AddRange(deletedRows) - End If - End If If (Not (Me._tBDD_INDEX_AUTOMTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBDD_INDEX_AUTOM.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ @@ -26608,19 +28018,19 @@ Namespace MyDatasetTableAdapters allChangedRows.AddRange(deletedRows) End If End If - If (Not (Me._tBHOTKEY_PATTERNS_REWORKTableAdapter) Is Nothing) Then - Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_PATTERNS_REWORK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) + If (Not (Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter) Is Nothing) Then + Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBGI_OBJECTTYPE_EMAIL_INDEX.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then - result = (result + Me._tBHOTKEY_PATTERNS_REWORKTableAdapter.Update(deletedRows)) + result = (result + Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If - If (Not (Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter) Is Nothing) Then - Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBGI_OBJECTTYPE_EMAIL_INDEX.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) + If (Not (Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter) Is Nothing) Then + Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBDD_INDEX_MAN_POSTPROCESSING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then - result = (result + Me._tBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter.Update(deletedRows)) + result = (result + Me._tBDD_INDEX_MAN_POSTPROCESSINGTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If @@ -26640,6 +28050,22 @@ Namespace MyDatasetTableAdapters allChangedRows.AddRange(deletedRows) End If End If + If (Not (Me._tBHOTKEY_PATTERNS_REWORKTableAdapter) Is Nothing) Then + Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_PATTERNS_REWORK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) + If ((Not (deletedRows) Is Nothing) _ + AndAlso (0 < deletedRows.Length)) Then + result = (result + Me._tBHOTKEY_PATTERNS_REWORKTableAdapter.Update(deletedRows)) + allChangedRows.AddRange(deletedRows) + End If + End If + If (Not (Me._tBHOTKEY_WINDOW_HOOKTableAdapter) Is Nothing) Then + Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBHOTKEY_WINDOW_HOOK.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) + If ((Not (deletedRows) Is Nothing) _ + AndAlso (0 < deletedRows.Length)) Then + result = (result + Me._tBHOTKEY_WINDOW_HOOKTableAdapter.Update(deletedRows)) + allChangedRows.AddRange(deletedRows) + End If + End If If (Not (Me._tBDD_USER_GROUPSTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBDD_USER_GROUPS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ diff --git a/Global_Indexer/MyDataset.xsc b/Global_Indexer/MyDataset.xsc index ed10432..137b380 100644 --- a/Global_Indexer/MyDataset.xsc +++ b/Global_Indexer/MyDataset.xsc @@ -283,18 +283,14 @@ - - + - - + - - + - - + @@ -334,11 +330,9 @@ - - + - - + diff --git a/Global_Indexer/MyDataset.xsd b/Global_Indexer/MyDataset.xsd index 26716b1..e7909b7 100644 --- a/Global_Indexer/MyDataset.xsd +++ b/Global_Indexer/MyDataset.xsd @@ -330,51 +330,52 @@ FROM TBDD_MODULES - + DELETE FROM TBDD_INDEX_MAN WHERE (GUID = @Original_GUID) - + - + INSERT INTO TBDD_INDEX_MAN (DOK_ID, NAME, WD_INDEX, COMMENT, DATATYPE, SUGGESTION, DEFAULT_VALUE, CONNECTION_ID, SEQUENCE, SQL_RESULT, SQL_CHECK, ACTIVE, ADDED_WHO, OPTIONAL) VALUES (@DOK_ID,@NAME,@WD_INDEX,@COMMENT,@DATATYPE,@SUGGESTION,@DEFAULT_VALUE,@CONNECTION_ID,@SEQUENCE,@SQL_RESULT,@SQL_CHECK,@ACTIVE,@ADDED_WHO,@OPTIONAL); SELECT GUID, DOK_ID, NAME, WD_INDEX, COMMENT, DATATYPE, SUGGESTION, DEFAULT_VALUE, CONNECTION_ID, SEQUENCE, SQL_RESULT, SQL_CHECK, ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, OPTIONAL FROM TBDD_INDEX_MAN WHERE (GUID = SCOPE_IDENTITY()) - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + SELECT GUID, DOK_ID, NAME, WD_INDEX, COMMENT, DATATYPE, SUGGESTION, DEFAULT_VALUE, CONNECTION_ID, SEQUENCE, SQL_RESULT, SQL_CHECK, ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, OPTIONAL FROM TBDD_INDEX_MAN -WHERE (DOK_ID = @DOK_ID) +WHERE (DOK_ID = @DOK_ID) +ORDER BY SEQUENCE - + UPDATE TBDD_INDEX_MAN SET DOK_ID = @DOK_ID, NAME = @NAME, WD_INDEX = @WD_INDEX, COMMENT = @COMMENT, DATATYPE = @DATATYPE, SUGGESTION = @SUGGESTION, DEFAULT_VALUE = @DEFAULT_VALUE, CONNECTION_ID = @CONNECTION_ID, SEQUENCE = @SEQUENCE, SQL_RESULT = @SQL_RESULT, SQL_CHECK = @SQL_CHECK, ACTIVE = @ACTIVE, CHANGED_WHO = @CHANGED_WHO, @@ -382,22 +383,22 @@ SET DOK_ID = @DOK_ID, NAME = @NAME, WD_INDEX = @WD_INDEX, COMMENT WHERE (GUID = @Original_GUID); SELECT GUID, DOK_ID, NAME, WD_INDEX, COMMENT, DATATYPE, SUGGESTION, DEFAULT_VALUE, CONNECTION_ID, SEQUENCE, SQL_RESULT, SQL_CHECK, ACTIVE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, OPTIONAL FROM TBDD_INDEX_MAN WHERE (GUID = @GUID) - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -1620,6 +1621,56 @@ SELECT GUID, HKPROFILE_ID, SEQUENCE_NUMBER, CONTROL_VALUE, ADDED_WHO, ADDED_WHEN + + + + + + SELECT GUID, FILENAME2WORK, USER@WORK, WORKED, ADDED_WHEN, HANDLE_TYPE, FILENAME_ONLY +FROM TBGI_FILES_USER +WHERE (WORKED = 0) AND (UPPER(USER@WORK) = UPPER(@USERNAME)) + + + + + + + + + + + + + + + + + + + + + + + + SELECT GUID, FILENAME_ORIGINAL, FILENAME_NEW, ADDED_WHEN +FROM TBGI_HISTORY +WHERE (ADDED_WHO = @User) AND (CONVERT(DATE, ADDED_WHEN) = CONVERT(DATE, GETDATE())) +ORDER BY GUID DESC + + + + + + + + + + + + + + + @@ -2859,6 +2910,66 @@ SELECT GUID, HKPROFILE_ID, SEQUENCE_NUMBER, CONTROL_VALUE, ADDED_WHO, ADDED_WHEN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2957,6 +3068,14 @@ SELECT GUID, HKPROFILE_ID, SEQUENCE_NUMBER, CONTROL_VALUE, ADDED_WHO, ADDED_WHEN + + + + + + + + diff --git a/Global_Indexer/MyDataset.xss b/Global_Indexer/MyDataset.xss index f670d1a..a48da6d 100644 --- a/Global_Indexer/MyDataset.xss +++ b/Global_Indexer/MyDataset.xss @@ -6,34 +6,36 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 431 @@ -45,7 +47,7 @@ - + 543 @@ -57,7 +59,7 @@ - + 397 @@ -69,7 +71,7 @@ - + 605 @@ -85,7 +87,7 @@ - + 959 @@ -97,7 +99,7 @@ - + 1193 @@ -113,7 +115,7 @@ - + 871 @@ -125,7 +127,7 @@ - + 94 @@ -145,7 +147,7 @@ - + 129 @@ -161,7 +163,7 @@ - + 183 @@ -173,7 +175,7 @@ - + 88 @@ -193,7 +195,7 @@ - + 117 @@ -213,7 +215,7 @@ - + 765 @@ -229,7 +231,7 @@ - + 409 @@ -249,5 +251,25 @@ + + + + 38 + 0 + + + 38 + -30 + + + 38 + -30 + + + 38 + 0 + + + \ No newline at end of file diff --git a/Global_Indexer/frmConfig_Basic.designer.vb b/Global_Indexer/frmConfig_Basic.designer.vb index 5e636c9..49d9149 100644 --- a/Global_Indexer/frmConfig_Basic.designer.vb +++ b/Global_Indexer/frmConfig_Basic.designer.vb @@ -36,22 +36,28 @@ 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() Me.lblUniversalViewer = New System.Windows.Forms.Label() Me.TabPage3 = New System.Windows.Forms.TabPage() + Me.Button2 = New System.Windows.Forms.Button() + Me.txtScanFolderWatch = New System.Windows.Forms.TextBox() + Me.Label7 = New System.Windows.Forms.Label() Me.btnsetFW_Folder = New System.Windows.Forms.Button() Me.btnFW_OwnFiles = New System.Windows.Forms.Button() Me.btnFW_Desktop = New System.Windows.Forms.Button() Me.txtFolderWatch = New System.Windows.Forms.TextBox() Me.Label6 = New System.Windows.Forms.Label() - 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() @@ -191,20 +197,10 @@ 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) + Me.TabPage2.Controls.Add(Me.CheckBox2) Me.TabPage2.Controls.Add(Me.btnApplicationFolder) Me.TabPage2.Controls.Add(Me.btnopenlog) Me.TabPage2.Controls.Add(Me.CheckBox1) @@ -219,34 +215,10 @@ 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, 101) - 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, 130) - 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 - Me.CheckBox1.Location = New System.Drawing.Point(11, 65) + Me.CheckBox1.Location = New System.Drawing.Point(11, 96) Me.CheckBox1.Name = "CheckBox1" Me.CheckBox1.Size = New System.Drawing.Size(99, 17) Me.CheckBox1.TabIndex = 3 @@ -280,25 +252,55 @@ Partial Class frmConfig_Basic ' 'TabPage3 ' + Me.TabPage3.Controls.Add(Me.Button2) + Me.TabPage3.Controls.Add(Me.txtScanFolderWatch) + Me.TabPage3.Controls.Add(Me.Label7) Me.TabPage3.Controls.Add(Me.btnsetFW_Folder) Me.TabPage3.Controls.Add(Me.btnFW_OwnFiles) Me.TabPage3.Controls.Add(Me.btnFW_Desktop) Me.TabPage3.Controls.Add(Me.txtFolderWatch) Me.TabPage3.Controls.Add(Me.Label6) + Me.TabPage3.Controls.Add(Me.btnstartstop2) Me.TabPage3.Controls.Add(Me.btnstartstop1) Me.TabPage3.Location = New System.Drawing.Point(4, 22) Me.TabPage3.Name = "TabPage3" Me.TabPage3.Padding = New System.Windows.Forms.Padding(3) Me.TabPage3.Size = New System.Drawing.Size(687, 235) Me.TabPage3.TabIndex = 2 - Me.TabPage3.Text = "Überwachter Ordner/Folderwatch" + Me.TabPage3.Text = "Überwachte Ordner - Folderwatch" Me.TabPage3.UseVisualStyleBackColor = True ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(616, 142) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(49, 22) + Me.Button2.TabIndex = 10 + Me.Button2.Text = "..." + Me.Button2.UseVisualStyleBackColor = True + ' + 'txtScanFolderWatch + ' + Me.txtScanFolderWatch.BackColor = System.Drawing.Color.LemonChiffon + Me.txtScanFolderWatch.Location = New System.Drawing.Point(11, 142) + Me.txtScanFolderWatch.Name = "txtScanFolderWatch" + Me.txtScanFolderWatch.Size = New System.Drawing.Size(602, 22) + Me.txtScanFolderWatch.TabIndex = 8 + ' + 'Label7 + ' + Me.Label7.AutoSize = True + Me.Label7.Location = New System.Drawing.Point(8, 126) + Me.Label7.Name = "Label7" + Me.Label7.Size = New System.Drawing.Size(392, 13) + Me.Label7.TabIndex = 7 + Me.Label7.Text = "Definieren Sie hier den Ordner der für Scan2Folder verwendet werden soll:" + ' 'btnsetFW_Folder ' - Me.btnsetFW_Folder.Location = New System.Drawing.Point(616, 28) + Me.btnsetFW_Folder.Location = New System.Drawing.Point(616, 30) Me.btnsetFW_Folder.Name = "btnsetFW_Folder" - Me.btnsetFW_Folder.Size = New System.Drawing.Size(49, 23) + Me.btnsetFW_Folder.Size = New System.Drawing.Size(49, 22) Me.btnsetFW_Folder.TabIndex = 6 Me.btnsetFW_Folder.Text = "..." Me.btnsetFW_Folder.UseVisualStyleBackColor = True @@ -323,6 +325,7 @@ Partial Class frmConfig_Basic ' 'txtFolderWatch ' + Me.txtFolderWatch.BackColor = System.Drawing.Color.Khaki Me.txtFolderWatch.Location = New System.Drawing.Point(11, 30) Me.txtFolderWatch.Name = "txtFolderWatch" Me.txtFolderWatch.Size = New System.Drawing.Size(602, 22) @@ -337,6 +340,84 @@ Partial Class frmConfig_Basic Me.Label6.TabIndex = 0 Me.Label6.Text = "Definieren Sie hier den Ordner welcher überwacht wird:" ' + 'OpenFileDialog1 + ' + Me.OpenFileDialog1.FileName = "OpenFileDialog1" + ' + 'CheckBox3 + ' + Me.CheckBox3.AutoSize = True + Me.CheckBox3.Checked = Global.Global_Indexer.My.MySettings.Default.DoNot_Show_Documents + Me.CheckBox3.DataBindings.Add(New System.Windows.Forms.Binding("Checked", Global.Global_Indexer.My.MySettings.Default, "DoNot_Show_Documents", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)) + Me.CheckBox3.Location = New System.Drawing.Point(11, 56) + Me.CheckBox3.Name = "CheckBox3" + Me.CheckBox3.Size = New System.Drawing.Size(249, 17) + Me.CheckBox3.TabIndex = 7 + Me.CheckBox3.Text = "Dokumente bei Indexierung nicht anzeigen" + Me.CheckBox3.UseVisualStyleBackColor = True + ' + 'CheckBox2 + ' + Me.CheckBox2.AutoSize = True + Me.CheckBox2.Checked = Global.Global_Indexer.My.MySettings.Default.Show_IndexResult + Me.CheckBox2.CheckState = System.Windows.Forms.CheckState.Checked + Me.CheckBox2.DataBindings.Add(New System.Windows.Forms.Binding("Checked", Global.Global_Indexer.My.MySettings.Default, "Show_IndexResult", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)) + Me.CheckBox2.Location = New System.Drawing.Point(241, 96) + Me.CheckBox2.Name = "CheckBox2" + Me.CheckBox2.Size = New System.Drawing.Size(231, 17) + Me.CheckBox2.TabIndex = 6 + 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 @@ -350,10 +431,6 @@ Partial Class frmConfig_Basic Me.btnstartstop1.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.btnstartstop1.UseVisualStyleBackColor = True ' - 'OpenFileDialog1 - ' - Me.OpenFileDialog1.FileName = "OpenFileDialog1" - ' 'frmConfig_Basic ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -406,4 +483,10 @@ Partial Class frmConfig_Basic Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox Friend WithEvents btnopenlog As System.Windows.Forms.Button Friend WithEvents btnApplicationFolder As System.Windows.Forms.Button + Friend WithEvents CheckBox2 As System.Windows.Forms.CheckBox + Friend WithEvents Button2 As System.Windows.Forms.Button + Friend WithEvents txtScanFolderWatch As System.Windows.Forms.TextBox + Friend WithEvents Label7 As System.Windows.Forms.Label + Friend WithEvents btnstartstop2 As System.Windows.Forms.Button + Friend WithEvents CheckBox3 As System.Windows.Forms.CheckBox End Class diff --git a/Global_Indexer/frmConfig_Basic.vb b/Global_Indexer/frmConfig_Basic.vb index db85227..4cff7d1 100644 --- a/Global_Indexer/frmConfig_Basic.vb +++ b/Global_Indexer/frmConfig_Basic.vb @@ -120,11 +120,18 @@ Public Class frmConfig_Basic Private Sub TabControl1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControl1.SelectedIndexChanged Select Case TabControl1.SelectedIndex Case 2 - Dim folderwatch = ClassDatabase.Execute_Scalar("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & CURRENT_USERID, MyConnectionString) + Dim folderwatch = ClassDatabase.Execute_Scalar("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & CURRENT_USERID, MyConnectionString) If Not folderwatch Is Nothing Then CURRENT_FOLDERWATCH = folderwatch End If Me.txtFolderWatch.Text = CURRENT_FOLDERWATCH + Dim SCAN_folderwatch = ClassDatabase.Execute_Scalar("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & CURRENT_USERID, MyConnectionString) + If Not SCAN_folderwatch Is Nothing Then + CURRENT_SCAN_FOLDERWATCH = SCAN_folderwatch + End If + Me.txtFolderWatch.Text = CURRENT_FOLDERWATCH + Me.txtScanFolderWatch.Text = CURRENT_SCAN_FOLDERWATCH + If Not ClassFolderWatcher.FolderWatcher Is Nothing Then If ClassFolderWatcher.FolderWatcher.EnableRaisingEvents = True Then btnstartstop1.Text = "Überwachung stoppen" @@ -137,43 +144,64 @@ Public Class frmConfig_Basic btnstartstop1.Text = "Überwachung starten" btnstartstop1.Image = My.Resources.bell_go End If + + If Not ClassFolderWatcher.FolderWatcher_SCAN Is Nothing Then + If ClassFolderWatcher.FolderWatcher_SCAN.EnableRaisingEvents = True Then + btnstartstop2.Text = "Überwachung stoppen" + btnstartstop2.Image = My.Resources.bell_delete + Else + btnstartstop2.Text = "Überwachung starten" + btnstartstop2.Image = My.Resources.bell_go + End If + Else + btnstartstop2.Text = "Überwachung starten" + btnstartstop2.Image = My.Resources.bell_go + End If End Select End Sub Private Sub btnFW_Desktop_Click(sender As Object, e As EventArgs) Handles btnFW_Desktop.Click CURRENT_FOLDERWATCH = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "SimpleIndexer") - CheckFolder(CURRENT_FOLDERWATCH) + CheckFolder(CURRENT_FOLDERWATCH, "DEFAULT") End Sub - Sub CheckFolder(mypath As String) + Sub CheckFolder(mypath As String, FOLDER_TYPE As String) Try If (Not System.IO.Directory.Exists(mypath)) Then System.IO.Directory.CreateDirectory(mypath) End If - Dim folderwatch = ClassDatabase.Execute_Scalar("SELECT GUID FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & CURRENT_USERID, MyConnectionString) + Dim folderwatch = ClassDatabase.Execute_Scalar("SELECT GUID FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & CURRENT_USERID & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'", MyConnectionString) Dim sql As String If folderwatch Is Nothing Then - sql = "INSERT INTO TBGI_FOLDERWATCH_USER (USER_ID, FOLDER_PATH, ADDED_WHO) VALUES (" & CURRENT_USERID & ",'" & mypath & "','" & Environment.UserName & "')" + sql = "INSERT INTO TBGI_FOLDERWATCH_USER (USER_ID, FOLDER_PATH, FOLDER_TYPE, ADDED_WHO) VALUES (" & CURRENT_USERID & ",'" & mypath & "','" & FOLDER_TYPE & "','" & Environment.UserName & "')" Else sql = "UPDATE TBGI_FOLDERWATCH_USER SET FOLDER_PATH = '" & mypath & "', CHANGED_WHO = '" & Environment.UserName & "' where GUID = " & folderwatch End If If ClassDatabase.Execute_non_Query(sql) Then - folderwatch = ClassDatabase.Execute_Scalar("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & CURRENT_USERID, MyConnectionString) - CURRENT_FOLDERWATCH = folderwatch - Me.txtFolderWatch.Text = CURRENT_FOLDERWATCH + folderwatch = ClassDatabase.Execute_Scalar("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & CURRENT_USERID & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'", MyConnectionString) + + If FOLDER_TYPE = "SCAN" Then + CURRENT_SCAN_FOLDERWATCH = folderwatch + Me.txtScanFolderWatch.Text = CURRENT_SCAN_FOLDERWATCH + + Else + CURRENT_FOLDERWATCH = folderwatch + Me.txtFolderWatch.Text = CURRENT_FOLDERWATCH + End If + End If - If FW_started = True Then + If FW_started = True And FOLDER_TYPE = "DEFAULT" Then ClassFolderWatcher.Restart_FolderWatch() End If Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in CheckFolder:") End Try - + End Sub Private Sub btnFW_OwnFiles_Click(sender As Object, e As EventArgs) Handles btnFW_OwnFiles.Click CURRENT_FOLDERWATCH = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "SimpleIndexer") - CheckFolder(CURRENT_FOLDERWATCH) + CheckFolder(CURRENT_FOLDERWATCH, "DEFAULT") End Sub _ @@ -193,11 +221,21 @@ Public Class frmConfig_Basic btnstartstop1.Image = My.Resources.bell_go End Select End Sub + Sub CheckFWSCAN_State() + Select Case ClassFolderWatcher.StartStop_FolderWatchSCAN() + Case 1 + btnstartstop2.Text = "Überwachung stoppen" + btnstartstop2.Image = My.Resources.bell_delete + Case 0 + btnstartstop2.Text = "Überwachung starten" + btnstartstop2.Image = My.Resources.bell_go + End Select + End Sub Private Sub btnsetFW_Folder_Click(sender As Object, e As EventArgs) Handles btnsetFW_Folder.Click Dim fbdialog As New FolderBrowserDialog If fbdialog.ShowDialog() = DialogResult.OK Then - CheckFolder(fbdialog.SelectedPath) + CheckFolder(fbdialog.SelectedPath, "DEFAULT") End If End Sub @@ -218,4 +256,25 @@ Public Class frmConfig_Basic Private Sub btnApplicationFolder_Click(sender As Object, e As EventArgs) Handles btnApplicationFolder.Click Process.Start(Application.UserAppDataPath()) End Sub + + Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox2.CheckedChanged + My.Settings.Save() + End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + Dim fbdialog As New FolderBrowserDialog + If fbdialog.ShowDialog() = DialogResult.OK Then + CheckFolder(fbdialog.SelectedPath, "SCAN") + End If + End Sub + + Private Sub Button3_Click(sender As Object, e As EventArgs) Handles btnstartstop2.Click + If CURRENT_FOLDERWATCH <> "" Then + CheckFWSCAN_State() + End If + End Sub + + Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox3.CheckedChanged + My.Settings.Save() + End Sub End Class \ No newline at end of file diff --git a/Global_Indexer/frmHistory.resx b/Global_Indexer/frmHistory.resx new file mode 100644 index 0000000..09184db --- /dev/null +++ b/Global_Indexer/frmHistory.resx @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 713, 17 + + + 127, 17 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 + wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0 + v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg + UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA + Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu + lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w + 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f + Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+ + 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 + n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI + N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f + oAc0QjgAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// + h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B + twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA + kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG + WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9 + 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg== + + + + 17, 17 + + + 336, 17 + + + 540, 17 + + \ No newline at end of file diff --git a/Global_Indexer/frmIndex.designer.vb b/Global_Indexer/frmIndex.designer.vb index 65729fd..9b0a8f8 100644 --- a/Global_Indexer/frmIndex.designer.vb +++ b/Global_Indexer/frmIndex.designer.vb @@ -26,6 +26,7 @@ Partial Class frmIndex Me.Label1 = New System.Windows.Forms.Label() Me.cmbDokumentart = New System.Windows.Forms.ComboBox() Me.Panel1 = New System.Windows.Forms.Panel() + Me.Button1 = New System.Windows.Forms.Button() Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton() Me.lblerror = New System.Windows.Forms.Label() @@ -46,11 +47,12 @@ Partial Class frmIndex Me.VWINDEX_AUTOMTableAdapter = New Global_Indexer.MyDatasetTableAdapters.VWDDINDEX_AUTOMTableAdapter() Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() Me.pnlIndex = New System.Windows.Forms.Panel() - Me.pnlWebbrowser = New System.Windows.Forms.Panel() + Me.grpbxMailBody = New System.Windows.Forms.GroupBox() Me.WebBrowser = New System.Windows.Forms.WebBrowser() - Me.Label3 = New System.Windows.Forms.Label() Me.StatusStrip3 = New System.Windows.Forms.StatusStrip() Me.tslblWebbrowser = New System.Windows.Forms.ToolStripStatusLabel() + Me.grpBetreff = New System.Windows.Forms.GroupBox() + Me.txtBetreff = New System.Windows.Forms.TextBox() Me.pnlPDF = New System.Windows.Forms.Panel() Me.PdfViewer1 = New DevExpress.XtraPdfViewer.PdfViewer() Me.StatusStrip2 = New System.Windows.Forms.StatusStrip() @@ -97,8 +99,9 @@ Partial Class frmIndex Me.SplitContainer1.Panel1.SuspendLayout() Me.SplitContainer1.Panel2.SuspendLayout() Me.SplitContainer1.SuspendLayout() - Me.pnlWebbrowser.SuspendLayout() + Me.grpbxMailBody.SuspendLayout() Me.StatusStrip3.SuspendLayout() + Me.grpBetreff.SuspendLayout() Me.pnlPDF.SuspendLayout() Me.StatusStrip2.SuspendLayout() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -123,13 +126,14 @@ Partial Class frmIndex Me.cmbDokumentart.FormattingEnabled = True Me.cmbDokumentart.Location = New System.Drawing.Point(5, 44) Me.cmbDokumentart.Name = "cmbDokumentart" - Me.cmbDokumentart.Size = New System.Drawing.Size(387, 25) + Me.cmbDokumentart.Size = New System.Drawing.Size(376, 25) Me.cmbDokumentart.TabIndex = 2 Me.cmbDokumentart.ValueMember = "DOKART_ID" ' 'Panel1 ' Me.Panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight + Me.Panel1.Controls.Add(Me.Button1) Me.Panel1.Controls.Add(Me.ToolStrip1) Me.Panel1.Controls.Add(Me.lblerror) Me.Panel1.Controls.Add(Me.cmbDokumentart) @@ -141,6 +145,20 @@ Partial Class frmIndex Me.Panel1.Size = New System.Drawing.Size(526, 110) Me.Panel1.TabIndex = 4 ' + 'Button1 + ' + Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Button1.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button1.Image = Global.Global_Indexer.My.Resources.Resources.cancel + Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Button1.Location = New System.Drawing.Point(387, 41) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(133, 30) + Me.Button1.TabIndex = 11 + Me.Button1.Text = "Abbruch" + Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight + Me.Button1.UseVisualStyleBackColor = True + ' 'ToolStrip1 ' Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton1}) @@ -204,10 +222,10 @@ Partial Class frmIndex Me.Panel2.Controls.Add(Me.txtIndexfilepath) Me.Panel2.Controls.Add(Me.OK_Button) Me.Panel2.Dock = System.Windows.Forms.DockStyle.Bottom - Me.Panel2.Location = New System.Drawing.Point(0, 397) + Me.Panel2.Location = New System.Drawing.Point(0, 373) Me.Panel2.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) Me.Panel2.Name = "Panel2" - Me.Panel2.Size = New System.Drawing.Size(526, 113) + Me.Panel2.Size = New System.Drawing.Size(526, 137) Me.Panel2.TabIndex = 7 ' 'chkMultiIndexer @@ -216,7 +234,7 @@ Partial Class frmIndex Me.chkMultiIndexer.BackColor = System.Drawing.Color.Yellow Me.chkMultiIndexer.Font = New System.Drawing.Font("Verdana", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.chkMultiIndexer.ForeColor = System.Drawing.Color.Maroon - Me.chkMultiIndexer.Location = New System.Drawing.Point(5, 43) + Me.chkMultiIndexer.Location = New System.Drawing.Point(3, 39) Me.chkMultiIndexer.Name = "chkMultiIndexer" Me.chkMultiIndexer.Size = New System.Drawing.Size(520, 20) Me.chkMultiIndexer.TabIndex = 10 @@ -227,19 +245,19 @@ Partial Class frmIndex ' Me.chkdelete_origin.AutoSize = True Me.chkdelete_origin.Font = New System.Drawing.Font("Verdana", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.chkdelete_origin.Location = New System.Drawing.Point(5, 14) + Me.chkdelete_origin.Location = New System.Drawing.Point(3, 13) Me.chkdelete_origin.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) Me.chkdelete_origin.Name = "chkdelete_origin" - Me.chkdelete_origin.Size = New System.Drawing.Size(169, 20) + Me.chkdelete_origin.Size = New System.Drawing.Size(176, 20) Me.chkdelete_origin.TabIndex = 3 - Me.chkdelete_origin.Text = "Lösche ""Dropped File""" + Me.chkdelete_origin.Text = "Lösche Ursprungsdatei" Me.chkdelete_origin.UseVisualStyleBackColor = True ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Label2.Location = New System.Drawing.Point(2, 66) + Me.Label2.Location = New System.Drawing.Point(2, 84) Me.Label2.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(92, 13) @@ -250,21 +268,22 @@ Partial Class frmIndex ' Me.txtIndexfilepath.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.txtIndexfilepath.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.txtIndexfilepath.Location = New System.Drawing.Point(5, 82) + Me.txtIndexfilepath.Font = New System.Drawing.Font("Verdana", 6.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtIndexfilepath.Location = New System.Drawing.Point(2, 100) Me.txtIndexfilepath.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) Me.txtIndexfilepath.Multiline = True Me.txtIndexfilepath.Name = "txtIndexfilepath" Me.txtIndexfilepath.ReadOnly = True - Me.txtIndexfilepath.Size = New System.Drawing.Size(519, 28) + Me.txtIndexfilepath.Size = New System.Drawing.Size(519, 34) Me.txtIndexfilepath.TabIndex = 1 ' 'OK_Button ' 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(383, 7) + 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) @@ -331,7 +350,8 @@ Partial Class frmIndex ' 'SplitContainer1.Panel2 ' - Me.SplitContainer1.Panel2.Controls.Add(Me.pnlWebbrowser) + Me.SplitContainer1.Panel2.Controls.Add(Me.grpbxMailBody) + Me.SplitContainer1.Panel2.Controls.Add(Me.grpBetreff) Me.SplitContainer1.Panel2.Controls.Add(Me.pnlPDF) Me.SplitContainer1.Size = New System.Drawing.Size(813, 510) Me.SplitContainer1.SplitterDistance = 526 @@ -343,45 +363,37 @@ Partial Class frmIndex Me.pnlIndex.Dock = System.Windows.Forms.DockStyle.Fill Me.pnlIndex.Location = New System.Drawing.Point(0, 110) Me.pnlIndex.Name = "pnlIndex" - Me.pnlIndex.Size = New System.Drawing.Size(526, 287) + Me.pnlIndex.Size = New System.Drawing.Size(526, 263) Me.pnlIndex.TabIndex = 8 Me.pnlIndex.Visible = False ' - 'pnlWebbrowser + 'grpbxMailBody ' - Me.pnlWebbrowser.Controls.Add(Me.WebBrowser) - Me.pnlWebbrowser.Controls.Add(Me.Label3) - Me.pnlWebbrowser.Controls.Add(Me.StatusStrip3) - Me.pnlWebbrowser.Location = New System.Drawing.Point(17, 216) - Me.pnlWebbrowser.Name = "pnlWebbrowser" - Me.pnlWebbrowser.Size = New System.Drawing.Size(200, 100) - Me.pnlWebbrowser.TabIndex = 2 + Me.grpbxMailBody.Controls.Add(Me.WebBrowser) + Me.grpbxMailBody.Controls.Add(Me.StatusStrip3) + Me.grpbxMailBody.Font = New System.Drawing.Font("Segoe UI Semibold", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.grpbxMailBody.Location = New System.Drawing.Point(58, 352) + Me.grpbxMailBody.Name = "grpbxMailBody" + Me.grpbxMailBody.Size = New System.Drawing.Size(200, 100) + Me.grpbxMailBody.TabIndex = 5 + Me.grpbxMailBody.TabStop = False + Me.grpbxMailBody.Text = "Mail-Body:" ' 'WebBrowser ' Me.WebBrowser.Dock = System.Windows.Forms.DockStyle.Fill - Me.WebBrowser.Location = New System.Drawing.Point(0, 17) + Me.WebBrowser.Location = New System.Drawing.Point(3, 21) Me.WebBrowser.MinimumSize = New System.Drawing.Size(20, 20) Me.WebBrowser.Name = "WebBrowser" - Me.WebBrowser.Size = New System.Drawing.Size(200, 61) + Me.WebBrowser.Size = New System.Drawing.Size(194, 54) Me.WebBrowser.TabIndex = 2 ' - 'Label3 - ' - Me.Label3.AutoSize = True - Me.Label3.Dock = System.Windows.Forms.DockStyle.Top - Me.Label3.Location = New System.Drawing.Point(0, 0) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(115, 17) - Me.Label3.TabIndex = 1 - Me.Label3.Text = "Ansicht Mail-Body:" - ' 'StatusStrip3 ' Me.StatusStrip3.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tslblWebbrowser}) - Me.StatusStrip3.Location = New System.Drawing.Point(0, 78) + Me.StatusStrip3.Location = New System.Drawing.Point(3, 75) Me.StatusStrip3.Name = "StatusStrip3" - Me.StatusStrip3.Size = New System.Drawing.Size(200, 22) + Me.StatusStrip3.Size = New System.Drawing.Size(194, 22) Me.StatusStrip3.TabIndex = 0 Me.StatusStrip3.Text = "StatusStrip3" ' @@ -391,6 +403,28 @@ Partial Class frmIndex Me.tslblWebbrowser.Size = New System.Drawing.Size(121, 17) Me.tslblWebbrowser.Text = "ToolStripStatusLabel1" ' + 'grpBetreff + ' + Me.grpBetreff.Controls.Add(Me.txtBetreff) + Me.grpBetreff.Font = New System.Drawing.Font("Segoe UI Semibold", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.grpBetreff.Location = New System.Drawing.Point(20, 64) + Me.grpBetreff.Name = "grpBetreff" + Me.grpBetreff.Size = New System.Drawing.Size(200, 58) + Me.grpBetreff.TabIndex = 4 + Me.grpBetreff.TabStop = False + Me.grpBetreff.Text = "Betreff" + ' + 'txtBetreff + ' + Me.txtBetreff.BackColor = System.Drawing.SystemColors.Info + Me.txtBetreff.Dock = System.Windows.Forms.DockStyle.Fill + Me.txtBetreff.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtBetreff.Location = New System.Drawing.Point(3, 21) + Me.txtBetreff.Name = "txtBetreff" + Me.txtBetreff.ReadOnly = True + Me.txtBetreff.Size = New System.Drawing.Size(194, 25) + Me.txtBetreff.TabIndex = 0 + ' 'pnlPDF ' Me.pnlPDF.Controls.Add(Me.PdfViewer1) @@ -624,6 +658,7 @@ Partial Class frmIndex Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(813, 532) + Me.ControlBox = False Me.Controls.Add(Me.SplitContainer1) Me.Controls.Add(Me.StatusStrip1) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) @@ -648,10 +683,12 @@ Partial Class frmIndex Me.SplitContainer1.Panel2.ResumeLayout(False) CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainer1.ResumeLayout(False) - Me.pnlWebbrowser.ResumeLayout(False) - Me.pnlWebbrowser.PerformLayout() + Me.grpbxMailBody.ResumeLayout(False) + Me.grpbxMailBody.PerformLayout() Me.StatusStrip3.ResumeLayout(False) Me.StatusStrip3.PerformLayout() + Me.grpBetreff.ResumeLayout(False) + Me.grpBetreff.PerformLayout() Me.pnlPDF.ResumeLayout(False) Me.pnlPDF.PerformLayout() Me.StatusStrip2.ResumeLayout(False) @@ -728,14 +765,16 @@ End Sub Friend WithEvents PdfNavigationRibbonPageGroup1 As DevExpress.XtraPdfViewer.Bars.PdfNavigationRibbonPageGroup Friend WithEvents PdfZoomRibbonPageGroup1 As DevExpress.XtraPdfViewer.Bars.PdfZoomRibbonPageGroup Friend WithEvents PdfBarController2 As DevExpress.XtraPdfViewer.Bars.PdfBarController - Friend WithEvents pnlWebbrowser As System.Windows.Forms.Panel Friend WithEvents StatusStrip3 As System.Windows.Forms.StatusStrip Friend WithEvents tslblWebbrowser As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents WebBrowser As System.Windows.Forms.WebBrowser - Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents chkMultiIndexer As System.Windows.Forms.CheckBox Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton + Friend WithEvents grpBetreff As System.Windows.Forms.GroupBox + Friend WithEvents txtBetreff As System.Windows.Forms.TextBox + Friend WithEvents grpbxMailBody As System.Windows.Forms.GroupBox + Friend WithEvents Button1 As System.Windows.Forms.Button diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb index 33d4b11..c1bb607 100644 --- a/Global_Indexer/frmIndex.vb +++ b/Global_Indexer/frmIndex.vb @@ -1005,7 +1005,7 @@ Public Class frmIndex End If Next End If - If DropType = "@OUTLOOK_MESSAGE@" Or DropType = "@FW_OUTLOOK_MESSAGE@" Then + If DropType = "@OUTLOOK_MESSAGE@" Or DropType = "@FW_MSGONLY@" Or DropType = "@MSGONLY@" Then indexierung_erfolgreich = SetEmailIndices() If indexierung_erfolgreich = False Then MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical) @@ -1056,12 +1056,25 @@ Public Class frmIndex Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = '" & ClassWindream._WDObjekttyp & "'") If DT.Rows.Count = 1 Then - indexierung_erfolgreich = WriteIndex2File(DT.Rows(0).Item("IDX_EMAIL_ID").ToString, msg.InternetMessageId) - 'Die aktuelle Message-ID zwischenspeichern - CURRENT_MESSAGEID = msg.InternetMessageId - If indexierung_erfolgreich = False Then - MsgBox("Error in SetEmailIndices-EmailID - See log", MsgBoxStyle.Critical) - Return False + 'Message-ID nur auswerten wenn vorher nicht gestzt wurde! + If CURRENT_MESSAGEID = "" Then + If Not msg.InternetMessageId Is Nothing Then + indexierung_erfolgreich = WriteIndex2File(DT.Rows(0).Item("IDX_EMAIL_ID").ToString, msg.InternetMessageId) + 'Die aktuelle Message-ID zwischenspeichern + CURRENT_MESSAGEID = msg.InternetMessageId + If indexierung_erfolgreich = False Then + MsgBox("Error in SetEmailIndices-EmailID - See log", MsgBoxStyle.Critical) + Return False + End If + Else + ClassLogger.Add("Eine Message-ID konnte nicht ausgelesen werden!", True) + End If + Else + indexierung_erfolgreich = WriteIndex2File(DT.Rows(0).Item("IDX_EMAIL_ID").ToString, CURRENT_MESSAGEID) + If indexierung_erfolgreich = False Then + MsgBox("Error in SetEmailIndices-EmailID - See log", MsgBoxStyle.Critical) + Return False + End If End If ' Regular Expressions vorbereiten @@ -1079,10 +1092,18 @@ Public Class frmIndex ' Email Header auslesen Dim headers As String = ClassEmailHeaderExtractor.getMessageHeaders(msg) - + Dim emailFrom As String + Dim emailTo As String ' Email Absender und Empfänger - Dim emailFrom As String = ClassEmailHeaderExtractor.extractFromAddress(headers, FromRegexList) - Dim emailTo As String = ClassEmailHeaderExtractor.extractToAddress(headers, ToRegexList) + If headers Is Nothing Then + emailFrom = msg.DisplayTo.Replace("'", "") + emailTo = msg.InternetAccountName.Replace("'", "") + Else + emailFrom = ClassEmailHeaderExtractor.extractFromAddress(headers, FromRegexList) + emailTo = ClassEmailHeaderExtractor.extractToAddress(headers, ToRegexList) + End If + + If LogErrorsOnly = False Then ClassLogger.Add(" ...emailFrom: " & emailFrom, False) If LogErrorsOnly = False Then ClassLogger.Add(" ...emailTo: " & emailTo, False) 'FROM @@ -1102,9 +1123,9 @@ Public Class frmIndex End If End If - Dim subj As String = ClassFormFunctions.CleanInput(msg.Subject) - If LogErrorsOnly = False Then ClassLogger.Add(" ...subj: " & subj, False) - indexierung_erfolgreich = WriteIndex2File(DT.Rows(0).Item("IDX_EMAIL_SUBJECT").ToString, subj) + ' Dim subj As String = ClassFormFunctions.CleanInput(msg.Subject) + If LogErrorsOnly = False Then ClassLogger.Add(" ...subj: " & msg.Subject, False) + indexierung_erfolgreich = WriteIndex2File(DT.Rows(0).Item("IDX_EMAIL_SUBJECT").ToString, msg.Subject) If indexierung_erfolgreich = False Then MsgBox("Error in SetEmailIndices-Subject - See log", MsgBoxStyle.Critical) Return False @@ -1135,11 +1156,13 @@ Public Class frmIndex Try Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = '" & ClassWindream._WDObjekttyp & "'") If DT.Rows.Count = 1 Then - If CURRENT_MESSAGEID <> "" Then - indexierung_erfolgreich = WriteIndex2File(DT.Rows(0).Item("IDX_EMAIL_ID").ToString, CURRENT_MESSAGEID) - If indexierung_erfolgreich = False Then - MsgBox("Error in SetAttachmentIndices - See log", MsgBoxStyle.Critical) - Return False + If Not CURRENT_MESSAGEID Is Nothing Then + If CURRENT_MESSAGEID <> "" Then + indexierung_erfolgreich = WriteIndex2File(DT.Rows(0).Item("IDX_EMAIL_ID").ToString, CURRENT_MESSAGEID) + If indexierung_erfolgreich = False Then + MsgBox("Error in SetAttachmentIndices - See log", MsgBoxStyle.Critical) + Return False + End If End If End If 'indexierung_erfolgreich = WriteIndex2File(DT.Rows(0).Item("IDX_EMAIL_FROM").ToString, msg.SenderEmailAddress) @@ -1211,7 +1234,26 @@ Public Class frmIndex Dim Insert_String As String Try Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO,ADDED_WHERE) VALUES ('" & CURRENT_WORKFILE & "','" & CURRENT_NEWFILENAME & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "','" & Environment.MachineName & "')" - ClassDatabase.Execute_Scalar(Insert_String, MyConnectionString) + If ClassDatabase.Execute_Scalar(Insert_String, MyConnectionString) = True Then + If CURRENT_MESSAGEID <> "" Then + Dim max As String = "SELECT MAX(GUID) FROM TBGI_HISTORY" + Dim GUID = ClassDatabase.Execute_Scalar(max, MyConnectionString, True) + Try + If GUID > 0 Then + Dim sql As String + If CURRENT_ISATTACHMENT = True Then + sql = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & CURRENT_MESSAGEID & "' WHERE GUID = " & GUID + ClassDatabase.Execute_Scalar(sql, MyConnectionString, True) + Else + sql = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & CURRENT_MESSAGEID & "' WHERE GUID = " & GUID + ClassDatabase.Execute_Scalar(sql, MyConnectionString, True) + End If + End If + Catch ex As Exception + + End Try + End If + End If Return False Catch ex As Exception ClassLogger.Add(" - Fehler bei Move_Rename - Fehler: " & vbNewLine & ex.Message) @@ -1262,31 +1304,27 @@ Public Class frmIndex End Sub Private Sub frmIndex_Load(sender As Object, e As System.EventArgs) Handles Me.Load Try + CURRENT_ISATTACHMENT = False DropType = ClassDatabase.Execute_Scalar("SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = " & CURRENT_WORKFILE_GUID, MyConnectionString, True) chkdelete_origin.Visible = False If DropType = "@DROPFROMFSYSTEM@" Then chkdelete_origin.Visible = True chkdelete_origin.Checked = Delete_OriginFile Me.Text = "Indexierung der gedroppten Datei:" - ElseIf DropType = "@OUTLOOK_MESSAGE@" Or DropType = "@FW_OUTLOOK_MESSAGE@" Then + ElseIf DropType = "@OUTLOOK_MESSAGE@" Or DropType = "@FW_MSGONLY@" Then Select Case DropType - Case "@FW_OUTLOOK_MESSAGE@""" + Case "@FW_MSGONLY@" If LogErrorsOnly = False Then ClassLogger.Add(" ....msg-file from folderwatch", False) Me.Text = "Indexierung der msg-Datei (ohne Anhang) - aus Folderwatch:" Case "@OUTLOOK_MESSAGE@" If LogErrorsOnly = False Then ClassLogger.Add(" ....msg-file through dragdrop", False) Me.Text = "Indexierung der msg-Datei (ohne Anhang):" End Select - Dim tempfile As String = Path.Combine(Path.GetTempPath, Path.GetFileNameWithoutExtension(CURRENT_WORKFILE) & "_excl_att.msg") - Dim savestring = tempfile 'Path.GetDirectoryName(CURRENT_WORKFILE) & "\" & Path.GetFileNameWithoutExtension(CURRENT_WORKFILE) & "_excl_att.msg" - If File.Exists(savestring) Then - File.Delete(savestring) - End If - Dim _msg As New Msg.Message(CURRENT_WORKFILE) - _msg.Attachments.Clear() - _msg.Save(savestring) - CURRENT_WORKFILE = savestring + + ElseIf DropType = "@MSGONLY@" Then + Me.Text = "Indexierung der msg-Datei (ohne Anhang):" ElseIf DropType = "@ATTMNTEXTRACTED@" Then + CURRENT_ISATTACHMENT = True Me.Text = "Indexierung eines Email-Attachments:" ElseIf DropType = "@FW_SIMPLEINDEXER@" Then Me.Text = "Indexierung einer Folderwatch-Datei:" @@ -1303,6 +1341,7 @@ Public Class frmIndex 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) If MULTIFILES > 0 Then chkMultiIndexer.Text = "Multi-Indexing - Alle nachfolgenden Dateien (" & MULTIFILES & ") identisch indexieren" + chkMultiIndexer.Checked = False chkMultiIndexer.Visible = True Else chkMultiIndexer.Visible = False @@ -1377,7 +1416,7 @@ Public Class frmIndex ' _ Private Sub Refresh_IndexeMan(dokartid As Integer) Try - DT_INDEXEMAN = ClassDatabase.Return_Datatable("select T1.BEZEICHNUNG AS DOKUMENTART,T.* from TBDD_INDEX_MAN T, TBDD_DOKUMENTART T1 where T.ACTIVE = 1 AND T.DOK_ID = T1.GUID AND T.DOK_ID = " & dokartid) + DT_INDEXEMAN = ClassDatabase.Return_Datatable("select T1.BEZEICHNUNG AS DOKUMENTART,T.* from TBDD_INDEX_MAN T, TBDD_DOKUMENTART T1 where T.ACTIVE = 1 AND T.DOK_ID = T1.GUID AND T.DOK_ID = " & dokartid & " ORDER BY T.SEQUENCE") pnlIndex.Visible = True LoadIndexe_Man() Catch ex As System.Exception @@ -1550,7 +1589,8 @@ Public Class frmIndex Sub PreviewFile() Try Dim Proc As New System.Diagnostics.Process - Me.pnlWebbrowser.Visible = False + Me.grpbxMailBody.Visible = False + Me.grpBetreff.Visible = False Me.pnlPDF.Visible = False CURRENT_HTML_DOC = "" If Not CURRENT_WORKFILE.EndsWith("msg") Then @@ -1582,50 +1622,56 @@ Public Class frmIndex End If Next Case Else - Console.WriteLine(Path.GetExtension(CURRENT_WORKFILE)) - Dim psi As New ProcessStartInfo(UniversalViewer, """" & CURRENT_WORKFILE & """") - Proc.EnableRaisingEvents = True - Proc.StartInfo = psi - Proc.Start() + If My.Settings.DoNot_Show_Documents = False And UniversalViewer <> "" Then + If File.Exists(UniversalViewer) Then + Console.WriteLine(Path.GetExtension(CURRENT_WORKFILE)) + Dim psi As New ProcessStartInfo(UniversalViewer, """" & CURRENT_WORKFILE & """") + Proc.EnableRaisingEvents = True + Proc.StartInfo = psi + Proc.Start() + End If + End If End Select End If Else - Me.pnlWebbrowser.Dock = DockStyle.Fill - Dim msg_email As New Msg.Message(CURRENT_WORKFILE) - 'Eine tempfile generieren - Dim tempFilename = My.Computer.FileSystem.GetTempFileName() - Dim name = Path.GetFileNameWithoutExtension(tempFilename) - tempFilename = Path.Combine(Path.GetDirectoryName(tempFilename), name & ".html") - 'tempfile löschen - If My.Computer.FileSystem.FileExists(tempFilename) Then - My.Computer.FileSystem.DeleteFile(tempFilename) - End If - - - 'Try - Dim wFile As System.IO.FileStream - Dim byteData() As Byte - byteData = msg_email.BodyHtml - - ' MsgBox(msg_email.InternetCodePage) - ' wFile = New FileStream(tempFilename, FileMode.Append) - ' wFile.Write(byteData, 0, byteData.Length) - ' wFile.Close() - 'Catch ex As IOException - ' MsgBox(ex.ToString) - 'End Try - - Dim vIn() As Byte = msg_email.BodyHtml - Dim vOut As String = System.Text.Encoding.UTF8.GetString(vIn) - File.WriteAllText(tempFilename, vOut, System.Text.Encoding.UTF8) + Me.grpBetreff.Dock = DockStyle.Top + Me.grpbxMailBody.Dock = DockStyle.Fill + Dim msg_email As New Msg.Message(CURRENT_WORKFILE) + 'Eine tempfile generieren + Dim tempFilename = My.Computer.FileSystem.GetTempFileName() + Dim name = Path.GetFileNameWithoutExtension(tempFilename) + tempFilename = Path.Combine(Path.GetDirectoryName(tempFilename), name & ".html") + 'tempfile löschen + If My.Computer.FileSystem.FileExists(tempFilename) Then + My.Computer.FileSystem.DeleteFile(tempFilename) + End If - CURRENT_HTML_DOC = tempFilename - Me.tslblWebbrowser.Text = CURRENT_HTML_DOC - WebBrowser.Navigate("file:///" & CURRENT_HTML_DOC) - Me.pnlWebbrowser.Visible = True + Me.txtBetreff.Text = msg_email.Subject + 'Try + Dim wFile As System.IO.FileStream + Dim byteData() As Byte + byteData = msg_email.BodyHtml + + ' MsgBox(msg_email.InternetCodePage) + ' wFile = New FileStream(tempFilename, FileMode.Append) + ' wFile.Write(byteData, 0, byteData.Length) + ' wFile.Close() + 'Catch ex As IOException + ' MsgBox(ex.ToString) + 'End Try + + Dim vIn() As Byte = msg_email.BodyHtml + Dim vOut As String = System.Text.Encoding.UTF8.GetString(vIn) + File.WriteAllText(tempFilename, vOut, System.Text.Encoding.UTF8) + + CURRENT_HTML_DOC = tempFilename + Me.tslblWebbrowser.Text = CURRENT_HTML_DOC + WebBrowser.Navigate("file:///" & CURRENT_HTML_DOC) + Me.grpbxMailBody.Visible = True + Me.grpBetreff.Visible = True Me.SplitContainer1.Panel2Collapsed = False - SplitContainer1.SplitterDistance = My.Settings.SplitterDistance_Viewer + SplitContainer1.SplitterDistance = My.Settings.SplitterDistance_Viewer End If ' Dim psi1 As New ProcessStartInfo("""" & CURRENT_WORKFILE & """") ' Proc.EnableRaisingEvents = True @@ -1690,7 +1736,7 @@ Public Class frmIndex ElseIf DropType = "@ATTMNTEXTRACTED@" Then 'Die temporäre Datei löschen File.Delete(CURRENT_WORKFILE) - ElseIf (DropType = "@OUTLOOK_MESSAGE@" Or DropType = "@FW_OUTLOOK_MESSAGE@") Then + ElseIf (DropType = "@OUTLOOK_MESSAGE@" Or DropType = "@FW_MSGONLY@" Or DropType = "@MSGONLY@") Then 'Die temporäre Datei löschen File.Delete(CURRENT_WORKFILE) ElseIf DropType = "@FW_SIMPLEINDEXER@" Then @@ -1729,7 +1775,6 @@ Public Class frmIndex lblerror.Visible = False Me.Cursor = Cursors.WaitCursor If chkMultiIndexer.Visible = True And chkMultiIndexer.Checked = True Then - 'Die erste Datei indexieren If WORK_FILE() = True Then 'Und nun die folgenden @@ -1739,7 +1784,7 @@ Public Class frmIndex For Each filerow As DataRow In DTFiles2Work.Rows CURRENT_WORKFILE_GUID = filerow.Item("GUID") CURRENT_WORKFILE = filerow.Item("FILENAME2WORK") - + DropType = filerow.Item("HANDLE_TYPE") 'Dim HandleType As String = filerow.Item("HANDLE_TYPE") 'If HandleType = "@DROPFROMFSYSTEM@" Then ' DropType = "dragdrop file" @@ -1755,7 +1800,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 @@ -1763,11 +1808,14 @@ Public Class frmIndex Else If WORK_FILE() = True Then Me.Cursor = Cursors.Default - MsgBox("Die Datei wurde erfolgreich verarbeitet!" & vbNewLine & "Ablagepfad:" & vbNewLine & CURRENT_NEWFILENAME, MsgBoxStyle.Information, "Erfolgsmeldung") + If My.Settings.Show_IndexResult = True Then + MsgBox("Die Datei wurde erfolgreich verarbeitet!" & vbNewLine & "Ablagepfad:" & vbNewLine & CURRENT_NEWFILENAME, MsgBoxStyle.Information, "Erfolgsmeldung") + End If + Me.Close() End If End If - + Me.Cursor = Cursors.Default End Sub Private Function Move_File2_Target() @@ -1780,7 +1828,7 @@ Public Class frmIndex Dim exp2WD As Boolean = False If DropType = "@DROPFROMFSYSTEM@" Or DropType = "@OUTLOOK_ATTACHMENT@" Or DropType = "@ATTMNTEXTRACTED@" Or DropType = "@FW_SIMPLEINDEXER@" Then exp2WD = SINGLEFILE_2_WINDREAM(CURR_DOKART_OBJECTTYPE) - ElseIf DropType = "@OUTLOOK_MESSAGE@" Or DropType = "@FW_OUTLOOK_MESSAGE@" Then + ElseIf DropType = "@OUTLOOK_MESSAGE@" Or DropType = "@FW_MSGONLY@" Or DropType = "@MSGONLY@" Then exp2WD = SINGLEFILE_2_WINDREAM(CURR_DOKART_OBJECTTYPE) End If If exp2WD = True Then @@ -1804,7 +1852,28 @@ Public Class frmIndex Dim Insert_String As String Try Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO) VALUES ('" & CURRENT_WORKFILE & "','" & CURRENT_NEWFILENAME & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "')" - ClassDatabase.Execute_Scalar(Insert_String, MyConnectionString) + ClassDatabase.Execute_Scalar(Insert_String, MyConnectionString, True) + If DropType.Contains("MSG") Or DropType = "@ATTMNTEXTRACTED@" Then + If CURRENT_MESSAGEID <> "" Then + Dim max As String = "SELECT MAX(GUID) FROM TBGI_HISTORY" + Dim GUID = ClassDatabase.Execute_Scalar(max, MyConnectionString, True) + Try + If GUID > 0 Then + Dim sqlUpdate As String + If DropType = "@ATTMNTEXTRACTED@" Then + sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & CURRENT_MESSAGEID & "' WHERE GUID = " & GUID + ClassDatabase.Execute_non_Query(sqlUpdate, True) + Else + sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & CURRENT_MESSAGEID & "' WHERE GUID = " & GUID + ClassDatabase.Execute_non_Query(sqlUpdate, True) + End If + End If + Catch ex As Exception + + 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) @@ -2084,4 +2153,14 @@ Public Class frmIndex Delete_OriginFile = chkdelete_origin.Checked SaveConfigValue("Delete_OriginFile", Delete_OriginFile) End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Select Case CURRENT_ABBRUCH + Case 0 + CURRENT_ABBRUCH = 1 + Case 1 + CURRENT_ABBRUCH = 2 + End Select + Me.Close() + End Sub End Class diff --git a/Global_Indexer/frmStart.Designer.vb b/Global_Indexer/frmStart.Designer.vb index d6a61bd..60bca4c 100644 --- a/Global_Indexer/frmStart.Designer.vb +++ b/Global_Indexer/frmStart.Designer.vb @@ -43,6 +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.MenuStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout() CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).BeginInit() @@ -61,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.KonfigurationToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AdministrationToolStripMenuItem, Me.ToolStripSeparator1, Me.GrundeinstellungenToolStripMenuItem, Me.FrmHotkeyAddToolStripMenuItem, Me.AApiToolStripMenuItem, Me.HistoryIndexierteDateienToolStripMenuItem}) Me.KonfigurationToolStripMenuItem.Image = Global.Global_Indexer.My.Resources.Resources.gear_32xLG Me.KonfigurationToolStripMenuItem.Name = "KonfigurationToolStripMenuItem" Me.KonfigurationToolStripMenuItem.Size = New System.Drawing.Size(108, 20) @@ -72,7 +73,7 @@ Partial Class frmStart Me.AdministrationToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.GlobalIndexerEinstellungenToolStripMenuItem, Me.HotkeyEisntellungenToolStripMenuItem}) Me.AdministrationToolStripMenuItem.Image = Global.Global_Indexer.My.Resources.Resources.Einstellungen6 Me.AdministrationToolStripMenuItem.Name = "AdministrationToolStripMenuItem" - Me.AdministrationToolStripMenuItem.Size = New System.Drawing.Size(204, 22) + Me.AdministrationToolStripMenuItem.Size = New System.Drawing.Size(217, 22) Me.AdministrationToolStripMenuItem.Text = "Administration" ' 'GlobalIndexerEinstellungenToolStripMenuItem @@ -92,25 +93,25 @@ Partial Class frmStart 'ToolStripSeparator1 ' Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New System.Drawing.Size(201, 6) + Me.ToolStripSeparator1.Size = New System.Drawing.Size(214, 6) ' 'GrundeinstellungenToolStripMenuItem ' Me.GrundeinstellungenToolStripMenuItem.Name = "GrundeinstellungenToolStripMenuItem" - Me.GrundeinstellungenToolStripMenuItem.Size = New System.Drawing.Size(204, 22) + Me.GrundeinstellungenToolStripMenuItem.Size = New System.Drawing.Size(217, 22) Me.GrundeinstellungenToolStripMenuItem.Text = "Grundeinstellungen User" ' 'FrmHotkeyAddToolStripMenuItem ' Me.FrmHotkeyAddToolStripMenuItem.Image = Global.Global_Indexer.My.Resources.Resources.Shortcut_8169_16x Me.FrmHotkeyAddToolStripMenuItem.Name = "FrmHotkeyAddToolStripMenuItem" - Me.FrmHotkeyAddToolStripMenuItem.Size = New System.Drawing.Size(204, 22) + Me.FrmHotkeyAddToolStripMenuItem.Size = New System.Drawing.Size(217, 22) Me.FrmHotkeyAddToolStripMenuItem.Text = "Hotkey-Funktion User" ' 'AApiToolStripMenuItem ' Me.AApiToolStripMenuItem.Name = "AApiToolStripMenuItem" - Me.AApiToolStripMenuItem.Size = New System.Drawing.Size(204, 22) + Me.AApiToolStripMenuItem.Size = New System.Drawing.Size(217, 22) Me.AApiToolStripMenuItem.Text = "AApi" Me.AApiToolStripMenuItem.Visible = False ' @@ -189,6 +190,12 @@ Partial Class frmStart Me.NotifyIcon1.Icon = CType(resources.GetObject("NotifyIcon1.Icon"), System.Drawing.Icon) Me.NotifyIcon1.Text = "GlobalIndexer" ' + 'HistoryIndexierteDateienToolStripMenuItem + ' + Me.HistoryIndexierteDateienToolStripMenuItem.Name = "HistoryIndexierteDateienToolStripMenuItem" + Me.HistoryIndexierteDateienToolStripMenuItem.Size = New System.Drawing.Size(217, 22) + Me.HistoryIndexierteDateienToolStripMenuItem.Text = "History - Indexierte Dateien" + ' 'frmStart ' Me.AllowDrop = True @@ -233,4 +240,5 @@ Partial Class frmStart Friend WithEvents TimerFolderWatch As System.Windows.Forms.Timer Friend WithEvents TimerClose3Minutes As System.Windows.Forms.Timer Friend WithEvents NotifyIcon1 As System.Windows.Forms.NotifyIcon + Friend WithEvents HistoryIndexierteDateienToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem End Class diff --git a/Global_Indexer/frmStart.vb b/Global_Indexer/frmStart.vb index b9b77d5..773dfde 100644 --- a/Global_Indexer/frmStart.vb +++ b/Global_Indexer/frmStart.vb @@ -80,78 +80,79 @@ Public Class frmStart e.Effect = DragDropEffects.None End If End Sub + Sub Check_Dropped_Files() - Try - ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')") - CURRENT_ABBRUCH = 0 - Dim i As Integer - For Each Str As Object In ClassDragDrop.files_dropped - If Not Str Is Nothing Then - If LogErrorsOnly = False Then ClassLogger.Add(">> Check Drop-File: " & Str.ToString, False) - Dim handleType As String = Str.Substring(0, Str.LastIndexOf("@") + 1) - Dim filename As String = Str.Substring(Str.LastIndexOf("@") + 1) - If ClassIndexFunctions.FileExistsinDropTable(filename) = False Then - Dim ins As String = "INSERT INTO TBGI_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE) VALUES ('" & filename & "','" & Environment.UserName & "','" & handleType & "')" - If ClassDatabase.Execute_non_Query(ins, True) = False Then - MsgBox("Unexpected Error in Create Record for dropped-file - Check logfile", MsgBoxStyle.Critical) - Exit Sub - End If - i += 1 - Else - Console.WriteLine("File gibt es bereits") - End If - + 'Try + Me.TopMost = False + ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')") + CURRENT_ABBRUCH = 0 + Dim i As Integer + For Each Str As Object In ClassDragDrop.files_dropped + If Not Str Is Nothing Then + If LogErrorsOnly = False Then ClassLogger.Add(">> Check Drop-File: " & Str.ToString, False) + Dim handleType As String = Str.Substring(0, Str.LastIndexOf("@") + 1) + Dim filename As String = Str.Substring(Str.LastIndexOf("@") + 1) + If ClassIndexFunctions.FileExistsinDropTable(filename) = False Then + ClassFilehandle.Decide_FileHandle(filename, handleType) + i += 1 + Else + Console.WriteLine("File gibt es bereits") End If - Next - 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) - For Each Filerow As DataRow In DTFiles.Rows - CURRENT_FILENAME = Filerow.Item(0) - CURRENT_WORKFILE_GUID = Filerow.Item(0) - CURRENT_WORKFILE = Filerow.Item("FILENAME2WORK") - If LogErrorsOnly = False Then ClassLogger.Add(">> CURRENT_WORKFILE: " & CURRENT_WORKFILE, False) - Open_IndexDialog() - Next + End If + 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) - '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 - If CURRENT_ABBRUCH = 2 Then - Dim result As MsgBoxResult - result = MessageBox.Show("Sie brechen nun zum zweiten Mal den Indexierungsvorgang ab!" & vbNewLine & "Wollen Sie abbrechen?", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) - If result = MsgBoxResult.Yes Then - ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE GUID = " & row.Item(0)) - Exit Sub - End If - Else - 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() - End If - Else - ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE GUID = " & row.Item(0)) - End If - Next + If DTFiles.Rows.Count > 1 Then + + frmIndexFileList.ShowDialog() + + DTFiles = ClassDatabase.Return_Datatable(sql, True) + End If + For Each Filerow As DataRow In DTFiles.Rows + Dim filestring As String = Filerow.Item("FILENAME2WORK") + CURRENT_FILENAME = Filerow.Item("FILENAME2WORK") + CURRENT_WORKFILE_GUID = Filerow.Item(0) + CURRENT_WORKFILE = Filerow.Item("FILENAME2WORK") + If LogErrorsOnly = False Then ClassLogger.Add(">> CURRENT_WORKFILE: " & CURRENT_WORKFILE, False) + If File.Exists(CURRENT_WORKFILE) Then + Open_IndexDialog() End If - Catch ex As Exception - MsgBox("Check_Dropped_Files: " & ex.Message, MsgBoxStyle.Critical) - End Try + + 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() @@ -159,58 +160,22 @@ Public Class frmStart Me.Visible = True Me.TopMost = True Me.BringToFront() - If Not CURRENT_FILENAME.EndsWith("msg") Then - Dim workedsql = "select WORKED FROM TBGI_FILES_USER where guid = " & CURRENT_WORKFILE_GUID - If ClassDatabase.Execute_Scalar(workedsql, MyConnectionString, True) = 0 Then - Select Case CURRENT_ABBRUCH - Case 0 - CURRENT_ABBRUCH = 1 - Case 1 - CURRENT_ABBRUCH = 2 - End Select - If CURRENT_ABBRUCH = 2 Then + If File.Exists(CURRENT_FILENAME) Then + Select Case CURRENT_ABBRUCH + Case 1 + MsgBox("Bitte indexieren Sie die Datei vollständig!" & vbNewLine & "(Abbruch 1 des Indexierungsvorgangs)", MsgBoxStyle.Information) + Open_IndexDialog() + Case 2 Dim result As MsgBoxResult - result = MessageBox.Show("Sie brechen nun zum zweiten Mal den Indexierungsvorgang ab!" & vbNewLine & "Wollen Sie abbrechen?", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + 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) CURRENT_ABBRUCH = 0 Exit Sub + Else + CURRENT_ABBRUCH = 0 End If - Else - MsgBox("Datei wurde nicht vollständig indexiert:" & vbNewLine & "Bitte wiederholen Sie den Vorgang:", MsgBoxStyle.Exclamation) - Open_IndexDialog() - End If - End If - Else - 'Hier nun die Anhänge indexieren - Dim _msg As New Msg.Message(CURRENT_FILENAME) - Dim i1 As Integer = 1 - If LogErrorsOnly = False Then ClassLogger.Add(">> Anzahl der Attachments: " & _msg.Attachments.Count, False) - For Each attachment As Independentsoft.Msg.Attachment In _msg.Attachments - If attachment.DisplayName Is Nothing Then - If Not attachment.LongFileName Is Nothing Then - If Not attachment.LongFileName.Contains("inline") Then - Dim tempfile As String = Path.Combine(Path.GetTempPath, attachment.LongFileName) - If File.Exists(tempfile) Then - File.Delete(tempfile) - End If - attachment.Save(tempfile) - Dim sql As String = "INSERT INTO TBGI_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE) VALUES ('" & tempfile & "','" & Environment.UserName & "','@ATTMNTEXTRACTED@')" - If ClassDatabase.Execute_non_Query(sql, True) = True Then - sql = "SELECT MAX(GUID) FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')" - Dim GUID = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True) - If Not IsNothing(GUID) Then - If LogErrorsOnly = False Then ClassLogger.Add(">> Attachment (" & i1 & "):" & tempfile, False) - CURRENT_FILENAME = tempfile - CURRENT_WORKFILE = tempfile - CURRENT_WORKFILE_GUID = GUID - Open_IndexDialog() - i1 += 1 - End If - End If - End If - End If - End If - Next + End Select End If Catch ex As Exception MsgBox("Fehler bei Aufruf Indexdialog: " & vbNewLine & ex.Message, MsgBoxStyle.Critical) @@ -289,7 +254,7 @@ Public Class frmStart MsgBox("Es konnte keine Datenbankverbindung aufgebaut werden!" & vbNewLine & "Bitte prüfen Sie die Einstellungen und den Datenbankserver", MsgBoxStyle.Critical) Me.Close() End If - If UniversalViewer = String.Empty Then + If UniversalViewer = String.Empty And My.Settings.DoNot_Show_Documents = False Then frmConfig_Basic.ShowDialog() End If If MyConnectionString = String.Empty Then @@ -440,28 +405,6 @@ Public Class frmStart MsgBox("Error in Load_Hotkeys:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) End Try End Sub - 'Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) - ' If loaded = True Then - ' If m.Msg = ClassHotkey.WM_HOTKEY Then - ' ' ' 'Me.Cursor = Cursors.WaitCursor - ' ' ' ' ClassHotkey_Windream.RUN_WD_SEARCH(m.WParam) - ' ' ' 'Me.NotifyIcon1.Visible = True - ' ' ' 'NotifyIcon1.ShowBalloonTip(2000, "Hotkey", "Hotkey wird ausgeführt!", ToolTipIcon.Info) - ' ' ' 'Dim Result = - ' ' ' 'MyBase.WndProc(m) - ' ' ' 'If Result = "" Then - ' ' ' ' ' Me.NotifyIcon1.Visible = False - ' ' ' 'Else - ' ' ' ' ' NotifyIcon1.ShowBalloonTip(5000, "Hotkey-Fehler:", Result.ToString, ToolTipIcon.Warning) - ' ' ' 'End If - ' ' ' End If - ' Else - ' Console.WriteLine("MESSAGE: " & m.ToString) - ' End If - ' End If - - 'End Sub 'System wide hotkey event handling - Private Sub HotkeyEisntellungenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles HotkeyEisntellungenToolStripMenuItem.Click Me.Hide() Unregister_Hotkeys() @@ -528,4 +471,8 @@ Public Class frmStart Opacity = 0.65 TimerFolderWatch.Start() End Sub + + Private Sub HistoryIndexierteDateienToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles HistoryIndexierteDateienToolStripMenuItem.Click + frmHistory.ShowDialog() + End Sub End Class \ No newline at end of file