📄 frminqiureexpand.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmInqiureExpand
BorderStyle = 1 'Fixed Single
Caption = "查询外卖信息"
ClientHeight = 8100
ClientLeft = 45
ClientTop = 330
ClientWidth = 8250
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 8100
ScaleWidth = 8250
Begin VB.Frame Frame1
Caption = "查询"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2100
Left = 240
TabIndex = 1
Top = 5640
Width = 7812
Begin VB.CommandButton cmdInquire
Caption = "查询"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 6120
TabIndex = 6
Top = 360
Width = 1212
End
Begin VB.CommandButton cmdExit
Caption = "退出查询"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 6120
TabIndex = 5
Top = 960
Width = 1212
End
Begin VB.TextBox txtDeskNO
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 1845
TabIndex = 4
Top = 420
Width = 3300
End
Begin VB.OptionButton OpP
Caption = "晚餐"
Height = 255
Left = 3960
TabIndex = 3
Top = 1560
Width = 1095
End
Begin VB.OptionButton OpA
Caption = "中餐"
Height = 255
Left = 1920
TabIndex = 2
Top = 1560
Value = -1 'True
Width = 735
End
Begin MSComCtl2.DTPicker DTReserve
Height = 375
Left = 1800
TabIndex = 7
Top = 960
Width = 3375
_ExtentX = 5953
_ExtentY = 661
_Version = 393216
Format = 72482817
CurrentDate = 37903
End
Begin VB.Label Label1
Caption = "负责员工编号:"
Height = 495
Left = 240
TabIndex = 10
Top = 360
Width = 1575
End
Begin VB.Label Label4
Alignment = 2 'Center
Caption = "中晚餐:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 600
TabIndex = 9
Top = 1680
Width = 1050
End
Begin VB.Label Label3
Caption = "时间:"
Height = 375
Left = 960
TabIndex = 8
Top = 1080
Width = 615
End
End
Begin VB.ListBox ListYou
Height = 1680
Left = 240
TabIndex = 0
Top = 3720
Width = 7695
End
Begin MSDataGridLib.DataGrid DataGrid1
Height = 2865
Left = 240
TabIndex = 11
Top = 240
Width = 7740
_ExtentX = 13653
_ExtentY = 5054
_Version = 393216
HeadLines = 1
RowHeight = 15
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 = 2
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
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Label Label7
Caption = "你的菜单:"
Height = 255
Left = 360
TabIndex = 12
Top = 3360
Width = 975
End
End
Attribute VB_Name = "frmInqiureExpand"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdInquire_Click()
Dim txtSQL As String
Dim MsgText As String
Dim mrc As ADODB.Recordset
If Trim(txtDeskNO.Text) = "" Then
sMeg = "负责员工编号不能为空"
MsgBox sMeg, vbOKOnly + vbExclamation, "警告"
txtDeskNO.SetFocus
Exit Sub
Else
If OpA.Value = True Then
txtSQL = "select * from 外卖服务 where 员工编号 = '" & Trim(txtDeskNO.Text) & "' and 时间 = '" & DTReserve.Value & "' and 中晚餐 <> 0"
Else
txtSQL = "select * from 外卖服务 where 员工编号 = '" & Trim(txtDeskNO.Text) & "' and 时间 = '" & DTReserve.Value & "' and 中晚餐 = 0"
End If
End If
Set mrc = ExecuteSQL(txtSQL, MsgText)
Set DataGrid1.DataSource = mrc
GetMenu
End Sub
Sub GetMenu()
ListYou.Clear
Dim txtSQL As String
Dim MsgText As String
Dim mrc As ADODB.Recordset
If OpA.Value = True Then
txtSQL = "select 菜肴名称 from 菜单 where 桌位编号 = '" & Trim(txtDeskNO.Text) & "' and 时间 = '" & DTReserve.Value & "' and 中晚餐 <> 0"
Else
txtSQL = "select 菜肴名称 from 菜单 where 桌位编号 = '" & Trim(txtDeskNO.Text) & "' and 时间 = '" & DTReserve.Value & "' and 中晚餐 = 0"
End If
Set mrc = ExecuteSQL(txtSQL, MsgText)
For i = 0 To mrc.RecordCount - 1
ListYou.AddItem mrc.Fields(0)
mrc.MoveNext
Next
mrc.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -