📄 frmnewcustreserveinfo.frm
字号:
VERSION 5.00
Begin VB.Form frmNewCustReserveInfo
Caption = "输入新顾客预定房间信息"
ClientHeight = 4305
ClientLeft = 60
ClientTop = 450
ClientWidth = 8655
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4305
ScaleWidth = 8655
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdCancel
Caption = "取消(&C)"
Height = 495
Left = 4560
TabIndex = 18
Top = 3480
Width = 1695
End
Begin VB.CommandButton cmdOK
Caption = "确定(&O)"
Height = 495
Left = 2040
TabIndex = 17
Top = 3480
Width = 1695
End
Begin VB.Frame Frame1
Caption = "请输入新客户的预定信息"
Height = 2415
Left = 240
TabIndex = 0
Top = 840
Width = 8175
Begin VB.ComboBox cboYear
Height = 315
Left = 4080
TabIndex = 22
Text = "cboYear"
Top = 1200
Width = 975
End
Begin VB.ComboBox cboDate
Height = 315
Left = 6360
TabIndex = 20
Text = "cboDate"
Top = 1200
Width = 855
End
Begin VB.ComboBox cboMonth
Height = 315
Left = 5280
TabIndex = 19
Text = "cboMonth"
Top = 1200
Width = 855
End
Begin VB.TextBox txtPrice
Appearance = 0 'Flat
Height = 285
Left = 6000
TabIndex = 16
Top = 1890
Width = 1455
End
Begin VB.ComboBox cboRoomNo
Height = 315
Left = 5640
TabIndex = 10
Text = "cboRoomNo"
Top = 400
Width = 2055
End
Begin VB.TextBox txtCustCreditNo
Appearance = 0 'Flat
Height = 300
Left = 1560
TabIndex = 8
Top = 1890
Width = 1575
End
Begin VB.TextBox txtCustPhoneNo
Appearance = 0 'Flat
Height = 300
Left = 1440
TabIndex = 7
Top = 1410
Width = 1695
End
Begin VB.TextBox txtCustAddress
Appearance = 0 'Flat
Height = 300
Left = 1320
TabIndex = 6
Top = 945
Width = 1815
End
Begin VB.TextBox txtCustName
Appearance = 0 'Flat
Height = 300
Left = 1320
TabIndex = 5
Top = 450
Width = 1815
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "元"
Height = 195
Left = 7560
TabIndex = 23
Top = 1920
Width = 180
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "客户预定房间所付定金:"
Height = 195
Left = 4080
TabIndex = 15
Top = 1920
Width = 1845
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "日"
Height = 195
Left = 7200
TabIndex = 14
Top = 1235
Width = 180
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "月"
Height = 195
Left = 6120
TabIndex = 13
Top = 1235
Width = 180
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "年"
Height = 195
Left = 5040
TabIndex = 12
Top = 1235
Width = 180
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "顾客预定日期:"
Height = 195
Left = 4080
TabIndex = 11
Top = 960
Width = 1125
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "顾客预定的房间号:"
Height = 195
Left = 4080
TabIndex = 9
Top = 480
Width = 1485
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "顾客信用卡号码:"
Height = 195
Left = 240
TabIndex = 4
Top = 1920
Width = 1305
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "顾客电话号码:"
Height = 195
Left = 240
TabIndex = 3
Top = 1440
Width = 1125
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "顾 客 地 址:"
Height = 195
Left = 240
TabIndex = 2
Top = 960
Width = 1035
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "顾 客 姓 名:"
Height = 195
Left = 240
TabIndex = 1
Top = 480
Width = 1035
End
End
Begin VB.Label labVacancyRoomNum
AutoSize = -1 'True
Caption = "目前有 个空闲房间"
BeginProperty Font
Name = "黑体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF8080&
Height = 285
Left = 3000
TabIndex = 21
Top = 360
Width = 2565
End
End
Attribute VB_Name = "frmNewCustReserveInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private cnnHotel As New ADODB.Connection
Private rsCustReserveInfo As New ADODB.Recordset
Private rsRooms As New ADODB.Recordset
Dim VacancyRoomNum As Byte 'VacancyRoomNum用来统计当前空闲的房间个数
Private Sub cboMonth_LostFocus()
Dim i As Integer, str As String, Leap As Boolean
str = Val(cboYear.Text)
If (str Mod 4 = 0) And (str Mod 100 <> 0) Or (str Mod 400 = 0) Then '如果当前年份为闰年
Leap = True
End If
For i = 0 To cboDate.ListCount - 1 '清空cboDate的下拉列表项
cboDate.Clear
Next i
Select Case Val(cboMonth.Text)
Case 1, 3, 5, 7, 8, 10, 12
For i = 1 To 31
cboDate.AddItem i
Next i
Case 2
If Leap Then '如果是闰年
For i = 1 To 29
cboDate.AddItem i
Next i
Else '如果不是闰年
For i = 1 To 28
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -