Compare commits
4 Commits
Cockpit_Tr
...
e49713246b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e49713246b | ||
|
|
501adeda52 | ||
|
|
bd72e9cecc | ||
|
|
46a9742d5d |
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.9.1.0")>
|
<Assembly: AssemblyVersion("2.9.3.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("")>
|
<Assembly: NeutralResourcesLanguage("")>
|
||||||
|
|||||||
@@ -137,8 +137,17 @@ Public Class frmColumn_Detail
|
|||||||
CURRENT_INDEX_ID = GUIDTextBox.Text
|
CURRENT_INDEX_ID = GUIDTextBox.Text
|
||||||
Dim oForm2 As New frmSQLEditor(LOGCONFIG, DatabaseECM) With {
|
Dim oForm2 As New frmSQLEditor(LOGCONFIG, DatabaseECM) With {
|
||||||
.SQLCommand = SQL_COMMANDTextBox.Text,
|
.SQLCommand = SQL_COMMANDTextBox.Text,
|
||||||
.SQLConnection = 0
|
.SQLConnection = 1,
|
||||||
|
.PlaceholdersManualPrefix = "CTRL",
|
||||||
|
.PlaceholdersManualTitle = "Controls",
|
||||||
|
.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.ToDictionary(Function(name) name, Function(name) name)
|
||||||
}
|
}
|
||||||
|
If IDB_ACTIVE = False Then
|
||||||
|
oForm2.ATTRIBUTE_STORE = "WM"
|
||||||
|
oForm2.PlaceholdersWindream = MVSource_AllIndicies
|
||||||
|
Else
|
||||||
|
oForm2.ATTRIBUTE_STORE = "IDB"
|
||||||
|
End If
|
||||||
oForm2.ShowDialog()
|
oForm2.ShowDialog()
|
||||||
|
|
||||||
If oForm2.DialogResult = DialogResult.OK Then
|
If oForm2.DialogResult = DialogResult.OK Then
|
||||||
|
|||||||
@@ -1027,6 +1027,13 @@ Public Class frmFormDesigner
|
|||||||
.PlaceholdersManualTitle = "Controls",
|
.PlaceholdersManualTitle = "Controls",
|
||||||
.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.ToDictionary(Function(name) name, Function(name) name)
|
.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.ToDictionary(Function(name) name, Function(name) name)
|
||||||
}
|
}
|
||||||
|
If IDB_ACTIVE = False Then
|
||||||
|
oForm.ATTRIBUTE_STORE = "WM"
|
||||||
|
oForm.PlaceholdersWindream = MVSource_AllIndicies
|
||||||
|
Else
|
||||||
|
oForm.ATTRIBUTE_STORE = "IDB"
|
||||||
|
End If
|
||||||
|
|
||||||
oForm.ShowDialog()
|
oForm.ShowDialog()
|
||||||
|
|
||||||
If oForm.DialogResult = DialogResult.OK Then
|
If oForm.DialogResult = DialogResult.OK Then
|
||||||
|
|||||||
@@ -616,7 +616,7 @@
|
|||||||
<value>DocumentViewer1</value>
|
<value>DocumentViewer1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>DocumentViewer1.Type" xml:space="preserve">
|
<data name=">>DocumentViewer1.Type" xml:space="preserve">
|
||||||
<value>DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=2.7.0.0, Culture=neutral, PublicKeyToken=null</value>
|
<value>DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=2.7.2.0, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>DocumentViewer1.Parent" xml:space="preserve">
|
<data name=">>DocumentViewer1.Parent" xml:space="preserve">
|
||||||
<value>SplitContainer1.Panel2</value>
|
<value>SplitContainer1.Panel2</value>
|
||||||
|
|||||||
@@ -865,7 +865,7 @@ Public Class frmValidator
|
|||||||
Try
|
Try
|
||||||
If COPY_WMFILE_2TEMP = True Then
|
If COPY_WMFILE_2TEMP = True Then
|
||||||
MyValidationLogger.Debug("🗑️ Bereinige Temp-Ordner beim Schließen...")
|
MyValidationLogger.Debug("🗑️ Bereinige Temp-Ordner beim Schließen...")
|
||||||
CleanupTempFolder()
|
_documentPathHandler.CleanupTempFolder()
|
||||||
End If
|
End If
|
||||||
Catch cleanupEx As Exception
|
Catch cleanupEx As Exception
|
||||||
MyValidationLogger.Warn($"⚠️ Fehler beim Bereinigen des Temp-Ordners: {cleanupEx.Message}")
|
MyValidationLogger.Warn($"⚠️ Fehler beim Bereinigen des Temp-Ordners: {cleanupEx.Message}")
|
||||||
@@ -901,52 +901,7 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CleanupTempFolder()
|
|
||||||
Try
|
|
||||||
If String.IsNullOrEmpty(TEMP_DOCUMENT_FOLDER) Then
|
|
||||||
MyValidationLogger.Debug("TEMP_DOCUMENT_FOLDER ist nicht gesetzt → Kein Cleanup erforderlich")
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not System.IO.Directory.Exists(TEMP_DOCUMENT_FOLDER) Then
|
|
||||||
MyValidationLogger.Debug($"Temp-Ordner [{TEMP_DOCUMENT_FOLDER}] existiert nicht → Kein Cleanup erforderlich")
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
|
|
||||||
' Alle Dateien im Ordner ermitteln
|
|
||||||
Dim files As String() = System.IO.Directory.GetFiles(TEMP_DOCUMENT_FOLDER)
|
|
||||||
|
|
||||||
If files.Length = 0 Then
|
|
||||||
MyValidationLogger.Debug($"Temp-Ordner [{TEMP_DOCUMENT_FOLDER}] ist bereits leer")
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
|
|
||||||
' Alle Dateien löschen
|
|
||||||
Dim deletedCount As Integer = 0
|
|
||||||
Dim errorCount As Integer = 0
|
|
||||||
|
|
||||||
For Each filePath As String In files
|
|
||||||
Try
|
|
||||||
System.IO.File.Delete(filePath)
|
|
||||||
deletedCount += 1
|
|
||||||
MyValidationLogger.Debug($"Datei gelöscht: [{System.IO.Path.GetFileName(filePath)}]")
|
|
||||||
Catch fileEx As Exception
|
|
||||||
errorCount += 1
|
|
||||||
MyValidationLogger.Warn($"⚠️ Datei konnte nicht gelöscht werden: [{System.IO.Path.GetFileName(filePath)}] - {fileEx.Message}")
|
|
||||||
End Try
|
|
||||||
Next
|
|
||||||
|
|
||||||
If errorCount = 0 Then
|
|
||||||
MyValidationLogger.Debug($"✓ Temp-Ordner bereinigt: {deletedCount} Datei(en) gelöscht")
|
|
||||||
Else
|
|
||||||
MyValidationLogger.Warn($"⚠️ Temp-Ordner teilweise bereinigt: {deletedCount} gelöscht, {errorCount} Fehler")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
MyValidationLogger.Error($"❌ Fehler beim Bereinigen des Temp-Ordners: {ex.Message}")
|
|
||||||
MyValidationLogger.Error(ex)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Function Test_Additional_Data_Searches_Exist() As Boolean
|
Public Function Test_Additional_Data_Searches_Exist() As Boolean
|
||||||
If DT_FILTERED_PROFILE_SEARCHES_DATA.Rows.Count > 0 Then
|
If DT_FILTERED_PROFILE_SEARCHES_DATA.Rows.Count > 0 Then
|
||||||
@@ -1018,6 +973,8 @@ Public Class frmValidator
|
|||||||
MyValidationLogger.Debug($"Current_Document: Id={Current_Document?.Id}, Path={Current_Document?.FullPath}")
|
MyValidationLogger.Debug($"Current_Document: Id={Current_Document?.Id}, Path={Current_Document?.FullPath}")
|
||||||
MyValidationLogger.Debug("========================================")
|
MyValidationLogger.Debug("========================================")
|
||||||
|
|
||||||
|
DT_AdditionalSearches_Resultset_Docs = Nothing
|
||||||
|
|
||||||
Dim allSQLSearches As DataTable = DT_FILTERED_PROFILE_SEARCHES_DATA
|
Dim allSQLSearches As DataTable = DT_FILTERED_PROFILE_SEARCHES_DATA
|
||||||
Dim allDocSearches As DataTable = DT_FILTERED_PROFILE_SEARCHES_DOC
|
Dim allDocSearches As DataTable = DT_FILTERED_PROFILE_SEARCHES_DOC
|
||||||
|
|
||||||
@@ -1048,6 +1005,7 @@ Public Class frmValidator
|
|||||||
MyValidationLogger.Debug("--- Ergebnisse werden geprüft (DATA/DOC) ---")
|
MyValidationLogger.Debug("--- Ergebnisse werden geprüft (DATA/DOC) ---")
|
||||||
Dim validSQLSearches As DataTable = allSQLSearches.Clone()
|
Dim validSQLSearches As DataTable = allSQLSearches.Clone()
|
||||||
Dim validDocSearches As DataTable = allDocSearches.Clone()
|
Dim validDocSearches As DataTable = allDocSearches.Clone()
|
||||||
|
Dim aggregatedDocResults As DataTable = Nothing
|
||||||
|
|
||||||
If hasDATASearches Then
|
If hasDATASearches Then
|
||||||
For i As Integer = 0 To allSQLSearches.Rows.Count - 1
|
For i As Integer = 0 To allSQLSearches.Rows.Count - 1
|
||||||
@@ -1091,6 +1049,12 @@ Public Class frmValidator
|
|||||||
If IsValidDocSearchResult(testDT) Then
|
If IsValidDocSearchResult(testDT) Then
|
||||||
validDocSearches.ImportRow(searchRow)
|
validDocSearches.ImportRow(searchRow)
|
||||||
MyValidationLogger.Info($"✓ Doc-Search '{tabTitle}': {testDT.Rows.Count} Dokumente gefunden")
|
MyValidationLogger.Info($"✓ Doc-Search '{tabTitle}': {testDT.Rows.Count} Dokumente gefunden")
|
||||||
|
If aggregatedDocResults Is Nothing Then
|
||||||
|
aggregatedDocResults = testDT.Clone()
|
||||||
|
End If
|
||||||
|
For Each resultRow As DataRow In testDT.Rows
|
||||||
|
aggregatedDocResults.ImportRow(resultRow)
|
||||||
|
Next
|
||||||
Else
|
Else
|
||||||
MyValidationLogger.Warn($"⚠️ Doc-Search '{tabTitle}' liefert kein Dokument-Schema (DocID/FULL_FILENAME) und wird übersprungen.")
|
MyValidationLogger.Warn($"⚠️ Doc-Search '{tabTitle}' liefert kein Dokument-Schema (DocID/FULL_FILENAME) und wird übersprungen.")
|
||||||
End If
|
End If
|
||||||
@@ -1102,6 +1066,10 @@ Public Class frmValidator
|
|||||||
End Try
|
End Try
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
DT_AdditionalSearches_Resultset_Docs = aggregatedDocResults
|
||||||
|
If DT_AdditionalSearches_Resultset_Docs IsNot Nothing Then
|
||||||
|
MyValidationLogger.Debug($"Zusätzliche Doc-Results gecached: {DT_AdditionalSearches_Resultset_Docs.Rows.Count} Rows")
|
||||||
|
End If
|
||||||
|
|
||||||
AdditionalDataResultsExist = validSQLSearches.Rows.Count > 0
|
AdditionalDataResultsExist = validSQLSearches.Rows.Count > 0
|
||||||
AdditionalDocResultsExist = validDocSearches.Rows.Count > 0
|
AdditionalDocResultsExist = validDocSearches.Rows.Count > 0
|
||||||
@@ -8578,8 +8546,8 @@ Public Class frmValidator
|
|||||||
|
|
||||||
oFilenameOnly = Path.GetFileName(DocPathWindows)
|
oFilenameOnly = Path.GetFileName(DocPathWindows)
|
||||||
oExtension = Path.GetExtension(DocPathWindows)
|
oExtension = Path.GetExtension(DocPathWindows)
|
||||||
oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbcrlf &
|
oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbCrLf &
|
||||||
$"EXEC dbo.PRPM_GETFILENAME_EXPORT {CURRENT_DOC_ID}, 1, @Outputfilename = @Filename OUTPUT;" & vbcrlf &
|
$"EXEC dbo.PRPM_GETFILENAME_EXPORT {CURRENT_DOC_ID}, 1, @Outputfilename = @Filename OUTPUT;" & vbCrLf &
|
||||||
"SELECT @Filename"
|
"SELECT @Filename"
|
||||||
|
|
||||||
Dim oExportFilename = DatabaseFallback.GetScalarValueECM(oSQLGetFilename)
|
Dim oExportFilename = DatabaseFallback.GetScalarValueECM(oSQLGetFilename)
|
||||||
@@ -8621,23 +8589,49 @@ Public Class frmValidator
|
|||||||
MyValidationLogger.Info($"File {oFile2Export} exported successfully!")
|
MyValidationLogger.Info($"File {oFile2Export} exported successfully!")
|
||||||
oCount += 1
|
oCount += 1
|
||||||
Else
|
Else
|
||||||
MsgBox("Error encountered while extracting Export-Filename!" & vbcrlf & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
MsgBox("Error encountered while extracting Export-Filename!" & vbCrLf & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
MyValidationLogger.Info($"#### ATTENTION: oExportFilename is Nothing - SQL: {oSQLGetFilename}")
|
||||||
|
MsgBox("Error encountered while extracting Export-Filename - Result is Nothing!" & vbCrLf & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oFileCount As Integer = 1
|
Dim oFileCount As Integer = 1
|
||||||
If Not IsNothing(DT_AdditionalSearches_Resultset_Docs) Then
|
If Not IsNothing(DT_AdditionalSearches_Resultset_Docs) Then
|
||||||
|
|
||||||
For Each oFileRecord As DataRow In DT_AdditionalSearches_Resultset_Docs.Rows
|
For Each oFileRecord As DataRow In DT_AdditionalSearches_Resultset_Docs.Rows
|
||||||
Dim oFromFilename = oFileRecord.Item("FULL_FILENAME")
|
Dim oFromFilename = oFileRecord.Item("FULL_FILENAME")?.ToString()
|
||||||
Dim oDocID = oFileRecord.Item("DocID")
|
Dim oDocID = oFileRecord.Item("DocID")
|
||||||
If File.Exists(oFromFilename) Then
|
|
||||||
|
' COPY_WMFILE_2TEMP: Pfad analog zu GetDocPathWindows() auflösen
|
||||||
|
Dim oResolvedFilename As String = oFromFilename
|
||||||
|
If COPY_WMFILE_2TEMP = True AndAlso Not String.IsNullOrWhiteSpace(oFromFilename) Then
|
||||||
|
Dim options As New DocumentPathHandler.DocumentPathOptions With {
|
||||||
|
.EnableMapping = True,
|
||||||
|
.WMSuffix = WMSUFFIX,
|
||||||
|
.SpecificDrive = If(Len(MAP_SHARE_DRIVE) = 1, MAP_SHARE_DRIVE, ""),
|
||||||
|
.DriveBlacklist = MAP_BLACKLIST,
|
||||||
|
.CopyToTemp = True,
|
||||||
|
.TempFolder = TEMP_DOCUMENT_FOLDER,
|
||||||
|
.UnmapAfterCopy = True
|
||||||
|
}
|
||||||
|
Dim result = _documentPathHandler.ProcessDocumentPath(oFromFilename, options)
|
||||||
|
If result.Success AndAlso Not String.IsNullOrWhiteSpace(result.FinalPath) AndAlso File.Exists(result.FinalPath) Then
|
||||||
|
MyValidationLogger.Info($"✓ Zusatzdokument via Temp aufgelöst: [{result.FinalPath}]")
|
||||||
|
oResolvedFilename = result.FinalPath
|
||||||
|
Else
|
||||||
|
MyValidationLogger.Warn($"⚠️ Temp-Auflösung fehlgeschlagen für [{oFromFilename}]: {result.ErrorMessage} - Fallback auf Originalpfad")
|
||||||
|
oResolvedFilename = oFromFilename
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If File.Exists(oResolvedFilename) Then
|
||||||
|
MyValidationLogger.Debug($"Found additional document for export: [{oResolvedFilename}] (WM: [{oFromFilename}]) with DocID [{oDocID}]")
|
||||||
oFileCount += 1
|
oFileCount += 1
|
||||||
oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbcrlf &
|
oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbCrLf &
|
||||||
$"EXEC dbo.PRPM_GETFILENAME_EXPORT {oDocID}, {oFileCount}, @Outputfilename = @Filename OUTPUT;" & vbcrlf &
|
$"EXEC dbo.PRPM_GETFILENAME_EXPORT {oDocID}, {oFileCount}, @Outputfilename = @Filename OUTPUT;" & vbCrLf &
|
||||||
"SELECT @Filename"
|
"SELECT @Filename"
|
||||||
oExportFilename = DatabaseFallback.GetScalarValueECM(oSQLGetFilename)
|
oExportFilename = DatabaseFallback.GetScalarValueECM(oSQLGetFilename)
|
||||||
oExtension = Path.GetExtension(oFromFilename)
|
oExtension = Path.GetExtension(oResolvedFilename)
|
||||||
If Not IsNothing(oExportFilename) Then
|
If Not IsNothing(oExportFilename) Then
|
||||||
If IsDBNull(oExportFilename) Then
|
If IsDBNull(oExportFilename) Then
|
||||||
MyValidationLogger.Info($"#### ATTENTION: oExportFilename is DBNULL - SQL: {oSQLGetFilename}")
|
MyValidationLogger.Info($"#### ATTENTION: oExportFilename is DBNULL - SQL: {oSQLGetFilename}")
|
||||||
@@ -8645,18 +8639,25 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
If oExportFilename <> String.Empty Then
|
If oExportFilename <> String.Empty Then
|
||||||
oTargetPath = FolderBrowserDialog1.SelectedPath & "\" & oExportFilename & oExtension
|
oTargetPath = FolderBrowserDialog1.SelectedPath & "\" & oExportFilename & oExtension
|
||||||
File.Copy(oFromFilename, oTargetPath)
|
File.Copy(oResolvedFilename, oTargetPath)
|
||||||
|
MyValidationLogger.Info($"Additional file [{oResolvedFilename}] exported successfully to [{oTargetPath}]")
|
||||||
oCount += 1
|
oCount += 1
|
||||||
Else
|
Else
|
||||||
Dim omsg = $"Error encountered while extracting ATTACHMENT-Export-Filename DocID [{oDocID}]!"
|
Dim omsg = $"Error encountered while extracting ATTACHMENT-Export-Filename DocID [{oDocID}]!"
|
||||||
MyValidationLogger.Info($"#### ATTENTION: {omsg} SQL: {oSQLGetFilename}")
|
MyValidationLogger.Info($"#### ATTENTION: {omsg} SQL: {oSQLGetFilename}")
|
||||||
MsgBox(omsg & vbcrlf & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
MsgBox(omsg & vbCrLf & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Dim omsg = $"Error encountered while extracting ATTACHMENT-Export-Filename DocID [{oDocID}] - Result is Nothing!"
|
||||||
|
MyValidationLogger.Info($"#### ATTENTION: {omsg} SQL: {oSQLGetFilename}")
|
||||||
|
MsgBox(omsg & vbCrLf & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
||||||
End If
|
End If
|
||||||
'oFilenameOnly = Path.GetFileName(oFromFilename)
|
Else
|
||||||
|
MyValidationLogger.Warn($"⚠️ Additional file for export not found: [{oResolvedFilename}] (WM: [{oFromFilename}]) with DocID [{oDocID}]")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
Else
|
||||||
|
MyValidationLogger.Info("No additional documents to export (DT_AdditionalSearches_Resultset_Docs is Nothing)")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CONFIG.Config.LastExportPath = FolderBrowserDialog1.SelectedPath
|
CONFIG.Config.LastExportPath = FolderBrowserDialog1.SelectedPath
|
||||||
@@ -8665,7 +8666,7 @@ Public Class frmValidator
|
|||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MyValidationLogger.Error(ex)
|
MyValidationLogger.Error(ex)
|
||||||
MsgBox("Could not move file to target: " & vbcrlf & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
MsgBox("Could not move file to target: " & vbCrLf & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user