| Team SILO Forum | |||
|
Forum Rules Staff Team Introduce Yourself Team SILO Wiki Main Page Follow Us! Stumble Upon Delicious Digg Myspace Youtube |
[ Click Here! ] For Full Download and Feedback |
Team SILO Lead Staff [DemonDog] Founder/Lead Designer/Admin [Vulcan] Founder/Global Moderator [HJKDillon] Global Moderator [Reapertura] Global Moderator [hawksghetto] Global Moderator AV Team [xXd34thm3t4131fXx] |
|
| Welcome to Team SILO. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Playtime Cellular Order Form; ~Completed~ | |
|---|---|
| Tweet Topic Started: Mar 13 2010, 11:02 AM (981 Views) | |
| DemonDog | Mar 13 2010, 11:02 AM Post #1 |
|
~Speedy Silence~
|
' Name: Playtime Cellular Project ' Purpose: Calculates the total number of phones ordered and ' the total price of the order. ' Programmer: Jonathan Horton on 2/23/10 ' I)emon I)og Option Explicit On Option Strict On Option Infer Off Public Class frmMain_jwh 'declare module-level variable Private strSalesPerson As String Private Sub frmMain_jwh_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'gets the salesperson's name Const strPrompt As String = "Enter The Salesperson's Name:" Const strTITLE As String = "Name Entry" 'assign the name to the module-level variable strSalesPerson = InputBox(strPrompt, strTITLE) End Sub Private Sub btnExit_cdh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit_cdh.Click Me.Close() 'Closes the application End Sub Private Sub btnCalc_cdh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc_cdh.Click 'Calculates the total number of phones and displays it to "lblTotalPhones_cdh" Const decPhone_Price As Decimal = 25D Const decTax_Rate As Decimal = 0.03D Dim intBluePhones As Integer Dim intPinkPhones As Integer Dim intTotalPhones As Integer Dim decSubtotal As Decimal Dim decSalestax As Decimal Dim decTotalPrice As Decimal 'calculate the total number of phones ordered Integer.TryParse(txtBlue_cdh.Text, intBluePhones) Integer.TryParse(txtPink_cdh.Text, intPinkPhones) intTotalPhones = intBluePhones + intPinkPhones 'calculate the subtotal decSubtotal = intTotalPhones * decPhone_Price 'calculate the sales tax decSalestax = decSubtotal * decTax_Rate 'calculate the toal price decTotalPrice = decSubtotal * decTax_Rate 'display total amounts lblTotalPhones_cdh.Text = Convert.ToString(intTotalPhones) lblTotalPrice_cdh.Text = decTotalPrice.ToString("C2") 'display tax and saleperson's name lblMessage_jwh.Text = strSalesPerson & ":" & " Your sales tax was " _ & decSalestax.ToString("C2") _ & "." & ControlChars.NewLine & strSalesPerson End Sub Private Sub btnClear_cdh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear_cdh.Click 'Empties all of the "Text Boxes" and "Total Phones & Total Price" txtName_cdh.Text = String.Empty txtAddress_cdh.Text = String.Empty txtCity_cdh.Text = String.Empty txtState_cdh.Text = String.Empty txtZip_cdh.Text = String.Empty txtBlue_cdh.Text = String.Empty txtPink_cdh.Text = String.Empty lblTotalPhones_cdh.Text = String.Empty lblTotalPrice_cdh.Text = String.Empty lblMessage_jwh.Text = String.Empty 'It sets the mouse/pointer to the "txtName_cdh" Text Field txtName_cdh.Focus() End Sub Private Sub lblMessage_jwh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblMessage_jwh.Click End Sub End Class |
|
Youtube Channel | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · VB.Net Examples · Next Topic » |
| Track Topic · E-mail Topic |
3:56 AM Jul 11
|
Quote of the Moment |
|
|
||
|
Team SILO Affiliates [ Click to Affiliate ] [ Show All Affiliates ] |
| Please support us by clicking our vote buttons everyday! | |
Theme Designed by McKee91
Forum Elements used from Brawl Domain
Hosted for free by ZetaBoards · Privacy Policy






3:56 AM Jul 11