What I'm trying to do is get all the police dispatch frequences for a particular county. I have it pulling down the states, then showing in another listbox the associated counties. When the user clicks a county I want it to show all the police frequencies. The getCountyFreqsByTag can do this, but i'm not sure how to implement this. I'm using VB.Net Here is my code so far.
Now what I need in my third listbox is a list of all the frequencies associated with a county that the user clicks on. Can someone point me in the right direction with this?
Code:
' This code populates the listbox with all the states
Dim clnt As MSSOAPLib30.SoapClient30
Dim objClient As New ScannerFrequencies.com.radioreference.api.RRWsdl
Dim testinput As ScannerFrequencies.com.radioreference.api.authInfo
Dim testoutput As ScannerFrequencies.com.radioreference.api.StateInfo
testinput = New ScannerFrequencies.com.radioreference.api.authInfo
clnt = New MSSOAPLib30.SoapClient30
testinput.appKey = "12345768"
testinput.username = "aaaa"
testinput.password = "bbbb"
clnt.ClientProperty("ServerHTTPRequest") = True
clnt.MSSoapInit("http://api.radioreference.com/soap2/?wsdl")
For i = 1 To 50
If i = 3 Or i = 7 Or i = 14 Or i = 43 Then
ListBox1.Items.Add(i & "-" & "Invalid Territory")
Else
testoutput = objClient.getStateInfo(i, testinput)
ListBox1.Items.Add(testoutput.stid & "-" & testoutput.stateName)
End If
Next
End Sub
----------------
'This code populates a second listbox with all the counties associated with that state
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Dim clnt As MSSOAPLib30.SoapClient30
Dim objClient As New ScannerFrequencies.com.radioreference.api.RRWsdl
Dim testinput As ScannerFrequencies.com.radioreference.api.authInfo
Dim testoutput As ScannerFrequencies.com.radioreference.api.StateInfo
Dim tmpCountyName As Object
Dim i As Integer
testinput = New ScannerFrequencies.com.radioreference.api.authInfo
clnt = New MSSOAPLib30.SoapClient30
testinput.appKey = "12345678"
testinput.username = aaaa"
testinput.password = "bbbb"
clnt.ClientProperty("ServerHTTPRequest") = True
clnt.MSSoapInit("http://api.radioreference.com/soap2/?wsdl")
i = ListBox1.SelectedIndex
i = i + 1
If i <> 3 And i <> 7 And i <> 14 And i <> 43 Then
testoutput = objClient.getStateInfo(i, testinput)
ListBox2.Items.Clear()
For i = 1 To UBound(testoutput.countyList)
tmpCountyName = testoutput.countyList(i)
ListBox2.Items.Add(tmpCountyName.countyname)
Next i
End If
End Sub
Now what I need in my third listbox is a list of all the frequencies associated with a county that the user clicks on. Can someone point me in the right direction with this?
Last edited: