MS clswindream entfernt Umstieg auf Modulwindream

This commit is contained in:
Developer01
2024-11-21 18:02:41 +01:00
parent b5ab9c5e1f
commit f05f6d46f8
85 changed files with 416997 additions and 1790 deletions

View File

@@ -1,7 +1,4 @@
Imports System.IO
Imports DD_LIB_Standards
Imports DevExpress.DataAccess.Native
Imports DevExpress.XtraRichEdit.API.Native
Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
@@ -74,7 +71,6 @@ Public Class ClassInit
If LoadFileExclusion() = False Then
MsgBox("The Exclude File Structure for files in Folderwatch could not be initialized!", MsgBoxStyle.Information)
End If
clsDatabase.GUI = True
If CONFIG.Config.ConnectionString <> String.Empty Then
LOGGER.Debug("Connection String from CONFIG")
MyConnectionString = DecryptConnectionString(CONFIG.Config.ConnectionString)
@@ -89,23 +85,18 @@ Public Class ClassInit
frmConfig_Basic.ShowDialog()
' dbResult = clsDatabase.Init(MyConnectionString)
End If
If ClassProxy.MyPROXYConnectionString <> String.Empty Then
If clsDatabase.Init(ClassProxy.MyPROXYConnectionString, True) = False Then
ClassHelper.MSGBOX_Handler("ERROR", "", "Error while Initializing proxyserver - Check logfile")
Else
Dim csb As New SqlClient.SqlConnectionStringBuilder
csb.ConnectionString = ClassProxy.MyPROXYConnectionString
ClassHelper.InsertEssential_Log(USER_GUID, "USER-ID", String.Format("Proxy-Server {0} - Database {1} is used", csb.DataSource, csb.InitialCatalog))
End If
End If
'If ClassProxy.MyPROXYConnectionString <> String.Empty Then
' If clsDatabase.Init(ClassProxy.MyPROXYConnectionString, True) = False Then
' ClassHelper.MSGBOX_Handler("ERROR", "", "Error while Initializing proxyserver - Check logfile")
' Else
' Dim csb As New SqlClient.SqlConnectionStringBuilder
' csb.ConnectionString = ClassProxy.MyPROXYConnectionString
' ClassHelper.InsertEssential_Log(USER_GUID, "USER-ID", String.Format("Proxy-Server {0} - Database {1} is used", csb.DataSource, csb.InitialCatalog))
' End If
'End If
If Not IsNothing(MYDB_ECM) Then
If MYDB_ECM.DBInitialized = False Then
If clsLogger.LOGG_MSG <> String.Empty Then
Throw New Exception("Error while Initializing database:" & vbNewLine & clsLogger.LOGG_MSG)
Else
Throw New Exception("Find more information in the logfile.")
End If
Throw New Exception("Find more information in the logfile.")
End If
Else
Return False
@@ -232,7 +223,7 @@ Public Class ClassInit
CURRENT_TBPMO_FORM_VIEW = MYDB_ECM.GetDatatable(oSql)
oSql = String.Format("select T.*, T1.HEADER_CAPTION,T1.TYPE_ID ,T1.ENTITY_ID,T1.LANGUAGE from TBPMO_DOCRESULT_DROPDOWN_ITEMS T, TBPMO_DOCSEARCH_RESULTLIST_CONFIG T1 WHERE T.CONFIG_ID = T1.GUID")
CURRENT_TBPMO_DOCRESULT_DROPDOWN_ITEMS = MYDB_ECM.GetDatatable(oSql)
clsCURRENT.LOG_ERRORS_ONLY = DEBUG
'clsCURRENT.LOG_ERRORS_ONLY = DEBUG
oSql = String.Format("select* from TBPMO_FILE_FORMATS_CHANGE")
Dim oDTFF_CHANGE As DataTable = MYDB_ECM.GetDatatable(oSql)
@@ -312,7 +303,7 @@ Public Class ClassInit
LOGGER.Debug($"USERID_FK_INT_ECM: {USERID_FK_INT_ECM}")
USER_IS_ADMIN = USER_DT.Rows(0).Item("IS_ADMIN")
USER_LANGUAGE = USER_DT.Rows(0).Item("USER_LANGUAGE")
clsCURRENT.USER_LANGUAGE = USER_LANGUAGE
'clsCURRENT.USER_LANGUAGE = USER_LANGUAGE
USER_DATE_FORMAT = USER_DT.Rows(0).Item("USER_DATE_FORMAT")
oMODULE_ACCES = USER_DT.Rows(0).Item("MODULE_ACCESS")
Dim oWORKING_MODE = USER_DT.Rows(0).Item("WORKING_MODE")
@@ -342,6 +333,9 @@ Public Class ClassInit
SHARE_DRIVE_ACTIVE = True
LOGGER.Info($"WM SHARE_DRIVE [{WMPATH_PREFIX}] via WORKING_MODE is active")
End If
ElseIf oMode = "WM_USER_LOGIN" Then
LOGGER.Info($"WM_IMPERSONATE_LOGIN WILL BE SET TO False via WORKING_MODE!")
WM_IMPERSONATE_LOGIN = False
Else
If oMode <> "0" Then
LOGGER.Info($"Wrong oMode: {oMode}")
@@ -404,11 +398,9 @@ Public Class ClassInit
End If
Dim ConStringMain As String
If clsDatabase.DB_PROXY_INITIALIZED = True Then
ConStringMain = "PROXY: " & ClassProxy.MyPROXYConnectionString & " # MAIN: " & MyConnectionString
Else
ConStringMain = "Main: " & MyConnectionString
End If
ConStringMain = "Main: " & MyConnectionString
oFNSQL = String.Format("INSERT INTO TBDD_USER_MODULE_LOG_IN (USER_ID,CLIENT_ID,MODULE,VERSION_CLIENT,MACHINE_NAME,CONNECTION_STRING) VALUES ({0},{1},'Record-Organizer','{2}','{3}','{4}')", USER_GUID, CLIENT_SELECTED, My.Application.Info.Version.ToString, Environment.MachineName, ConStringMain)
MYDB_ECM.ExecuteNonQuery(oFNSQL)
@@ -430,7 +422,12 @@ Public Class ClassInit
If WM_READ_ONLY = False Then
Try
LOGGER.Debug($"Connecting to windream-Server via DigitalData.Modules.Windream.Windream...")
WMMOD = New DigitalData.Modules.Windream.Windream(LOGCONFIG, False, WMDriveLetter, WMPATH_PREFIX, True, WM_SERVER, WM_USER, WM_USER_PW, WM_DOMAIN)
If WM_IMPERSONATE_LOGIN = False Then
WMMOD = New DigitalData.Modules.Windream.Windream(LOGCONFIG, False, WMDriveLetter, WMPATH_PREFIX, True, WM_SERVER, "", "", WM_DOMAIN)
Else
WMMOD = New DigitalData.Modules.Windream.Windream(LOGCONFIG, False, WMDriveLetter, WMPATH_PREFIX, True, WM_SERVER, WM_USER, WM_USER_PW, WM_DOMAIN)
End If
If IsNothing(WMMOD) Then
MsgBox("Could not connect to windream! Check Your configuration", MsgBoxStyle.Exclamation)
Else
@@ -445,13 +442,13 @@ Public Class ClassInit
WM_READ_ONLY = True
End Try
If clsWindream.Create_Session = False Then
If WMMOD.SessionLoggedin = False Then
LOGGER.Warn("Could not create the login for windream - No session created!")
ClassHelper.MSGBOX_Handler("ERROR", "windream-login Error:", "Could not create the login/session!", "OrgFlow will start anyway but be aware that searching and importing won't be possible!")
ClassHelper.MSGBOX_Handler("ERROR", "windream-login Error:", "Could not create the login/session!", "orgFLOW will start anyway but be aware that searching and importing won't be possible!")
End If
End If
Catch ex As Exception
LOGGER.Warn("Unexpected Error in clswindream.Init: " & ex.Message)
LOGGER.Warn("Unexpected Error in WINDREAM MOD.Init: " & ex.Message)
MsgBox("Unexpected Error in Creating windream-Session: " & ex.Message & vbNewLine & "Please inform Your sysadmin!", MsgBoxStyle.Critical)
End Try
@@ -496,9 +493,9 @@ Public Class ClassInit
End Try
End If
If LICENSE_PROXY = True And clsDatabase.DB_PROXY_INITIALIZED Then
SQL_FULLTEXT = "SELECT DISTINCT [dwDocID] FROM [dbo].FullText WHERE CONTAINS([Text], '""*@FULLTEXT*""') "
End If
'If LICENSE_PROXY = True And clsDatabase.DB_PROXY_INITIALIZED Then
' SQL_FULLTEXT = "SELECT DISTINCT [dwDocID] FROM [dbo].FullText WHERE CONTAINS([Text], '""*@FULLTEXT*""') "
'End If
Dim oSQL = $"SELECT COUNT(GU.GUID) FROM TBDD_GROUPS_USER GU INNER JOIN TBDD_GROUPS G ON GU.GROUP_ID = G.GUID WHERE G.NAME = 'ORGFLOW-Supervisor' AND GU.USER_ID = {USER_GUID}"
USER_IS_SUPERVISOR = MYDB_ECM.GetScalarValue(oSQL)
Return True