📄 main_qtgl_mdgl.frm
字号:
Width = 930
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
ForeColor = &H00FF0000&
Height = 225
Index = 0
Left = 645
TabIndex = 21
Top = 300
Width = 555
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
ForeColor = &H00FF0000&
Height = 225
Index = 1
Left = 2115
TabIndex = 20
Top = 285
Width = 945
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
ForeColor = &H00FF0000&
Height = 225
Index = 2
Left = 1050
TabIndex = 19
Top = 675
Width = 705
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
ForeColor = &H00FF0000&
Height = 225
Index = 3
Left = 2415
TabIndex = 18
Top = 675
Width = 645
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
ForeColor = &H00FF0000&
Height = 225
Index = 4
Left = 870
TabIndex = 17
Top = 1065
Width = 840
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
ForeColor = &H00FF0000&
Height = 225
Index = 5
Left = 1050
TabIndex = 16
Top = 1380
Width = 1935
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
ForeColor = &H00FF0000&
Height = 225
Index = 6
Left = 2415
TabIndex = 15
Top = 1065
Width = 645
End
End
Begin VB.Frame Frame3
Height = 615
Left = 7380
TabIndex = 3
Top = 1980
Width = 3150
Begin VB.CommandButton Comgz
Caption = "挂帐"
Height = 330
Left = 240
TabIndex = 7
Top = 195
Width = 2670
End
End
Begin VB.Frame Frame5
Height = 600
Left = 7380
TabIndex = 6
Top = 4950
Width = 3150
Begin VB.CommandButton Comend
Caption = "退出买单管理"
Height = 330
Left = 255
TabIndex = 14
Top = 180
Width = 2670
End
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "main_qtgl_mdgl.frx":08DC
Height = 5550
Left = 60
TabIndex = 30
Top = 15
Width = 7185
_ExtentX = 12674
_ExtentY = 9790
_Version = 393216
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 = 7
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
BeginProperty Column04
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 Column05
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 Column06
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
ColumnWidth = 794.835
EndProperty
BeginProperty Column01
ColumnWidth = 1365.165
EndProperty
BeginProperty Column02
ColumnWidth = 1379.906
EndProperty
BeginProperty Column03
ColumnWidth = 14.74
EndProperty
BeginProperty Column04
ColumnWidth = 1110.047
EndProperty
BeginProperty Column05
ColumnWidth = 14.74
EndProperty
BeginProperty Column06
ColumnWidth = 1035.213
EndProperty
EndProperty
End
End
Attribute VB_Name = "main_qtgl_mdgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim itmX As ListItem '定义一个listitem对象
Dim rs1 As New ADODB.Recordset '定义数据集对象
Dim a As Integer '定义整型变量
Dim list, key, myval As String '定义字符串变量
Public Sub list_change() '定义房台列表函数
ListView1.ListItems.Clear
Adodc1.RecordSource = "select * from 房间台号信息表 where 状态='营业'order by 编号"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
key = "(" & Trim(Adodc1.Recordset.Fields("编号")) & ")" & Trim(Adodc1.Recordset.Fields("房台名称"))
Set itmX = ListView1.ListItems.Add(, , key, 1)
Adodc1.Recordset.MoveNext
Loop
End If
Label5.Caption = "营业总数: " & Adodc1.Recordset.RecordCount & "个"
End Sub
Private Sub Form_Load()
Call list_change '调用函数
If ListView1.ListItems.Count > 0 Then
Adodc1.RecordSource = "select * from 房间台号信息表 where 状态='营业'order by 编号"
Adodc1.Refresh
For a = 0 To 7
If Adodc1.Recordset.RecordCount > 0 Then
Label4(a).Caption = Trim(Adodc1.Recordset.Fields(a)) '赋值给label4(a).caption
End If
Next a
End If
Me.Caption = Me.Caption & " " & frm_main.St1.Panels(3).text
End Sub
Private Sub Check1_Click() '选择数据显示模式
If Check1.Value = 1 Then
Adodc1.RecordSource = "select * from 房间台号信息表 where 状态='营业'order by 编号"
Adodc1.Refresh
Frame1.Visible = False
Else
Frame1.Visible = True
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub ListView1_Click()
If ListView1.ListItems.Count > 0 Then
list = ListView1.SelectedItem
Adodc1.RecordSource = "select * from 房间台号信息表 where 编号='" + Right(Left(list, 4), 3) + "'order by 编号"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
For a = 0 To 7
Label4(a).Caption = Trim(Adodc1.Recordset.Fields(a)) '赋值给label4(a).caption
Next a
Text1.text = Trim(Adodc1.Recordset.Fields("编号")) '赋值给text1.text
End If
End If
End Sub
Private Sub Comgz_Click() '调入挂帐
Load main_qtgl_mdgl_gz
main_qtgl_mdgl_gz.Show
main_qtgl_mdgl.Enabled = False
End Sub
Private Sub Commd_Click() '调入买单
Load main_qtgl_mdgl_md
main_qtgl_mdgl_md.Show
main_qtgl_mdgl.Enabled = False
End Sub
Private Sub ComView_Click() '显示点单金额
Adodc2.RecordSource = "select sum(数量)as 数量1,sum(金额)as 金额合计 from 点单临时表 where 点单临时表.状态='" + "点单" + "'and 点单临时表.房台编号='" + Trim(Label4(0).Caption) + "'"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
myval = Format(Val(Adodc2.Recordset.Fields(1)) + Val(Label4(4).Caption), "0.00")
MsgBox Label4(0).Caption & "房间的合计消费金额为" & myval & "人民币."
End If
End Sub
Private Sub Comtq_Click() '调入特权结帐
Load main_qtgl_mdgl_tq
main_qtgl_mdgl_tq.Show
main_qtgl_mdgl.Enabled = False
End Sub
Private Sub comend_Click()
frm_main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -