2.7.9 an WISAG ausgegeben
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
Imports DLLLicenseManager
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback
|
||||
Imports DigitalData.Modules.EDMI.API.Constants
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports DigitalData.Modules.EDMI.API.Constants
|
||||
Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DLLLicenseManager
|
||||
Imports DocumentFormat.OpenXml.Spreadsheet
|
||||
|
||||
Public Class ClassInit
|
||||
Public _lizenzManager As ClassLicenseManager
|
||||
@@ -20,21 +21,16 @@ Public Class ClassInit
|
||||
My.Application.Info.CompanyName,
|
||||
My.Application.Info.ProductName)
|
||||
|
||||
|
||||
LOGGER = LOGCONFIG.GetLogger("taskFLOW")
|
||||
|
||||
LOGGER.Info("## taskFLOW started - {0}", Now)
|
||||
Try
|
||||
Dim directory As New IO.DirectoryInfo(Application.LocalUserAppDataPath & "\Log")
|
||||
|
||||
For Each file As IO.FileInfo In directory.GetFiles
|
||||
If (Now - file.CreationTime).Days > 29 Then
|
||||
file.Delete()
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -59,6 +55,15 @@ Public Class ClassInit
|
||||
|
||||
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, oCommonAppDataPath, oStartupPath)
|
||||
LOGGER.Info("ConfigManager loaded")
|
||||
LOGGER.Info($"oUserAppDataPath will be: {oUserAppDataPath}")
|
||||
|
||||
If oStartupPath <> oCommonAppDataPath Then
|
||||
LOGGER.Info($"oCommonAppDataPath will be: {oCommonAppDataPath}")
|
||||
LOGGER.Info($"oStartupPath will be: {oStartupPath}")
|
||||
Else
|
||||
LOGGER.Info($"oStartupPath is the same as oCommonAppDataPath: {oCommonAppDataPath}")
|
||||
End If
|
||||
|
||||
Try
|
||||
If CONFIG.Config.ConnectionStringTest <> String.Empty And CONFIG.Config.TestMode = True Then
|
||||
LOGGER.Debug("Test Connection String loaded")
|
||||
@@ -85,11 +90,11 @@ Public Class ClassInit
|
||||
|
||||
LOGGER.Info($"EDMIAppServer [{CONFIG.Config.EDMIAppServer}] is active!")
|
||||
Else
|
||||
LOGGER.Warn($"#### !!! Could not Connect to APPServer [{CONFIG.Config.EDMIAppServer}]!!! ###")
|
||||
LOGGER.Warn($"#### ⚠️ !!! Could not Connect to APPServer [{CONFIG.Config.EDMIAppServer}]!!! ###")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn($"Could not initialize the AppServer: {ex.Message}")
|
||||
LOGGER.Warn($"⚠️ Could not initialize the AppServer: {ex.Message}")
|
||||
End Try
|
||||
|
||||
Else
|
||||
@@ -244,12 +249,12 @@ Public Class ClassInit
|
||||
Try
|
||||
oLICDATE = CDate(split(1))
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn($"Error Converting Value {split(1)} to DATE")
|
||||
LOGGER.Warn($"⚠️ Error Converting Value {split(1)} to DATE")
|
||||
Try
|
||||
Dim expenddt As Date = Date.ParseExact(split(1), "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||
oLICDATE = expenddt
|
||||
Catch ex1 As Exception
|
||||
LOGGER.Warn($"Second Error Converting DATE with ParseExact - Setting Date = Today")
|
||||
LOGGER.Warn($"⚠️Second Error Converting DATE with ParseExact - Setting Date = Today")
|
||||
oLICDATE = Now.Date
|
||||
End Try
|
||||
|
||||
@@ -356,6 +361,7 @@ Public Class ClassInit
|
||||
USER_EMAIL = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_EMAIL")), "", DT_CHECKUSER_MODULE.Rows(0).Item("USER_EMAIL"))
|
||||
USER_LANGUAGE = DT_CHECKUSER_MODULE.Rows(0).Item("USER_LANGUAGE")
|
||||
|
||||
USER_MODULE_ID = DT_CHECKUSER_MODULE.Rows(0).Item("MODULE_ID")
|
||||
|
||||
|
||||
USER_IN_MODULE = DT_CHECKUSER_MODULE.Rows(0).Item("MODULE_ACCESS")
|
||||
@@ -385,7 +391,7 @@ Public Class ClassInit
|
||||
USER_RIGHT_FILE_DELETE = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_RIGHT_FILE_DEL")), False, DT_CHECKUSER_MODULE.Rows(0).Item("USER_RIGHT_FILE_DEL"))
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Error in USER_RIGHT_FILE_DELETE: " & ex.Message)
|
||||
LOGGER.Warn("⚠️ Error in USER_RIGHT_FILE_DELETE: " & ex.Message)
|
||||
USER_RIGHT_FILE_DELETE = False
|
||||
End Try
|
||||
USER_DATE_FORMAT = DT_CHECKUSER_MODULE.Rows(0).Item("USER_DATE_FORMAT")
|
||||
@@ -525,7 +531,10 @@ Public Class ClassInit
|
||||
oSql = "SELECT * FROM TBDD_COLUMNS_FORMAT WHERE MODULE = 'taskFLOW' AND GRIDVIEW = 'GridViewWorkflows'"
|
||||
BASEDATA_TBDD_COLUMNS_FORMAT = DatabaseFallback.GetDatatable("TBDD_COLUMNS_FORMAT", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
||||
|
||||
|
||||
|
||||
oStopWatch.Done()
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info($"Unexpected Error in InitBasics - last Step [{oStep}]: {ex.Message}", True)
|
||||
@@ -546,6 +555,48 @@ Public Class ClassInit
|
||||
LOGGER.Warn($"no profiles for user: '{USER_USERNAME}' configured - Check SQL [{oSql}]!", False)
|
||||
End If
|
||||
|
||||
oSql = "SELECT KEY_NAME, VALUE_TEXT1
|
||||
FROM TBDD_USER_KEY_VALUE_PAIR
|
||||
WHERE FK_USER_ID = " & USER_ID & " And [FK_MODULE_ID] = '" & USER_MODULE_ID & "'"
|
||||
|
||||
Dim oDT_USER_KEY_VALUE_PAIR As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSql, DatabaseType.ECM))
|
||||
If UserInheritance_ConfirmationByColumn Is Nothing Then
|
||||
UserInheritance_ConfirmationByColumn = New List(Of UserInheritanceConfirmation)()
|
||||
End If
|
||||
If Not IsNothing(oDT_USER_KEY_VALUE_PAIR) Then
|
||||
For Each row As DataRow In oDT_USER_KEY_VALUE_PAIR.Rows
|
||||
Dim keyName As String = row("KEY_NAME").ToString()
|
||||
|
||||
' Prüfe ob es sich um einen Inheritance-Key handelt
|
||||
If keyName.StartsWith("INHERITANCE_CONFIRM_") Then
|
||||
Dim columnName As String = keyName.Replace("INHERITANCE_CONFIRM_", "")
|
||||
Dim countValue As Integer = Integer.Parse(row("VALUE_TEXT1").ToString())
|
||||
|
||||
Dim existingEntry = UserInheritance_ConfirmationByColumn.FirstOrDefault(
|
||||
Function(e) String.Equals(e.ColumnName, columnName, StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
If existingEntry IsNot Nothing Then
|
||||
existingEntry.Count = countValue
|
||||
Else
|
||||
UserInheritance_ConfirmationByColumn.Add(
|
||||
New UserInheritanceConfirmation With {
|
||||
.ColumnName = columnName,
|
||||
.Count = countValue
|
||||
})
|
||||
End If
|
||||
|
||||
LOGGER.Debug("Loaded inheritance confirmation for column [{0}] with count [{1}]", columnName, countValue)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
LOGGER.Warn("⚠️ oDT_USER_KEY_VALUE_PAIR is nothing")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
oStopWatch.Done()
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
|
||||
Reference in New Issue
Block a user