krazykrisi Newbie
Joined: 19 Oct 2005 Posts: 2
|
Posted: Oct 19th, 2005 11:52 AM Post subject: I need some help with If/Then |
|
|
Here is what I want to do:
Create a customer order entry system. The order taker will select the item to purchase and the quantity.
GIVEN:
Hammer $2.25 each Socket Set $12.00 each
*beep* Driver $1.75 each Compressor $125.00
By default the Apply Discount box is not seen
Calculate total calculates the total and determines of the discount box shows.
If Quantity is greater then 250 then display the discount group box and display on the 1% discount. Apply that discount to the total and display in the Label 2 area.
If the Quantity is greater then 500 then display only the 3% discount option, apply the 3% discount to the total and display in the Label 2 area.
Here is what I have for the calculate button event:
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim dblHammer, dblScrewDriver, dblSocketSet, dblCompressor As Double
Dim dblQuantity As Double
Dim dblTotal As Double
dblTotal = Convert.ToDouble(lblTotal.Text)
dblHammer = 2.25
dblScrewDriver = 1.75
dblSocketSet = 12.0
dblCompressor = 125.0
dblQuantity = Convert.ToDouble(nudQuantity.Value)
If radHammer.Visible Then
dblTotal = dblHammer * dblQuantity
Else
If radScrewDriver.Visible Then
dblTotal = dblScrewDriver * dblQuantity
Else
If radSocketSet.Visible Then
dblTotal = dblSocketSet * dblQuantity
Else
If radCompressor.Visible Then
dblTotal = dblCompressor * dblQuantity
End If
End If
End If
End If
' If dblQuantity > 250 Then
'grpDiscount()
'End If
It runs but it doesn't work, what am I doing wrong? |
|