home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD150222152001.psc / frmMain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-01-29  |  3.1 KB  |  99 lines

  1. VERSION 5.00
  2. Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
  3. Begin VB.Form frmMain 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Search for Rental Rates (Client)"
  6.    ClientHeight    =   1476
  7.    ClientLeft      =   36
  8.    ClientTop       =   264
  9.    ClientWidth     =   4176
  10.    Icon            =   "frmMain.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   1476
  15.    ScaleWidth      =   4176
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.CommandButton cmdGetRate 
  18.       Caption         =   "&Get Rate"
  19.       Height          =   264
  20.       Left            =   2640
  21.       TabIndex        =   4
  22.       Top             =   600
  23.       Width           =   852
  24.    End
  25.    Begin MSComCtl2.DTPicker dtpRentalDate 
  26.       Height          =   264
  27.       Left            =   1176
  28.       TabIndex        =   2
  29.       Top             =   600
  30.       Width           =   1056
  31.       _ExtentX        =   1863
  32.       _ExtentY        =   466
  33.       _Version        =   393216
  34.       Format          =   24444929
  35.       CurrentDate     =   36281
  36.    End
  37.    Begin VB.TextBox txtCategoryId 
  38.       Height          =   288
  39.       Left            =   1176
  40.       TabIndex        =   0
  41.       Text            =   "EC"
  42.       Top             =   168
  43.       Width           =   432
  44.    End
  45.    Begin VB.Label lblResult 
  46.       BorderStyle     =   1  'Fixed Single
  47.       Height          =   264
  48.       Left            =   120
  49.       TabIndex        =   5
  50.       Top             =   1020
  51.       Width           =   3888
  52.    End
  53.    Begin VB.Label Label2 
  54.       Alignment       =   1  'Right Justify
  55.       AutoSize        =   -1  'True
  56.       Caption         =   "Rental Date:"
  57.       Height          =   192
  58.       Left            =   240
  59.       TabIndex        =   3
  60.       Top             =   660
  61.       Width           =   888
  62.    End
  63.    Begin VB.Label Label1 
  64.       Alignment       =   1  'Right Justify
  65.       AutoSize        =   -1  'True
  66.       Caption         =   "Category ID:"
  67.       Height          =   192
  68.       Left            =   216
  69.       TabIndex        =   1
  70.       Top             =   240
  71.       Width           =   888
  72.    End
  73. Attribute VB_Name = "frmMain"
  74. Attribute VB_GlobalNameSpace = False
  75. Attribute VB_Creatable = False
  76. Attribute VB_PredeclaredId = True
  77. Attribute VB_Exposed = False
  78. Option Explicit
  79. Private mRentalRates As CRentalRates
  80. Private Sub cmdGetRate_Click()
  81. 'Search for the Vehicle category and rental date, using the
  82. 'CRentalRates object.
  83.   Dim curDailyRate As Currency, curWeeklyRate As Currency
  84.   If mRentalRates.GetRentalRates(txtCategoryId.Text, _
  85.     dtpRentalDate.Value, curDailyRate, curWeeklyRate) Then
  86.     lblResult.Caption = "Daily rate = " _
  87.       & Format(curDailyRate, "Currency") _
  88.       & ", Weekly rate = " _
  89.       & Format(curWeeklyRate, "Currency")
  90.   Else
  91.     lblResult.Caption = "Rental rates not found"
  92.   End If
  93. End Sub
  94. Private Sub Form_Load()
  95. 'Create an instance of CRentalRates. This
  96. 'will open the database and recordset.
  97.   Set mRentalRates = New CRentalRates
  98. End Sub
  99.