📄 main_qtgl_ztfwgl_hx.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form main_qtgl_ztfwgl_hx
BorderStyle = 1 'Fixed Single
Caption = "【客人换箱登记窗口】"
ClientHeight = 4230
ClientLeft = 45
ClientTop = 330
ClientWidth = 7365
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4230
ScaleWidth = 7365
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
Caption = "请选择目标大厅和箱号"
Height = 2580
Left = 75
TabIndex = 4
Top = 1140
Width = 7200
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "main_qtgl_ztfwgl_hx.frx":0000
Height = 1635
Left = 1155
TabIndex = 7
Top = 765
Width = 5910
_ExtentX = 10425
_ExtentY = 2884
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 4
BeginProperty Column00
DataField = "记录号"
Caption = "记录号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "箱号"
Caption = "箱号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "所在大厅"
Caption = "所在大厅"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "状态"
Caption = "状态"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
MarqueeStyle = 4
BeginProperty Column00
ColumnWidth = 645.165
EndProperty
BeginProperty Column01
ColumnWidth = 1365.165
EndProperty
BeginProperty Column02
ColumnWidth = 2085.166
EndProperty
BeginProperty Column03
ColumnWidth = 1365.165
EndProperty
EndProperty
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1170
TabIndex = 6
Top = 315
Width = 2265
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "所在大厅: 箱 号: "
Height = 900
Left = 210
TabIndex = 5
Top = 405
Width = 1035
End
End
Begin VB.CommandButton CmdEnd
Caption = "确定退出"
Height = 345
Left = 2430
TabIndex = 0
Top = 3810
Width = 2745
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 3180
Top = 465
Visible = 0 'False
Width = 1935
_ExtentX = 3413
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XYGLXT"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XYGLXT"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 箱号信息表"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 3165
Top = 795
Visible = 0 'False
Width = 1950
_ExtentX = 3440
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XYGLXT"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XYGLXT"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 临时消费信息表"
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Labydt
ForeColor = &H000000FF&
Height = 210
Left = 1245
TabIndex = 3
Top = 705
Width = 2820
End
Begin VB.Label Labyxh
ForeColor = &H000000FF&
Height = 210
Left = 1245
TabIndex = 2
Top = 180
Width = 2820
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "源 箱 号: 源所在大厅:"
Height = 840
Left = 120
TabIndex = 1
Top = 180
Width = 1110
End
End
Attribute VB_Name = "main_qtgl_ztfwgl_hx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'定义数据集对象
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
Dim txtSQL, myval As String '定义字符串变量
Private Sub Form_Load()
Combo1.AddItem ("中央大厅") '添加大厅列表
Combo1.AddItem ("男大厅")
Combo1.AddItem ("女大厅")
Combo1.ListIndex = 0
'设置窗体标题栏的内容
Me.Caption = Me.Caption & " 操作员: " & frm_main.St1.Panels(3).Text
End Sub
Private Sub Form_Unload(Cancel As Integer)
main_qtgl_ztfwgl.Enabled = True
End Sub
Private Sub Combo1_Click()
'按所在大厅和状态查询箱号信息
Adodc1.RecordSource = "select * from 箱号信息表 where 所在大厅 ='" + Trim(Combo1.Text) + "'and 状态='空闲'order by 记录号"
Adodc1.Refresh
End Sub
Private Sub CmdEnd_Click()
On Error Resume Next
myval = MsgBox("确认将[" & Labydt.Caption & " " & Labyxh.Caption & "箱号]的客人转到[" & Trim(Combo1.Text) & " " & Trim(Adodc1.Recordset.Fields("箱号")) & "箱号]吗?", vbYesNo)
If myval = vbYes Then '确认换箱
'更新临时消费信息
txtSQL = "update 临时消费信息表 set 箱号='" + Trim(Adodc1.Recordset.Fields("箱号")) + "',所在大厅 ='" + Trim(Combo1.Text) + "'where 箱号='" + Trim(Labyxh.Caption) + "'and 所在大厅 ='" + Trim(Labydt.Caption) + "'"
Set rs1 = ESQL(txtSQL)
'更新包房消费信息
txtSQL = "update 包房消费临时表 set 箱号='" + Trim(Adodc1.Recordset.Fields("箱号")) + "',所在大厅 ='" + Trim(Combo1.Text) + "'where 箱号='" + Trim(Labyxh.Caption) + "'and 所在大厅 ='" + Trim(Labydt.Caption) + "'"
Set rs2 = ESQL(txtSQL)
Adodc1.Recordset.Fields("状态") = "使用" '设置包房状态为使用
Adodc1.Recordset.Update '更新记录
'按箱号和大厅查询箱号信息
Adodc1.RecordSource = "select * from 箱号信息表 where 箱号 ='" + Trim(Labyxh.Caption) + "'and 所在大厅 ='" + Trim(Labydt.Caption) + "'"
Adodc1.Refresh
Adodc1.Recordset.Fields("状态") = "空闲" '设置箱号状态为空闲
Adodc1.Recordset.Update '更新记录
main_qtgl_ztfwgl.Enabled = True
main_qtgl_ztfwgl.ListView1.ListItems.Clear
Call main_qtgl_ztfwgl.View_List '调用函数
Unload Me
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -