Hi All,
I am in an online VB course and am struggling to create an application that will calculate a discount in accordance to the amount that is purchased for 3 different package values.
Package A: 99$
Package B: 199$
Package C: 299$
10-19 Purchased = 20% Discount
20-49 Purchased = 30% Discount
50-99 Purchased = 40% Discount
100 or more Purchased = 50% Discount
I need to create a form that will allow me to enter the amounts for each of the 3 packages, and apply a discount in accordance to the amount entered for each. Finnally I have to display the totals for each package after the discount and then a final grand total of all added together in 1 label.
If anyone has any suggestions or any help at all it is much appreciated!
Here is what it looks like,
Attachment 95379
and basic code just to shut it down and clear..
Public Class Lab2
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
' Variable declarations
Dim decPackageAAmount As Decimal ' Package A Quantity
Dim decPackageBAmount As Decimal ' Package B Quantity
Dim decPackageCAmount As Decimal ' Package C Quantity
Dim decTotals As Decimal ' Totals
End Sub
Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
' Clear the TextBoxes and Label.
txtPackageAAmount.Clear()
txtPackageBAmount.Clear()
txtPackageCAmount.Clear()
lblDiscount.Text = String.Empty
lblTotals.Text = String.Empty
' Give the focus to txtPackageAAmount
txtPackageAAmount.Focus()
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
' Close the form.
Me.Close()
End Sub
End Class
-----------------------
Thank you!
Jordan
I am in an online VB course and am struggling to create an application that will calculate a discount in accordance to the amount that is purchased for 3 different package values.
Package A: 99$
Package B: 199$
Package C: 299$
10-19 Purchased = 20% Discount
20-49 Purchased = 30% Discount
50-99 Purchased = 40% Discount
100 or more Purchased = 50% Discount
I need to create a form that will allow me to enter the amounts for each of the 3 packages, and apply a discount in accordance to the amount entered for each. Finnally I have to display the totals for each package after the discount and then a final grand total of all added together in 1 label.
If anyone has any suggestions or any help at all it is much appreciated!
Here is what it looks like,
Attachment 95379
and basic code just to shut it down and clear..
Public Class Lab2
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
' Variable declarations
Dim decPackageAAmount As Decimal ' Package A Quantity
Dim decPackageBAmount As Decimal ' Package B Quantity
Dim decPackageCAmount As Decimal ' Package C Quantity
Dim decTotals As Decimal ' Totals
End Sub
Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
' Clear the TextBoxes and Label.
txtPackageAAmount.Clear()
txtPackageBAmount.Clear()
txtPackageCAmount.Clear()
lblDiscount.Text = String.Empty
lblTotals.Text = String.Empty
' Give the focus to txtPackageAAmount
txtPackageAAmount.Focus()
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
' Close the form.
Me.Close()
End Sub
End Class
-----------------------
Thank you!
Jordan