Public Sub PostCustomer
Dim inputJ As String = (Utility.RequestText(Request))
Dim parser As JSONParser
parser.Initialize(inputJ)
Dim cust As clsCustomer
cust.Initialize
Dim root As Map = parser.NextObject
'Dim Customers As List = root.Get("Customers")
Dim User As Map = root.Get("User")
cust.CustomerShortName = root.Get("CustomerShortName")
cust.CustomerBaseCurrency = root.Get("CustomerBaseCurrency")
cust.RootUserName = root.Get("RootUserName")
cust.CustomerName = root.Get("CustomerName")
cust.CID = root.Get("CID")
Try
Dim rs As ResumableSub = Main.DL.createCustomer(User.Get("UID"), User.Get("Fname"), User.Get("Lname"),1,cust)
Wait For (rs) Complete (Result As HttpResponseMessage)
Utility.ReturnHttpResponse(Result,Response)
StopMessageLoop
Catch
Log(LastException)
StopMessageLoop
End Try
End Sub
Public Sub PutCustomer (cid As Int, cName As String, cShortName As String, cBaseCurrency As Int) As HttpResponseMessage
StopMessageLoop
'Call to regular Sub
UpdateCustomer
End Sub