Aktualisierung SQL View, GDPicture Referenzen etc

This commit is contained in:
Developer01
2026-07-06 16:30:56 +02:00
parent 7f714ce705
commit cbc16d5dd2
9 changed files with 182 additions and 48 deletions

View File

@@ -191,14 +191,16 @@
<File Id="Microsoft.Bcl.HashCode" Name="Microsoft.Bcl.HashCode.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Bcl.HashCode.dll" /> <File Id="Microsoft.Bcl.HashCode" Name="Microsoft.Bcl.HashCode.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Bcl.HashCode.dll" />
<File Id="Microsoft.Identity.Client" Name="Microsoft.Identity.Client.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Identity.Client.dll" /> <File Id="Microsoft.Identity.Client" Name="Microsoft.Identity.Client.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Identity.Client.dll" />
<File Id="Microsoft.IdentityModel.Abstractions" Name="Microsoft.IdentityModel.Abstractions.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.IdentityModel.Abstractions.dll" /> <File Id="Microsoft.IdentityModel.Abstractions" Name="Microsoft.IdentityModel.Abstractions.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.IdentityModel.Abstractions.dll" />
<File Id="Microsoft.Win32.Primitives" Name="Microsoft.Win32.Primitives.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Win32.Primitives.dll" />
<File Id="Microsoft.Win32.Registry" Name="Microsoft.Win32.Registry.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Win32.Registry.dll" />
<File Id="Newtonsoft.Json.Bson" Name="Newtonsoft.Json.Bson.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Newtonsoft.Json.Bson.dll" /> <File Id="Newtonsoft.Json.Bson" Name="Newtonsoft.Json.Bson.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Newtonsoft.Json.Bson.dll" />
<File Id="netstandard" Name="netstandard.dll" Source="..\taskFLOW\bin\$(var.Configuration)\netstandard.dll" />
<File Id="OpenMcdf" Name="OpenMcdf.dll" Source="..\taskFLOW\bin\$(var.Configuration)\OpenMcdf.dll" /> <File Id="OpenMcdf" Name="OpenMcdf.dll" Source="..\taskFLOW\bin\$(var.Configuration)\OpenMcdf.dll" />
<File Id="protobufnet" Name="protobuf-net.dll" Source="..\taskFLOW\bin\$(var.Configuration)\protobuf-net.dll" /> <File Id="protobufnet" Name="protobuf-net.dll" Source="..\taskFLOW\bin\$(var.Configuration)\protobuf-net.dll" />
<File Id="protobufnet.Core" Name="protobuf-net.Core.dll" Source="..\taskFLOW\bin\$(var.Configuration)\protobuf-net.Core.dll" /> <File Id="protobufnet.Core" Name="protobuf-net.Core.dll" Source="..\taskFLOW\bin\$(var.Configuration)\protobuf-net.Core.dll" />
<File Id="RtfPipe" Name="RtfPipe.dll" Source="..\taskFLOW\bin\$(var.Configuration)\RtfPipe.dll" /> <File Id="RtfPipe" Name="RtfPipe.dll" Source="..\taskFLOW\bin\$(var.Configuration)\RtfPipe.dll" />
<!-- System DLLs --> <!-- System DLLs -->
<File Id="netstandard" Name="netstandard.dll" Source="..\taskFLOW\bin\$(var.Configuration)\netstandard.dll" />
<File Id="System.Buffers" Name="System.Buffers.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.Buffers.dll" /> <File Id="System.Buffers" Name="System.Buffers.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.Buffers.dll" />
<File Id="System.CodeDom" Name="System.CodeDom.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.CodeDom.dll" /> <File Id="System.CodeDom" Name="System.CodeDom.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.CodeDom.dll" />
<File Id="System.Collections.Immutable" Name="System.Collections.Immutable.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.Collections.Immutable.dll" /> <File Id="System.Collections.Immutable" Name="System.Collections.Immutable.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.Collections.Immutable.dll" />
@@ -215,13 +217,18 @@
<File Id="System.Threading.Channels" Name="System.Threading.Channels.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.Threading.Channels.dll" /> <File Id="System.Threading.Channels" Name="System.Threading.Channels.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.Threading.Channels.dll" />
<File Id="System.Threading.Tasks.Extensions" Name="System.Threading.Tasks.Extensions.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.Threading.Tasks.Extensions.dll" /> <File Id="System.Threading.Tasks.Extensions" Name="System.Threading.Tasks.Extensions.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.Threading.Tasks.Extensions.dll" />
<File Id="System.ValueTuple" Name="System.ValueTuple.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.ValueTuple.dll" /> <File Id="System.ValueTuple" Name="System.ValueTuple.dll" Source="..\taskFLOW\bin\$(var.Configuration)\System.ValueTuple.dll" />
<File Id="Microsoft.Win32.Primitives" Name="Microsoft.Win32.Primitives.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Win32.Primitives.dll" />
<File Id="Microsoft.Win32.Registry" Name="Microsoft.Win32.Registry.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Win32.Registry.dll" />
<!-- NativeSDK DLLs --> <!-- NativeSDK DLLs -->
<File Id="NativeSDK.Exceptions" Name="NativeSDK.Exceptions.dll" Source="..\taskFLOW\bin\$(var.Configuration)\NativeSDK.Exceptions.dll" /> <File Id="NativeSDK.Exceptions" Name="NativeSDK.Exceptions.dll" Source="..\taskFLOW\bin\$(var.Configuration)\NativeSDK.Exceptions.dll" />
<File Id="NativeSDK.Settings" Name="NativeSDK.Settings.dll" Source="..\taskFLOW\bin\$(var.Configuration)\NativeSDK.Settings.dll" /> <File Id="NativeSDK.Settings" Name="NativeSDK.Settings.dll" Source="..\taskFLOW\bin\$(var.Configuration)\NativeSDK.Settings.dll" />
<File Id="NativeSDK.Settings.Edition" Name="NativeSDK.Settings.Edition.dll" Source="..\taskFLOW\bin\$(var.Configuration)\NativeSDK.Settings.Edition.dll" /> <File Id="NativeSDK.Settings.Edition" Name="NativeSDK.Settings.Edition.dll" Source="..\taskFLOW\bin\$(var.Configuration)\NativeSDK.Settings.Edition.dll" />
<!-- Microsoft.Extensions Dependencies -->
<File Id="Microsoft.Extensions.Logging.Abstractions" Name="Microsoft.Extensions.Logging.Abstractions.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Extensions.Logging.Abstractions.dll" />
<File Id="Microsoft.Extensions.Logging" Name="Microsoft.Extensions.Logging.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Extensions.Logging.dll" />
<File Id="Microsoft.Extensions.DependencyInjection.Abstractions" Name="Microsoft.Extensions.DependencyInjection.Abstractions.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Extensions.DependencyInjection.Abstractions.dll" />
<File Id="Microsoft.Extensions.Options" Name="Microsoft.Extensions.Options.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Extensions.Options.dll" />
<File Id="Microsoft.Extensions.Primitives" Name="Microsoft.Extensions.Primitives.dll" Source="..\taskFLOW\bin\$(var.Configuration)\Microsoft.Extensions.Primitives.dll" />
</Component> </Component>
<Component Id="DevExpressLibs" Guid="CB40DAAE-348E-4BD3-B275-9A526EB8F191"> <Component Id="DevExpressLibs" Guid="CB40DAAE-348E-4BD3-B275-9A526EB8F191">

View File

@@ -192,7 +192,7 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-10.0.0.9" newVersion="10.0.0.9" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Formats.Asn1" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Formats.Asn1" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
@@ -202,6 +202,18 @@
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" /> <bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.9" newVersion="10.0.0.9" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.9" newVersion="10.0.0.9" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.9" newVersion="10.0.0.9" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<entityFramework> <entityFramework>

View File

@@ -406,18 +406,22 @@ Public Class ClassInit
Try Try
USER_RIGHT_VIEW_ONLY = DT_CHECKUSER_MODULE.Rows(0).Item("USER_RIGHT2") USER_RIGHT_VIEW_ONLY = DT_CHECKUSER_MODULE.Rows(0).Item("USER_RIGHT2")
LOGGER.Debug("USER_RIGHT_VIEW_ONLY: " & USER_RIGHT_VIEW_ONLY.ToString)
Catch ex As Exception Catch ex As Exception
USER_RIGHT_VIEW_ONLY = False USER_RIGHT_VIEW_ONLY = False
LOGGER.Info("⚠️ Error in USER_RIGHT_VIEW_ONLY: " & ex.Message)
End Try End Try
Try Try
USER_RIGHT3 = DT_CHECKUSER_MODULE.Rows(0).Item("USER_RIGHT3") USER_RIGHT3 = DT_CHECKUSER_MODULE.Rows(0).Item("USER_RIGHT3")
Catch ex As Exception Catch ex As Exception
USER_RIGHT3 = False USER_RIGHT3 = False
LOGGER.Info("⚠️ Error in USER_RIGHT3: " & ex.Message)
End Try End Try
Try Try
USER_RIGHT4 = DT_CHECKUSER_MODULE.Rows(0).Item("USER_RIGHT4") USER_RIGHT4 = DT_CHECKUSER_MODULE.Rows(0).Item("USER_RIGHT4")
Catch ex As Exception Catch ex As Exception
USER_RIGHT4 = False USER_RIGHT4 = False
LOGGER.Info("⚠️ Error in USER_RIGHT4: " & ex.Message)
End Try End Try
LOGGER.Debug("User exists....") LOGGER.Debug("User exists....")

View File

@@ -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("3.0.0.0")> <Assembly: AssemblyVersion("3.1.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: NeutralResourcesLanguage("")> <Assembly: NeutralResourcesLanguage("")>

View File

@@ -316,8 +316,8 @@
<Reference Include="Mail"> <Reference Include="Mail">
<HintPath>M:\Bibliotheken\3rdParty\Limilabs\Mail.dll</HintPath> <HintPath>M:\Bibliotheken\3rdParty\Limilabs\Mail.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.5\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.9\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Bcl.Cryptography, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="Microsoft.Bcl.Cryptography, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Cryptography.10.0.5\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.Cryptography.10.0.5\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
@@ -326,6 +326,24 @@
<HintPath>..\packages\Microsoft.Bcl.HashCode.6.0.0\lib\net462\Microsoft.Bcl.HashCode.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.HashCode.6.0.0\lib\net462\Microsoft.Bcl.HashCode.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Logging.10.0.0\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.10.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Options, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Options.10.0.0\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Primitives.10.0.0\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Identity.Client, Version=4.55.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL"> <Reference Include="Microsoft.Identity.Client, Version=4.55.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Identity.Client.4.55.0\lib\net461\Microsoft.Identity.Client.dll</HintPath> <HintPath>..\packages\Microsoft.Identity.Client.4.55.0\lib\net461\Microsoft.Identity.Client.dll</HintPath>
</Reference> </Reference>
@@ -385,6 +403,9 @@
<Reference Include="System.Data.OracleClient" /> <Reference Include="System.Data.OracleClient" />
<Reference Include="System.Deployment" /> <Reference Include="System.Deployment" />
<Reference Include="System.Design" /> <Reference Include="System.Design" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=10.0.0.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.10.0.9\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.DirectoryServices" /> <Reference Include="System.DirectoryServices" />
<Reference Include="System.DirectoryServices.AccountManagement" /> <Reference Include="System.DirectoryServices.AccountManagement" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />

View File

@@ -25,6 +25,7 @@ Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback
Imports DigitalData.Modules.Windream Imports DigitalData.Modules.Windream
Imports DigitalData.Modules.ZooFlow Imports DigitalData.Modules.ZooFlow
Imports GdPicture.Internal.CAD.DWG.Entities Imports GdPicture.Internal.CAD.DWG.Entities
Imports System.Runtime.InteropServices
Public Class frmMain Public Class frmMain
Private Property FormHelper As FormHelper Private Property FormHelper As FormHelper
@@ -1957,7 +1958,7 @@ Public Class frmMain
Dim foundRow As DataRow = CURRENT_DT_PROFILES.Select(expression).FirstOrDefault() Dim foundRow As DataRow = CURRENT_DT_PROFILES.Select(expression).FirstOrDefault()
If foundRow Is Nothing Then If foundRow Is Nothing Then
LOGGER.Warn($"LoadProfileData for Profile-ID [{CURRENT_CLICKED_PROFILE_ID}] - Title [{CURRENT_CLICKED_PROFILE_TITLE}] not found - exiting Decide_Load") LOGGER.Warn($"LoadProfileData for Profile-ID [{CURRENT_CLICKED_PROFILE_ID}] - Title [{CURRENT_CLICKED_PROFILE_TITLE}] not found - exiting")
Return False Return False
End If End If
@@ -1968,25 +1969,45 @@ Public Class frmMain
viewUpdateStarted = True viewUpdateStarted = True
End If End If
' ========== SQL VORBEREITEN UND AUSFÜHREN ========== ' ===== PRIORISIERUNG: TreeList-SQL (COCKPIT_PROFILE_SQL) VOR Datenbank-SQL (SQL_VIEW) =====
Dim oSQL = foundRow.Item("SQL_VIEW") Dim oSQL As String = String.Empty
If Len(oSQL) = 0 Then
LOGGER.Debug($"LoadProfileData for Profile-ID [{CURRENT_CLICKED_PROFILE_ID}] - Title [{CURRENT_CLICKED_PROFILE_TITLE}] has empty SQL_VIEW ...")
If Len(COCKPIT_PROFILE_SQL) > 0 Then
oSQL = COCKPIT_PROFILE_SQL
LOGGER.Debug($"Using COCKPIT_PROFILE_SQL for Profile-ID [{CURRENT_CLICKED_PROFILE_ID}] - Title [{CURRENT_CLICKED_PROFILE_TITLE}]")
End If
End If
oSQL = PrepareSQLWithReplacements(oSQL, CURRENT_CLICKED_PROFILE_ID)
' 1⃣ ERSTE PRIORITÄT: SQL aus TreeList-Knoten
If Not String.IsNullOrWhiteSpace(COCKPIT_PROFILE_SQL) Then
oSQL = COCKPIT_PROFILE_SQL
LOGGER.Debug($"LoadProfileData: Using COCKPIT_PROFILE_SQL from TreeList node")
' 2⃣ FALLBACK: SQL aus Datenbank-Tabelle (nur wenn TreeList-SQL fehlt)
Else
oSQL = foundRow.Item("SQL_VIEW")?.ToString()
LOGGER.Debug($"LoadProfileData: SQL_VIEW from foundRow = [{oSQL}]")
' Prüfen ob SQL leer oder "select 'NONE'" ist
If String.IsNullOrWhiteSpace(oSQL) OrElse oSQL.Trim().ToUpper() = "SELECT 'NONE'" Then
LOGGER.Warn($"⚠️ LoadProfileData: Both COCKPIT_PROFILE_SQL and SQL_VIEW are empty/invalid for Profile-ID [{CURRENT_CLICKED_PROFILE_ID}]")
NO_WORKFLOW_ITEMS = True
GridControlWorkflows.Visible = False
bindsourcegrid.DataSource = Nothing
GridControlWorkflows.DataSource = Nothing
Return False
End If
LOGGER.Debug($"LoadProfileData: COCKPIT_PROFILE_SQL empty - using SQL_VIEW from database as fallback")
End If
' ===== SQL NACH allen Ersetzungen loggen =====
LOGGER.Debug($"LoadProfileData: Final SQL BEFORE PrepareSQLWithReplacements: [{oSQL}]")
oSQL = PrepareSQLWithReplacements(oSQL, CURRENT_CLICKED_PROFILE_ID)
LOGGER.Debug($"LoadProfileData: Final SQL AFTER PrepareSQLWithReplacements: [{oSQL}]")
' ===== DATEN ABRUFEN =====
DT_CURR_WF_ITEMS = Await DatabaseFallback.GetDatatableECMAsync(oSQL) DT_CURR_WF_ITEMS = Await DatabaseFallback.GetDatatableECMAsync(oSQL)
If IsNothing(DT_CURR_WF_ITEMS) Then If IsNothing(DT_CURR_WF_ITEMS) Then
LOGGER.Warn($"LoadProfileData for Profile-ID [{CURRENT_CLICKED_PROFILE_ID}] - Title [{CURRENT_CLICKED_PROFILE_TITLE}] failed - exiting Decide_Load") LOGGER.Warn($"LoadProfileData for Profile-ID [{CURRENT_CLICKED_PROFILE_ID}] - Title [{CURRENT_CLICKED_PROFILE_TITLE}] failed - exiting")
Return False Return False
End If End If
' ========== DATEN VERARBEITEN ========== ' ===== DATEN VERARBEITEN =====
NO_WORKFLOW_ITEMS = (DT_CURR_WF_ITEMS.Rows.Count = 0) NO_WORKFLOW_ITEMS = (DT_CURR_WF_ITEMS.Rows.Count = 0)
UpdateGridCaption() UpdateGridCaption()
@@ -1997,8 +2018,10 @@ Public Class frmMain
LOGGER.Info("Keine Workflow-Items für Profil: " & CURRENT_CLICKED_PROFILE_TITLE) LOGGER.Info("Keine Workflow-Items für Profil: " & CURRENT_CLICKED_PROFILE_TITLE)
Return False Return False
End If End If
GridControlWorkflows_Visible() GridControlWorkflows_Visible()
' ========== BASIC VIEW ERSTELLEN ==========
' ===== BASIC VIEW ERSTELLEN =====
Await CreateBasicViewForProfile() Await CreateBasicViewForProfile()
LOGGER.Debug("Basic View für Profil erstellt: " & CURRENT_CLICKED_PROFILE_TITLE) LOGGER.Debug("Basic View für Profil erstellt: " & CURRENT_CLICKED_PROFILE_TITLE)
Return True Return True
@@ -2162,6 +2185,7 @@ Public Class frmMain
End Sub End Sub
Private Async Function CreateBasicViewForProfile() As Task Private Async Function CreateBasicViewForProfile() As Task
' ===== GRID DATASOURCE ZURÜCKSETZEN =====
GridControlWorkflows.DataSource = Nothing GridControlWorkflows.DataSource = Nothing
Try Try
GridViewWorkflows.Columns.Clear() GridViewWorkflows.Columns.Clear()
@@ -2170,31 +2194,50 @@ Public Class frmMain
LOGGER.Warn("⚠️ Could not clear GridViewWorkflows.Columns") LOGGER.Warn("⚠️ Could not clear GridViewWorkflows.Columns")
End Try End Try
' ===== ICON-SPALTE VORBEREITEN =====
Await Task.Run(Sub() PrepareIconColumn()) Await Task.Run(Sub() PrepareIconColumn())
' ===== DATASOURCE ZUWEISEN =====
bindsourcegrid.DataSource = DT_CURR_WF_ITEMS bindsourcegrid.DataSource = DT_CURR_WF_ITEMS
GridControlWorkflows.DataSource = bindsourcegrid GridControlWorkflows.DataSource = bindsourcegrid
' ✅ KRITISCH: Grid zwingen, Columns zu erstellen BEVOR RestoreLayout
GridControlWorkflows.ForceInitialize()
' ✅ Wenn kein gespeichertes Layout existiert → Columns manuell populieren
Dim oXmlPath As String = GetLayoutName_GridMain()
If Not System.IO.File.Exists(oXmlPath) Then
LOGGER.Debug($"CreateBasicViewForProfile: No layout file found at [{oXmlPath}] - populating columns")
GridViewWorkflows.PopulateColumns()
End If
' ===== LAYOUT WIEDERHERSTELLEN =====
RestoreLayout() RestoreLayout()
COLUMNS_INVISIBLE() COLUMNS_INVISIBLE()
' ===== GRUPPIERUNG FÜR PROFIL-ANSICHT ENTFERNEN ===== ' ===== GRUPPIERUNG FÜR PROFIL-ANSICHT ENTFERNEN =====
' Profil-Ansichten dürfen nicht gruppiert sein - Gruppierung ggf. aus gespeichertem Layout entfernen
If GridViewWorkflows.GroupCount > 0 Then If GridViewWorkflows.GroupCount > 0 Then
LOGGER.Debug($"CreateBasicViewForProfile: Clearing [{GridViewWorkflows.GroupCount}] group(s) from restored layout for profile view") LOGGER.Debug($"CreateBasicViewForProfile: Clearing [{GridViewWorkflows.GroupCount}] group(s) from restored layout for profile view")
GridViewWorkflows.ClearGrouping() GridViewWorkflows.ClearGrouping()
End If End If
' Icon-Spalte konfigurieren ' ===== ICON-SPALTE KONFIGURIEREN =====
If TL_ICON = True Then If TL_ICON = True Then
Try Try
GridViewWorkflows.Columns.Item("ICON").MaxWidth = 24 If GridViewWorkflows.Columns.ColumnByFieldName("ICON") IsNot Nothing Then
GridViewWorkflows.Columns.Item("ICON").MinWidth = 24 GridViewWorkflows.Columns.Item("ICON").MaxWidth = 24
GridViewWorkflows.Columns.Item("ICON").AppearanceCell.BackColor = Color.White GridViewWorkflows.Columns.Item("ICON").MinWidth = 24
GridViewWorkflows.Columns.Item("ICON").Fixed = FixedStyle.Left GridViewWorkflows.Columns.Item("ICON").AppearanceCell.BackColor = Color.White
GridViewWorkflows.Columns.Item("ICON").Fixed = FixedStyle.Left
GridViewWorkflows.Columns.Item("ICON").VisibleIndex = 0 ' ✅ Ganz links
End If
Catch ex As Exception Catch ex As Exception
LOGGER.Warn($"Could not configure ICON column: {ex.Message}")
End Try End Try
End If End If
' ✅ DEBUG: Spalten-Info loggen
LOGGER.Debug($"CreateBasicViewForProfile: Grid has [{GridViewWorkflows.Columns.Count}] columns, DataSource has [{DT_CURR_WF_ITEMS.Rows.Count}] rows")
End Function End Function
Private Sub ApplyPostLoadSettings() Private Sub ApplyPostLoadSettings()
@@ -2341,7 +2384,8 @@ Public Class frmMain
MsgBox("Could not get a Profile - Check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) MsgBox("Could not get a Profile - Check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
Exit Sub Exit Sub
End If End If
LOGGER.Debug($"Load_Profil_from_Grid: Loaded profile [{CURRENT_ProfilName}] with GUID [{CURRENT_ProfilGUID}]")
LOGGER.Debug($"Load_Profil_from_Grid: PROFILE_SHOW_DOCUMENT = [{PROFILE_SHOW_DOCUMENT}]")
' ========== SEARCH DOCUMENTS PREPARATION ========== ' ========== SEARCH DOCUMENTS PREPARATION ==========
oExpression = $"PROFILE_ID = {CURRENT_ProfilGUID} " oExpression = $"PROFILE_ID = {CURRENT_ProfilGUID} "
DT_FILTERED_PROFILE_SEARCHES_DOC = Nothing DT_FILTERED_PROFILE_SEARCHES_DOC = Nothing
@@ -2395,7 +2439,7 @@ Public Class frmMain
End If End If
Next Next
Catch ex As Exception Catch ex As Exception
LOGGER.Warn("⚠️ Unexpected Error in Removing Row after Loading Record from Grid: " & ex.Message) LOGGER.Warn("⚠️ Unexpected Error In Removing Row after Loading Record from Grid: " & ex.Message)
End Try End Try
' ========== TIMER RE-ENABLE ========== ' ========== TIMER RE-ENABLE ==========
@@ -3470,7 +3514,7 @@ Public Class frmMain
FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_GET_ACTIVE_PROFILES_USER] ({USER_ID}))" FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_GET_ACTIVE_PROFILES_USER] ({USER_ID}))"
End If End If
LOGGER.Debug($"VWPM_PROFILE_ACTIVE-SELECT: {oSQL}")
CURR_DT_VWPM_PROFILE_ACTIVE = DatabaseFallback.GetDatatableECM(oSQL) CURR_DT_VWPM_PROFILE_ACTIVE = DatabaseFallback.GetDatatableECM(oSQL)
CURR_DT_VWPM_PROFILE_AH_WORKFLOW = CURR_DT_VWPM_PROFILE_ACTIVE.Copy CURR_DT_VWPM_PROFILE_AH_WORKFLOW = CURR_DT_VWPM_PROFILE_ACTIVE.Copy
CURR_DT_VWPM_PROFILE_AH_WORKFLOW.Clear() CURR_DT_VWPM_PROFILE_AH_WORKFLOW.Clear()
@@ -4613,6 +4657,9 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G
Else Else
LOGGER.Debug($"TreeList_Cockpit: Overview SQL query to be used: [{oSqlQuery}]") LOGGER.Debug($"TreeList_Cockpit: Overview SQL query to be used: [{oSqlQuery}]")
End If End If
' ✅ NEU: Verifizieren Sie die Zuweisung
LOGGER.Debug($"TreeList_Cockpit: COCKPIT_PROFILE_SQL after assignment: [{COCKPIT_PROFILE_SQL}]")
LOGGER.Debug($"TreeList_Cockpit: COCKPIT_PROFILE_SQL.Length = [{COCKPIT_PROFILE_SQL.Length}]")
CURRENT_CLICKED_PROFILE_ID = 0 CURRENT_CLICKED_PROFILE_ID = 0
CUSTOM_OVERVIEW_SQL = oSqlQuery.ToString() CUSTOM_OVERVIEW_SQL = oSqlQuery.ToString()
_lastUsedOverviewSQL = CUSTOM_OVERVIEW_SQL ' ← SQL merken BEVOR es gelöscht wird _lastUsedOverviewSQL = CUSTOM_OVERVIEW_SQL ' ← SQL merken BEVOR es gelöscht wird
@@ -4730,28 +4777,40 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G
End If End If
COCKPIT_CHART_ID = oCHART_ID COCKPIT_CHART_ID = oCHART_ID
Dim oHandleChart As Object = Nothing ' ✅ KEIN Overlay bei Dashboard (verhindert Fokus-Raub)
Dim overlayChart As Boolean = False
If Not _overlayActive Then
oHandleChart = SplashScreenManager.ShowOverlayForm(Me)
_overlayActive = True
overlayChart = True
End If
Me.Cursor = Cursors.WaitCursor Me.Cursor = Cursors.WaitCursor
Try Try
If Not Application.OpenForms().OfType(Of frmInvDashboard).Any Then ' ===== SCHRITT 1: Dashboard öffnen/referenzieren =====
frmInvDashboard.Show() Dim dashboardForm As frmInvDashboard
If Application.OpenForms().OfType(Of frmInvDashboard).Any Then
' Dashboard ist bereits offen
dashboardForm = Application.OpenForms().OfType(Of frmInvDashboard).First()
LOGGER.Debug("TreeList_Cockpit: Dashboard already open - reusing existing instance")
Else
' Dashboard neu öffnen
dashboardForm = New frmInvDashboard()
dashboardForm.Show()
LOGGER.Debug("TreeList_Cockpit: Dashboard opened new instance")
End If End If
' ===== SCHRITT 2: Garantierte Vordergrund-Aktivierung =====
' TopMost temporär setzen (wird sofort wieder entfernt)
dashboardForm.TopMost = True
dashboardForm.TopMost = False
' Aktivieren und Fokus setzen
dashboardForm.Activate()
dashboardForm.BringToFront()
dashboardForm.Focus()
' ===== SCHRITT 3: Windows-API als Fallback (optional) =====
' Falls DevExpress hartnäckig ist
NativeMethods.SetForegroundWindow(dashboardForm.Handle)
Finally Finally
Me.Cursor = Cursors.Default Me.Cursor = Cursors.Default
If overlayChart Then
_overlayActive = False
SplashScreenManager.CloseOverlayForm(oHandleChart)
End If
End Try End Try
' ✅ BeginInvoke stellt Activate() ans Ende der Message-Queue
' nach DevExpress' internem Fokus-Restore
Me.BeginInvoke(Sub() frmInvDashboard.Activate())
Case Else Case Else
LOGGER.Warn($"ProcessTreeListNodeAsync: Unhandled TYPE_ID [{oTypeIdInt}] - PK_CFG_COCKPIT_DEFINITION_ID:[{oCockpitConfigID}]") LOGGER.Warn($"ProcessTreeListNodeAsync: Unhandled TYPE_ID [{oTypeIdInt}] - PK_CFG_COCKPIT_DEFINITION_ID:[{oCockpitConfigID}]")
@@ -5007,5 +5066,17 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G
End Try End Try
End Sub End Sub
' ===== AM ENDE DER DATEI (vor "End Class") =====
Friend NotInheritable Class NativeMethods
<DllImport("user32.dll")>
Public Shared Function SetForegroundWindow(hWnd As IntPtr) As Boolean
End Function
<DllImport("user32.dll")>
Public Shared Function ShowWindow(hWnd As IntPtr, nCmdShow As Integer) As Boolean
End Function
Public Const SW_RESTORE As Integer = 9
End Class
End Class End Class

View File

@@ -616,7 +616,7 @@
<value>DocumentViewer1</value> <value>DocumentViewer1</value>
</data> </data>
<data name="&gt;&gt;DocumentViewer1.Type" xml:space="preserve"> <data name="&gt;&gt;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.3.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;DocumentViewer1.Parent" xml:space="preserve"> <data name="&gt;&gt;DocumentViewer1.Parent" xml:space="preserve">
<value>SplitContainer1.Panel2</value> <value>SplitContainer1.Panel2</value>

View File

@@ -4643,6 +4643,7 @@ Public Class frmValidator
If USER_RIGHT_VIEW_ONLY = True Then If USER_RIGHT_VIEW_ONLY = True Then
RibbonPageFile.Visible = False RibbonPageFile.Visible = False
LOGGER.Debug("User has view-only rights, hiding RibbonPageFile.")
Else Else
RibbonPageFile.Visible = True RibbonPageFile.Visible = True
End If End If
@@ -8810,4 +8811,15 @@ Public Class frmValidator
CONFIG.Config.NOTES_ONCLICK = bchkitmNotes.Checked CONFIG.Config.NOTES_ONCLICK = bchkitmNotes.Checked
CONFIG.Save() CONFIG.Save()
End Sub End Sub
Private Sub BarButtonItemFileView_ItemClick(sender As Object, e As ItemClickEventArgs) Handles BarButtonItemFileView.ItemClick
If DocPathWindows <> "" Then
Try
Process.Start(DocPathWindows)
Catch ex As Exception
LOGGER.Error(ex)
End Try
End If
End Sub
End Class End Class

View File

@@ -9,10 +9,16 @@
<package id="GdPicture.runtimes.windows" version="14.4.4" targetFramework="net462" /> <package id="GdPicture.runtimes.windows" version="14.4.4" targetFramework="net462" />
<package id="Google.Protobuf" version="3.33.2" targetFramework="net462" /> <package id="Google.Protobuf" version="3.33.2" targetFramework="net462" />
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" /> <package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.5" targetFramework="net462" /> <package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.9" targetFramework="net462" />
<package id="Microsoft.Bcl.Cryptography" version="10.0.5" targetFramework="net462" /> <package id="Microsoft.Bcl.Cryptography" version="10.0.5" targetFramework="net462" />
<package id="Microsoft.Bcl.HashCode" version="6.0.0" targetFramework="net462" /> <package id="Microsoft.Bcl.HashCode" version="6.0.0" targetFramework="net462" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" /> <package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
<package id="Microsoft.Extensions.DependencyInjection" version="10.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="10.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Logging" version="10.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="10.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Options" version="10.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Primitives" version="10.0.0" targetFramework="net462" />
<package id="Microsoft.Identity.Client" version="4.55.0" targetFramework="net462" /> <package id="Microsoft.Identity.Client" version="4.55.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Abstractions" version="6.22.0" targetFramework="net462" /> <package id="Microsoft.IdentityModel.Abstractions" version="6.22.0" targetFramework="net462" />
<package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" /> <package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" />
@@ -29,6 +35,7 @@
<package id="System.CodeDom" version="9.0.0" targetFramework="net462" /> <package id="System.CodeDom" version="9.0.0" targetFramework="net462" />
<package id="System.Collections.Immutable" version="10.0.5" targetFramework="net462" /> <package id="System.Collections.Immutable" version="10.0.5" targetFramework="net462" />
<package id="System.Data.Odbc" version="6.0.1" targetFramework="net462" /> <package id="System.Data.Odbc" version="6.0.1" targetFramework="net462" />
<package id="System.Diagnostics.DiagnosticSource" version="10.0.9" targetFramework="net462" />
<package id="System.Formats.Asn1" version="10.0.5" targetFramework="net462" /> <package id="System.Formats.Asn1" version="10.0.5" targetFramework="net462" />
<package id="System.IO.Packaging" version="10.0.5" targetFramework="net462" /> <package id="System.IO.Packaging" version="10.0.5" targetFramework="net462" />
<package id="System.IO.Pipelines" version="10.0.5" targetFramework="net462" /> <package id="System.IO.Pipelines" version="10.0.5" targetFramework="net462" />