I am learning vb and one of my projects is to make a price schedule using full day and half day rates as well as adding a deposit, etc. I don't want you to tell me what to do just please what I am missing. I haven't been able to get it to run but if I can I can salvage some points. Thank you in advance..
Public Class frmEddies
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblDuration.Click
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub btnRates_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRates.Click
'Display rates for given items per length of time rented.
Dim item, duration As String
Dim deposit As String
item = txtItem.Text
duration = txtDuration.Text
deposit = CStr(30.0)
Dim fmtStr As String = "{0,-22}{1,12} {2,12}"
lstRates.Items.Clear()
lstRates.Items.Add(String.Format(fmtStr, "Price of Equipment", "Half-day", "Full-day"))
lstRates.Items.Add(String.Format(fmtStr, "1. Rug cleaner", "$16.00", "$24.00"))
lstRates.Items.Add(String.Format(fmtStr, "2. Lawn mower", "$12.00", "$18.00"))
lstRates.Items.Add(String.Format(fmtStr, "3. Paint Sprayer", "$20.00", "$30.00"))
End Sub
Private Sub btnBill_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBill.Click
'Shows total bill.
Dim item, duration, deposit As String
item = txtItem.Text
duration = txtDuration.Text
deposit = CStr(30.0)
Dim fmtStr As String = "{0,-20}{1, 10}{2, 10} "
lstBill.Items.Clear()
lstBill.Items.Add("Receipt from Eddie's Equipment Rental")
'Program will not run past this point....
Select Case duration + deposit + item
Case "1H"
lstBill.Items.Add("Rug cleaner" & "$16.00 ")
lstBill.Items.Add("Deposit" & "$30.00")
lstBill.Items.Add("Total" = duration + item)
Case "1F"
lstBill.Items.Add("Rug cleaner" & "$24.00 " & "Deposit" & "$30.00" & "Total" = duration + item)
Case "2H"
lstBill.Items.Add("Lawn mower" & "$12.00 " & "Deposit" & "$30.00" & "Total" = duration + item)
Case "2F"
lstBill.Items.Add("Lawn mower" & "$18.00 " & "Deposit" & "$30.00" & "Total" = duration + item)
Case "3H"
lstBill.Items.Add("Paint sprayer" & "$20.00 " & "Deposit" & "$30.00" & "Total" = duration + item)
Case "3F"
lstBill.Items.Add("Paint sprayer" & "$30.00 " & "Deposit" & "$30.00" & "Total" = duration + item)
End Select
End Sub
End Class