From 1ded23ab1835ffd5695aefcfc19148fee3a81237 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Thu, 22 Oct 2026 15:56:06 +0200 Subject: [PATCH] Aktualisiere DevExpress und verbessere Fehlerbehandlung MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Verweise auf DevExpress-Bibliotheken in `DocumentViewer.vbproj`, `LookupControl.vbproj` und `Common.vbproj` wurden von Version 21.2 auf 25.2 aktualisiert, einschließlich der Anpassung der DLL-Pfade und der Hinzufügung des Attributs `False`. Die Assembly-Versionen in `AssemblyInfo.vb` für `DocumentViewer`, `LookupControl` und `Loader` wurden entsprechend aktualisiert. In `Loader.vb` wurden neue Ausnahmebehandlungen für `UnauthorizedAccessException` und bestimmte `IOException`-Fehlercodes hinzugefügt, um spezifische Warnungen und Fehlerprotokollierungen zu ermöglichen. In `frmLanguage_Select.vb` wurden die Imports für `DigitalData.Modules.EDMI.API` hinzugefügt und die Datenbanklogik auf `DatabaseWithFallback` umgestellt. Die Benutzeridentifikation wurde von `USERNAME` auf `GUID` geändert, und es wurden zusätzliche Methodenaufrufe für die Sprachänderung hinzugefügt. --- Controls.DocumentViewer/DocumentViewer.vbproj | 120 +++++++++++------- .../My Project/AssemblyInfo.vb | 4 +- Controls.LookupGrid/LookupControl.vbproj | 52 ++++++-- .../My Project/AssemblyInfo.vb | 8 +- GUIs.Common/Common.vbproj | 82 +++++++++--- GUIs.Common/DocumentResultList/Loader.vb | 15 ++- GUIs.Common/My Project/AssemblyInfo.vb | 4 +- GUIs.Common/frmLanguage_Select.vb | 25 ++-- 8 files changed, 214 insertions(+), 96 deletions(-) diff --git a/Controls.DocumentViewer/DocumentViewer.vbproj b/Controls.DocumentViewer/DocumentViewer.vbproj index ae35dd9d..d9193f35 100644 --- a/Controls.DocumentViewer/DocumentViewer.vbproj +++ b/Controls.DocumentViewer/DocumentViewer.vbproj @@ -54,77 +54,101 @@ packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Charts.v21.2.Core.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Charts.v25.2.Core.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Data.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Data.Desktop.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.DataAccess.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Data.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.DataAccess.v21.2.UI.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.DataAccess.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Images.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.DataAccess.v25.2.UI.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Office.v21.2.Core.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.DataVisualization.v25.2.Core.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Pdf.v21.2.Core.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Images.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Printing.v21.2.Core.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Office.v25.2.Core.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.RichEdit.v21.2.Core.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Pdf.v25.2.Core.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.DataVisualization.v21.2.Core.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Printing.v25.2.Core.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Spreadsheet.v21.2.Core.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.RichEdit.v25.2.Core.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Data.Desktop.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Spreadsheet.v25.2.Core.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Utils.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Utils.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Utils.v21.2.UI.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Utils.v25.2.UI.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraBars.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraBars.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraCharts.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraCharts.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraEditors.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraEditors.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraGrid.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraGrid.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraLayout.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraLayout.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraNavBar.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraNavBar.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraPrinting.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraPrinting.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraRichEdit.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraRichEdit.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraSpreadsheet.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraSpreadsheet.v25.2.dll - - D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraTreeList.v21.2.dll + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraTreeList.v25.2.dll ..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll diff --git a/Controls.DocumentViewer/My Project/AssemblyInfo.vb b/Controls.DocumentViewer/My Project/AssemblyInfo.vb index 7005c6f2..4f6d62ec 100644 --- a/Controls.DocumentViewer/My Project/AssemblyInfo.vb +++ b/Controls.DocumentViewer/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Controls.LookupGrid/LookupControl.vbproj b/Controls.LookupGrid/LookupControl.vbproj index 948806fa..9193d857 100644 --- a/Controls.LookupGrid/LookupControl.vbproj +++ b/Controls.LookupGrid/LookupControl.vbproj @@ -44,33 +44,57 @@ On - - False - - + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Data.Desktop.v25.2.dll - + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Data.v25.2.dll - + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Drawing.v25.2.dll - + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Office.v25.2.Core.dll - + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Pdf.v25.2.Core.dll - - - - - + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Printing.v25.2.Core.dll - + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.RichEdit.v25.2.Core.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.RichEdit.v25.2.Export.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Utils.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraEditors.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraGrid.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraLayout.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraPrinting.v25.2.dll diff --git a/Controls.LookupGrid/My Project/AssemblyInfo.vb b/Controls.LookupGrid/My Project/AssemblyInfo.vb index 400e317f..a9812350 100644 --- a/Controls.LookupGrid/My Project/AssemblyInfo.vb +++ b/Controls.LookupGrid/My Project/AssemblyInfo.vb @@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices - - + + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/GUIs.Common/Common.vbproj b/GUIs.Common/Common.vbproj index 6cf2db3a..3f0e07b1 100644 --- a/GUIs.Common/Common.vbproj +++ b/GUIs.Common/Common.vbproj @@ -52,24 +52,74 @@ ..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll - - - - - - - - - - - - - - - + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Data.Desktop.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Data.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Dialogs.v25.2.Core.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Drawing.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Office.v25.2.Core.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Printing.v25.2.Core.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.RichEdit.v25.2.Core.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Sparkline.v25.2.Core.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.Utils.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraBars.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraDialogs.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraEditors.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraGrid.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraLayout.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraPrinting.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraRichEdit.v25.2.dll + + + False + D:\ProgramFiles\DevExpress 25.2\Components\Bin\Framework\DevExpress.XtraTreeList.v25.2.dll - False ..\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll diff --git a/GUIs.Common/DocumentResultList/Loader.vb b/GUIs.Common/DocumentResultList/Loader.vb index 21ee5510..5dd0c08d 100644 --- a/GUIs.Common/DocumentResultList/Loader.vb +++ b/GUIs.Common/DocumentResultList/Loader.vb @@ -145,8 +145,21 @@ Namespace DocumentResultList Return oMemoryStream.ToArray() End Using End Using + Catch ex As UnauthorizedAccessException + Logger.Warn("Access denied for file [{0}]. Check permissions or network credentials.", pFullPath) + Logger.Error(ex) + Return Nothing + Catch ex As IOException When (ex.HResult = -2147024843 OrElse + ex.HResult = -2147023570 OrElse + ex.HResult = -2147024829) + ' -2147024843 = 0x80070035 Netzwerkpfad nicht gefunden + ' -2147023570 = 0x8007052E Falscher Benutzername oder Kennwort (Error 1326) + ' -2147024829 = 0x80070043 Netzwerkname nicht gefunden + Logger.Warn("Network access failed for file [{0}]. HResult: 0x{1:X8} – Possible causes: wrong credentials, unavailable share or disconnected network drive.", pFullPath, ex.HResult) + Logger.Error(ex) + Return Nothing Catch ex As Exception - Logger.Warn("Loading file [{0}] failed.", pFullPath) + Logger.Warn("Loading file [{0}] failed. Exception: {1}", pFullPath, ex.GetType().Name) Logger.Error(ex) Return Nothing End Try diff --git a/GUIs.Common/My Project/AssemblyInfo.vb b/GUIs.Common/My Project/AssemblyInfo.vb index b122dce5..2496467b 100644 --- a/GUIs.Common/My Project/AssemblyInfo.vb +++ b/GUIs.Common/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/GUIs.Common/frmLanguage_Select.vb b/GUIs.Common/frmLanguage_Select.vb index bf50cb4f..15337d3c 100644 --- a/GUIs.Common/frmLanguage_Select.vb +++ b/GUIs.Common/frmLanguage_Select.vb @@ -1,15 +1,19 @@ -Public Class frmLanguage_Select - Private ReadOnly _Database As Modules.Database.MSSQLServer - Private ReadOnly _Username As String +Imports DigitalData.Modules.EDMI.API +Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback + +Public Class frmLanguage_Select + + Private ReadOnly _DatabaseFallback As DatabaseWithFallback + Private ReadOnly _UserID As String Private ReadOnly _ModShort As String Private ReadOnly _DT_LANG As DataTable Public Property pChanged As Boolean = False - - Public Sub New(pLogConfig As Modules.Logging.LogConfig, oConStringECM As String, pUserName As String, pDT_LANG As DataTable, pModShort As String) - _Database = New Modules.Database.MSSQLServer(pLogConfig, oConStringECM) + Public Property pChanged_Language As String = False + Public Sub New(pLogConfig As Modules.Logging.LogConfig, oDBFallback As DatabaseWithFallback, pUserID As String, pDT_LANG As DataTable, pModShort As String) + _DatabaseFallback = oDBFallback _DT_LANG = pDT_LANG - _Username = pUserName + _UserID = pUserID _ModShort = pModShort ' Dieser Aufruf ist für den Designer erforderlich. InitializeComponent() @@ -29,9 +33,12 @@ End Sub Private Sub btnStep2_Click(sender As Object, e As EventArgs) Handles btnStep2.Click - Dim update As String = $"UPDATE TBDD_USER SET [LANGUAGE] = '{cmbLanguage.Text}', CHANGED_WHO = 'LANG_CHANGE_GUI_{_ModShort}' WHERE USERNAME = '{_Username}'" - If _Database.ExecuteNonQuery(update) = True Then + Dim update As String = $"UPDATE TBDD_USER SET [LANGUAGE] = '{cmbLanguage.Text}', CHANGED_WHO = 'LANG_CHANGE_GUI_{_ModShort}' WHERE GUID = '{_UserID}'" + If _DatabaseFallback.ExecuteNonQueryECM(update) = True Then + _DatabaseFallback.ExecuteAppServiceWrite(New GetDatatableOptions( + $"TBDD_USER_MODULE?USER_ID={_UserID}!USER_LANGUAGE='{cmbLanguage.Text}'")) pChanged = True + pChanged_Language = cmbLanguage.Text Me.Close() End If End Sub