📄 frmaddedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmAddEdit
Caption = "编辑客房续住"
ClientHeight = 4185
ClientLeft = 60
ClientTop = 345
ClientWidth = 10335
Icon = "FrmAddEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 4185
ScaleWidth = 10335
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "客户信息"
Height = 855
Left = 120
TabIndex = 23
Top = 120
Width = 10095
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "编 号:"
Height = 180
Left = 240
TabIndex = 29
Top = 360
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "类 型:"
Height = 180
Left = 5760
TabIndex = 28
Top = 360
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "姓 名:"
Height = 180
Left = 3360
TabIndex = 27
Top = 360
Width = 540
End
Begin VB.Label lblCtype
AutoSize = -1 'True
Caption = "lblCtype"
Height = 180
Left = 6480
TabIndex = 26
Top = 360
Width = 720
End
Begin VB.Label lblCname
AutoSize = -1 'True
Caption = "lblCname"
Height = 180
Left = 4080
TabIndex = 25
Top = 360
Width = 720
End
Begin VB.Label lblCid
AutoSize = -1 'True
Caption = "lblCid"
Height = 180
Left = 960
TabIndex = 24
Top = 360
Width = 540
End
End
Begin VB.Frame Frame3
Caption = "预定信息"
Height = 2175
Left = 120
TabIndex = 2
Top = 1080
Width = 10095
Begin VB.TextBox txtMemo
Height = 735
Left = 3360
MaxLength = 1000
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 10
Top = 1320
Width = 6495
End
Begin VB.TextBox txtOtherFee
Alignment = 1 'Right Justify
Height = 270
Left = 5880
TabIndex = 9
Text = "0"
Top = 810
Width = 855
End
Begin VB.ComboBox ComboRate
Height = 300
ItemData = "FrmAddEdit.frx":0CCA
Left = 3360
List = "FrmAddEdit.frx":0CF5
Locked = -1 'True
TabIndex = 8
Text = "100"
Top = 795
Width = 855
End
Begin VB.TextBox txtDays
Alignment = 1 'Right Justify
Height = 270
Left = 5880
TabIndex = 7
Text = "0"
Top = 315
Width = 855
End
Begin VB.TextBox txtPrice
Alignment = 1 'Right Justify
Height = 270
Left = 1200
Locked = -1 'True
TabIndex = 6
Text = "0"
Top = 810
Width = 855
End
Begin VB.TextBox txtInDate
Alignment = 1 'Right Justify
Height = 270
Left = 3360
Locked = -1 'True
TabIndex = 5
Top = 315
Width = 1215
End
Begin VB.TextBox txtLeaveDate
Alignment = 1 'Right Justify
Height = 270
Left = 8640
TabIndex = 4
Top = 360
Width = 1215
End
Begin VB.TextBox txtFirstPay
Alignment = 1 'Right Justify
Height = 270
Left = 1200
TabIndex = 3
Text = "0"
Top = 1275
Width = 855
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "其他说明"
Height = 180
Left = 2280
TabIndex = 22
Top = 1320
Width = 720
End
Begin VB.Label Label18
AutoSize = -1 'True
Caption = "预计总费用(元)"
Height = 180
Left = 7560
TabIndex = 21
Top = 855
Width = 1440
End
Begin VB.Label lblTotal
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 9720
TabIndex = 20
Top = 855
Width = 90
End
Begin VB.Label Label16
AutoSize = -1 'True
Caption = "其他费用(元)"
Height = 180
Left = 4440
TabIndex = 19
Top = 855
Width = 1260
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "折扣(%)"
Height = 180
Left = 2280
TabIndex = 18
Top = 855
Width = 810
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "入住天数"
Height = 180
Left = 4920
TabIndex = 17
Top = 360
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "报价(元)"
Height = 180
Left = 240
TabIndex = 16
Top = 855
Width = 900
End
Begin VB.Label lblRoomNo
AutoSize = -1 'True
Caption = "lblRoomNo"
Height = 180
Left = 1200
TabIndex = 15
Top = 360
Width = 810
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "入住日期"
Height = 180
Left = 2280
TabIndex = 14
Top = 360
Width = 720
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "客房编号:"
Height = 180
Left = 240
TabIndex = 13
Top = 360
Width = 810
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "退房日期"
Height = 180
Left = 7560
TabIndex = 12
Top = 405
Width = 720
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "押金(元)"
Height = 180
Left = 240
TabIndex = 11
Top = 1320
Width = 900
End
End
Begin VB.CommandButton Cmd_Close
Caption = "关 闭"
Height = 495
Left = 9120
TabIndex = 1
Top = 3480
Width = 1095
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 495
Left = 7560
TabIndex = 0
Top = 3480
Width = 1095
End
Begin VB.Label lblEmpName
AutoSize = -1 'True
Caption = "lblEmpName"
Height = 180
Left = 1200
TabIndex = 31
Top = 3637
Width = 900
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "操作人员"
Height = 180
Left = 240
TabIndex = 30
Top = 3637
Width = 720
End
End
Attribute VB_Name = "FrmAddEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TmpId As Integer '入住编号
'计算预定当前房间的总费用
Private Sub Cal_Total()
lblTotal = Round(Val(txtPrice) * Val(ComboRate) * Val(txtDays) / 100, 0) + Val(txtOtherFee)
End Sub
Private Sub Cmd_Close_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
If Trim(txtLeaveDate) = False Then
MsgBox "请录入退房日期"
txtLeaveDate.SetFocus
Exit Sub
End If
If Val(txtDays) <= 0 Then
MsgBox "请录入入住天数"
txtDays.SetFocus
Exit Sub
End If
If Val(txtOtherFee) < 0 Then
MsgBox "请录入有效的其他费用"
txtOtherFee.SetFocus
Exit Sub
End If
If Val(txtFirstPay) < 0 Then
MsgBox "请录入有效的押金"
txtFirstPay.SetFocus
Exit Sub
End If
'将此入住记录保存
With MyReg
.CustId = lblCid
.RoomNo = lblRoomNo
.InDate = MakeStr(txtInDate)
.LeaveDate = MakeStr(txtLeaveDate)
.Days = Val(txtDays)
.Price = Val(txtPrice)
.Rate = Val(ComboRate)
.OtherFee = Val(txtOtherFee)
.FirstPay = Val(txtFirstPay)
.Memo = MakeStr(txtMemo)
.UserName = CurUser.UserName
.Update (TmpId)
End With
Unload Me
End Sub
Private Sub txtDays_Change()
Cal_Total
End Sub
Private Sub txtOtherFee_Change()
Cal_Total
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -