Personalakte und ComputerAppConfig Fehler

This commit is contained in:
Developer01
2025-06-05 15:36:50 +02:00
parent b4631d8af8
commit 0159fa79c4
18 changed files with 356 additions and 368 deletions

View File

@@ -89,8 +89,18 @@ Public Class ClassDocGrid
Return oSelectedRows.Count = 0
End Function
Public Shared Function GetSelectedDocuments(pGridView As GridView) As List(Of clsWMDoc)
Dim oSelectedRows As List(Of Integer) = pGridView.GetSelectedRows().ToList()
Public Shared Function GetSelectedDocuments(pGridView As GridView, Optional pGetFirst As Boolean = False) As List(Of clsWMDoc)
Dim oSelectedRows As List(Of Integer)
If pGridView.RowCount = 0 Then
Return Nothing
End If
If pGetFirst = True Then
pGridView.FocusedRowHandle = 0
oSelectedRows = New List(Of Integer) From {0}
Else
oSelectedRows = pGridView.GetSelectedRows().ToList()
End If
Dim oDocuments As New List(Of clsWMDoc)
For Each oRowHandle In oSelectedRows

View File

@@ -7,18 +7,23 @@ Public Class ClassHelper
Private Shared BW_DocID As Integer
Public Shared Function FORMAT_WM_PATH(WMpath As String)
Try
Dim ochanged As Boolean = False
If WMpath.StartsWith("W:") Then
WMpath = WMpath.Replace("W:", WMPATH_PREFIX)
ochanged = True
ElseIf WMpath.StartsWith("\") Then
If WMpath.StartsWith(WMPATH_PREFIX) = False Then
WMpath = WMPATH_PREFIX & WMpath
If Not IsNothing(WMpath) Then
Dim ochanged As Boolean = False
If WMpath.StartsWith("W:") Then
WMpath = WMpath.Replace("W:", WMPATH_PREFIX)
ochanged = True
ElseIf WMpath.StartsWith("\") Then
If WMpath.StartsWith(WMPATH_PREFIX) = False Then
WMpath = WMPATH_PREFIX & WMpath
ochanged = True
End If
End If
LOGGER.Debug("WMpath is: " & WMpath)
Return WMpath
Else
Return Nothing
End If
LOGGER.Debug("WMpath is: " & WMpath)
Return WMpath
Catch ex As Exception
Return WMpath
End Try

View File

@@ -11,24 +11,29 @@ Public Class ClassInit
Public Sub InitLoggerANDConfig()
Try
Dim oLocalUserAppDataPath As String = Application.LocalUserAppDataPath
LOGCONFIG = New LogConfig(LogConfig.PathType.AppData, oLocalUserAppDataPath & "\Log", Nothing,
LOGCONFIG = New LogConfig(LogConfig.PathType.AppData,
oLocalUserAppDataPath & "\Log", Nothing,
My.Application.Info.CompanyName,
My.Application.Info.ProductName)
LOGGER = LOGCONFIG.GetLogger()
LOGGER.Info("orgFLOW started")
Dim oUserAppDataPath As String = Application.UserAppDataPath
Dim oLegacyAppDataPath As String = Application.UserAppDataPath
Dim oCommonAppDataPath = Application.CommonAppDataPath
LOGGER.Debug($"oCommonAppDataPath: {oCommonAppDataPath}")
Dim oStartupPath = Application.StartupPath
' If AppConfig from Startup Path should be forced, rewrite the common app data path
If My.Settings.UseAppConfigConString = True Then
If My.Settings.UseAppConfig = True Then
oCommonAppDataPath = oStartupPath
LOGGER.Info($"Achtung: Anstatt ComputerConfig wird AppConfig-/Startup-Path ({oCommonAppDataPath}) benutzt! (UseAppConfig in Appdata)")
End If
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, oCommonAppDataPath, oStartupPath)
LOGGER.Info("Config loaded")
LOGGER.Debug("Config loaded")
LOGGER.Debug($"oUserAppDataPath: {oUserAppDataPath}")
LOGGER.Debug($"oCommonAppDataPath: {oCommonAppDataPath}")
Try
If CONFIG.Config.ConnectionString <> String.Empty Then
LOGGER.Debug("Connection String loaded")

View File

@@ -1,7 +1,9 @@
Imports System.ComponentModel
Imports System.Data.SqlClient
Imports System.Drawing.Design
Imports System.Windows.Forms
Imports System.Windows.Forms.Design
Imports DigitalData.GUIs.Common
Public Class ClassSQLEditor
Inherits UITypeEditor
@@ -14,19 +16,26 @@ Public Class ClassSQLEditor
Public Overrides Function EditValue(context As ITypeDescriptorContext, provider As IServiceProvider, value As Object) As Object
'Return MyBase.EditValue(context, provider, value)
Dim svc As IWindowsFormsEditorService = TryCast(provider.GetService(GetType(IWindowsFormsEditorService)), IWindowsFormsEditorService)
Dim SQLSTring As String = DirectCast(value, SQLValue).Value
Dim SQLString As String = DirectCast(value, SQLValue).Value
'If svc IsNot Nothing AndAlso SQLSTring IsNot Nothing Then
' Using Form As New frmSQLEditor()
' Form.Value = SQLSTring
' If svc.ShowDialog(Form) = DialogResult.OK Then
' Dim sql As New SQLValue(Form.Value)
' value = sql
' End If
' End Using
'End If
If svc IsNot Nothing AndAlso SQLString IsNot Nothing Then
Dim oForm2 As New DigitalData.GUIs.Common.frmSQLEditor(LOGCONFIG, MYDB_ECM) With {
.SQLCommand = SQLString
}
Dim oResult = oForm2.ShowDialog()
If oResult = DialogResult.OK Then
Dim oSql As New SQLValue(oForm2.SQLCommand)
value = oSql
SQLString = oForm2.SQLCommand
End If
End If
If Not IsNothing(value) Then
Return value
Else
Return Nothing
End If
Return ""
End Function
End Class