MS
This commit is contained in:
parent
c402467b38
commit
ecfe669938
@ -1268,32 +1268,33 @@ Public Class Windream
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function SetFileIndexLoS(Path As String, IndexName As String, Values As List(Of String), ObjectType As String) As Boolean
|
||||
Public Function SetFileIndexLoS(pPath As String, IndexName As String, pValues As List(Of String), pObjectType As String) As Boolean
|
||||
If TestSessionLoggedIn() = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
If TestFileExists(Path) = False Then
|
||||
_logger.Warn("File '{0}' does not exist", Path)
|
||||
If TestFileExists(pPath) = False Then
|
||||
_logger.Warn("File '{0}' does not exist", pPath)
|
||||
Return False
|
||||
End If
|
||||
Dim oWMObject As IWMObject6
|
||||
|
||||
Try
|
||||
oWMObject = GetFileByPath(Path)
|
||||
'Das windream-Objekt erzeugen
|
||||
oWMObject = GetFileByPath(pPath)
|
||||
Catch ex As Exception
|
||||
_logger.Warn("Could not create a WMObject for path '{0}'!!", Path)
|
||||
_logger.Warn("Could not create a WMObject for path '{0}'!!", pPath)
|
||||
_logger.Warn(ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
'Das windream-Objekt zum editieren sperren/locken
|
||||
If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then
|
||||
_logger.Warn("File {0} could not be locked")
|
||||
Return False
|
||||
End If
|
||||
|
||||
If oWMObject.aObjectType.aName = Constants.OBJECT_TYPE_DEFAULT Then
|
||||
oWMObject.aObjectType = GetObjectByName(ObjectType, WMEntityObjectType)
|
||||
oWMObject.aObjectType = GetObjectByName(pObjectType, WMEntityObjectType)
|
||||
End If
|
||||
|
||||
Try
|
||||
@ -1301,10 +1302,10 @@ Public Class Windream
|
||||
Dim oConvertedValues As New List(Of String)
|
||||
Dim oArray As Object
|
||||
_logger.Debug("SetFileIndexLoS '{0}' - Indextype: {1} - ... ", IndexName, oType)
|
||||
ReDim oArray(Values.Count - 1)
|
||||
ReDim oArray(pValues.Count - 1)
|
||||
|
||||
For oIndex = 0 To Values.Count - 1
|
||||
Dim oValue As Object = Helpers.ConvertAttrValue(oType, Values.Item(oIndex))
|
||||
For oIndex = 0 To pValues.Count - 1
|
||||
Dim oValue As Object = Helpers.ConvertAttrValue(oType, pValues.Item(oIndex))
|
||||
oArray(oIndex) = oValue
|
||||
Next
|
||||
|
||||
@ -1312,7 +1313,7 @@ Public Class Windream
|
||||
oWMObject.Save()
|
||||
|
||||
If UnlockObject(oWMObject) = False Then
|
||||
_logger.Warn("File {0} could not be unlocked", Path)
|
||||
_logger.Warn("File {0} could not be unlocked", pPath)
|
||||
End If
|
||||
|
||||
Return True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user