?
Solved

keep running total and change to currency

Posted on 2009-05-07
5
Medium Priority
?
374 Views
Last Modified: 2013-12-17
Can you  help me figure out how to keep an accurate running total when using the wizard control, and convert these results to a currency value? (because I'm going to have send this value as payment to paypal, so I need currency instead of string--and, of course, accurate) Thanks.
Protected Sub Wizard1_ActiveStepChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Wizard1.ActiveStepChanged
        Select Case Wizard1.ActiveStepIndex
            Case 0
                'How many users                
            Case 1
                lblTally.Text = 23 + rdoConcurrentUsers.SelectedValue
            Case 2
                lblTally.Text = 23 + rdoConcurrentUsers.SelectedValue * rdoHours.SelectedValue
            Case 3
                lblReport.ForeColor = Drawing.Color.Red
                lblReport.Text = "This is a summary of your selections for a webcast service commencing on " & _
                RadDateTimePicker1.SelectedDate & ", for " & rdoHours.SelectedItem.Text & " hours, to support up to " & _
                rdoConcurrentUsers.SelectedItem.Text & " total users." & " If this is correct, click Finish to checkout."
        End Select
    End Sub
 
    Protected Sub rdoConcurrentUsers_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
        lblTxtTotal.Visible = True
        lblTally.Text = 23 + rdoConcurrentUsers.SelectedValue
    End Sub
 
    Protected Sub rdoHours_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
        lblTally.Text = 23 + rdoConcurrentUsers.SelectedValue * rdoHours.SelectedValue
    End Sub

Open in new window

0
Comment
Question by:John Account
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 13

Accepted Solution

by:
copyPasteGhost earned 2000 total points
ID: 24328342
Don't use a string use decimal.
0
 

Author Comment

by:John Account
ID: 24328702
Thank you, Ghost. That did the trick!
0
 

Author Closing Comment

by:John Account
ID: 31579073
Very nice. Thanks.
0
 
LVL 13

Expert Comment

by:copyPasteGhost
ID: 24328764
you are most welcome. If you have anything else don't be shy.
0
 

Author Comment

by:John Account
ID: 24329541
I'll try not to be! Thanks :-)
0

Featured Post

Not sure which OpenStack Certification to get?

So you’ve realized you might want to get certified in OpenStack, but you’re not sure what the benefits might be or even which one you should take. You know there are several certification courses you can choose from, but how do you know which one is right for you?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question