Visual Basic

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDesktop ProgrammingVisual Basic

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old September 12th, 2010, 02:42 PM
UNF_Steph UNF_Steph is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Sep 2010
Posts: 4 UNF_Steph User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 5 sec
Reputation Power: 0
Question Coding.

I am new to VB and I am trying to work on a project. This is what its supposed to look like: unf.edu/~jgaudry/Courses/cop2010/projects/Project1. html

It is basically a billing program for a restaurant. I am supposed to code to when items are added to the listbox, it will display the totals at the bottom.
I am having trouble stringing the items to go into the list box.

This is what I have so far.

Option Explicit On
Option Strict On

Public Class Form1

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.
ListBox1.Items.Add(CBoxPasta)
ListBox1.Items.Add(CBoxCurry)
ListBox1.Items.Add(CBoxChixSalad)
ListBox1.Items.Add(CBoxShrmpSalad)
ListBox1.Items.Add(CBoxSteak)
ListBox1.Items.Add(CBoxSpecial)
End Sub

Private Function FindTax(ByVal AmountDecimal As Decimal) As Decimal
'Calculate the sales tax.

Return CDec(AmountDecimal * 0.07)

End Function

Private Function Subtotal(ByVal sender As System.Object, ByVal e As System.EventArgs) As Decimal
'Calculate the subtotal.

If CBoxPasta.Checked Then
CBoxPasta = 11
ElseIf CBoxCurry.Checked Then
CBoxCurry = 14


End If
End Function

Private Function Total(ByVal sender As System.Object, ByVal e As System.EventArgs) As Decimal
'Calculate the total.
If Subtotal() <> 0 Then
GrandTotalDecimal += TotalDecimal
SubtotalDecimal = 0
TotalDecimal = 0
End If
End Function

Private Function PriceDecimal() As Object
Throw New NotImplementedException
'Converto to decimal
Decimal.Parse(CBoxPasta.Text)
Decimal.Parse(CBoxCurry.Text)
Decimal.Parse(CBoxChixSalad.Text)
Decimal.Parse(CBoxShrmpSalad.Text)
Decimal.Parse(CBoxSteak.Text)
Decimal.Parse(CBoxSpecial.Text)
End Function

Private Function QuantityInteger() As Char
Throw New NotImplementedException
QuantityInteger=Integer.Parse(
End Function

End Class



Any sort of help would be appreciated.

Last edited by UNF_Steph : September 27th, 2010 at 10:41 PM. Reason: Delete

Reply With Quote
Reply

Viewing: Tutorialized ForumsDesktop ProgrammingVisual Basic > Coding.


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap