EDMIAPI: Add SetObjectState Function

This commit is contained in:
Jonathan Jenne
2022-02-07 14:07:46 +01:00
parent 41447e80c5
commit 1e5d8c96fd
4 changed files with 63 additions and 0 deletions

View File

@@ -194,9 +194,11 @@ Public Class Client
Try
Dim oNewFile As New Modules.IDB.NewFile(LogConfig, Channel)
Return Await oNewFile.RunAsync(pFilePath, pObjectStoreName, pObjectKind, pBusinessEntity, pImportOptions)
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function
@@ -204,9 +206,23 @@ Public Class Client
Try
Dim oUpdateFile As New Modules.IDB.UpdateFile(LogConfig, Channel)
Return Await oUpdateFile.RunAsync(pFilePath, pObjectId, pImportOptions)
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function
Public Async Function SetObjectStateAsync(pObjectId As Long, pState As String, Optional pOptions As Options.SetObjectStateOptions = Nothing) As Task(Of Boolean)
Try
Dim oSetObjectState As New Modules.IDB.SetObjectState(LogConfig, Channel)
Return Await oSetObjectState.RunAsync(pObjectId, pState, pOptions)
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
@@ -221,9 +237,11 @@ Public Class Client
Try
Dim oImportFile As New Modules.Globix.ImportFile(LogConfig, Channel)
Return Await oImportFile.RunAsync(pFilePath, pProfileId, pAttributeValues, pObjectStoreName, pObjectKind, pBusinessEntity, pImportOptions)
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function