📄 form25.frm
字号:
BackStyle = 0 'Transparent
Caption = "应收宿费"
Height = 255
Left = 4680
TabIndex = 38
Top = 3120
Width = 855
End
Begin VB.Label Label12
BackStyle = 0 'Transparent
Caption = "宿 费"
Height = 255
Left = 720
TabIndex = 37
Top = 3120
Width = 855
End
Begin VB.Label Label11
BackStyle = 0 'Transparent
Caption = "天数"
Height = 255
Left = 8400
TabIndex = 36
Top = 2520
Width = 495
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "价格"
Height = 255
Left = 6000
TabIndex = 35
Top = 2520
Width = 615
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "客房类型"
Height = 255
Left = 3120
TabIndex = 34
Top = 2520
Width = 855
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "※"
ForeColor = &H000000FF&
Height = 255
Left = 480
TabIndex = 33
Top = 2520
Width = 255
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "房间号码"
Height = 255
Left = 720
TabIndex = 32
Top = 2520
Width = 735
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "※"
ForeColor = &H000000FF&
Height = 255
Left = 600
TabIndex = 31
Top = 1200
Width = 255
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "联系电话"
Height = 255
Left = 7800
TabIndex = 30
Top = 1800
Width = 735
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "出差理由"
Height = 255
Left = 4920
TabIndex = 29
Top = 1800
Width = 735
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "详细地址"
Height = 255
Left = 720
TabIndex = 28
Top = 1800
Width = 735
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "NO"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6720
TabIndex = 27
Top = 360
Width = 375
End
Begin VB.Line Line1
X1 = 0
X2 = 11040
Y1 = 840
Y2 = 840
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "姓 名"
Height = 255
Left = 840
TabIndex = 26
Top = 1200
Width = 615
End
Begin VB.Label Label14
Caption = "房间号码"
Height = 255
Left = 360
TabIndex = 25
Top = 360
Width = 855
End
End
Attribute VB_Name = "Form25"
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 Combo2.Text <> "" Then
'开始保存内容
'Caozuo = "在住客人资料修改保存按钮 "
'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
'-------------------------
'---------------------------
EF("凭证号码") = Text1.Text
EF("姓名") = txtfield(0).Text
EF("证件名称") = Combo1
EF("证件号码") = txtfield(1)
EF("详细地址") = txtfield(2)
EF("出差事由") = txtfield(3)
EF("房间号") = Combo2
EF("客房类型") = txtfield(5)
EF("联系电话") = txtfield(4)
EF("客房价格") = txtfield(6)
EF("住宿日期") = Date
EF("住宿时间") = Time
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.Update
'-----------------
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("证件名称")
If txtfield(1).Text <> "" Then txtfield(1) = EF("证件号码")
If txtfield(2).Text <> "" Then txtfield(2) = EF("详细地址")
If txtfield(3).Text <> "" Then txtfield(3) = EF("出差事由")
Combo2 = EF("房间号")
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
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -