merge 2
This commit is contained in:
parent
b01b2f0014
commit
01acaa5e48
@ -1222,15 +1222,42 @@ Public Class frmValidator
|
|||||||
viewerID = Proc.Id
|
viewerID = Proc.Id
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Function ReplaceWindreamDriveLetter(Filepath As String) As String
|
||||||
|
Return Filepath.
|
||||||
|
Replace("W:", "\\windream\objects").
|
||||||
|
Replace("K:", "\\windream\objects")
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function Next_GUID(Filepath As String, ProfilId As Integer, OrderByNewest As Boolean) As Integer
|
||||||
|
Dim oFilePath = ReplaceWindreamDriveLetter(Filepath).ToUpper()
|
||||||
|
Dim oSQL = $"
|
||||||
|
SELECT GUID FROM TBPM_PROFILE_FILES WHERE
|
||||||
|
PROFIL_ID = {CURRENT_ProfilGUID} AND EDIT = 0 AND IN_WORK = 0 AND
|
||||||
|
UPPER(REPLACE(FILE_PATH, 'W:','\\windream\objects')) <> '{oFilePath}' AND
|
||||||
|
UPPER(REPLACE(FILE_PATH, 'W:','\\windream\objects')) NOT IN (
|
||||||
|
SELECT UPPER(FILE_PATH)
|
||||||
|
FROM TBPM_FILES_USER_NOT_INDEXED
|
||||||
|
WHERE (PROFIL_ID = {ProfilId}) AND (UPPER(USR_NAME) = UPPER('{Environment.UserName}'))
|
||||||
|
)
|
||||||
|
{IIf(OrderByNewest, " ORDER BY DMS_ERSTELLT_DATE DESC", "")}
|
||||||
|
"
|
||||||
|
|
||||||
|
Return ClassDatabase.Execute_Scalar(oSQL, MyConnectionString, True)
|
||||||
|
End Function
|
||||||
|
|
||||||
Function Get_Next_GUID() As Integer
|
Function Get_Next_GUID() As Integer
|
||||||
Try
|
Try
|
||||||
Dim newGUID As Integer
|
Dim newGUID As Integer
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Old Document_Path: " & OLD_Document_Path, False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Old Document_Path: " & OLD_Document_Path, False)
|
||||||
If PROFIL_sortbynewest = True Then
|
'If PROFIL_sortbynewest = True Then
|
||||||
newGUID = TBPM_PROFILE_FILESTableAdapter.cmdgetNextFile_GUID_Newest(CURRENT_ProfilGUID, OLD_Document_Path, Environment.UserName)
|
' newGUID = TBPM_PROFILE_FILESTableAdapter.cmdgetNextFile_GUID_Newest(CURRENT_ProfilGUID, OLD_Document_Path, Environment.UserName)
|
||||||
Else
|
'Else
|
||||||
newGUID = TBPM_PROFILE_FILESTableAdapter.cmdGetNextFile_GUID(CURRENT_ProfilGUID, OLD_Document_Path, Environment.UserName)
|
' newGUID = TBPM_PROFILE_FILESTableAdapter.cmdGetNextFile_GUID(CURRENT_ProfilGUID, OLD_Document_Path, Environment.UserName)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
|
newGUID = Next_GUID(OLD_Document_Path, CURRENT_ProfilGUID, PROFIL_sortbynewest)
|
||||||
|
|
||||||
Document_Path = ""
|
Document_Path = ""
|
||||||
CURRENT_DOC_PATH = ""
|
CURRENT_DOC_PATH = ""
|
||||||
If newGUID > 0 Then
|
If newGUID > 0 Then
|
||||||
@ -2166,16 +2193,16 @@ Public Class frmValidator
|
|||||||
Try
|
Try
|
||||||
Dim lookup As LookupControl = oControl
|
Dim lookup As LookupControl = oControl
|
||||||
Dim wertWD = aktivesDokument.GetVariableValue(oWMIndexName)
|
Dim wertWD = aktivesDokument.GetVariableValue(oWMIndexName)
|
||||||
If wertWD.GetType.ToString.Contains("System.Object") Then
|
|
||||||
|
If IsNothing(wertWD) Then
|
||||||
|
lookup.SelectedValues = New List(Of String)
|
||||||
|
ElseIf wertWD.GetType.ToString.Contains("System.Object") Then
|
||||||
Dim oArrlist As New List(Of String)
|
Dim oArrlist As New List(Of String)
|
||||||
For Each oVectorRow As Object In wertWD
|
For Each oVectorRow As Object In wertWD
|
||||||
|
|
||||||
oArrlist.Add(oVectorRow.ToString)
|
oArrlist.Add(oVectorRow.ToString)
|
||||||
Next
|
Next
|
||||||
lookup.SelectedValues = oArrlist
|
lookup.SelectedValues = oArrlist
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
_CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString
|
_CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user