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.I am not asking anyone to do the full question for me just the array part.
This post has been edited by Pvk258: 07 February 2009 - 09:47 AM

New Topic/Question
Reply




MultiQuote




|