📄 frmktgl_ztfw.frm
字号:
VERSION 5.00
Begin VB.Form frmktgl_ztfw
BorderStyle = 3 'Fixed Dialog
Caption = "开台管理-转台服务"
ClientHeight = 3390
ClientLeft = 45
ClientTop = 330
ClientWidth = 5385
Icon = "frmktgl_ztfw.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3390
ScaleWidth = 5385
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.PictureBox Picture1
Height = 615
Left = 2280
ScaleHeight = 555
ScaleWidth = 2955
TabIndex = 13
Top = 2640
Width = 3015
Begin VB.CommandButton Command2
Caption = "放弃返回"
Height = 375
Left = 1560
TabIndex = 15
Top = 120
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定返回"
Height = 375
Left = 120
TabIndex = 14
Top = 120
Width = 1215
End
End
Begin VB.Frame Frame3
Caption = "请选择要转换的餐台"
Height = 855
Left = 120
TabIndex = 8
Top = 1560
Width = 5175
Begin VB.ComboBox Combo2
Height = 300
Left = 3720
TabIndex = 12
Top = 300
Width = 1215
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1320
TabIndex = 9
Top = 300
Width = 1215
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "餐台名称:"
Height = 180
Left = 2760
TabIndex = 11
Top = 360
Width = 900
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "餐台号:"
Height = 180
Left = 360
TabIndex = 10
Top = 360
Width = 720
End
End
Begin VB.Frame Frame2
Height = 375
Left = 120
TabIndex = 7
Top = 960
Width = 5175
End
Begin VB.Frame Frame1
Caption = "当前房间信息栏"
Height = 855
Left = 120
TabIndex = 0
Top = 120
Width = 5175
Begin VB.Label Label6
AutoSize = -1 'True
Height = 180
Left = 4560
TabIndex = 6
Top = 360
Width = 90
End
Begin VB.Label Label5
AutoSize = -1 'True
Height = 180
Left = 2640
TabIndex = 5
Top = 360
Width = 90
End
Begin VB.Label Label4
AutoSize = -1 'True
Height = 180
Left = 960
TabIndex = 4
Top = 360
Width = 90
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "餐台状态:"
Height = 180
Left = 3360
TabIndex = 3
Top = 360
Width = 900
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "餐台名称:"
Height = 180
Left = 1560
TabIndex = 2
Top = 360
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "餐台号:"
Height = 180
Left = 120
TabIndex = 1
Top = 360
Width = 720
End
End
End
Attribute VB_Name = "frmktgl_ztfw"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
Dim cmd As New ADODB.Command
Private Sub Combo1_Click()
rs.Open "select 餐台名称 from 餐台 where 餐台号='" & Combo1.Text & "'", conn
Combo2.Text = Trim(rs.Fields(0))
rs.Close
End Sub
Private Sub Combo2_Click()
rs.Open "select 餐台号 from 餐台 where 餐台名称='" & Combo2.Text & "'", conn
Combo1.Text = Trim(rs.Fields(0))
rs.Close
End Sub
Private Sub Command1_Click()
a = MsgBox("确定要换餐台吗?", vbYesNo + vbQuestion + vbDefaultButton2, "提示")
rs.Open "select * from 餐台 where 餐台号='" & Combo1.Text & "' and 餐台名称='" & Combo2.Text & "'", conn
If Not rs.EOF And Not rs.BOF Then
If a = vbYes Then
cmd.ActiveConnection = conn
cmd.CommandText = "update 餐台 set 餐台状态='营业' where 餐台号='" & Combo1.Text & "'"
cmd.Execute
cmd.CommandText = "update 餐台 set 餐台状态='空闲' where 餐台号='" & cth & "'"
cmd.Execute
cmd.CommandText = "update 登记ls set 房台号='" & Combo1.Text & "' where 房台号='" & cth & "'"
cmd.Execute
a = MsgBox("转台成功!", vbOKOnly + 64, "提示")
Unload Me
End If
Else
a = MsgBox("餐台信息错误!", vbOKOnly + 16, "提示")
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub form_Load()
rs.Open "select * from 餐台 where 餐台状态='空闲'", conn
If Not rs.EOF And Not rs.BOF Then
Do While Not rs.EOF
Combo1.AddItem Trim(rs.Fields(0))
Combo2.AddItem Trim(rs.Fields(1))
rs.MoveNext
Loop
End If
rs.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -