Sub btnEnterProd_Click
GetFilteredProductOnline("'%" & txtDescription.Text & "%'")
End Sub
Sub GetFilteredProductOnline(pdesc As String)
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "GetFilteredProducts"
cmd.Parameters = Array As Object(pdesc)
reqManager.ExecuteQuery(cmd, 0, "GetFilteredProducts")
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success = False Then
Msgbox("Error: " & Job.ErrorMessage, "")
txtDescription.Text = ""
txtIDSelected.Text = ""
txtDescription.RequestFocus
Else
Try
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "GetFilteredProducts" Then 'query tag
If result.Rows.Size > 0 Then
For Each records() As Object In result.Rows
lv.AddSingleLine(records(result.Columns.Get("Description")) & " : " & records(result.Columns.Get("PartNumber")) & " : " & records(result.Columns.Get("ProductID")))
lv.RequestFocus
Next
Else
If modMain.LANGUAGE = "Spanish" Then
Msgbox("Producto No Encontrado", "")
Else
Msgbox("Product Not Found", "")
End If
End If
End If
End If
Catch
Msgbox(LastException.Message, "")
End Try
End If
Job.Release
End Sub