It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming ASP & ASP.NET Forum

Just need help with the array part of a visual basicquestion

Just need help with the array part of a visual basicquestion

Postby Paladin on Sat Feb 07, 2009 5:23 pm

I need help with this following array question.

Create an array-based project to track and report on the number of kilometers travelled by a team of salespeople.Salespeople have ID numbers ranging from 1 to 12, and there are 12 salespeople in total.Separately, each salesperson travels between various towns each day, accumulating kilometers on their cars.The application should input the kilometers travelled by particular salespeople,and provide a lookup facility to find how many kilometers have been travelled by a particular salesperson.
This is what I have done so far.
Public Class KilometerForm

Dim SalesKm(11, 1) As Integer '12rows 2 columns
Dim SalesID As Integer = 1
Dim KmTravelled As Integer

Private Sub SubmitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitButton.Click
'Verify sales id as number
If Not Integer.TryParse(SalesIDTextBox.Text, SalesID) Then
'Not a number
Exit Sub
Else
SalesKm(SalesID - 1, 0) = SalesID
End If
If Not Integer.TryParse(KilometersTextBox.Text, KmTravelled) Then
Exit Sub
End If
End Sub


Private Sub ExitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitButton.Click
Me.Close()
End Sub

End Class

When I run it nothing happens and there is no errors,I would be grateful if someone told me what to do or give me the remaining code on the array part.Once I have that done I will be able to do the rest of the question myself
Paladin
 
Posts: 2
Joined: Sat Feb 07, 2009 5:10 pm

Re: Just need help with the array part of a visual basicquestion

Postby Paladin on Sun Feb 08, 2009 1:08 pm

Its ok I got it to work now
Paladin
 
Posts: 2
Joined: Sat Feb 07, 2009 5:10 pm


Return to ASP & ASP.NET Forum

Who is online

Users browsing this forum: No registered users and 1 guest