From fd2f59af04218b2b5df643687c25be2098a147ef Mon Sep 17 00:00:00 2001 From: Developer01 Date: Tue, 9 Sep 2025 11:26:49 +0200 Subject: [PATCH] =?UTF-8?q?=C3=9Cbernahme=20frmValidator-Logik=20aus=20Bug?= =?UTF-8?q?fix=202.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/TaskFlow/frmValidator.vb | 55 ++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index facdf96..1ec5145 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -2289,7 +2289,7 @@ Public Class frmValidator ' End Try 'End Sub Private Sub Controls2B_EnDisabled() - If LOG_PERF Then PerformanceLogger.Info("Controls2B_EnDisabled_on_Load") + If LOG_PERF Then PerformanceLogger.Info("Controls2B_EnDisabled") Try Dim oFilteredDatatable As DataTable = DT_CONTROLS.Clone() @@ -2678,12 +2678,14 @@ Public Class frmValidator ' ############ Infos eintragen ################# - If Amount_Docs2Validate > 0 Then + If Amount_Docs2Validate > 1 Then Dim omsg = String.Format(S.Verbleibende_Vorgänge___0_, Amount_Docs2Validate) bsiInformation.Caption = omsg + If RbnPgGrpActions.Visible = False Then + RbnPgGrpActions.Visible = True + End If bbtniNext.Visibility = BarItemVisibility.Always Else - bsiInformation.Caption = "Could not get the amount of remaining docs!" bbtniNext.Visibility = BarItemVisibility.Never End If @@ -4227,7 +4229,7 @@ Public Class frmValidator End Function Sub Finish_WFStep(Optional includeFI As Boolean = True) btnSave.Enabled = False - MyValidationLogger.Debug("Abschluss für Dok: " & CURRENT_DOC_PATH & " gestartet") + MyValidationLogger.Debug("Abschluss für DocID " & CURRENT_DOC_ID & " wird gestartet ...") _ItemWorked = True Dim oErrorOcurred As Boolean = False If OverrideAll = False Then @@ -4499,35 +4501,38 @@ Public Class frmValidator DatabaseFallback.ExecuteNonQueryECM(ins) Dim oFIsql As String 'Close_document_viewer() - If Current_Document.Extension = "pdf" Then - If Not IsNothing(WORK_HISTORY_ENTRY) Then - If CBool(CURRENT_DT_PROFILE.Rows(0).Item("ANNOTATE_WORK_HISTORY_ENTRY")) = True Then - oFIsql = String.Format("SELECT * FROM TBPM_FILES_WORK_HISTORY WHERE GUID = (SELECT MAX(GUID) FROM TBPM_FILES_WORK_HISTORY WHERE PROFIL_ID = {0} AND DOC_ID = {1})", CURRENT_ProfilGUID, CURRENT_DOC_ID) - Dim DT_ENTRY As DataTable = DatabaseFallback.GetDatatableECM(oFIsql) ', "Finish_WFStep2") - If Not IsNothing(DT_ENTRY) Then - If DT_ENTRY.Rows.Count = 1 Then - Dim AnnotationString = DT_ENTRY.Rows(0).Item("WORKED_WHEN") & " " & DT_ENTRY.Rows(0).Item("WORKED_BY") & ": " & DT_ENTRY.Rows(0).Item("STATUS_COMMENT") - ClassAnnotation.Annotate_PDF("Workflow-State:", AnnotationString, 0, False) + If Not IsNothing(Current_Document) Then + If Current_Document.Extension = "pdf" Then + If Not IsNothing(WORK_HISTORY_ENTRY) Then + If CBool(CURRENT_DT_PROFILE.Rows(0).Item("ANNOTATE_WORK_HISTORY_ENTRY")) = True Then + oFIsql = String.Format("SELECT * FROM TBPM_FILES_WORK_HISTORY WHERE GUID = (SELECT MAX(GUID) FROM TBPM_FILES_WORK_HISTORY WHERE PROFIL_ID = {0} AND DOC_ID = {1})", CURRENT_ProfilGUID, CURRENT_DOC_ID) + Dim DT_ENTRY As DataTable = DatabaseFallback.GetDatatableECM(oFIsql) ', "Finish_WFStep2") + If Not IsNothing(DT_ENTRY) Then + If DT_ENTRY.Rows.Count = 1 Then + Dim AnnotationString = DT_ENTRY.Rows(0).Item("WORKED_WHEN") & " " & DT_ENTRY.Rows(0).Item("WORKED_BY") & ": " & DT_ENTRY.Rows(0).Item("STATUS_COMMENT") + ClassAnnotation.Annotate_PDF("Workflow-State:", AnnotationString, 0, False) + End If End If End If - End If - Dim oAnnotateAllWHEs = CURRENT_DT_PROFILE.Rows(0).Item("ANNOTATE_ALL_WORK_HISTORY_ENTRIES") - If CBool(oAnnotateAllWHEs) = True Then - oFIsql = String.Format("SELECT * FROM TBPM_FILES_WORK_HISTORY WHERE DOC_ID = {1} ORDER BY GUID", CURRENT_ProfilGUID, CURRENT_DOC_ID) - Dim DT_ENTRIES As DataTable = DatabaseFallback.GetDatatableECM(oFIsql) ', "Finish_WFStep3") - If Not IsNothing(DT_ENTRIES) Then - If DT_ENTRIES.Rows.Count > 0 Then - Dim AnnotationString As String = "" - For Each rw As DataRow In DT_ENTRIES.Rows - AnnotationString = AnnotationString & rw.Item("WORKED_WHEN") & " " & rw.Item("WORKED_BY") & ": " & rw.Item("STATUS_COMMENT") & vbNewLine - Next - ClassAnnotation.Annotate_PDF("Workflow History:", AnnotationString, 0, False, 10, 40) + Dim oAnnotateAllWHEs = CURRENT_DT_PROFILE.Rows(0).Item("ANNOTATE_ALL_WORK_HISTORY_ENTRIES") + If CBool(oAnnotateAllWHEs) = True Then + oFIsql = String.Format("SELECT * FROM TBPM_FILES_WORK_HISTORY WHERE DOC_ID = {1} ORDER BY GUID", CURRENT_ProfilGUID, CURRENT_DOC_ID) + Dim DT_ENTRIES As DataTable = DatabaseFallback.GetDatatableECM(oFIsql) ', "Finish_WFStep3") + If Not IsNothing(DT_ENTRIES) Then + If DT_ENTRIES.Rows.Count > 0 Then + Dim AnnotationString As String = "" + For Each rw As DataRow In DT_ENTRIES.Rows + AnnotationString = AnnotationString & rw.Item("WORKED_WHEN") & " " & rw.Item("WORKED_BY") & ": " & rw.Item("STATUS_COMMENT") & vbNewLine + Next + ClassAnnotation.Annotate_PDF("Workflow History:", AnnotationString, 0, False, 10, 40) + End If End If End If End If End If End If + 'wenn Move2Folder aktiviert wurde If Move2Folder <> "" And (OPERATION_MODE_FS = ClassConstants.OpModeFS_PWM Or OPERATION_MODE_FS = ClassConstants.OpModeFS_IDBWM) Then idxerr_message = allgFunk.Move2Folder(WMDocPathWindows, Move2Folder, CURRENT_ProfilGUID, WINDREAM_ALLG)