title: VB.net Price Calculation
body: <p>I'm making an application to display the total price of a order. It decides the price based on the number of items ordered and if the customer is a wholesale or retailer.</p>
  
  <p>Calculation it uses:</p>
  
  <p>1-4 items = $10 per item if wholesaler.</p>
  
  <p>5+ items = $9 each if wholesaler.</p>
  
  <p>1-3 items = $15 per item if retailer.</p>
  
  <p>4-8 item = $14 per item if retailer.</p>
  
  <p>9+ item = $12 per item if retailer.
  I'm stuck on the calculation and confused as to how I would do it.</p>
  
  <p>The GUI is complete, here is what I have so far:</p>
  
  <p>Picture of GUI: <a href="http://i.imgur.com/P2tDz.png" rel="nofollow">http://i.imgur.com/P2tDz.png</a></p>
  
  <pre><code>Dim quantity As Decimal
  Dim price As Decimal
  Dim wholesaler As Integer
  Dim retailer As Integer
  
  Integer.TryParse(txtUnits.Text, price)
  
  chkRetailer.Text = retailer
  chkWholesale.Text = wholesaler
  
  
  If wholesaler Then
      If Quantity &lt;= 4 Then
          Price = 10
      Else
          Price = 9
      End If
  ElseIf retailer Then
      If Quantity &lt;= 3 Then
          Price = 15
      ElseIf Quantity &lt;= 8 Then
          Price = 14
      Else
          Price = 12
      End If
  End If
  
  lblTotPrice.Text = price * quantity
  
  lblTotPrice.Text = price.ToString("C0")
  </code></pre>
  
  <p>It's the calculation I'm confused on, I have the display and the declarations correct I believe.</p>
  
  <p>Thank you. </p>