From b6b08588887c3d2a5841a9b45ca4c6e781ba2ce2 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Wed, 2 Apr 2025 14:14:04 +0200 Subject: [PATCH] MS 2.7.4.01Indexierung Vektorfelder automatische Idnexe --- Global_Indexer/ClassInit.vb | 2 + Global_Indexer/Global_Indexer.vbproj | 3 +- Global_Indexer/frmConfig_Basic.designer.vb | 48 +- Global_Indexer/frmConfig_Basic.resx | 910 +++++++-------------- Global_Indexer/frmIndex.vb | 23 +- Global_Indexer/packages.config | 1 - 6 files changed, 342 insertions(+), 645 deletions(-) diff --git a/Global_Indexer/ClassInit.vb b/Global_Indexer/ClassInit.vb index befac2c..37742c5 100644 --- a/Global_Indexer/ClassInit.vb +++ b/Global_Indexer/ClassInit.vb @@ -131,6 +131,8 @@ Public Class ClassInit WM_DB_SERVER = oROW.Item("CAT_STRING") End If Next + VIEWER_LICENSE = DATABASE_ECM.GetScalarValue($"SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE + NAME = 'GDPICTURE_FILEFLOW' AND ACTIVE = 1") oSql = "SELECT * FROM TBDD_BASECONFIG" DT = DATABASE_ECM.GetDatatable(oSql) If DT.Rows.Count = 1 Then diff --git a/Global_Indexer/Global_Indexer.vbproj b/Global_Indexer/Global_Indexer.vbproj index 476cfd2..6046044 100644 --- a/Global_Indexer/Global_Indexer.vbproj +++ b/Global_Indexer/Global_Indexer.vbproj @@ -203,7 +203,8 @@ ..\packages\DigitalData.Modules.Windows.1.5.1\lib\net462\DigitalData.Modules.Windows.dll - ..\packages\DigitalData.Modules.Windream.1.9.5.2\lib\net462\DigitalData.Modules.Windream.dll + False + ..\..\..\2_DLL Projekte\DDModules\Windream\bin\Debug\DigitalData.Modules.Windream.dll False diff --git a/Global_Indexer/frmConfig_Basic.designer.vb b/Global_Indexer/frmConfig_Basic.designer.vb index d3cdaf9..d5f01ca 100644 --- a/Global_Indexer/frmConfig_Basic.designer.vb +++ b/Global_Indexer/frmConfig_Basic.designer.vb @@ -22,8 +22,8 @@ Partial Class frmConfig_Basic 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() - Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Basic)) + Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.TabControl1 = New System.Windows.Forms.TabControl() Me.TabPage1 = New System.Windows.Forms.TabPage() Me.chkbxUserAut = New System.Windows.Forms.CheckBox() @@ -39,6 +39,9 @@ Partial Class frmConfig_Basic Me.txtPasswort = New System.Windows.Forms.TextBox() Me.BtnConnect = New System.Windows.Forms.Button() Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.Label10 = New System.Windows.Forms.Label() + Me.Button5 = New System.Windows.Forms.Button() + Me.cmbDesign = New System.Windows.Forms.ComboBox() Me.LinkLabel1 = New System.Windows.Forms.LinkLabel() Me.Button3 = New System.Windows.Forms.Button() Me.cmbLanguage = New System.Windows.Forms.ComboBox() @@ -63,9 +66,6 @@ Partial Class frmConfig_Basic Me.btnstartstop2 = New System.Windows.Forms.Button() Me.btnstartstop1 = New System.Windows.Forms.Button() Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() - Me.Button5 = New System.Windows.Forms.Button() - Me.cmbDesign = New System.Windows.Forms.ComboBox() - Me.Label10 = New System.Windows.Forms.Label() Me.TabControl1.SuspendLayout() Me.TabPage1.SuspendLayout() Me.TabPage2.SuspendLayout() @@ -188,6 +188,24 @@ Partial Class frmConfig_Basic Me.TabPage2.Name = "TabPage2" Me.TabPage2.UseVisualStyleBackColor = True ' + 'Label10 + ' + resources.ApplyResources(Me.Label10, "Label10") + Me.Label10.Name = "Label10" + ' + 'Button5 + ' + resources.ApplyResources(Me.Button5, "Button5") + Me.Button5.Name = "Button5" + Me.Button5.UseVisualStyleBackColor = True + ' + 'cmbDesign + ' + resources.ApplyResources(Me.cmbDesign, "cmbDesign") + Me.cmbDesign.FormattingEnabled = True + Me.cmbDesign.Items.AddRange(New Object() {resources.GetString("cmbDesign.Items"), resources.GetString("cmbDesign.Items1"), resources.GetString("cmbDesign.Items2"), resources.GetString("cmbDesign.Items3"), resources.GetString("cmbDesign.Items4"), resources.GetString("cmbDesign.Items5"), resources.GetString("cmbDesign.Items6")}) + Me.cmbDesign.Name = "cmbDesign" + ' 'LinkLabel1 ' resources.ApplyResources(Me.LinkLabel1, "LinkLabel1") @@ -272,8 +290,8 @@ Partial Class frmConfig_Basic ' 'DataGridView1 ' - DataGridViewCellStyle3.BackColor = System.Drawing.Color.Aqua - Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3 + DataGridViewCellStyle1.BackColor = System.Drawing.Color.Aqua + Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1 resources.ApplyResources(Me.DataGridView1, "DataGridView1") Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.DataGridView1.Name = "DataGridView1" @@ -349,24 +367,6 @@ Partial Class frmConfig_Basic ' Me.OpenFileDialog1.FileName = "OpenFileDialog1" ' - 'Button5 - ' - resources.ApplyResources(Me.Button5, "Button5") - Me.Button5.Name = "Button5" - Me.Button5.UseVisualStyleBackColor = True - ' - 'cmbDesign - ' - resources.ApplyResources(Me.cmbDesign, "cmbDesign") - Me.cmbDesign.FormattingEnabled = True - Me.cmbDesign.Items.AddRange(New Object() {resources.GetString("cmbDesign.Items"), resources.GetString("cmbDesign.Items1"), resources.GetString("cmbDesign.Items2"), resources.GetString("cmbDesign.Items3"), resources.GetString("cmbDesign.Items4"), resources.GetString("cmbDesign.Items5"), resources.GetString("cmbDesign.Items6")}) - Me.cmbDesign.Name = "cmbDesign" - ' - 'Label10 - ' - resources.ApplyResources(Me.Label10, "Label10") - Me.Label10.Name = "Label10" - ' 'frmConfig_Basic ' resources.ApplyResources(Me, "$this") diff --git a/Global_Indexer/frmConfig_Basic.resx b/Global_Indexer/frmConfig_Basic.resx index c61ba13..d385e85 100644 --- a/Global_Indexer/frmConfig_Basic.resx +++ b/Global_Indexer/frmConfig_Basic.resx @@ -117,6 +117,23 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + + 255, 58 + + + 170, 17 + + + 47 + + + Windows-Authentifizierung + chkbxUserAut @@ -129,6 +146,21 @@ 0 + + True + + + 5, 115 + + + 150, 13 + + + 46 + + + Aktueller ConnectionString: + Label5 @@ -141,6 +173,15 @@ 1 + + 8, 78 + + + 244, 21 + + + 39 + cmbDatenbank @@ -153,6 +194,21 @@ 2 + + True + + + 5, 62 + + + 67, 13 + + + 44 + + + Datenbank: + Label4 @@ -165,6 +221,21 @@ 3 + + True + + + 5, 14 + + + 74, 13 + + + 41 + + + Server-Name: + Label1 @@ -177,6 +248,21 @@ 4 + + True + + + 255, 14 + + + 83, 13 + + + 42 + + + Benutzername: + Label2 @@ -189,6 +275,21 @@ 5 + + True + + + 379, 14 + + + 56, 13 + + + 43 + + + Passwort: + Label3 @@ -201,6 +302,19 @@ 6 + + + Top, Left, Right + + + 8, 131 + + + 500, 22 + + + 45 + txtActualConnection @@ -213,6 +327,15 @@ 7 + + 6, 30 + + + 246, 22 + + + 36 + txtServer @@ -225,6 +348,15 @@ 8 + + 255, 30 + + + 118, 22 + + + 37 + txtUser @@ -237,6 +369,15 @@ 9 + + 382, 30 + + + 64, 22 + + + 38 + txtPasswort @@ -249,6 +390,24 @@ 10 + + MiddleLeft + + + 255, 75 + + + 253, 25 + + + 40 + + + Verbindung zur Datenbank herstellen + + + MiddleRight + BtnConnect @@ -261,18 +420,15 @@ 11 - 4, 22 - 3, 3, 3, 3 582, 280 - 0 @@ -400,7 +556,7 @@ True - 8, 222 + 8, 226 153, 13 @@ -587,7 +743,7 @@ MiddleLeft - 11, 196 + 11, 183 180, 23 @@ -620,7 +776,7 @@ NoControl - 197, 196 + 197, 183 180, 23 @@ -653,7 +809,7 @@ 3, 3, 3, 3 - 582, 280 + 526, 244 1 @@ -673,6 +829,22 @@ 1 + + True + + + 8, 197 + + + 453, 26 + + + 13 + + + Definieren Sie hier Inhalte von Dateinamen welche von der Folderwatch-Überwachung +ausgenommen werden sollen: + Label8 @@ -685,6 +857,18 @@ 0 + + Top, Bottom, Left + + + 11, 226 + + + 192, 48 + + + 11 + DataGridView1 @@ -697,6 +881,18 @@ 1 + + 495, 140 + + + 49, 22 + + + 10 + + + ... + Button2 @@ -709,6 +905,15 @@ 2 + + 11, 142 + + + 478, 22 + + + 8 + txtScanFolderWatch @@ -721,6 +926,21 @@ 3 + + True + + + 8, 126 + + + 392, 13 + + + 7 + + + Definieren Sie hier den Ordner der für Scan2Folder verwendet werden soll: + Label7 @@ -733,6 +953,18 @@ 4 + + 495, 30 + + + 49, 22 + + + 6 + + + ... + btnsetFW_Folder @@ -745,6 +977,18 @@ 5 + + 11, 87 + + + 298, 23 + + + 3 + + + Ordner 'fileFLOW' in Eigenen Dateien erzeugen + btnFW_OwnFiles @@ -757,603 +1001,8 @@ 6 - - btnFW_Desktop - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 7 - - - txtFolderWatch - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 8 - - - Label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 9 - - - btnSaveExclusionFiles - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 10 - - - btnstartstop2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 11 - - - btnstartstop1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 12 - - - 4, 22 - - - 3, 3, 3, 3 - - - 582, 280 - - - 2 - - - Überwachte Ordner - Folderwatch - - - TabPage3 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabControl1 - - - 2 - - - Fill - - - 0, 0 - - - 590, 306 - - - 0 - - - TabControl1 - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - True - - - 255, 58 - - - 170, 17 - - - 47 - - - Windows-Authentifizierung - - - chkbxUserAut - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 0 - - - True - - - 5, 115 - - - 150, 13 - - - 46 - - - Aktueller ConnectionString: - - - Label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 1 - - - 8, 78 - - - 244, 21 - - - 39 - - - cmbDatenbank - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 2 - - - True - - - 5, 62 - - - 67, 13 - - - 44 - - - Datenbank: - - - Label4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 3 - - - True - - - 5, 14 - - - 74, 13 - - - 41 - - - Server-Name: - - - Label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 4 - - - True - - - 255, 14 - - - 83, 13 - - - 42 - - - Benutzername: - - - Label2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 5 - - - True - - - 379, 14 - - - 56, 13 - - - 43 - - - Passwort: - - - Label3 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 6 - - - Top, Left, Right - - - 8, 131 - - - 500, 22 - - - 45 - - - txtActualConnection - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 7 - - - 6, 30 - - - 246, 22 - - - 36 - - - txtServer - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 8 - - - 255, 30 - - - 118, 22 - - - 37 - - - txtUser - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 9 - - - 382, 30 - - - 64, 22 - - - 38 - - - txtPasswort - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 10 - - - MiddleLeft - - - 255, 75 - - - 253, 25 - - - 40 - - - Verbindung zur Datenbank herstellen - - - MiddleRight - - - BtnConnect - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 11 - - - True - - - 8, 197 - - - 453, 26 - - - 13 - - - Definieren Sie hier Inhalte von Dateinamen welche von der Folderwatch-Überwachung -ausgenommen werden sollen: - - - Label8 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 0 - - - Top, Bottom, Left - - - 11, 226 - - - 192, 48 - - - 11 - - - DataGridView1 - - - System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 1 - - - 495, 140 - - - 49, 22 - - - 10 - - - ... - - - Button2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 2 - - - 11, 142 - - - 478, 22 - - - 8 - - - txtScanFolderWatch - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 3 - - - True - - - 8, 126 - - - 392, 13 - - - 7 - - - Definieren Sie hier den Ordner der für Scan2Folder verwendet werden soll: - - - Label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 4 - - - 495, 30 - - - 49, 22 - - - 6 - - - ... - - - btnsetFW_Folder - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 5 - - - 11, 87 - - - 298, 23 - - - 3 - - - Ordner 'fileFLOW' in Eigenen Dateien erzeugen - - - btnFW_OwnFiles - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 6 - - - 11, 58 + + 11, 58 298, 23 @@ -1520,6 +1169,57 @@ ausgenommen werden sollen: 12 + + 4, 22 + + + 3, 3, 3, 3 + + + 582, 280 + + + 2 + + + Überwachte Ordner - Folderwatch + + + TabPage3 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabControl1 + + + 2 + + + Fill + + + 0, 0 + + + 534, 270 + + + 0 + + + TabControl1 + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + 17, 17 @@ -1530,7 +1230,7 @@ ausgenommen werden sollen: 6, 13 - 590, 306 + 534, 270 Segoe UI, 8.25pt diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb index 5136161..fd252bb 100644 --- a/Global_Indexer/frmIndex.vb +++ b/Global_Indexer/frmIndex.vb @@ -322,10 +322,8 @@ Public Class frmIndex Dim oErgebnis 'Welcher Provider? If vProvider.ToLower = "oracle" Then - 'oErgebnis = ClassDatabase.OracleExecute_Scalar(SQLCommand, oConnectionString) LOGGER.Warn("Oracle Database Queries are not supported") - Else 'im Moment nur SQL-Server oErgebnis = DATABASE_ECM.GetScalarValueWithConnection(SQLCommand, oConnectionString) End If @@ -802,14 +800,14 @@ Public Class frmIndex _Logger.Debug($"Indexing Vektor - oIndexType [{oIndexType}] ...") Dim oSplitArray = Split(idxvalue, ClassConstants.VECTORSEPARATOR) Dim oListofString As New List(Of String) - If oSplitArray.Length <= 1 Then - indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, idxvalue, CURR_DOKART_OBJECTTYPE) - Else - For Each oStr In oSplitArray - oListofString.Add(oStr) - Next - indexierung_erfolgreich = WINDREAM.SetFileIndexLoS(CURRENT_NEWFILENAME, indexname, oListofString, CURR_DOKART_OBJECTTYPE) - End If + 'If oSplitArray.Length <= 1 Then + ' indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, idxvalue, CURR_DOKART_OBJECTTYPE) + 'Else + For Each oStr In oSplitArray + oListofString.Add(oStr) + Next + indexierung_erfolgreich = WINDREAM.SetFileIndexLoS(CURRENT_NEWFILENAME, indexname, oListofString, CURR_DOKART_OBJECTTYPE) + 'End If Else indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, idxvalue, CURR_DOKART_OBJECTTYPE) @@ -1603,9 +1601,6 @@ Public Class frmIndex checkItemDeleteSource.Enabled = True checkItemDeleteSource.Checked = CONFIG.Config.DeleteOriginalFile - VIEWER_LICENSE = DATABASE_ECM.GetScalarValue($"SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE - NAME = 'GDPICTURE_FILEFLOW' AND ACTIVE = 1") - DocumentViewer1.Init(LOGCONFIG, VIEWER_LICENSE) If DropType Is Nothing Then @@ -2295,7 +2290,7 @@ Public Class frmIndex Dim oConnectionString As String oConnectionString = DATABASE_ECM.Get_ConnectionStringforID(oSqlConnectionId) Try - Dim oResultDT As DataTable = DATABASE_ECM.GetDatatable(oSqlResult) + Dim oResultDT As DataTable = DATABASE_ECM.GetDatatableWithConnection(oSqlResult, oConnectionString) If Not IsNothing(oResultDT) Then _Logger.Info("We got [" & oResultDT.Rows.Count & "] result(s) for the vector-field!") For Each oResultRow As DataRow In oResultDT.Rows diff --git a/Global_Indexer/packages.config b/Global_Indexer/packages.config index c2d4ed2..75b67ac 100644 --- a/Global_Indexer/packages.config +++ b/Global_Indexer/packages.config @@ -11,7 +11,6 @@ -