Private Sub ShowDialog(Item As Map, RowId As Long, Action As Int)
...
Dim params As List
params.Initialize
'keys based on the template json file
params.AddAll(Array As String(id, Item.Get("FirstName"), Item.Get("LastName"), Item.Get("Company"), Item.Get("Address"), Item.Get("Email")))
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("update_customers", Array As Object(params.Get(0), params.Get(1), params.Get(2), params.Get(3), params.Get(4), params.Get(5), RowId))
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
Wait For (req.ExecuteCommand(cmd,Null)) JobDone(j As HttpJob)
If j.Success Then
TMS.TMessage1_Show("Transaction Successful")
Else
Log("ERROR (7): " & j.ErrorMessage)
TMS.TMessage3_Show( j.ErrorMessage)
End If
j.Release
...
End Sub
Sub CreateCommand(Name As String, Parameters() As Object) As DBCommand
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = Name
If Parameters <> Null Then cmd.Parameters = Parameters
Return cmd
End Sub