MS
This commit is contained in:
commit
66328bb243
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.9.6.0")>
|
||||
<Assembly: AssemblyFileVersion("1.9.6.0")>
|
||||
<Assembly: AssemblyVersion("1.9.6.1")>
|
||||
<Assembly: AssemblyFileVersion("1.9.6.1")>
|
||||
|
||||
@ -1268,44 +1268,44 @@ Public Class Windream
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function SetFileIndexLoS(pPath As String, IndexName As String, pValues As List(Of String), pObjectType As String) As Boolean
|
||||
Public Function SetFileIndexLoS(Path As String, IndexName As String, Values As List(Of String), ObjectType As String) As Boolean
|
||||
If TestSessionLoggedIn() = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
If TestFileExists(pPath) = False Then
|
||||
_logger.Warn("File '{0}' does not exist", pPath)
|
||||
If TestFileExists(Path) = False Then
|
||||
_logger.Warn("File '{0}' does not exist", Path)
|
||||
Return False
|
||||
End If
|
||||
Dim oWMObject As IWMObject6
|
||||
|
||||
Try
|
||||
'Das windream-Objekt erzeugen
|
||||
oWMObject = GetFileByPath(pPath)
|
||||
oWMObject = GetFileByPath(Path)
|
||||
Catch ex As Exception
|
||||
_logger.Warn("Could not create a WMObject for path '{0}'!!", pPath)
|
||||
_logger.Warn("Could not create a WMObject for path '{0}'!!", Path)
|
||||
_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(pObjectType, WMEntityObjectType)
|
||||
oWMObject.aObjectType = GetObjectByName(ObjectType, WMEntityObjectType)
|
||||
End If
|
||||
|
||||
Try
|
||||
Dim oType As Integer = GetIndexType(IndexName)
|
||||
Dim oConvertedValues As New List(Of String)
|
||||
Dim oArray As Object
|
||||
_logger.Debug("SetFileIndexLoS '{0}' - Indextype: {1} - ... ", IndexName, oType)
|
||||
ReDim oArray(pValues.Count - 1)
|
||||
_logger.Debug("SetFileIndexLoS '{0}' - Indextype: {1} - Values.Count: {2} ... ", IndexName, oType, Values.Count)
|
||||
ReDim oArray(Values.Count - 1)
|
||||
|
||||
For oIndex = 0 To pValues.Count - 1
|
||||
Dim oValue As Object = Helpers.ConvertAttrValue(oType, pValues.Item(oIndex))
|
||||
For oIndex = 0 To Values.Count - 1
|
||||
Dim oValue As Object = Helpers.ConvertAttrValue(oType, Values.Item(oIndex))
|
||||
_logger.Debug("Converted Value: {0}", oValue.ToString)
|
||||
oArray(oIndex) = oValue
|
||||
Next
|
||||
|
||||
@ -1313,7 +1313,7 @@ Public Class Windream
|
||||
oWMObject.Save()
|
||||
|
||||
If UnlockObject(oWMObject) = False Then
|
||||
_logger.Warn("File {0} could not be unlocked", pPath)
|
||||
_logger.Warn("File {0} could not be unlocked", Path)
|
||||
End If
|
||||
|
||||
Return True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user