📄 form24.frm
字号:
Width = 735
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "出差理由"
Height = 255
Left = 4800
TabIndex = 39
Top = 1800
Width = 735
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "联系电话"
Height = 255
Left = 7680
TabIndex = 38
Top = 1800
Width = 735
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "※"
ForeColor = &H000000FF&
Height = 255
Left = 480
TabIndex = 37
Top = 1200
Width = 255
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "房间号码"
Height = 255
Left = 600
TabIndex = 36
Top = 2520
Width = 735
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "※"
ForeColor = &H000000FF&
Height = 255
Left = 360
TabIndex = 35
Top = 2520
Width = 255
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "客房类型"
Height = 255
Left = 3000
TabIndex = 34
Top = 2520
Width = 855
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "价格"
Height = 255
Left = 5880
TabIndex = 33
Top = 2520
Width = 615
End
Begin VB.Label Label11
BackStyle = 0 'Transparent
Caption = "天数"
Height = 255
Left = 8280
TabIndex = 32
Top = 2520
Width = 495
End
Begin VB.Label Label12
BackStyle = 0 'Transparent
Caption = "宿 费"
Height = 255
Left = 600
TabIndex = 31
Top = 3120
Width = 855
End
Begin VB.Label Label13
BackStyle = 0 'Transparent
Caption = "应收宿费"
Height = 255
Left = 4560
TabIndex = 30
Top = 3120
Width = 855
End
Begin VB.Label Label15
BackStyle = 0 'Transparent
Caption = "预收押金"
Height = 255
Left = 7560
TabIndex = 29
Top = 3120
Width = 735
End
Begin VB.Label Label16
BackStyle = 0 'Transparent
Caption = "住宿日期"
Height = 255
Left = 600
TabIndex = 28
Top = 3720
Width = 855
End
Begin VB.Label Label17
BackStyle = 0 'Transparent
Caption = "住宿时间"
Height = 255
Left = 3120
TabIndex = 27
Top = 3720
Width = 855
End
Begin VB.Label Label18
BackStyle = 0 'Transparent
Caption = "退宿日期"
Height = 255
Left = 5520
TabIndex = 26
Top = 3720
Width = 855
End
Begin VB.Label Label19
BackStyle = 0 'Transparent
Caption = "退宿时间"
Height = 255
Left = 7920
TabIndex = 25
Top = 3720
Width = 855
End
Begin VB.Label Label20
BackStyle = 0 'Transparent
Caption = "备 注"
Height = 255
Left = 600
TabIndex = 24
Top = 4200
Width = 855
End
End
Attribute VB_Name = "Form24"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'FIXIT: 使用 Option Explicit 可以避免隐式创建 Variant 类型的变量 FixIT90210ae-R383-H1984
Private Sub Command1_Click()
If txtfield(6).Text <> "" And Combo4.Text <> "" Then
'开始保存内容
'Caozuo = "调房保存 ,从'" & Combo5 & "'调整到'" & Combo4 & "' "
'lu_time = Now
'RiZhil
Dim db As Database
Dim EF As Recordset
Dim efc As Recordset
Dim efb As Recordset
Set db = OpenDatabase(ConData, False, False, Constr)
Set EF = db.OpenRecordset("Select * from djb where 房间号='" & Combo2.Text & "' and 标志='1'", dbOpenDynaset)
Set efc = db.OpenRecordset("Select * from kf where 房间号='" & Combo2.Text & "'", dbOpenDynaset)
Set efb = db.OpenRecordset("select * from kf where 房间号='" & Combo4.Text & "'", dbOpenDynaset)
'==================1
EF.Edit
'-------------------------
efc.Edit
efb.Edit
efc("房态") = "脏房"
efb("房态") = "售出"
'---------------------------
EF("凭证号码") = Text1.Text
EF("姓名") = txtfield(0).Text
EF("证件名称") = Combo1
EF("证件号码") = txtfield(1)
EF("详细地址") = txtfield(2)
EF("出差事由") = txtfield(3)
EF("房间号") = Combo4
EF("客房类型") = txtfield(5)
EF("联系电话") = txtfield(4)
EF("客房价格") = txtfield(6)
EF("住宿日期") = txtfield(12)
EF("住宿时间") = txtfield(13)
EF("住宿天数") = 1
EF("宿费") = txtfield(8)
EF("折扣") = txtfield(9)
EF("应收宿费") = txtfield(10)
EF("预收金额") = Val(txtfield(11))
EF("提醒日期") = txtfield(14)
EF("退宿日期") = txtfield(14)
EF("备注") = txtfield(16)
EF("标志") = "1"
EF("日期") = Date
EF("时间") = Time
EF("提醒时间") = txtfield(15)
EF("退宿时间") = txtfield(15)
EF("结款方式") = Combo3.Text
EF("摘要") = "从'" & Combo5 & "'调整到'" & Combo4 & "'"
efb.Update
efc.Update
EF.Update
'-----------------
efb.Close
efc.Close
EF.Close
db.Close
MsgBox "住宿信息已经录入!如果有错误请用住宿客人信息修改功能进行修改! ", vbInformation
Command1.Enabled = False
Else
MsgBox "对不起!您的房间号码和姓名不能为空!"
End If
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Txtfield_Change(Index As Integer)
txtfield(8).Text = Val(txtfield(6).Text) * Val(txtfield(7).Text)
txtfield(10).Text = Val(txtfield(6).Text) * Val(txtfield(7).Text)
End Sub
Private Sub Combo5_Click()
Dim db As Database
Dim EF As Recordset
Set db = OpenDatabase(ConData, False, False, Constr)
Set EF = db.OpenRecordset("select * from djb where 房间号='" & Combo5.Text & "'and 标志='1'", dbOpenDynaset)
'列出记录
If Combo5.Text <> "" Then
Text1.Text = EF("凭证号码")
txtfield(0).Text = EF("姓名")
Combo1 = EF("证件名称")
txtfield(1) = EF("证件号码")
If txtfield(2).Text <> "" Then txtfield(2) = EF("详细地址")
If txtfield(3).Text <> "" Then txtfield(3) = EF("出差事由")
Combo2 = EF("房间号")
If txtfield(5).Text <> "" Then txtfield(5) = EF("客房类型")
If txtfield(4).Text <> "" Then txtfield(4) = EF("联系电话")
txtfield(6) = EF("客房价格")
txtfield(12) = EF("住宿日期")
txtfield(13) = EF("住宿时间")
txtfield(7) = EF("住宿天数")
txtfield(8) = EF("宿费")
txtfield(9) = EF("折扣")
txtfield(10) = EF("应收宿费")
txtfield(11) = EF("预收金额")
txtfield(14) = EF("提醒日期")
txtfield(14) = EF("退宿日期")
If txtfield(16).Text <> "" Then txtfield(16) = EF("备注")
txtfield(15) = EF("提醒时间")
txtfield(15) = EF("退宿时间")
Combo3.Text = EF("结款方式")
End If
'添加合计
EF.Close
db.Close
End Sub
Private Sub Command5_Click()
'Caozuo = "调房登记按钮 "
'lu_time = Now
'RiZhil
Dim db As Database
Dim EF As Recordset
Set db = OpenDatabase(ConData, False, False, Constr)
Set EF = db.OpenRecordset("select * from kf where 房态='售出' order by 房间号", dbOpenDynaset)
'列出记录
If Not (EF.BOF And EF.EOF) Then
Do While Not EF.EOF
Combo5.AddItem EF("房间号")
EF.MoveNext
Loop
End If
Command1.Enabled = True
EF.Close
db.Close
SearchIt
End Sub
Private Sub SearchIt()
Dim db As Database
Dim EF As Recordset
Set db = OpenDatabase(ConData, False, False, Constr)
Set EF = db.OpenRecordset("select * from kf where 房态='空房' order by 房间号", dbOpenDynaset)
'列出记录
If Not (EF.BOF And EF.EOF) Then
Do While Not EF.EOF
Combo4.AddItem EF("房间号")
EF.MoveNext
Loop
End If
EF.Close
db.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -