Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program: Broadway tickets
- ' Author: Ryan Mari
- ' Date: November 5, 2010
- ' Purpose:to make a useable website
- Public Class Broadwaytickets
- ' Cost per ticket - used in multiple procedures
- Const_cdecPriceperticket as decimal = 0.99d
- Private Property strNumberoftickets As String
- Private Property intNumberoftickets As Integer
- Private Property decTotalcostoftickets As Integer
- Private Sub txtNumberOfTickets_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtNumberOfDownloads.TextChanged
- End Sub
- Private Sub LblBroadwaytickets_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LblBroadwaytickets.Click
- End Sub
- Private Sub Btncalculatecost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDisplaycost.Click
- ' This event handler is executed when the user clicks
- ' Calculate cost button. It calculates and displays the cost
- ' of tickets
- Dim strNumberoftickets As String
- Dim intNumberoftickets As Integer
- Dim decTotalcostoftickets As Decimal
- strNumberoftickets = txtNumberOfDtickets.Text
- intNumberoftickets = Convert.ToInt32(strNumberoftickets)
- decTotalcostoftickets = intNumberoftickets * _cdecPriceperticket()
- LblTotalCostOftickets.Text = decTotalcostoftickets.ToString
- End Sub
- Private Sub Btncost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnclear.Click
- ' this event handler is executed when the user clicks the
- ' clear button. it clears the number of songs text box
- ' and the text property of the Total Cost Of Tickets label.
- ' Then, it sets the focus on the txtNumberoftickets Textbox objects
- txtNumberOftickets.Clear()
- LblTotalCostOftickets.Text = ""
- txtNumberOftickets.Focus()
- End Sub
- Private Sub Btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnexit.Click
- ' close the window and terminate the application
- Close()
- End Sub
- Private Sub frmBroadwaytickets_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- ' this event handler is executed when the form is loaded
- ' it displays the cost heading, clears the text property of the
- ' total cost of Tickets label, and sets the focus on
- ' the txtnumberoftickets textbox object
- lblCostheading.Text = _cdecPriceperticket.ToString("c") & " per Ticket"
- LblTotalCostOftickets.Text = ""
- txtNumberOftickets.Focus()
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement