📄 main_qtgl_ztfwgl_bfxftj.frm
字号:
VERSION 5.00
Begin VB.Form main_qtgl_ztfwgl_bfxftj
BorderStyle = 1 'Fixed Single
Caption = "【包房消费统计窗口】"
ClientHeight = 3030
ClientLeft = 45
ClientTop = 330
ClientWidth = 6210
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3030
ScaleWidth = 6210
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame2
Height = 2985
Left = 3495
TabIndex = 8
Top = -15
Width = 2655
Begin VB.Label Labje
ForeColor = &H00FF0000&
Height = 240
Left = 1035
TabIndex = 14
Top = 2445
Width = 1500
End
Begin VB.Label Labbz
ForeColor = &H00FF0000&
Height = 240
Left = 1035
TabIndex = 13
Top = 1890
Width = 1500
End
Begin VB.Label Labdw
ForeColor = &H00FF0000&
Height = 240
Left = 1035
TabIndex = 12
Top = 1365
Width = 1500
End
Begin VB.Label Labmc
ForeColor = &H00FF0000&
Height = 240
Left = 1035
TabIndex = 11
Top = 810
Width = 1500
End
Begin VB.Label Labfjh
ForeColor = &H00FF0000&
Height = 240
Left = 1035
TabIndex = 10
Top = 285
Width = 1500
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = $"main_qtgl_ztfwgl_bfxftj.frx":0000
Height = 2445
Left = 150
TabIndex = 9
Top = 300
Width = 945
End
End
Begin VB.Frame Frame1
Height = 2985
Left = 75
TabIndex = 0
Top = -15
Width = 3450
Begin VB.CommandButton CmdTj
Caption = "统计包房消费"
Height = 345
Left = 300
TabIndex = 7
Top = 2430
Width = 1380
End
Begin VB.CommandButton CmdEnd
Caption = "退出"
Height = 345
Left = 1680
TabIndex = 6
Top = 2430
Width = 1380
End
Begin VB.TextBox xh
Height = 300
Left = 1065
TabIndex = 5
Top = 1860
Width = 1380
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "开始时间: 当前时间: 消费时间: 输入箱号:"
Height = 1800
Left = 150
TabIndex = 4
Top = 315
Width = 945
End
Begin VB.Label Labst
BackStyle = 0 'Transparent
ForeColor = &H00FF0000&
Height = 240
Left = 1020
TabIndex = 3
Top = 300
Width = 2220
End
Begin VB.Label Labnow
BackStyle = 0 'Transparent
ForeColor = &H000000FF&
Height = 240
Left = 1020
TabIndex = 2
Top = 825
Width = 2220
End
Begin VB.Label Labxfsj
BackStyle = 0 'Transparent
ForeColor = &H00FF0000&
Height = 240
Left = 1020
TabIndex = 1
Top = 1395
Width = 2220
End
End
End
Attribute VB_Name = "main_qtgl_ztfwgl_bfxftj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs1 As New ADODB.Recordset '定义一个数据集对象
Dim txtSQL As String '定义字符串变量
Private Sub Form_Load()
'设置窗体标题栏的内容
Me.Caption = Me.Caption & " 操作员: " & frm_main.St1.Panels(3).Text
End Sub
Private Sub Form_Unload(Cancel As Integer)
main_qtgl_ztfwgl.Enabled = True '设置main_qtgl_ztfwgl窗体有效
End Sub
Private Sub CmdTj_Click()
'按箱号和所在大厅查询包房消费临时信息
txtSQL = "select * from 包房消费临时表 where 箱号='" + Trim(xh.Text) + "'and 所在大厅 ='" + Trim(main_qtgl_ztfwgl.Combo1.Text) + "'"
Set rs1 = ESQL(txtSQL)
If rs1.RecordCount > 0 Then '当记录大于零时
'赋值给labst.caption等
Labst.Caption = rs1.Fields("进入时间")
Labnow.Caption = Now
Labxfsj.Caption = DateDiff("n", rs1.Fields("进入时间"), Now) & "分钟"
Labfjh.Caption = rs1.Fields("房间号")
Labmc.Caption = rs1.Fields("包房名称")
Labdw.Caption = "分钟"
Labbz.Caption = Trim(rs1.Fields("分钟描述")) & "分钟/" & Val(rs1.Fields("包房价格")) & "元"
Labje.Caption = Format((Val(rs1.Fields("包房价格")) / Val(rs1.Fields("分钟描述"))) * (DateDiff("n", rs1.Fields("进入时间"), Now)), "0.00") & "元整"
Else
MsgBox "此箱号没有进行包房消费!"
End If
End Sub
Private Sub CmdEnd_Click()
main_qtgl_ztfwgl.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -