MS WMsharedrive Integration

This commit is contained in:
2022-11-11 14:37:36 +01:00
parent f01ffe312d
commit 01b066e4e3
19 changed files with 280 additions and 435 deletions

View File

@@ -10,11 +10,11 @@ Public Class ClassHelper
Try
Dim ochanged As Boolean = False
If WMpath.StartsWith("W:") Then
WMpath = WMpath.Replace("W:", "\\windream\Objects")
WMpath = WMpath.Replace("W:", WMPATH_PREFIX)
ochanged = True
ElseIf WMpath.StartsWith("\") Then
If WMpath.StartsWith("\\windream\Objects") = False Then
WMpath = "\\windream\Objects" & WMpath
If WMpath.StartsWith(WMPATH_PREFIX) = False Then
WMpath = WMPATH_PREFIX & WMpath
ochanged = True
End If
End If
@@ -24,6 +24,23 @@ Public Class ClassHelper
Return WMpath
End Try
End Function
Public Shared Function GetRelPath(WMpath As String)
Try
If WMpath.StartsWith("W:") Then
WMpath = WMpath.Replace("W:", "")
ElseIf WMpath.StartsWith("\") Then
If WMpath.StartsWith(WMPATH_PREFIX) = False Then
WMpath = WMpath.Replace("WMPATH_PREFIX:", "")
End If
End If
LOGGER.Debug("WMpath is: " & WMpath)
Return WMpath
Catch ex As Exception
Return WMpath
End Try
End Function
Public Shared Function Format_Currency(value As String, language As String)
Try
@@ -161,7 +178,7 @@ Public Class ClassHelper
If USER_GENERAL_VIEWER = "NONE" Then
Dim EXT = Path.GetExtension(RESULT_DOC_PATH)
EXT = EXT.Replace(".", "")
Dim sql = String.Format("SELECT VIEWER FROM TBPMO_DOC_USER_VIEW WHERE USER_ID = {0} AND UPPER(FILE_EXTENSION) = UPPER('{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)
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql)
If DT.Rows.Count = 1 Then
Select Case DT.Rows(0).Item("VIEWER")
@@ -192,6 +209,7 @@ Public Class ClassHelper
Public Shared Sub Open_Folder(RESULT_DOC_PATH As Object, DocID As String)
Try
If RESULT_DOC_PATH <> Nothing Then
RESULT_DOC_PATH = FORMAT_WM_PATH(RESULT_DOC_PATH)
Dim _path = Path.GetDirectoryName(RESULT_DOC_PATH)
FOLDER_OPEN(_path, DocID)
Else