Billing System.

I have to create a billing system for a restaurant that looks like this using Visual Basic: http://www.unf.edu/~jgaudry/Courses/cop ... ject1.html
When you click on an item it adds it to the listbox which then calculates the subtotal, tax, and total.

Am I on the right track? What do I need to do?




Option Explicit On
Option Strict On

Public Class Form1
Const Pasta_Price_Decimal As Decimal = 11D
Const Curry_Price_Decimal As Decimal = 14D
Const ChixSalad_Price_Decimal As Decimal = 12D
Const ShrmpSalad_Price_Decimal As Decimal = 14D
Const Steak_Price_Decimal As Decimal = 18D
Const Special_Price_Decimal As Decimal = 6D
Const Tax_Rate_Decimal As Decimal = 0.07D

Private Property PriceDecimal As Decimal


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
'Lists the items selected to be calculated in totals.
If CBoxPasta.Checked Then
PriceDecimal = Pasta_Price_Decimal
ElseIf CBoxCurry.Checked Then
PriceDecimal = Curry_Price_Decimal
ElseIf CBoxChixSalad.Checked Then
PriceDecimal = ChixSalad_Price_Decimal
ElseIf CBoxShrmpSalad.Checked Then
PriceDecimal = ShrmpSalad_Price_Decimal
ElseIf CBoxSteak.Checked Then
PriceDecimal = Steak_Price_Decimal
ElseIf CBoxSpecial.Checked Then
PriceDecimal = Special_Price_Decimal

End If
End Sub

Private Sub ButtonClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonClear.Click
'Clear the project.

ButtonClear_Click(sender, e)
TextSubtotal.Clear()
TextFindTax.Clear()
TextTotal.Clear()
End Sub

Private Sub ButtonExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonExit.Click
'Terminate the project.

Me.Close()
End Sub

Private Sub TextSubtotal_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextSubtotal.TextChanged
'Calculates the Subtotal.
End Sub

Private Sub TextFindTax_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextFindTax.TextChanged
'Calculates the Sales Tax.


End Sub

Private Sub TextTotal_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextTotal.TextChanged
'Calculates the Total.
End Sub
End Class


Any help is appreciated.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories