From c249b5c591b9ac80ecdba63d5791ac635e624a10 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Tue, 19 May 2026 09:08:52 +0200 Subject: [PATCH] =?UTF-8?q?Neue=20Datei=20hinzugef=C3=BCgt=20und=20Logging?= =?UTF-8?q?=20verbessert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In der Datei Product.wxs wurde die Datei DLLLicenseManager.dll zum Installationspaket hinzugefügt. In frmInvDashboard.Designer.vb wurde der Adapter VWPM_CHART_TOP5TableAdapter entfernt und durch das neue Element CreateChartOtherRibbonPage1 ersetzt. In frmValidator.vb wurden mehrere Verbesserungen vorgenommen: - Debug- und Info-Logs für Exportprozesse hinzugefügt. - SQL-Befehl für Export-Dateinamen angepasst. - Verbesserte Fehlerbehandlung und Logging bei fehlenden oder ungültigen Export-Dateinamen. - Warn-Log für nicht gefundene Dateien ergänzt. - Info-Log für leere Dokumentenlisten hinzugefügt. --- app/SetupVS19/Product.wxs | 1 + app/TaskFlow/frmInvDashboard.Designer.vb | 5 +---- app/TaskFlow/frmValidator.vb | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/app/SetupVS19/Product.wxs b/app/SetupVS19/Product.wxs index 9594425..7deea1d 100644 --- a/app/SetupVS19/Product.wxs +++ b/app/SetupVS19/Product.wxs @@ -126,6 +126,7 @@ + diff --git a/app/TaskFlow/frmInvDashboard.Designer.vb b/app/TaskFlow/frmInvDashboard.Designer.vb index 93078d5..f22af89 100644 --- a/app/TaskFlow/frmInvDashboard.Designer.vb +++ b/app/TaskFlow/frmInvDashboard.Designer.vb @@ -1384,10 +1384,7 @@ Partial Class frmInvDashboard Me.ChartBottomRight.Size = New System.Drawing.Size(808, 130) Me.ChartBottomRight.TabIndex = 1 ' - 'VWPM_CHART_TOP5TableAdapter - ' - Me.VWPM_CHART_TOP5TableAdapter.ClearBeforeFill = True - ' + 'CreateChartOtherRibbonPage1 ' Me.CreateChartOtherRibbonPage1.Name = "CreateChartOtherRibbonPage1" diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 964e0e6..63c39c4 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -8627,14 +8627,14 @@ Public Class frmValidator Dim oFileCount As Integer = 1 If Not IsNothing(DT_AdditionalSearches_Resultset_Docs) Then - For Each oFileRecord As DataRow In DT_AdditionalSearches_Resultset_Docs.Rows Dim oFromFilename = oFileRecord.Item("FULL_FILENAME") Dim oDocID = oFileRecord.Item("DocID") If File.Exists(oFromFilename) Then + MyValidationLogger.Debug($"Found additional document for export: [{oFromFilename}] with DocID [{oDocID}]") oFileCount += 1 - oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbcrlf & - $"EXEC dbo.PRPM_GETFILENAME_EXPORT {oDocID}, {oFileCount}, @Outputfilename = @Filename OUTPUT;" & vbcrlf & + oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbCrLf & + $"EXEC dbo.PRPM_GETFILENAME_EXPORT {oDocID}, {oFileCount}, @Outputfilename = @Filename OUTPUT;" & vbCrLf & "SELECT @Filename" oExportFilename = DatabaseFallback.GetScalarValueECM(oSQLGetFilename) oExtension = Path.GetExtension(oFromFilename) @@ -8646,17 +8646,25 @@ Public Class frmValidator If oExportFilename <> String.Empty Then oTargetPath = FolderBrowserDialog1.SelectedPath & "\" & oExportFilename & oExtension File.Copy(oFromFilename, oTargetPath) + LOGGER.Info($"Additional file [{oFromFilename}] exported successfully to [{oTargetPath}]") oCount += 1 Else Dim omsg = $"Error encountered while extracting ATTACHMENT-Export-Filename DocID [{oDocID}]!" 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 + 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 'oFilenameOnly = Path.GetFileName(oFromFilename) - + Else + MyValidationLogger.Warn($"⚠️ Additional file for export not found: [{oFromFilename}] with DocID [{oDocID}]") End If Next + Else + MyValidationLogger.Info("No additional documents to export (DT_AdditionalSearches_Resultset_Docs is Nothing)") End If CONFIG.Config.LastExportPath = FolderBrowserDialog1.SelectedPath