?? frmaddedit.frm
字號:
VERSION 5.00
Begin VB.Form FrmAddEdit
Caption = "編輯客房續(xù)住"
ClientHeight = 4080
ClientLeft = 60
ClientTop = 450
ClientWidth = 10170
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4080
ScaleWidth = 10170
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_OK
Caption = "確 定"
Height = 495
Left = 7440
TabIndex = 29
Top = 3360
Width = 1095
End
Begin VB.CommandButton Cmd_Close
Caption = "關(guān) 閉"
Height = 495
Left = 9000
TabIndex = 28
Top = 3360
Width = 1095
End
Begin VB.Frame Frame3
Caption = "預定信息"
Height = 2175
Left = 0
TabIndex = 7
Top = 960
Width = 10095
Begin VB.TextBox txtFirstPay
Alignment = 1 'Right Justify
Height = 270
Left = 1200
TabIndex = 15
Text = "0"
Top = 1275
Width = 855
End
Begin VB.TextBox txtLeaveDate
Alignment = 1 'Right Justify
Height = 270
Left = 8640
TabIndex = 14
Top = 360
Width = 1215
End
Begin VB.TextBox txtInDate
Alignment = 1 'Right Justify
Height = 270
Left = 3360
Locked = -1 'True
TabIndex = 13
Top = 315
Width = 1215
End
Begin VB.TextBox txtPrice
Alignment = 1 'Right Justify
Height = 270
Left = 1200
Locked = -1 'True
TabIndex = 12
Text = "0"
Top = 810
Width = 855
End
Begin VB.TextBox txtDays
Alignment = 1 'Right Justify
Height = 270
Left = 5880
TabIndex = 11
Text = "0"
Top = 315
Width = 855
End
Begin VB.ComboBox ComboRate
Height = 300
ItemData = "FrmAddEdit.frx":0000
Left = 3360
List = "FrmAddEdit.frx":002B
Locked = -1 'True
TabIndex = 10
Text = "100"
Top = 795
Width = 855
End
Begin VB.TextBox txtOtherFee
Alignment = 1 'Right Justify
Height = 270
Left = 5880
TabIndex = 9
Text = "0"
Top = 810
Width = 855
End
Begin VB.TextBox txtMemo
Height = 735
Left = 3360
MaxLength = 1000
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 8
Top = 1320
Width = 6495
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "押金(元)"
Height = 180
Left = 240
TabIndex = 27
Top = 1320
Width = 900
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "退房日期"
Height = 180
Left = 7560
TabIndex = 26
Top = 405
Width = 720
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "客房編號:"
Height = 180
Left = 240
TabIndex = 25
Top = 360
Width = 810
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "入住日期"
Height = 180
Left = 2280
TabIndex = 24
Top = 360
Width = 720
End
Begin VB.Label lblRoomNo
AutoSize = -1 'True
Caption = "lblRoomNo"
Height = 180
Left = 1200
TabIndex = 23
Top = 360
Width = 810
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "報價(元)"
Height = 180
Left = 240
TabIndex = 22
Top = 855
Width = 900
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "入住天數(shù)"
Height = 180
Left = 4920
TabIndex = 21
Top = 360
Width = 720
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "折扣(%)"
Height = 180
Left = 2280
TabIndex = 20
Top = 855
Width = 810
End
Begin VB.Label Label16
AutoSize = -1 'True
Caption = "其他費用(元)"
Height = 180
Left = 4440
TabIndex = 19
Top = 855
Width = 1260
End
Begin VB.Label lblTotal
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 9720
TabIndex = 18
Top = 855
Width = 90
End
Begin VB.Label Label18
AutoSize = -1 'True
Caption = "預計總費用(元)"
Height = 180
Left = 7560
TabIndex = 17
Top = 855
Width = 1440
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "其他說明"
Height = 180
Left = 2280
TabIndex = 16
Top = 1320
Width = 720
End
End
Begin VB.Frame Frame1
Caption = "客戶信息"
Height = 855
Left = 0
TabIndex = 0
Top = 0
Width = 10095
Begin VB.Label lblCid
AutoSize = -1 'True
Caption = "lblCid"
Height = 180
Left = 960
TabIndex = 6
Top = 360
Width = 540
End
Begin VB.Label lblCname
AutoSize = -1 'True
Caption = "lblCname"
Height = 180
Left = 4080
TabIndex = 5
Top = 360
Width = 720
End
Begin VB.Label lblCtype
AutoSize = -1 'True
Caption = "lblCtype"
Height = 180
Left = 6480
TabIndex = 4
Top = 360
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "姓 名:"
Height = 180
Left = 3360
TabIndex = 3
Top = 360
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "類 型:"
Height = 180
Left = 5760
TabIndex = 2
Top = 360
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "編 號:"
Height = 180
Left = 240
TabIndex = 1
Top = 360
Width = 540
End
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "操作人員"
Height = 180
Left = 120
TabIndex = 31
Top = 3517
Width = 720
End
Begin VB.Label lblEmpName
AutoSize = -1 'True
Caption = "lblEmpName"
Height = 180
Left = 1080
TabIndex = 30
Top = 3517
Width = 900
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 Cat_LeaveDate()
txtLeaveDate.Text = DateAdd("d", Val(txtDays), Trim(txtInDate))
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 "請錄入入住天數(shù)"
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
Cat_LeaveDate
End Sub
Private Sub txtOtherFee_Change()
Cal_Total
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -