Sub Activity_Create(FirstTime As Boolean)
GetPartyInfo("D")
Wait for GetPartyInfo_Complete
GetPartyInfo("G")
Wait for GetPartyInfo_Complete
GetPartyInfo("R")
Wait for GetPartyInfo_Complete
End Sub
Sub GetPartyInfo(PartyType As String)
Dim cmd As DBCommand
cmd.Initialize
If PartyType = "D" Then
cmd.Name = "select_dealer"
cmd.Parameters = Array As Object(manager.GetString("mobPhone"))
reqManager.ExecuteQuery(cmd, 0, "D")
Else If PartyType = "G" Then
cmd.Name = "select_golden"
cmd.Parameters = Array As Object(manager.GetString("mobPhone"))
reqManager.ExecuteQuery(cmd, 0, "G")
Else If PartyType = "R" Then
cmd.Name = "select_retailer"
cmd.Parameters = Array As Object(manager.GetString("mobPhone"))
reqManager.ExecuteQuery(cmd, 0, "R")
End If
CallSubDelayed(Me, "GetPartyInfo_Complete")
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success = False Then
Log("Error: " & Job.ErrorMessage)
Else
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
Starter.sqlLiteDB.BeginTransaction
Try
For Each records() As Object In result.Rows
' Do Some Database Stuff Here
Next
Starter.sqlLiteDB.TransactionSuccessful
Catch
Msgbox("Error Occured When Updating Data !!!", "Error")
End Try
Starter.sqlLiteDB.EndTransaction
End If
End If
Job.Release
FILL_LIST
End Sub