Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27206

VS 2012 Get percentage with select case ?

$
0
0
Hi I'm kinda new to vb.net and am kinda stuck in a invoice i'm writing,it needs to be if 200 or less then 20% off between 200-400 then 25% off and over 400 then 30% off i know this can be done with select case but i don't know how this is my code


Private Sub cmdAmountDue_Click(sender As Object, e As EventArgs) Handles cmdAmountDue.Click
'1.Declare Variables
Dim strCustomerName As String
Dim strElectricalItem As String
Dim decUsualPrice As Decimal
Dim decDeliveryDistance As Decimal
Dim intUnitsBought As Integer
Dim decTotalPrice As Decimal
Dim decReductionAvailable As Decimal
Dim decTotalAfterReduction As Decimal
Dim decDeliveryCharge As Decimal
Dim decAmountDue As Decimal
Const decVAT As Decimal = 0.21

'2. Input Values
strCustomerName = Val(txtCustomerName.Text)
strElectricalItem = Val(txtElectricalItem.Text)
decUsualPrice = Val(txtUsualPrice.Text)
decDeliveryDistance = Val(txtDeliveryDistance.Text)
intUnitsBought = Val(txtUnitsBought.Text)

'3.Calculate Total Price
decTotalPrice = Val(lblTotalPrice.Text)
lblTotalPrice.Text = intUnitsBought * decUsualPrice

'4.Calculate Reduction Available
decReductionAvailable = Val(lblReductionAvailable.Text)
Select Case decReductionAvailable




ANY HELP WOULD BE GREATLY APPRECIATED

Viewing all articles
Browse latest Browse all 27206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>