Private Sub btnBill_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnBill.Click
item = txtItem.Text
duration = txtduration.Text
Dim fmtstr As String = "{0, -15} {1, 17:c2}"
'-----------------------------------------------------------------------------------------------
lstResult2.Items.Add(" Receipt from Eddie's Equipment Rental")
Select Case item.ToUpper & duration.ToUpper
Case "1", "h"
lstResult2.Items.Add(String.Format(fmtstr, "Rug cleaner", 16))
Case "2", "h"
lstResult2.Items.Add(String.Format(fmtstr, "Lawn mower", 12))
Case "3", "h"
lstResult2.Items.Add(String.Format(fmtstr, "Paint sprayer", 20))
Case "1", "f"
lstResult2.Items.Add(String.Format(fmtstr, "Rug cleaner", 24))
Case "2", "f"
lstResult2.Items.Add(String.Format(fmtstr, "Lawn mower", 18))
Case "3", "f"
lstResult2.Items.Add(String.Format(fmtstr, "Paint sprayer", 40))
End Select
lstResult2.Items.Add(String.Format(fmtstr, "Deposit", 30))
lstResult2.Items.Add(String.Format(fmtstr, "Total", 25 + 25))
'----------------------------------------------------------------------- End Sub
End Class
mjltech 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.