handle create record false
This commit is contained in:
@@ -13,13 +13,22 @@ Public Class ClassNodeCreator
|
||||
_ImageList = pImageList
|
||||
End Sub
|
||||
|
||||
Public Function AddNode(pEntityId As Integer, pNodeCaption As String, pParentNodeId As Integer, pNodeConfigId As Integer) As Boolean
|
||||
Public Function AddNode(pEntityId As Integer, pNodeCaption As String, pParentNodeId As Integer, pNodeConfigId As Integer, pCreateRecord As Boolean) As Boolean
|
||||
|
||||
' Create a new Record in the given Entity
|
||||
Dim oRecordId = ClassRecordCommands.CreateRecordProcedure(pEntityId)
|
||||
If oRecordId = 0 Then
|
||||
Logger.Warn("Could not create a record. Exiting.")
|
||||
Return False
|
||||
Dim oRecordId
|
||||
|
||||
' If a record should be created, do it.
|
||||
' Otherwise we set the record id to 0.
|
||||
If pCreateRecord Then
|
||||
' Create a new Record in the given Entity
|
||||
oRecordId = ClassRecordCommands.CreateRecordProcedure(pEntityId)
|
||||
If oRecordId = 0 Then
|
||||
Logger.Warn("Could not create a record. Exiting.")
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
' Zero will be handled by CreateNodeProcedure
|
||||
oRecordId = 0
|
||||
End If
|
||||
|
||||
' Update the proxy?
|
||||
|
||||
Reference in New Issue
Block a user