Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  Program: Broadway tickets
  2. ' Author: Ryan Mari
  3. ' Date: November 5, 2010
  4. ' Purpose:to make a useable website
  5.  
  6.  
  7.  
  8.  
  9. Public Class Broadwaytickets
  10.     ' Cost per ticket - used in multiple procedures
  11.    Const_cdecPriceperticket as decimal = 0.99d
  12.  
  13.     Private Property strNumberoftickets As String
  14.  
  15.     Private Property intNumberoftickets As Integer
  16.  
  17.     Private Property decTotalcostoftickets As Integer
  18.  
  19.     Private Sub txtNumberOfTickets_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtNumberOfDownloads.TextChanged
  20.  
  21.     End Sub
  22.  
  23.     Private Sub LblBroadwaytickets_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LblBroadwaytickets.Click
  24.  
  25.     End Sub
  26.  
  27.     Private Sub Btncalculatecost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDisplaycost.Click
  28.         ' This event handler is executed when the user clicks
  29.        ' Calculate cost button. It calculates and displays the cost
  30.        ' of tickets
  31.  
  32.         Dim strNumberoftickets As String
  33.         Dim intNumberoftickets As Integer
  34.         Dim decTotalcostoftickets As Decimal
  35.  
  36.         strNumberoftickets = txtNumberOfDtickets.Text
  37.         intNumberoftickets = Convert.ToInt32(strNumberoftickets)
  38.         decTotalcostoftickets = intNumberoftickets * _cdecPriceperticket()
  39.         LblTotalCostOftickets.Text = decTotalcostoftickets.ToString
  40.  
  41.     End Sub
  42.  
  43.     Private Sub Btncost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnclear.Click
  44.  
  45.         ' this event handler is executed when the user clicks the
  46.        ' clear button. it clears the number of songs text box
  47.        ' and the text property of the Total Cost Of Tickets label.
  48.        ' Then, it sets the focus on the txtNumberoftickets Textbox objects
  49.  
  50.         txtNumberOftickets.Clear()
  51.         LblTotalCostOftickets.Text = ""
  52.         txtNumberOftickets.Focus()
  53.     End Sub
  54.  
  55.     Private Sub Btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnexit.Click
  56.         ' close the window and terminate the application
  57.  
  58.         Close()
  59.     End Sub
  60.  
  61.     Private Sub frmBroadwaytickets_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  62.         ' this event handler is executed when the form is loaded
  63.        ' it displays the cost heading, clears the text property of the
  64.        ' total cost of Tickets label, and sets the focus on
  65.        ' the txtnumberoftickets textbox object
  66.  
  67.         lblCostheading.Text = _cdecPriceperticket.ToString("c") & " per Ticket"
  68.         LblTotalCostOftickets.Text = ""
  69.         txtNumberOftickets.Focus()
  70.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement