EDMI: Update Service, Add TestObjectIdExists, Work on GetVariableValue
This commit is contained in:
@@ -469,6 +469,32 @@ Public Class EDMIService
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function TestObjectIdExists(Data As TestObjectIdExistsRequest) As TestObjectIdExistsResponse Implements IEDMIService.TestObjectIdExists
|
||||
Try
|
||||
Dim oSQL As String = $"SELECT IDB_OBJ_ID, ACTIVE, DELETED FROM TBIDB_OBJECT WHERE IDB_OBJ_ID = {Data.ObjectId}"
|
||||
Dim oTable As DataTable = MSSQL_IDB.GetDatatable(oSQL)
|
||||
|
||||
If IsNothing(oTable) OrElse oTable.Rows.Count = 0 Then
|
||||
_Logger.Warn("ObjectId {0} does not exist")
|
||||
Return New TestObjectIdExistsResponse(False)
|
||||
End If
|
||||
|
||||
Dim oRow As DataRow = oTable.Rows.Item(0)
|
||||
Dim oActive = Utils.NotNull(oRow.Item("ACTIVE"), False)
|
||||
Dim oDeleted = Utils.NotNull(oRow.Item("DELETED"), False)
|
||||
|
||||
Return New TestObjectIdExistsResponse(True) With {
|
||||
.Deleted = oDeleted,
|
||||
.Inactive = Not oActive
|
||||
}
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Return New TestObjectIdExistsResponse(False)
|
||||
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function NewFileObject(Data As NewFileObjectRequest) As NewFileObjectResponse Implements IEDMIService.NewFileObject
|
||||
Try
|
||||
Dim oStoreType As String = Data.StoreType
|
||||
|
||||
Reference in New Issue
Block a user