📄 frmreserve.frm
字号:
VERSION 5.00
Begin VB.Form frmReserve
BackColor = &H00FF0000&
Caption = "Reserve"
ClientHeight = 6465
ClientLeft = 60
ClientTop = 345
ClientWidth = 6675
ForeColor = &H00FF0000&
LinkTopic = "Form1"
ScaleHeight = 6465
ScaleWidth = 6675
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
BackColor = &H00FF0000&
Caption = "Reservation"
BeginProperty Font
Name = "MS Sans Serif"
Size = 13.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 3255
Left = 600
TabIndex = 5
Top = 2520
Width = 5535
Begin VB.CommandButton cmdBack
Caption = "Back"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 4
ToolTipText = "Back to choices form?"
Top = 2640
Width = 1215
End
Begin VB.CommandButton cmdLogin
Caption = "&Log in"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3960
TabIndex = 1
ToolTipText = "Log in?"
Top = 1080
Visible = 0 'False
Width = 975
End
Begin VB.TextBox txtId
Height = 375
Left = 1800
TabIndex = 0
Top = 1080
Visible = 0 'False
Width = 1935
End
Begin VB.CommandButton cmdBrowse
Caption = "&Browse"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3120
TabIndex = 3
ToolTipText = "View videos Info"
Top = 1920
Visible = 0 'False
Width = 1215
End
Begin VB.CommandButton cmdReserve
BackColor = &H00808080&
Caption = "&Reserve"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 2
ToolTipText = "Reserve a video?"
Top = 1920
Visible = 0 'False
Width = 1215
End
Begin VB.Label Label1
BackColor = &H00FF0000&
Caption = "Login-Id:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 6
Top = 1080
Visible = 0 'False
Width = 1095
End
End
Begin VB.Label Label3
Alignment = 2 'Center
BackColor = &H00FF0000&
Caption = "Point-of-sale system"
BeginProperty Font
Name = "Times New Roman"
Size = 26.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 735
Left = 960
TabIndex = 9
Top = 1080
Width = 4695
End
Begin VB.Label Label2
Caption = "Label2"
Height = 15
Left = 2040
TabIndex = 8
Top = 240
Width = 255
End
Begin VB.Label Label6
Alignment = 2 'Center
BackColor = &H00FF0000&
Caption = "Millenium Video Store"
BeginProperty Font
Name = "Times New Roman"
Size = 26.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 735
Left = 840
TabIndex = 7
Top = 480
Width = 5055
End
End
Attribute VB_Name = "frmReserve"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdBack_Click()
Unload Me
frmChoices.Show
End Sub
Private Sub cmdBrowse_Click()
Unload Me
frmBrowse.Show
End Sub
Private Sub cmdLogin_Click()
CheckId
End Sub
Private Sub cmdReserve_Click()
Unload Me
frmMakeReservation.Show
End Sub
Private Sub cmdVideosDetails_Click()
Dim strTitle As String, Title As Long
Dim varData As Variant
strTitle = InputBox("Enter a title")
If Len(strTitle) > 0 Then
Title = RunSelectQuery("select ID,Title,Copies,CopiesAvailable," _
& "Description,Director,NextDue," _
& "Year from Videos " _
& "where Title = '" & strTitle & "'", varData)
Unload Me
frmVideo.Show
If Title = 0 Then
frmVidoe.Hide
MsgBox "Pai sei dun have such video"
frmReserve.Show
Else
frmVideo.txtFields(0).Text = ConvertToString(varData(0, 0)) ' ID
frmVideo.txtFields(1).Text = ConvertToString(varData(1, 0)) ' Title
frmVideo.txtFields(2).Text = ConvertToString(varData(2, 0)) ' Copies
frmVideo.txtFields(3).Text = ConvertToString(varData(3, 0)) ' CopiesAvailable
frmVideo.txtFields(4).Text = ConvertToString(varData(4, 0)) ' Description
frmVideo.txtFields(5).Text = ConvertToString(varData(5, 0)) ' Director
frmVideo.txtFields(6).Text = ConvertToString(varData(6, 0)) ' NextDue
frmVideo.txtFields(7).Text = ConvertToString(varData(7, 0)) ' Year
End If
End If
End Sub
Private Sub CheckId()
Dim Login_Id As Long, strId As String
Dim varData As Variant
strId = txtId.Text
If Len(strId) > 0 Then
Login_Id = RunSelectQuery("select ID,Name,Address,PostalCode,Phone,TapesRented,TapesReserved from Members " _
& "where ID = " & strId & " ", varData)
cmdReserve.Visible = True
cmdBrowse.Visible = True
If Login_Id = 0 Then
cmdReserve.Visible = False
cmdBrowse.Visible = False
MsgBox "Go and die lar..not a member want to reserve video."
Unload Me
frmMain.Show
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -