For i = 0 To Lsalon.RowCount - 1
Lsalon.Position = i
joblist.Add(Lsalon.GetString(cSalonIcon))
salonName = Lsalon.GetString(cSalonName)
salonAddress = Lsalon.GetString(cSalonAddress)
' Now we get the first item in this list and start download with ftp
ExecuteRemoteQuery(joblist.Get(i),salonName)
Next
Sub ExecuteRemoteQuery(Query As String, JobName As String)
Dim job As HttpJob
job.Initialize(JobName, Me)
job.download("http://67.205.112.152/~iqueue/SalonAppIcons/" & Query)
End Sub
Sub JobDone(Job As HttpJob)
ProgressDialogHide
' Delete the topmost job in ftpjobs
If joblist.Size > 0 Then
joblist.RemoveAt(0)
End If
If Job.Success Then
Dim res As String
res = Job.GetString
Dim resmap As Map
resmap.Initialize
resmap.Put("Job",Job)
resmap.Put("Success",Job.Success)
resmap.Put("Result",Job.GetString)
jobresults.Add(resmap)
salon_listView.AddTwoLinesAndBitmap(Job.JobName, "here I need the address" , Job.GetBitmap)
salon_listView.SetSelection(salon_listView.Size-1)
Else
Dim resmap As Map
resmap.Initialize
resmap.Put("Job",Job)
resmap.Put("Success",Job.Success)
resmap.Put("Exception","Error: " & Job.ErrorMessage)
jobresults.Add(resmap)
salon_listView.AddTwoLines(Job.JobName, Job.ErrorMessage)
salon_listView.SetSelection(salon_listView.Size-1)
'ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub