EDMI: Move Object Status changes into Service
This commit is contained in:
@@ -199,6 +199,25 @@ Namespace IDB
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Function SetObjectState(pObjectId As Long, pState As String, pWho As String) As Boolean
|
||||
Try
|
||||
Dim oSql As String = $"EXEC PRIDB_OBJECT_SET_STATE {pObjectId}, '{pState}', '{pWho}'"
|
||||
Dim oResult = Database.ExecuteNonQuery(oSql)
|
||||
If oResult = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Logger.Info("Object state for [{0}] created: [{1}]", pObjectId, pState)
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Error while setting Object State")
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
Reference in New Issue
Block a user