Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Program Name: WK12- Project 2: JM Sales
- 'AUTHOR: STONEBONETHONE
- 'DATE: November, 2017
- 'OVERVIEW: Program calculates user entered sales made by 5 employees, who all have a salesID
- 'The ID and total sales of the employee are calculated and displayed in a results textbox (edit)
- Option Explicit On
- Option Infer Off
- Option Strict On
- Public Class Form1
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
- salesIDListBox.Items.Add("101")
- salesIDListBox.Items.Add("112")
- salesIDListBox.Items.Add("203")
- salesIDListBox.Items.Add("301")
- salesIDListBox.Items.Add("302")
- '(from when the salesIDs were part of an array)
- 'Dim highestSub As Integer = salesID.GetUpperBound(0)
- 'For subscript As Integer = 0 To highestSub
- ' salesIDListBox.Items.Add(salesID(subscript))
- 'Next
- End Sub
- Private Sub addToTotalButton_Click(sender As Object, e As EventArgs) Handles addToTotalButton.Click
- 'CAN THIS BE IN A SEP. PROCEDURE AND BROUGHT HERE????
- 'This is the array for the sales made
- Dim salesMade(4) As Double
- 'This is part of the loop to add the array amounts to the listbox items
- Dim highestSub As Integer = salesMade.GetUpperBound(0)
- Dim subscript As Integer
- 'Convert the listbox items to Double variables to hold the indv. elements
- 'This loop will add the sales amounts to the 'DCHECK!!!!!
- 'Perhaps right, but is just need one at a time, maybe no loop
- Do While subscript <= highestSub
- Double.TryParse(enterSalesTextBox.Text, salesMade(subscript))
- enterSalesTextBox.Text = String.Empty 'NEED?????
- 'send each element to each corresponding item
- subscript += 1
- Loop
- End Sub
- Private Sub CreateTheReport(sender As Object, e As EventArgs) Handles createReportButton.Click
- ''Display the IDs and their corresponding sales amounts (NOT MONEY)
- 'Dim fillerVariable As Integer
- 'Dim highestSub As Integer
- 'Dim subscript As Integer
- '' For fillerVariable = 0 To salesIDListBox.SelectedItems.Count - 1 'Need - 1?
- ''salesTotalTextBox.Text &= salesIDListBox.SelectedItems.ToString()
- '' Next
- 'salesTotalTextBox =
- 'Calculate the total sales amount based on all the sales
- End Sub
- End Class
- ''This is placed here so that only other private subs can use it 'should it be an array?
- 'Private salesID() As String = {"101", "112", "203", "301", "302"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement