MS ClassUpdate entfernt
This commit is contained in:
parent
fc87dc05a9
commit
5ae2d466d0
@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
"ExpandedNodes": [
|
"ExpandedNodes": [
|
||||||
"",
|
""
|
||||||
"\\app"
|
|
||||||
],
|
],
|
||||||
"SelectedNode": "\\app\\DD-Record-Organizer.sln",
|
"SelectedNode": "\\OrgFlow.sln",
|
||||||
"PreviewInSolutionExplorer": false
|
"PreviewInSolutionExplorer": false
|
||||||
}
|
}
|
||||||
@ -174,7 +174,6 @@ Public Class ClassHelper
|
|||||||
RESULT_DOC_PATH = FORMAT_WM_PATH(RESULT_DOC_PATH)
|
RESULT_DOC_PATH = FORMAT_WM_PATH(RESULT_DOC_PATH)
|
||||||
CURRENT_OFFICE_FILE_CHANGED = False
|
CURRENT_OFFICE_FILE_CHANGED = False
|
||||||
If RESULT_DOC_PATH <> Nothing Then
|
If RESULT_DOC_PATH <> Nothing Then
|
||||||
If USER_GENERAL_VIEWER = "NONE" Then
|
|
||||||
Dim EXT = Path.GetExtension(RESULT_DOC_PATH)
|
Dim EXT = Path.GetExtension(RESULT_DOC_PATH)
|
||||||
EXT = EXT.Replace(".", "")
|
EXT = EXT.Replace(".", "")
|
||||||
Dim sql = String.Format("SELECT VIEWER FROM TBPMO_DOC_USER_VIEW WHERE USER_ID = {0} AND FILE_EXTENSION = '{1}'", USER_GUID, EXT)
|
Dim sql = String.Format("SELECT VIEWER FROM TBPMO_DOC_USER_VIEW WHERE USER_ID = {0} AND FILE_EXTENSION = '{1}'", USER_GUID, EXT)
|
||||||
@ -187,12 +186,6 @@ Public Class ClassHelper
|
|||||||
Else
|
Else
|
||||||
File_SYSOPEN(RESULT_DOC_PATH, DocID)
|
File_SYSOPEN(RESULT_DOC_PATH, DocID)
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
Select Case USER_GENERAL_VIEWER
|
|
||||||
Case "DOC-VIEW"
|
|
||||||
OPEN_DOCVIEW(RESULT_DOC_PATH, DocID)
|
|
||||||
End Select
|
|
||||||
End If
|
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
MSGBOX_Handler("ERROR", "", "Sorry, but the docpath for doc-id: " & DocID & " is nothing!")
|
MSGBOX_Handler("ERROR", "", "Sorry, but the docpath for doc-id: " & DocID & " is nothing!")
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports DD_LIB_Standards
|
Imports DD_LIB_Standards
|
||||||
|
Imports DevExpress.DataAccess.Native
|
||||||
Imports DigitalData.Modules.Config
|
Imports DigitalData.Modules.Config
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
@ -22,7 +23,6 @@ Public Class ClassInit
|
|||||||
Dim oStartupPath = Application.StartupPath
|
Dim oStartupPath = Application.StartupPath
|
||||||
' If AppConfig from Startup Path should be forced, rewrite the common app data path
|
' If AppConfig from Startup Path should be forced, rewrite the common app data path
|
||||||
If My.Settings.UseAppConfigConString = True Then
|
If My.Settings.UseAppConfigConString = True Then
|
||||||
' UserAppDataPath = StartupPath
|
|
||||||
oCommonAppDataPath = oStartupPath
|
oCommonAppDataPath = oStartupPath
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ Public Class ClassInit
|
|||||||
WMPATH_PREFIX = KONFIG_DT.Rows(0).Item("WMPATH_PREFIX")
|
WMPATH_PREFIX = KONFIG_DT.Rows(0).Item("WMPATH_PREFIX")
|
||||||
If Not WMPATH_PREFIX.ToUpper.StartsWith("\\WINDREAM\OBJECTS") Then
|
If Not WMPATH_PREFIX.ToUpper.StartsWith("\\WINDREAM\OBJECTS") Then
|
||||||
SHARE_DRIVE_ACTIVE = True
|
SHARE_DRIVE_ACTIVE = True
|
||||||
LOGGER.Info("WM SHARE_DRIVE via TBPMO_KONFIGURATION is active")
|
LOGGER.Info($"WM SHARE_DRIVE [{WMPATH_PREFIX}] via TBPMO_KONFIGURATION is active")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -234,18 +234,18 @@ Public Class ClassInit
|
|||||||
|
|
||||||
Public Shared Function InitUserLogin(Optional _User As String = "")
|
Public Shared Function InitUserLogin(Optional _User As String = "")
|
||||||
Try
|
Try
|
||||||
|
Dim oMODULE_ACCES As Boolean = False
|
||||||
If _User = "" Then
|
If _User = "" Then
|
||||||
USER_USERNAME = Environment.UserName
|
USER_USERNAME = Environment.UserName
|
||||||
Else
|
Else
|
||||||
USER_USERNAME = _User
|
USER_USERNAME = _User
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim sql = String.Format("SELECT T.*, T1.IS_ADMIN FROM TBDD_USER T INNER JOIN TBDD_USER_MODULES T1 ON T.GUID = T1.USER_ID INNER JOIN TBDD_MODULES T2 ON T1.MODULE_ID = T2.GUID
|
Dim oFNSQL = String.Format("SELECT * FROM [dbo].[FNDD_LOGIN_USER_MODULE] ('{0}','ORGFLOW',{1})", USER_USERNAME, CLIENT_SELECTED)
|
||||||
WHERE (USERNAME = '{0}') AND T2.SHORT_NAME = 'ADDI'", USER_USERNAME)
|
Dim DT_CHECKUSER_MODULE As DataTable
|
||||||
LOGGER.Info("Login at: " & Now.ToString)
|
LOGGER.Info("Login at: " & Now.ToString)
|
||||||
LOGGER.Info("Username: " & USER_USERNAME)
|
LOGGER.Info("Username: " & USER_USERNAME)
|
||||||
Dim USER_DT As DataTable = MYDB_ECM.GetDatatable(sql)
|
Dim USER_DT As DataTable = MYDB_ECM.GetDatatable(oFNSQL)
|
||||||
If USER_DT.Rows.Count = 0 Then
|
If USER_DT.Rows.Count = 0 Then
|
||||||
LOGGER.Warn(" - User '" & USER_USERNAME & "' not listed in Useradministration!")
|
LOGGER.Warn(" - User '" & USER_USERNAME & "' not listed in Useradministration!")
|
||||||
|
|
||||||
@ -254,27 +254,54 @@ WHERE (USERNAME = '{0}') AND T2.SHORT_NAME = 'ADDI'", USER_USERNAME)
|
|||||||
ClassHelper.InsertEssential_Log(0, "USER-ID", String.Format("User '{0}' not listed in Userconfiguration", USER_USERNAME))
|
ClassHelper.InsertEssential_Log(0, "USER-ID", String.Format("User '{0}' not listed in Userconfiguration", USER_USERNAME))
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
Dim Right_RO As Boolean = False
|
|
||||||
USER_GUID = USER_DT.Rows(0).Item("GUID")
|
|
||||||
USERID_FK_INT_ECM = USER_DT.Rows(0).Item("USERID_FK_INT_ECM")
|
|
||||||
USER_WAN = USER_DT.Rows(0).Item("WAN_ENVIRONMENT")
|
|
||||||
USER_LANGUAGE = USER_DT.Rows(0).Item("LANGUAGE")
|
|
||||||
clsCURRENT.USER_LANGUAGE = USER_LANGUAGE
|
|
||||||
USER_DATE_FORMAT = USER_DT.Rows(0).Item("DATE_FORMAT")
|
|
||||||
USER_GENERAL_VIEWER = USER_DT.Rows(0).Item("GENERAL_VIEWER")
|
|
||||||
Right_RO = True
|
|
||||||
|
|
||||||
|
USER_GUID = USER_DT.Rows(0).Item("USER_ID")
|
||||||
Try
|
Try
|
||||||
If CBool(USER_DT.Rows(0).Item("PMO_READ_ONLY")) = True Then
|
USERID_FK_INT_ECM = USER_DT.Rows(0).Item("USERID_FK_INT_ECM")
|
||||||
WM_READ_ONLY = True
|
|
||||||
LOGGER.Info("WINDREAM IS CONFIGURED READ ONLY!!")
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
USERID_FK_INT_ECM = 0
|
||||||
End Try
|
End Try
|
||||||
|
USER_LANGUAGE = USER_DT.Rows(0).Item("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")
|
||||||
|
|
||||||
|
Dim oSplitWorkMode As String() = oWORKING_MODE.Split("#")
|
||||||
|
|
||||||
|
' Use For Each loop over words and display them.
|
||||||
|
Dim oMode As String
|
||||||
|
For Each oMode In oSplitWorkMode
|
||||||
|
LOGGER.Debug($"oWorkingMode Parameter: {oMode}")
|
||||||
|
|
||||||
|
If oMode.StartsWith("WMMODE") Then
|
||||||
|
WorkMode_WMMODE = oMode.Replace("WMMODE=", "")
|
||||||
|
If WorkMode_WMMODE = "READ" Then
|
||||||
|
WM_READ_ONLY = True
|
||||||
|
LOGGER.Info("WINDREAM IS CONFIGURED READ ONLY FOR USER!")
|
||||||
|
End If
|
||||||
|
ElseIf oMode.StartsWith("WM_PRAEFIX") Then
|
||||||
|
WMPATH_PREFIX = oMode.Replace("WM_PRAEFIX=", "")
|
||||||
|
If Not WMPATH_PREFIX.ToUpper.StartsWith("\\WINDREAM\OBJECTS") Then
|
||||||
|
SHARE_DRIVE_ACTIVE = True
|
||||||
|
LOGGER.Info($"WM SHARE_DRIVE [{WMPATH_PREFIX}] via WORKING_MODE is active")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If oMode <> "0" Then
|
||||||
|
LOGGER.Info($"Wrong oMode: {oMode}")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If SHARE_DRIVE_ACTIVE = True And Len(oWORKING_MODE) = 0 Then
|
||||||
|
LOGGER.Info("WINDREAM IS CONFIGURED READ ONLY AS No Workmode was configured and Sharedrive is active!")
|
||||||
|
WM_READ_ONLY = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Right_RO = False Then
|
If oMODULE_ACCES = False Then
|
||||||
LOGGER.Warn("User '" & USER_USERNAME & "' not authorized for using OrgFlow!")
|
LOGGER.Warn("User '" & USER_USERNAME & "' not authorized for using OrgFlow!")
|
||||||
'MsgBox("Achtung: Sie sind nicht für die Nutzung dieses Moduls freigeschaltet." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
'MsgBox("Achtung: Sie sind nicht für die Nutzung dieses Moduls freigeschaltet." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
||||||
Dim msg = String.Format("Sie sind nicht für die Nutzung dieses Moduls freigeschaltet." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!")
|
Dim msg = String.Format("Sie sind nicht für die Nutzung dieses Moduls freigeschaltet." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!")
|
||||||
@ -284,10 +311,11 @@ WHERE (USERNAME = '{0}') AND T2.SHORT_NAME = 'ADDI'", USER_USERNAME)
|
|||||||
End If
|
End If
|
||||||
MsgBox(msg, MsgBoxStyle.Exclamation)
|
MsgBox(msg, MsgBoxStyle.Exclamation)
|
||||||
Return False
|
Return False
|
||||||
|
End If
|
||||||
'Me.Close()
|
'Me.Close()
|
||||||
Else
|
|
||||||
sql = String.Format("select * from TBPMO_RIGHT_USER WHERE USER_ID = " & USER_GUID)
|
oFNSQL = String.Format("select * from TBPMO_RIGHT_USER WHERE USER_ID = " & USER_GUID)
|
||||||
CURRENT_TBPMO_RIGHT_USER = MYDB_ECM.GetDatatable(sql)
|
CURRENT_TBPMO_RIGHT_USER = MYDB_ECM.GetDatatable(oFNSQL)
|
||||||
|
|
||||||
|
|
||||||
Init_CONN_SWITCH()
|
Init_CONN_SWITCH()
|
||||||
@ -311,9 +339,9 @@ WHERE (USERNAME = '{0}') AND T2.SHORT_NAME = 'ADDI'", USER_USERNAME)
|
|||||||
ClassLicence.Refresh_Licence(CLIENT_SELECTED)
|
ClassLicence.Refresh_Licence(CLIENT_SELECTED)
|
||||||
'Am System anmelden
|
'Am System anmelden
|
||||||
'sql = String.Format("UPDATE TBDD_USER SET LOGGED_IN = 1, LOGGED_WHERE = '{0}' WHERE GUID = {1}", Environment.MachineName, USER_GUID)
|
'sql = String.Format("UPDATE TBDD_USER SET LOGGED_IN = 1, LOGGED_WHERE = '{0}' WHERE GUID = {1}", Environment.MachineName, USER_GUID)
|
||||||
MYDB_ECM.ExecuteNonQuery(sql)
|
MYDB_ECM.ExecuteNonQuery(oFNSQL)
|
||||||
sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_GUID & " AND UPPER(MODULE)= UPPER('Record-Organizer')"
|
oFNSQL = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_GUID & " AND UPPER(MODULE)= UPPER('Record-Organizer')"
|
||||||
If MYDB_ECM.ExecuteNonQuery(sql) = True Then
|
If MYDB_ECM.ExecuteNonQuery(oFNSQL) = True Then
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Dim ConStringMain As String
|
Dim ConStringMain As String
|
||||||
@ -322,8 +350,8 @@ WHERE (USERNAME = '{0}') AND T2.SHORT_NAME = 'ADDI'", USER_USERNAME)
|
|||||||
Else
|
Else
|
||||||
ConStringMain = "Main: " & MyConnectionString
|
ConStringMain = "Main: " & MyConnectionString
|
||||||
End If
|
End If
|
||||||
sql = 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)
|
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(sql)
|
MYDB_ECM.ExecuteNonQuery(oFNSQL)
|
||||||
|
|
||||||
USER_IS_ADMIN = USER_DT.Rows(0).Item("IS_ADMIN") 'vorher RECORD_ADMIN
|
USER_IS_ADMIN = USER_DT.Rows(0).Item("IS_ADMIN") 'vorher RECORD_ADMIN
|
||||||
If USER_IS_ADMIN = True Then
|
If USER_IS_ADMIN = True Then
|
||||||
@ -334,24 +362,19 @@ WHERE (USERNAME = '{0}') AND T2.SHORT_NAME = 'ADDI'", USER_USERNAME)
|
|||||||
InitUserLogin(USER_USERNAME)
|
InitUserLogin(USER_USERNAME)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
If WM_READ_ONLY = True Then
|
If WM_READ_ONLY = False Then
|
||||||
If SHARE_DRIVE_ACTIVE = True Then
|
|
||||||
LOGGER.Info($"SHAREDRIVE IS ACTIVE = {SHARE_DRIVE_ACTIVE.ToString}")
|
|
||||||
WM_READ_ONLY = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
Try
|
Try
|
||||||
WMMOD = New DigitalData.Modules.Windream.Windream(LOGCONFIG, False, WMDriveLetter, WMPATH_PREFIX, True, "", "", "", "")
|
WMMOD = New DigitalData.Modules.Windream.Windream(LOGCONFIG, False, WMDriveLetter, WMPATH_PREFIX, True, "", "", "", "")
|
||||||
If IsNothing(WMMOD) Then
|
If IsNothing(WMMOD) Then
|
||||||
MsgBox("No windream connectable", MsgBoxStyle.Exclamation)
|
MsgBox("Could not connect to windream! Check Your configuration", MsgBoxStyle.Exclamation)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Warn("Could not create the login for DigitalData.Modules.Windream.Windream!")
|
LOGGER.Error(ex)
|
||||||
|
LOGGER.Warn("Could not create the login for DigitalData.Modules.Windream.Windream! Setting WM_READ_ONLY = True")
|
||||||
|
WM_READ_ONLY = True
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If clsWindream.Create_Session = False Then
|
If clsWindream.Create_Session = False Then
|
||||||
@ -359,15 +382,13 @@ WHERE (USERNAME = '{0}') AND T2.SHORT_NAME = 'ADDI'", USER_USERNAME)
|
|||||||
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
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Warn("Unexpected Error in clswindream.Init: " & ex.Message)
|
LOGGER.Warn("Unexpected Error in clswindream.Init: " & ex.Message)
|
||||||
MsgBox("Unexpected Error in Creating windream-Session: " & ex.Message & vbNewLine & "Please inform Your sysadmin!", MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in Creating windream-Session: " & ex.Message & vbNewLine & "Please inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
sql = String.Format("SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE UPPER(MODULE) = UPPER('Record-Organizer') AND CLIENT_ID = {0}", CLIENT_SELECTED)
|
oFNSQL = String.Format("SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE UPPER(MODULE) = UPPER('Record-Organizer') AND CLIENT_ID = {0}", CLIENT_SELECTED)
|
||||||
Dim anzahl = MYDB_ECM.GetScalarValue(sql)
|
Dim anzahl = MYDB_ECM.GetScalarValue(oFNSQL)
|
||||||
USERS_LOGGED_IN = CInt(anzahl)
|
USERS_LOGGED_IN = CInt(anzahl)
|
||||||
LOGGER.Info("User# logged in: " & anzahl.ToString)
|
LOGGER.Info("User# logged in: " & anzahl.ToString)
|
||||||
LOGGER.Info("LICENSE_COUNT: " & LICENSE_COUNT.ToString)
|
LOGGER.Info("LICENSE_COUNT: " & LICENSE_COUNT.ToString)
|
||||||
@ -384,8 +405,8 @@ WHERE (USERNAME = '{0}') AND T2.SHORT_NAME = 'ADDI'", USER_USERNAME)
|
|||||||
LOGGER.Warn("The number of logged Users (" & USERS_LOGGED_IN.ToString & ") exceeds the number of licenses (" & LICENSE_COUNT & ") ")
|
LOGGER.Warn("The number of logged Users (" & USERS_LOGGED_IN.ToString & ") exceeds the number of licenses (" & LICENSE_COUNT & ") ")
|
||||||
If USER_IS_ADMIN = False Then
|
If USER_IS_ADMIN = False Then
|
||||||
'Anmeldung wieder herausnehmen
|
'Anmeldung wieder herausnehmen
|
||||||
sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_GUID & " AND MODULE= 'Record-Organizer'"
|
oFNSQL = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_GUID & " AND MODULE= 'Record-Organizer'"
|
||||||
MYDB_ECM.ExecuteNonQuery(sql)
|
MYDB_ECM.ExecuteNonQuery(oFNSQL)
|
||||||
LOGGER.Warn(" - logged out the user")
|
LOGGER.Warn(" - logged out the user")
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@ -413,9 +434,6 @@ WHERE (USERNAME = '{0}') AND T2.SHORT_NAME = 'ADDI'", USER_USERNAME)
|
|||||||
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}"
|
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)
|
USER_IS_SUPERVISOR = MYDB_ECM.GetScalarValue(oSQL)
|
||||||
Return True
|
Return True
|
||||||
'LabelLoggedIn.Caption = "Anzahl Angemeldete User: " & anzahl.ToString
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
LOGGER.Warn("Unexpected Error in InitUserLogin: " & ex.Message)
|
LOGGER.Warn("Unexpected Error in InitUserLogin: " & ex.Message)
|
||||||
|
|||||||
@ -1,378 +0,0 @@
|
|||||||
Imports System.IO
|
|
||||||
Public Class ClassUpdate
|
|
||||||
Public Shared MyServer_UpdatePath As String
|
|
||||||
|
|
||||||
Public Shared VERSION_SERVER = "1.0.0.0"
|
|
||||||
Public Shared VERSION_USER = "1.0.0.0"
|
|
||||||
Public Shared FORCE_UPDATE As Boolean = False
|
|
||||||
Public Shared UPDATE_ID As Integer
|
|
||||||
Public Shared ALL_USERS As Boolean = False
|
|
||||||
Public Shared VERSIONS_FOR_FORCE_UPDATE As String = ""
|
|
||||||
Public Shared FOLDER_TEMP As String
|
|
||||||
|
|
||||||
Public Shared MY_INSTALL_PATH As String
|
|
||||||
Public Shared DT_UPDATE_ITEMS As DataTable
|
|
||||||
Public Shared DT_UPDATE As DataTable
|
|
||||||
Public Shared ERROR_WHILE_UPDATING As Boolean = False
|
|
||||||
|
|
||||||
Public Shared UPDATE_NECESSARY As Boolean = False
|
|
||||||
Public Shared UPDATE_CANCELLED As Boolean = False
|
|
||||||
Public Shared UPDATE_ERROR As Boolean = False
|
|
||||||
|
|
||||||
Private Shared RecExe_found As Boolean = False
|
|
||||||
Public Shared DT_USER_DATA As DataTable
|
|
||||||
Private Shared USER_INFO1, USER_INFO2, USER_INFO3 As String
|
|
||||||
Public Shared Function Init()
|
|
||||||
Try
|
|
||||||
Dim sql = String.Format("SELECT * FROM TBDD_MODULES WHERE UPPER(NAME) = UPPER('Record-Organizer')")
|
|
||||||
Dim KONFIG_DT As DataTable = MYDB_ECM.GetDatatable(sql)
|
|
||||||
If KONFIG_DT.Rows.Count = 1 Then
|
|
||||||
MyServer_UpdatePath = KONFIG_DT.Rows(0).Item("VERSION_UPATE_PATH")
|
|
||||||
MIN_REQUIRED_VERSION = KONFIG_DT.Rows(0).Item("MIN_REQUIRED_VERSION")
|
|
||||||
Try
|
|
||||||
DBVERSION = KONFIG_DT.Rows(0).Item("DB_VERSION")
|
|
||||||
Catch ex As Exception
|
|
||||||
DBVERSION = "No DB Version-Config"
|
|
||||||
End Try
|
|
||||||
End If
|
|
||||||
sql = String.Format("Select * FROM TBDD_VERSION_UPDATE WHERE GUID = (Select MAX(GUID) FROM TBDD_VERSION_UPDATE WHERE UPPER(MODULE_NAME) = UPPER('{0}'))", "Record-Organizer")
|
|
||||||
DT_UPDATE = MYDB_ECM.GetDatatable(sql)
|
|
||||||
If Not IsNothing(DT_UPDATE) Then
|
|
||||||
If DT_UPDATE.Rows.Count = 1 Then
|
|
||||||
UPDATE_ID = DT_UPDATE.Rows(0).Item("GUID")
|
|
||||||
VERSION_SERVER = DT_UPDATE.Rows(0).Item("VERSION_NO")
|
|
||||||
FORCE_UPDATE = DT_UPDATE.Rows(0).Item("FORCE_UPD")
|
|
||||||
VERSIONS_FOR_FORCE_UPDATE = DT_UPDATE.Rows(0).Item("VERSION_FORCE_UPD")
|
|
||||||
ALL_USERS = DT_UPDATE.Rows(0).Item("ALL_USERS")
|
|
||||||
sql = String.Format("SELECT * FROM TBDD_VERSION_ITEMS WHERE UPDATE_ID = {0} AND [INFO1] IS NOT NULL ORDER BY GUID", UPDATE_ID)
|
|
||||||
DT_UPDATE_ITEMS = MYDB_ECM.GetDatatable(sql)
|
|
||||||
LOGGER.Info(String.Format("{0} items need to be updated!", DT_UPDATE_ITEMS.Rows.Count.ToString))
|
|
||||||
Else
|
|
||||||
LOGGER.Info("No Updates Configured!")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Return True
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn("Unexpected Error in ClassUpdate - Init: " & ex.Message)
|
|
||||||
Return False
|
|
||||||
End Try
|
|
||||||
|
|
||||||
End Function
|
|
||||||
Public Shared Function InitInstallPath()
|
|
||||||
Try
|
|
||||||
Dim readValue = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Digital Data\Record Organizer", "Path", Nothing)
|
|
||||||
If Not IsNothing(readValue) Then
|
|
||||||
MY_INSTALL_PATH = readValue
|
|
||||||
Return True
|
|
||||||
Else
|
|
||||||
MY_INSTALL_PATH = ""
|
|
||||||
For Each s In Directory.GetLogicalDrives()
|
|
||||||
If RecExe_found = False Then
|
|
||||||
DirSearch(s)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If RecExe_found = False Then
|
|
||||||
LOGGER.Warn("Could not find the path for RecordOrganizer")
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn("Unexpected Error in InitInstallPath: " & ex.Message)
|
|
||||||
Return False
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
Private Shared Sub DirSearch(ByVal sDir As String)
|
|
||||||
Dim d As String
|
|
||||||
Dim f As String
|
|
||||||
Try
|
|
||||||
For Each d In Directory.GetDirectories(sDir)
|
|
||||||
If d.Contains("$Recycle") = False Or d.Contains("System Volume") = False Then
|
|
||||||
If RecExe_found = False Then
|
|
||||||
For Each f In Directory.GetFiles(d, "DD-OrgFlow.exe")
|
|
||||||
RecExe_found = True
|
|
||||||
MY_INSTALL_PATH = Path.GetDirectoryName(f)
|
|
||||||
Exit Sub
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
If RecExe_found = False Then
|
|
||||||
DirSearch(d)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Catch excpt As System.Exception
|
|
||||||
LOGGER.Warn("Unexpected Error in DirSearch: " & excpt.Message)
|
|
||||||
MY_INSTALL_PATH = ""
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
Public Shared Function InitUser(Optional _User As String = "")
|
|
||||||
Try
|
|
||||||
Dim sql = ""
|
|
||||||
USER_USERNAME = Environment.UserName
|
|
||||||
sql = String.Format("SELECT * FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('{0}'))", USER_USERNAME)
|
|
||||||
Dim USER_DT As DataTable = MYDB_ECM.GetDatatable(sql)
|
|
||||||
If USER_DT.Rows.Count = 0 Then
|
|
||||||
LOGGER.Warn(" - User '" & USER_USERNAME & "' not listed in Useradministration!")
|
|
||||||
'MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
|
||||||
'Me.Close()
|
|
||||||
Dim msg = String.Format("You are not listed in the Useradministration." & vbNewLine & "Please contact the admin.")
|
|
||||||
MsgBox(msg, MsgBoxStyle.Exclamation)
|
|
||||||
Return False
|
|
||||||
Else
|
|
||||||
USER_GUID = USER_DT.Rows(0).Item("GUID")
|
|
||||||
USER_LANGUAGE = USER_DT.Rows(0).Item("LANGUAGE")
|
|
||||||
sql = String.Format("SELECT UPDATE_PATH,TEMPPATH,INFO1,INFO2,INFO3 FROM TBDD_VERSION_USER_UPDATE_PATH WHERE USER_ID = {0} AND UPPER(MODULE_NAME) = UPPER('{1}')", USER_GUID, "Record-Organizer")
|
|
||||||
DT_USER_DATA = MYDB_ECM.GetDatatable(sql)
|
|
||||||
MyServer_UpdatePath = DT_USER_DATA.Rows(0).Item("UPDATE_PATH")
|
|
||||||
|
|
||||||
sql = String.Format("SELECT CASE VERSION_CLIENT WHEN '' THEN '{3}' ELSE VERSION_CLIENT END AS VERSION_CLIENT FROM VWDD_LOGIN_USER_HISTORY WHERE GUID = (select MAX(GUID) from VWDD_LOGIN_USER_HISTORY where USER_ID = {0} AND VERSION_CLIENT <> '' AND UPPER(MACHINE_NAME) = UPPER('{1}') AND UPPER(MODULE) = UPPER('{2}'))", USER_GUID, Environment.MachineName, "Record-Organizer", VERSION_SERVER)
|
|
||||||
VERSION_USER = MYDB_ECM.GetScalarValue(sql)
|
|
||||||
If IsNothing(VERSION_USER) Then
|
|
||||||
sql = String.Format("SELECT CASE VERSION_CLIENT WHEN '' THEN '{2}' ELSE VERSION_CLIENT END AS VERSION_CLIENT FROM VWDD_LOGIN_USER_HISTORY WHERE GUID = (select MAX(GUID) from VWDD_LOGIN_USER_HISTORY where USER_ID = {0} AND VERSION_CLIENT <> '' AND UPPER(MODULE) = UPPER('{1}'))", USER_GUID, "Record-Organizer", VERSION_SERVER)
|
|
||||||
VERSION_USER = MYDB_ECM.GetScalarValue(sql)
|
|
||||||
If IsNothing(VERSION_USER) Then
|
|
||||||
VERSION_USER = "1.0.0.0"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
VERSION_USER = CInt(VERSION_USER.ToString.Replace(".", ""))
|
|
||||||
VERSION_SERVER = CInt(VERSION_SERVER.ToString.Replace(".", ""))
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn("Unexpected Error in InitUser_Update_Spec: " & ex.Message)
|
|
||||||
Return False
|
|
||||||
End Try
|
|
||||||
|
|
||||||
End Function
|
|
||||||
Public Shared Sub RUN_UPDATE()
|
|
||||||
Dim UPD_VC As Boolean = False
|
|
||||||
Dim UPD_RM As Boolean = False
|
|
||||||
Dim KEEP_TEMPPATH As Boolean = False
|
|
||||||
If DT_USER_DATA.Rows.Count <> 1 Then
|
|
||||||
Exit Sub
|
|
||||||
Else
|
|
||||||
USER_INFO1 = DT_USER_DATA.Rows(0).Item("INFO1")
|
|
||||||
USER_INFO2 = DT_USER_DATA.Rows(0).Item("INFO2")
|
|
||||||
USER_INFO3 = DT_USER_DATA.Rows(0).Item("INFO3")
|
|
||||||
|
|
||||||
If DT_USER_DATA.Rows(0).Item("TEMPPATH") <> "" Then
|
|
||||||
FOLDER_TEMP = DT_USER_DATA.Rows(0).Item("TEMPPATH")
|
|
||||||
Else
|
|
||||||
For Each Upd_item As DataRow In DT_UPDATE_ITEMS.Rows
|
|
||||||
If Upd_item.Item("ITEM_INFO") = "VERSION_CHECKER.exe" Then
|
|
||||||
If Not USER_INFO1.Contains(Upd_item.Item("INFO2")) Then
|
|
||||||
UPD_VC = True
|
|
||||||
|
|
||||||
End If
|
|
||||||
ElseIf Upd_item.Item("ITEM_INFO") = "RecordOrganizer_RightManager.exe" Then
|
|
||||||
If Not USER_INFO1.Contains(Upd_item.Item("INFO2")) Then
|
|
||||||
UPD_RM = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If Not IsDBNull(Upd_item.Item("INFO3")) Then
|
|
||||||
FOLDER_TEMP = Upd_item.Item("INFO3")
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If UPD_VC = True Or UPD_RM = True Then
|
|
||||||
UPDATE_NECESSARY = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UPDATE_NECESSARY = False Then
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim msg = "Auf dem Server liegt ein Update für ein OrgFlow-AddOn bereit!" & vbNewLine & "Wollen Sie das Update nun durchführen? Die Dauer ist abhängig von Ihrer Netzwerkverbindung!"
|
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
|
||||||
msg = "There is a new release available for an OrgFlow-AddOn!" & vbNewLine & "Would You like to install the update now? This might take some time minute(s)!"
|
|
||||||
End If
|
|
||||||
Dim result As MsgBoxResult
|
|
||||||
result = MessageBox.Show(msg, CAPTION_CONFIRMATION, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
|
||||||
If result = MsgBoxResult.No Then
|
|
||||||
UPDATE_CANCELLED = True
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If FOLDER_TEMP <> String.Empty Then
|
|
||||||
If Directory.Exists(FOLDER_TEMP) Then
|
|
||||||
' GetTempFolderGuid()
|
|
||||||
' If FOLDER_TEMP <> String.Empty Then
|
|
||||||
|
|
||||||
Dim error_while_copying = False
|
|
||||||
For Each Upd_item As DataRow In DT_UPDATE_ITEMS.Rows
|
|
||||||
LOGGER.Info(String.Format("...working on item {0}: ", Upd_item.Item("ITEM_INFO")))
|
|
||||||
|
|
||||||
If Upd_item.Item("ITEM_INFO") = "VERSION_CHECKER.exe" Then
|
|
||||||
KEEP_TEMPPATH = Upd_item.Item("BIT3")
|
|
||||||
End If
|
|
||||||
|
|
||||||
If error_while_copying = True Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Dim tempfilename = Path.Combine(FOLDER_TEMP, Upd_item.Item("ITEM_INFO"))
|
|
||||||
If File.Exists(tempfilename) Then
|
|
||||||
Try
|
|
||||||
Dim error_while_replacing = False
|
|
||||||
|
|
||||||
Dim BackUpOfFileToReplace As String = MY_INSTALL_PATH & "\" & Upd_item.Item("INFO1") & Upd_item.Item("ITEM_INFO") & ".bac"
|
|
||||||
BackUpOfFileToReplace = BackUpOfFileToReplace.Replace("//", "/")
|
|
||||||
|
|
||||||
Dim sourcefile = Path.Combine(FOLDER_TEMP, Upd_item.Item("ITEM_INFO"))
|
|
||||||
Dim targetfile
|
|
||||||
If IsDBNull(Upd_item.Item("INFO1")) Then
|
|
||||||
targetfile = Path.Combine(MY_INSTALL_PATH, Upd_item.Item("ITEM_INFO"))
|
|
||||||
Else
|
|
||||||
If Upd_item.Item("INFO1") <> String.Empty Then
|
|
||||||
targetfile = Path.Combine(MY_INSTALL_PATH, Upd_item.Item("INFO1"), Upd_item.Item("ITEM_INFO"))
|
|
||||||
Else
|
|
||||||
targetfile = Path.Combine(MY_INSTALL_PATH, Upd_item.Item("ITEM_INFO"))
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
targetfile = targetfile.ToString.Replace("//", "/")
|
|
||||||
LOGGER.Info(String.Format("...replacing targetfile '{0}': ", targetfile))
|
|
||||||
Try
|
|
||||||
' Replace the file.
|
|
||||||
If File.Exists(targetfile) Then
|
|
||||||
If File_Rename(targetfile, BackUpOfFileToReplace) = True Then
|
|
||||||
If File.Exists(BackUpOfFileToReplace) Then
|
|
||||||
If KEEP_TEMPPATH Then
|
|
||||||
If CopyFile(sourcefile, targetfile) = True Then
|
|
||||||
File_Delete(BackUpOfFileToReplace)
|
|
||||||
LOGGER.Warn(String.Format("...targetfile '{0}' was copied! ", targetfile))
|
|
||||||
Dim updinfo
|
|
||||||
If USER_INFO1 <> "" Then
|
|
||||||
updinfo = USER_INFO1 & ";" & Upd_item.Item("INFO1") & "V" & Upd_item.Item("INFO2")
|
|
||||||
Else
|
|
||||||
updinfo = Upd_item.Item("INFO1") & "V" & Upd_item.Item("INFO2")
|
|
||||||
End If
|
|
||||||
Dim _Sql = String.Format("Update TBDD_VERSION_USER_UPDATE_PATH SET INFO1 = '{2}' WHERE USER_ID = {0} AND UPPER(MODULE_NAME) = UPPER('{1}')", USER_GUID, "Record-Organizer", updinfo)
|
|
||||||
MYDB_ECM.ExecuteNonQuery(_Sql)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If MoveFile(sourcefile, targetfile) = True Then
|
|
||||||
File_Delete(BackUpOfFileToReplace)
|
|
||||||
LOGGER.Info(String.Format("...targetfile '{0}' was replaced! ", targetfile))
|
|
||||||
Dim updinfo
|
|
||||||
If USER_INFO1 <> "" Then
|
|
||||||
updinfo = USER_INFO1 & ";" & Upd_item.Item("INFO1") & "V" & Upd_item.Item("INFO2")
|
|
||||||
Else
|
|
||||||
updinfo = Upd_item.Item("INFO1") & "V" & Upd_item.Item("INFO2")
|
|
||||||
End If
|
|
||||||
Dim _Sql = String.Format("Update TBDD_VERSION_USER_UPDATE_PATH SET INFO1 = '{2}' WHERE USER_ID = {0} AND UPPER(MODULE_NAME) = UPPER('{1}')", USER_GUID, "Record-Organizer", updinfo)
|
|
||||||
MYDB_ECM.ExecuteNonQuery(_Sql)
|
|
||||||
Else
|
|
||||||
LOGGER.Warn(String.Format("MoveFile was not successfull! BackupFile will be activated!"))
|
|
||||||
'Verschieben hat nicht geklappt also die Backupdatei wieder umbenennen!
|
|
||||||
File_Rename(BackUpOfFileToReplace, targetfile)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn(String.Format("Error while copying file {0} to {1}: " & ex.Message, sourcefile, targetfile))
|
|
||||||
error_while_replacing = True
|
|
||||||
UPDATE_ERROR = True
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn(String.Format("Unexpected Error in Replace_Files: {0}", ex.Message))
|
|
||||||
UPDATE_ERROR = True
|
|
||||||
End Try
|
|
||||||
End If
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
Dim upd = String.Format("Update TBDD_VERSION_USER_UPDATE_PATH SET TEMPPATH = '' WHERE USER_ID = {0} AND UPPER(MODULE_NAME) = UPPER('{1}')", USER_GUID, "Record-Organizer")
|
|
||||||
MYDB_ECM.ExecuteNonQuery(upd)
|
|
||||||
Try
|
|
||||||
If KEEP_TEMPPATH = False Then
|
|
||||||
'Delete the tempfolder and all data
|
|
||||||
System.IO.Directory.Delete(FOLDER_TEMP, True)
|
|
||||||
Else
|
|
||||||
LOGGER.Info(String.Format("TEMP FOLDER SHALL BE KEPT..."))
|
|
||||||
End If
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
|
|
||||||
End Try
|
|
||||||
'Else
|
|
||||||
' Logger.Warn(String.Format("The temporaryFolder could not be created!"))
|
|
||||||
'End If
|
|
||||||
Else
|
|
||||||
LOGGER.Warn(String.Format("The Updatepath '{0}'is not accessible or does not exist", MyServer_UpdatePath))
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
LOGGER.Warn(String.Format("NO ACTION: the Updatepath is empty"))
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
Private Shared Function GetTempFolderGuid() As String
|
|
||||||
Try
|
|
||||||
Dim folder As String = Path.Combine(Path.GetTempPath, Guid.NewGuid.ToString)
|
|
||||||
If Not Directory.Exists(folder) Then
|
|
||||||
Directory.CreateDirectory(folder)
|
|
||||||
End If
|
|
||||||
FOLDER_TEMP = folder
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn(String.Format("Error while Creating tempfolder: " & ex.Message))
|
|
||||||
End Try
|
|
||||||
|
|
||||||
End Function
|
|
||||||
Private Shared Function File_Rename(targetfile As String, Renamefilestring As String)
|
|
||||||
Try
|
|
||||||
Renamefilestring = Renamefilestring.Replace("\\", "\")
|
|
||||||
If File.Exists(Renamefilestring) Then
|
|
||||||
|
|
||||||
If File_Delete(Renamefilestring) = False Then
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Rename(targetfile, Renamefilestring)
|
|
||||||
Return True
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn(String.Format("ClassUpdate - Unexpected Error in File_Rename: " & "OldPath '{0}'" & "NewPath '{1}'" & "ERROR: {2}", targetfile, Renamefilestring, ex.Message))
|
|
||||||
UPDATE_ERROR = True
|
|
||||||
Return False
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
Private Shared Function File_Delete(deletefile As String)
|
|
||||||
Try
|
|
||||||
File.Delete(deletefile)
|
|
||||||
Return True
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn(String.Format("Unexpected Error in File_Delete: " & vbNewLine & "deletefile '{0}'" & vbNewLine & "ERROR: {2}", deletefile, ex.Message))
|
|
||||||
UPDATE_ERROR = True
|
|
||||||
Return False
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
Private Shared Function MoveFile(sourcefile As String, targetfile As String)
|
|
||||||
Try
|
|
||||||
File.Move(sourcefile, targetfile)
|
|
||||||
Return True
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn(String.Format("Unexpected Error in MoveFile: sourcefile '{0}', targetfile '{1}' - ERROR: {2}", sourcefile, targetfile, ex.Message))
|
|
||||||
UPDATE_ERROR = True
|
|
||||||
Return False
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
Private Shared Function CopyFile(sourcefile As String, destfile As String)
|
|
||||||
Try
|
|
||||||
File.Copy(sourcefile, destfile, True)
|
|
||||||
Return True
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Warn(String.Format("Unexpected Error in CopyFile: sourcefile '{0}', destfile '{1}' - ERROR: {2}", sourcefile, destfile, ex.Message))
|
|
||||||
UPDATE_ERROR = True
|
|
||||||
Return False
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
End Class
|
|
||||||
@ -20,9 +20,10 @@ Module ModuleMySettings
|
|||||||
Public WD_GROUP1 As String
|
Public WD_GROUP1 As String
|
||||||
Public WD_UNICODE As Boolean = False
|
Public WD_UNICODE As Boolean = False
|
||||||
Public WMDriveLetter As String
|
Public WMDriveLetter As String
|
||||||
Public WMPATH_PREFIX As String
|
Public WMPATH_PREFIX As String = ""
|
||||||
Public WMMOD As Windream
|
Public WMMOD As Windream
|
||||||
Public SHARE_DRIVE_ACTIVE As Boolean = False
|
Public SHARE_DRIVE_ACTIVE As Boolean = False
|
||||||
|
Public WorkMode_WMMODE As String = "NORMAL"
|
||||||
Public WM_READ_ONLY As Boolean = False
|
Public WM_READ_ONLY As Boolean = False
|
||||||
Public GridDocResult_BestFitColumns As Boolean = True
|
Public GridDocResult_BestFitColumns As Boolean = True
|
||||||
Public SQL_FULLTEXT As String
|
Public SQL_FULLTEXT As String
|
||||||
@ -50,12 +51,12 @@ Module ModuleMySettings
|
|||||||
Public USERID_FK_INT_ECM = 0
|
Public USERID_FK_INT_ECM = 0
|
||||||
Public USER_LANGUAGE As String = "de-DE"
|
Public USER_LANGUAGE As String = "de-DE"
|
||||||
Public USER_DATE_FORMAT As String
|
Public USER_DATE_FORMAT As String
|
||||||
Public USER_GENERAL_VIEWER As String
|
|
||||||
Public USER_WAN As Boolean = False
|
|
||||||
|
|
||||||
Public DT_CLIENT_USER As DataTable
|
Public DT_CLIENT_USER As DataTable
|
||||||
Public CLIENT_SELECTED As Integer = 99
|
Public CLIENT_SELECTED As Integer = 99
|
||||||
|
|
||||||
|
|
||||||
'Public USER_CLIENTS_COMMA_SEPERATED As String
|
'Public USER_CLIENTS_COMMA_SEPERATED As String
|
||||||
Public FWSCAN_started As Boolean = False
|
Public FWSCAN_started As Boolean = False
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ Module ModuleRuntimeVariables
|
|||||||
|
|
||||||
Public ESC_Hidden As Boolean = False
|
Public ESC_Hidden As Boolean = False
|
||||||
|
|
||||||
Public MIN_REQUIRED_VERSION As String
|
Public MIN_REQUIRED_VERSION As String = "1.0.0.0"
|
||||||
|
|
||||||
Public MAIN_FORM As frmMain = Nothing
|
Public MAIN_FORM As frmMain = Nothing
|
||||||
Public ERROR_INIT = "NONE"
|
Public ERROR_INIT = "NONE"
|
||||||
|
|||||||
@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("3.1.0.2")>
|
<Assembly: AssemblyVersion("3.1.0.3")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|
||||||
<Assembly: NeutralResourcesLanguageAttribute("")>
|
<Assembly: NeutralResourcesLanguageAttribute("")>
|
||||||
@ -2815,9 +2815,6 @@ Public Class frmConstructor_Main
|
|||||||
|
|
||||||
CURRENT_SQL_AUTO_VALUES_DT = DT_AUTOVALUES
|
CURRENT_SQL_AUTO_VALUES_DT = DT_AUTOVALUES
|
||||||
|
|
||||||
If USER_WAN = True Then
|
|
||||||
|
|
||||||
End If
|
|
||||||
Try
|
Try
|
||||||
Dim primaryKey(1) As DataColumn
|
Dim primaryKey(1) As DataColumn
|
||||||
primaryKey(0) = CURRENT_DT_ENTITY_RECORDS.Columns("Record-ID")
|
primaryKey(0) = CURRENT_DT_ENTITY_RECORDS.Columns("Record-ID")
|
||||||
|
|||||||
@ -594,53 +594,6 @@ Public Class frmMain
|
|||||||
Me.BarButtonItemSAPConnect.Enabled = True
|
Me.BarButtonItemSAPConnect.Enabled = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Try
|
|
||||||
If ClassUpdate.Init = True And Not IsNothing(ClassUpdate.DT_UPDATE_ITEMS) Then
|
|
||||||
'MsgBox("532")
|
|
||||||
If Not IsNothing(ClassUpdate.DT_UPDATE) Then
|
|
||||||
|
|
||||||
If ClassUpdate.DT_UPDATE_ITEMS.Rows.Count > 0 Then
|
|
||||||
If ClassUpdate.InitUser = False Then
|
|
||||||
Me.Cursor = Cursors.Default
|
|
||||||
Exit Sub
|
|
||||||
Else
|
|
||||||
If ClassUpdate.DT_USER_DATA.Rows.Count = 1 Or ClassUpdate.ALL_USERS = True Then
|
|
||||||
If ClassUpdate.InitInstallPath() = False Then
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
ClassUpdate.RUN_UPDATE()
|
|
||||||
If ClassUpdate.UPDATE_ERROR = True Then
|
|
||||||
Dim msg = String.Format("Während des Updatevorgangs für Version '{0}' haben sich unerwartet Fehler ereignet!" & vbNewLine & "Wollen Sie die Logdatei anzeigen?", ClassUpdate.VERSION_SERVER)
|
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
|
||||||
msg = String.Format("During update of version '{0}' unexpected errors occured!" & vbNewLine & "Would You like to show the logfile?", ClassUpdate.VERSION_SERVER)
|
|
||||||
End If
|
|
||||||
ClassHelper.InsertEssential_Log(USER_GUID, "USER-ID", String.Format("Unexpected errors occured during client-update update of version {0}!", ClassUpdate.VERSION_SERVER))
|
|
||||||
Dim result As MsgBoxResult
|
|
||||||
result = MessageBox.Show(msg, CAPTION_CONFIRMATION, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
|
||||||
If result = MsgBoxResult.Yes Then
|
|
||||||
Process.Start(LOGCONFIG.LogFile)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If ClassUpdate.UPDATE_NECESSARY Then
|
|
||||||
Dim msg = "Das Addon-Update war erfolgreich!"
|
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
|
||||||
msg = "The Addon-Update was successful!"
|
|
||||||
End If
|
|
||||||
MsgBox(msg, MsgBoxStyle.Information)
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox("Unexpected Error in Update VersionChecker: " & ex.Message, MsgBoxStyle.Critical)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
MsgBox("Application will close now!", MsgBoxStyle.Critical)
|
MsgBox("Application will close now!", MsgBoxStyle.Critical)
|
||||||
Me.Close()
|
Me.Close()
|
||||||
|
|||||||
@ -754,9 +754,6 @@ LOGGER.Error(ex)
|
|||||||
|
|
||||||
CURRENT_SQL_AUTO_VALUES_DT = DT_AUTOVALUES
|
CURRENT_SQL_AUTO_VALUES_DT = DT_AUTOVALUES
|
||||||
|
|
||||||
If USER_WAN = True Then
|
|
||||||
|
|
||||||
End If
|
|
||||||
Try
|
Try
|
||||||
Dim primaryKey(1) As DataColumn
|
Dim primaryKey(1) As DataColumn
|
||||||
primaryKey(0) = CURRENT_DT_ENTITY_RECORDS.Columns("Record-ID")
|
primaryKey(0) = CURRENT_DT_ENTITY_RECORDS.Columns("Record-ID")
|
||||||
@ -1636,7 +1633,10 @@ LOGGER.Error(ex)
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub OnCBSelectedValueChanged(sender As Object, e As EventArgs)
|
Private Sub OnCBSelectedValueChanged(sender As Object, e As EventArgs)
|
||||||
Try
|
Try
|
||||||
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
|
|
||||||
|
Dim oDocuments = DocList.SelectedDocuments
|
||||||
|
|
||||||
|
Dim docId As Integer = oDocuments.First.DocId
|
||||||
If docId = 0 Then
|
If docId = 0 Then
|
||||||
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
|
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@ -1662,13 +1662,14 @@ LOGGER.Error(ex)
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnCBSelectedValueChanged: ", ex.Message)
|
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnCBSelectedValueChanged: ", ex.Message)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnDateSelectedValueChanged(sender As Object, e As EventArgs)
|
Private Sub OnDateSelectedValueChanged(sender As Object, e As EventArgs)
|
||||||
Try
|
Try
|
||||||
|
Dim oDocuments = DocList.SelectedDocuments
|
||||||
Dim DatePicker As DateEdit = sender
|
Dim DatePicker As DateEdit = sender
|
||||||
Dim value As DateTime = DatePicker.EditValue
|
Dim value As DateTime = DatePicker.EditValue
|
||||||
|
|
||||||
@ -1678,7 +1679,7 @@ LOGGER.Error(ex)
|
|||||||
Try
|
Try
|
||||||
validDate = Date.TryParse(DatePicker.OldEditValue, oldValue)
|
validDate = Date.TryParse(DatePicker.OldEditValue, oldValue)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
oldValue = Date.MinValue
|
oldValue = Date.MinValue
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
@ -1697,7 +1698,7 @@ LOGGER.Error(ex)
|
|||||||
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
|
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
|
||||||
Dim configid = detailRow.Item("CONFIG_ID")
|
Dim configid = detailRow.Item("CONFIG_ID")
|
||||||
|
|
||||||
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
|
Dim docId As Integer = oDocuments.First.DocId
|
||||||
If docId = 0 Then
|
If docId = 0 Then
|
||||||
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
|
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@ -1712,13 +1713,14 @@ LOGGER.Error(ex)
|
|||||||
ClassProxy.PRPROXY_DOC_VALUES_UPD(docId, SELECTED_NODE_RECORD_ID)
|
ClassProxy.PRPROXY_DOC_VALUES_UPD(docId, SELECTED_NODE_RECORD_ID)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnDateSelectedValueChanged: ", ex.Message)
|
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnDateSelectedValueChanged: ", ex.Message)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnTextSelectedValueChanged(sender As Object, e As EventArgs)
|
Private Sub OnTextSelectedValueChanged(sender As Object, e As EventArgs)
|
||||||
Try
|
Try
|
||||||
|
Dim oDocuments = DocList.SelectedDocuments
|
||||||
Dim TextBox As TextEdit = sender
|
Dim TextBox As TextEdit = sender
|
||||||
Dim value = TextBox.EditValue
|
Dim value = TextBox.EditValue
|
||||||
If value.ToUpper = "Not displayable in Group-Search".ToUpper Then
|
If value.ToUpper = "Not displayable in Group-Search".ToUpper Then
|
||||||
@ -1733,7 +1735,7 @@ LOGGER.Error(ex)
|
|||||||
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
|
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
|
||||||
Dim configid = detailRow.Item("CONFIG_ID")
|
Dim configid = detailRow.Item("CONFIG_ID")
|
||||||
|
|
||||||
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
|
Dim docId As Integer = oDocuments.First.DocId
|
||||||
If docId = 0 Then
|
If docId = 0 Then
|
||||||
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
|
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@ -1747,7 +1749,7 @@ LOGGER.Error(ex)
|
|||||||
ClassProxy.PRPROXY_DOC_VALUES_UPD(docId, SELECTED_NODE_RECORD_ID)
|
ClassProxy.PRPROXY_DOC_VALUES_UPD(docId, SELECTED_NODE_RECORD_ID)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnTextSelectedValueChanged: ", ex.Message)
|
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnTextSelectedValueChanged: ", ex.Message)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
@ -1755,6 +1757,7 @@ LOGGER.Error(ex)
|
|||||||
Private Sub OnCheckboxValueChanged(sender As Object, e As EventArgs)
|
Private Sub OnCheckboxValueChanged(sender As Object, e As EventArgs)
|
||||||
'TODO Save Checkboxvalue
|
'TODO Save Checkboxvalue
|
||||||
Try
|
Try
|
||||||
|
Dim oDocuments = DocList.SelectedDocuments
|
||||||
Dim CheckBox As CheckEdit = sender
|
Dim CheckBox As CheckEdit = sender
|
||||||
Dim value As Boolean = CheckBox.EditValue
|
Dim value As Boolean = CheckBox.EditValue
|
||||||
|
|
||||||
@ -1764,7 +1767,7 @@ LOGGER.Error(ex)
|
|||||||
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
|
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
|
||||||
Dim configid = detailRow.Item("CONFIG_ID")
|
Dim configid = detailRow.Item("CONFIG_ID")
|
||||||
|
|
||||||
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
|
Dim docId As Integer = oDocuments.First.DocId
|
||||||
If docId = 0 Then
|
If docId = 0 Then
|
||||||
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
|
MsgBox("Sorry no document was selected! Please try again!", MsgBoxStyle.Exclamation)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@ -1778,7 +1781,7 @@ LOGGER.Error(ex)
|
|||||||
ClassProxy.PRPROXY_DOC_VALUES_UPD(docId, SELECTED_NODE_RECORD_ID)
|
ClassProxy.PRPROXY_DOC_VALUES_UPD(docId, SELECTED_NODE_RECORD_ID)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnCheckboxValueChanged: ", ex.Message)
|
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnCheckboxValueChanged: ", ex.Message)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
@ -1805,11 +1808,10 @@ LOGGER.Error(ex)
|
|||||||
Refresh_DocID()
|
Refresh_DocID()
|
||||||
End Sub
|
End Sub
|
||||||
Sub Refresh_DocID()
|
Sub Refresh_DocID()
|
||||||
If ClassWindreamDocGrid.SELECTED_DOC_ID <> 0 Then
|
Dim oDocuments = DocList.SelectedDocuments
|
||||||
Dim omsg = "Doc-ID: " & ClassWindreamDocGrid.SELECTED_DOC_ID.ToString
|
If oDocuments.Count <> 0 Then
|
||||||
|
Dim omsg = "Doc-ID: " & oDocuments.First.DocId
|
||||||
Update_DocID_Label(True, omsg, EditState.Update)
|
Update_DocID_Label(True, omsg, EditState.Update)
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Update_DocID_Label(True, "DocRow not selected", EditState.None)
|
Update_DocID_Label(True, "DocRow not selected", EditState.None)
|
||||||
End If
|
End If
|
||||||
@ -1890,7 +1892,11 @@ LOGGER.Error(ex)
|
|||||||
#Region "Dropping Files"
|
#Region "Dropping Files"
|
||||||
Sub Drag_Enter(e As DragEventArgs)
|
Sub Drag_Enter(e As DragEventArgs)
|
||||||
If _EntityId <> 0 Then
|
If _EntityId <> 0 Then
|
||||||
|
If WM_READ_ONLY = False Then
|
||||||
ClassDragDrop.Drag_enter(e)
|
ClassDragDrop.Drag_enter(e)
|
||||||
|
Else
|
||||||
|
Update_Status_Label(True, "READ ONLY ACCESS", EditState.Insert)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Update_Status_Label(True, "No entity selected", EditState.Insert)
|
Update_Status_Label(True, "No entity selected", EditState.Insert)
|
||||||
End If
|
End If
|
||||||
@ -2229,6 +2235,9 @@ LOGGER.Error(ex)
|
|||||||
ContextMenu_Multiplefiles()
|
ContextMenu_Multiplefiles()
|
||||||
ElseIf oSelectedDocs.Count = 1 Then
|
ElseIf oSelectedDocs.Count = 1 Then
|
||||||
File_in_Work()
|
File_in_Work()
|
||||||
|
If WM_READ_ONLY Then
|
||||||
|
ContextMenu_Read()
|
||||||
|
Else
|
||||||
Dim oSelectedDocument = oSelectedDocs.First
|
Dim oSelectedDocument = oSelectedDocs.First
|
||||||
Dim Result = ClassDOC_SEARCH.Get_File_Rights(oSelectedDocument.DocId)
|
Dim Result = ClassDOC_SEARCH.Get_File_Rights(oSelectedDocument.DocId)
|
||||||
If Not IsNothing(Result) Then
|
If Not IsNothing(Result) Then
|
||||||
@ -2263,6 +2272,8 @@ LOGGER.Error(ex)
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If oSelectedDocs.First.DisplayName <> "" Then
|
If oSelectedDocs.First.DisplayName <> "" Then
|
||||||
tsmiFileRenameDisplayname.Visible = True
|
tsmiFileRenameDisplayname.Visible = True
|
||||||
@ -2284,12 +2295,9 @@ LOGGER.Error(ex)
|
|||||||
|
|
||||||
Sub ContextMenu_Multiplefiles()
|
Sub ContextMenu_Multiplefiles()
|
||||||
tsmiFileProperties.Enabled = False
|
tsmiFileProperties.Enabled = False
|
||||||
|
|
||||||
tsmiFileOpen.Enabled = False
|
tsmiFileOpen.Enabled = False
|
||||||
tsmiFileFolderOpen.Enabled = False
|
tsmiFileFolderOpen.Enabled = False
|
||||||
|
|
||||||
tsmiFileInWork.Enabled = False
|
tsmiFileInWork.Enabled = False
|
||||||
|
|
||||||
tsmiFileLink_Add.Enabled = True
|
tsmiFileLink_Add.Enabled = True
|
||||||
tsmiFileLink_ShowAll.Enabled = True
|
tsmiFileLink_ShowAll.Enabled = True
|
||||||
tsmiFileLinkRemove.Enabled = True
|
tsmiFileLinkRemove.Enabled = True
|
||||||
@ -2342,8 +2350,8 @@ LOGGER.Error(ex)
|
|||||||
Me.Cursor = Cursors.WaitCursor
|
Me.Cursor = Cursors.WaitCursor
|
||||||
Dim allow_Open As Boolean = False
|
Dim allow_Open As Boolean = False
|
||||||
'ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
|
'ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
|
||||||
|
Dim oDocuments = DocList.SelectedDocuments
|
||||||
Dim Result = ClassDOC_SEARCH.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_ID)
|
Dim Result = ClassDOC_SEARCH.Get_File_Rights(oDocuments.First.DocId)
|
||||||
|
|
||||||
|
|
||||||
If Not IsNothing(Result) Then
|
If Not IsNothing(Result) Then
|
||||||
@ -2376,8 +2384,8 @@ LOGGER.Error(ex)
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
If clsWD_GET.WDFile_exists(ClassWindreamDocGrid.SELECTED_DOC_PATH, DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer, True) = True Then
|
If clsWD_GET.WDFile_exists(oDocuments.First.DocPath, DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer, True) = True Then
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "Right-Management", "File is existing, but you do not have the rights to open this file! " & vbNewLine & "Please contact your admin!" & vbNewLine & "DOC-ID: " & ClassWindreamDocGrid.SELECTED_DOC_ID.ToString)
|
ClassHelper.MSGBOX_Handler("ERROR", "Right-Management", "File is existing, but you do not have the rights to open this file! " & vbNewLine & "Please contact your admin!" & vbNewLine & "DOC-ID: " & oDocuments.First.DocId.ToString)
|
||||||
Else
|
Else
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "", "File does not exist! Please contact your admin!")
|
ClassHelper.MSGBOX_Handler("ERROR", "", "File does not exist! Please contact your admin!")
|
||||||
End If
|
End If
|
||||||
@ -2390,14 +2398,16 @@ LOGGER.Error(ex)
|
|||||||
INWORK_FILE = False
|
INWORK_FILE = False
|
||||||
tsmiFileInWork.Enabled = True
|
tsmiFileInWork.Enabled = True
|
||||||
Try
|
Try
|
||||||
Dim expression As String
|
'Dim expression As String
|
||||||
expression = "DocID = " & ClassWindreamDocGrid.SELECTED_DOC_ID
|
'expression = "DocID = " & ClassWindreamDocGrid.SELECTED_DOC_ID
|
||||||
Dim foundRowsLevel0() As DataRow
|
'Dim foundRowsLevel0() As DataRow
|
||||||
' Use the Select method to find all rows matching the filter.
|
' Use the Select method to find all rows matching the filter.
|
||||||
foundRowsLevel0 = CURRENT_DOC_RESULTS.Select(expression)
|
'foundRowsLevel0 = CURRENT_DOC_RESULTS.Select(expression)
|
||||||
|
|
||||||
|
Dim oDocuments = DocList.SelectedDocuments
|
||||||
|
If oDocuments.Count = 1 Then
|
||||||
Try
|
Try
|
||||||
Dim oSQLDRList = $"Select COALESCE(IN_WORK_USER,'') IN_WORK_USER, COALESCE(IN_WORK_COMMENT,'') IN_WORK_COMMENT,IN_WORK FROM TBPMO_DOCRESULT_LIST where DocID = {ClassWindreamDocGrid.SELECTED_DOC_ID}"
|
Dim oSQLDRList = $"Select COALESCE(IN_WORK_USER,'') IN_WORK_USER, COALESCE(IN_WORK_COMMENT,'') IN_WORK_COMMENT,IN_WORK FROM TBPMO_DOCRESULT_LIST where DocID = {oDocuments.First.DocId}"
|
||||||
Dim oDT As DataTable = MYDB_ECM.GetDatatable(oSQLDRList)
|
Dim oDT As DataTable = MYDB_ECM.GetDatatable(oSQLDRList)
|
||||||
If Not IsNothing(oDT) Then
|
If Not IsNothing(oDT) Then
|
||||||
If oDT.Rows.Count = 1 Then
|
If oDT.Rows.Count = 1 Then
|
||||||
@ -2407,7 +2417,6 @@ LOGGER.Error(ex)
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
IW_USER = ""
|
IW_USER = ""
|
||||||
IW_COMMENT = ""
|
IW_COMMENT = ""
|
||||||
@ -2434,6 +2443,10 @@ LOGGER.Error(ex)
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
tsmiFileInWork.Text = displ
|
tsmiFileInWork.Text = displ
|
||||||
|
Else
|
||||||
|
MsgBox("Bitte nur eine Datei wählen!", MsgBoxStyle.Exclamation)
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
LOGGER.Warn("Unexpected Error in File-Work Info: " & ex.Message)
|
LOGGER.Warn("Unexpected Error in File-Work Info: " & ex.Message)
|
||||||
@ -2446,7 +2459,9 @@ LOGGER.Error(ex)
|
|||||||
MsgBox("Could not read File Parameters (3)!", MsgBoxStyle.Exclamation)
|
MsgBox("Could not read File Parameters (3)!", MsgBoxStyle.Exclamation)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
ClassFileResult.DocID = ClassWindreamDocGrid.SELECTED_DOC_ID
|
Dim oDocuments = DocList.SelectedDocuments
|
||||||
|
If oDocuments.Count = 1 Then
|
||||||
|
ClassFileResult.DocID = oDocuments.First.DocId
|
||||||
If INWORK_FILE = True Then ' Datei ist in Bearbeitung
|
If INWORK_FILE = True Then ' Datei ist in Bearbeitung
|
||||||
Dim msglbl As String
|
Dim msglbl As String
|
||||||
Dim msg1 As String
|
Dim msg1 As String
|
||||||
@ -2458,7 +2473,7 @@ LOGGER.Error(ex)
|
|||||||
msglbl = "In Bearbeitung durch User '" & IW_USER & "' - Kommentar:"
|
msglbl = "In Bearbeitung durch User '" & IW_USER & "' - Kommentar:"
|
||||||
msg1 = IW_COMMENT
|
msg1 = IW_COMMENT
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
If USER_LANGUAGE <> "de-DE" Then
|
||||||
msglbl = "File in Work through User '" & IW_USER & "' - Comment:"
|
msglbl = "File being edited by user '" & IW_USER & "' - Comment:"
|
||||||
End If
|
End If
|
||||||
ClassHelper.MSGBOX_Handler("INFO", "Information file", msglbl, msg1)
|
ClassHelper.MSGBOX_Handler("INFO", "Information file", msglbl, msg1)
|
||||||
End If
|
End If
|
||||||
@ -2467,6 +2482,8 @@ LOGGER.Error(ex)
|
|||||||
ClassWindreamDocGrid.SELECTED_INWORK = ClassFileResult.InWork
|
ClassWindreamDocGrid.SELECTED_INWORK = ClassFileResult.InWork
|
||||||
Await RUN_WDSEARCH_GRID(True)
|
Await RUN_WDSEARCH_GRID(True)
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmNodeNavigation_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
Private Sub frmNodeNavigation_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||||
@ -2686,7 +2703,9 @@ LOGGER.Error(ex)
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub tsmiFileRightsShow_Click(sender As Object, e As EventArgs) Handles tsmiFileRightsShow.Click
|
Private Sub tsmiFileRightsShow_Click(sender As Object, e As EventArgs) Handles tsmiFileRightsShow.Click
|
||||||
Dim result = ClassDOC_SEARCH.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_ID)
|
Dim oDocuments = DocList.SelectedDocuments
|
||||||
|
|
||||||
|
Dim result = ClassDOC_SEARCH.Get_File_Rights(oDocuments.First.DocId)
|
||||||
If Not IsNothing(result) Then
|
If Not IsNothing(result) Then
|
||||||
Dim msg = "Das aktuelle Recht für Sie (" & USER_USERNAME & ") ist: "
|
Dim msg = "Das aktuelle Recht für Sie (" & USER_USERNAME & ") ist: "
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
If USER_LANGUAGE <> "de-DE" Then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user