⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main_qtgl_ktgl.frm

📁 功能强大,画面精致,在XP系统中运行最佳先选择用户名:a 再输入密码:a
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            EndProperty
            BeginProperty Column13 
               ColumnWidth     =   14.74
            EndProperty
            BeginProperty Column14 
               ColumnWidth     =   14.74
            EndProperty
         EndProperty
      End
      Begin VB.Label Labje 
         BackStyle       =   0  'Transparent
         ForeColor       =   &H000000FF&
         Height          =   195
         Left            =   4635
         TabIndex        =   41
         Top             =   3300
         Width           =   1710
      End
      Begin VB.Label Labfwy 
         BackStyle       =   0  'Transparent
         ForeColor       =   &H00FF0000&
         Height          =   195
         Left            =   2640
         TabIndex        =   40
         Top             =   3300
         Width           =   1020
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "总计金额:"
         Height          =   210
         Index           =   1
         Left            =   3720
         TabIndex        =   36
         Top             =   3285
         Width           =   900
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "服务员:"
         Height          =   210
         Index           =   0
         Left            =   1920
         TabIndex        =   35
         Top             =   3285
         Width           =   735
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "已定菜谱信息:"
         Height          =   285
         Left            =   75
         TabIndex        =   33
         Top             =   165
         Width           =   3300
      End
   End
   Begin VB.Frame Frame8 
      Height          =   585
      Left            =   6240
      TabIndex        =   6
      Top             =   6645
      Width           =   6465
      Begin VB.TextBox Text1 
         ForeColor       =   &H00000000&
         Height          =   285
         Left            =   1485
         TabIndex        =   37
         Top             =   195
         Width           =   2190
      End
      Begin VB.Label Label7 
         Caption         =   "请输入房台名称:"
         ForeColor       =   &H000000FF&
         Height          =   180
         Left            =   60
         TabIndex        =   39
         Top             =   255
         Width           =   1560
      End
   End
   Begin MSDataGridLib.DataGrid DataGrid2 
      Bindings        =   "main_qtgl_ktgl.frx":1418
      Height          =   7095
      Left            =   30
      TabIndex        =   38
      Top             =   105
      Width           =   6150
      _ExtentX        =   10848
      _ExtentY        =   12515
      _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     =   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_ktgl"
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 key, list As String
Public Sub list_change()     '定义房间列表函数
  i = SSTab1.Tab
  Adodc1.RecordSource = "select * from 房间台号信息表 where 状态='" + Left(SSTab1.Caption, 2) + "'and 房间台号信息表.部门='" + Combo1.text + "'and 房间台号信息表.房台名称 like '" + Text1.text + "'+'%'order by 编号"
  Adodc1.Refresh
  If Adodc1.Recordset.RecordCount > 0 Then
     ListView1(i).ListItems.Clear
     Adodc1.Recordset.MoveFirst
     Do While Adodc1.Recordset.EOF = False
        key = "(" & Trim(Adodc1.Recordset.Fields("编号")) & ")" & Trim(Adodc1.Recordset.Fields("房台名称"))
        Set itmX = ListView1(i).ListItems.Add(, , key, 3)
        Adodc1.Recordset.MoveNext
     Loop
  End If
  Label2(i).Caption = Left(SSTab1.Caption, 2) & "总数: " & Adodc1.Recordset.RecordCount & "个"
End Sub
Private Sub Form_Load()
 Call list_change     '调用函数
 i = SSTab1.Tab
 If ListView1(i).ListItems.Count > 0 Then
    Adodc1.RecordSource = "select * from 房间台号信息表 where 房间台号信息表.状态='" + Left(SSTab1.Caption, 2) + "'and 房间台号信息表.部门='" + Combo1.text + "'order by 编号"
    Adodc1.Refresh
    For A = 0 To 7
        If Adodc1.Recordset.RecordCount > 0 Then
           Label4(A).Caption = Trim(Adodc1.Recordset.Fields(A))
        End If
    Next A
 End If
 Me.Caption = Me.Caption & "    " & frm_main.St1.Panels(3).text
 '打开"部门信息表"
 rs1.Open "select 部门名称 from 部门信息表 order by 部门编号", cnn, adOpenKeyset, adLockOptimistic
 '添加部门信息
 If rs1.BOF = False Then rs1.MoveFirst
 For i = 0 To rs1.RecordCount - 1
     Combo1.AddItem (Trim(rs1.Fields("部门名称")))
     rs1.MoveNext
 Next i
 If Combo1.ListCount > 0 Then Combo1.ListIndex = 0
 rs1.Close     '关闭数据集对象
End Sub
Private Sub Combo1_Click()     '选择部门
 Call list_change     '调用函数
 i = SSTab1.Tab
 If ListView1(i).ListItems.Count = 0 Then
    For A = 0 To 7
        Label4(A).Caption = ""
    Next A
 End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
  frm_main.Enabled = True
End Sub
Private Sub ListView1_Click(Index As Integer)     '选择房台
 Labje.Caption = ""
 i = SSTab1.Tab
 If ListView1(i).ListItems.Count > 0 Then
  list = ListView1(i).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
  End If
  Adodc2.RecordSource = "select sum(金额)as 金额合计 from 点单临时表 where 房台编号='" + Right(Left(list, 4), 3) + "'"
  Adodc2.Refresh
  If Adodc2.Recordset.Fields(0) <> "" Then Labje.Caption = Format(Adodc2.Recordset.Fields(0), "0.00") & " 元" Else Labje.Caption = "0.00 元"
  Adodc2.RecordSource = "select * from 点单临时表 where 房台编号='" + Right(Left(list, 4), 3) + "'"
  Adodc2.Refresh
  If Adodc2.Recordset.RecordCount > 0 Then
     Labfwy.Caption = Trim(Adodc2.Recordset.Fields("服务员姓名"))
     Set DataGrid1.DataSource = Adodc2
  End If
 End If
End Sub
Private Sub SSTab1_Click(PreviousTab As Integer)     '选择房台的不同状态
 Call list_change     '调用函数
 i = SSTab1.Tab
 For A = 0 To 7
  If ListView1(i).ListItems.Count > 0 Then
     list = ListView1(i).SelectedItem
     Adodc1.RecordSource = "select * from 房间台号信息表 where 编号='" + Right(Left(list, 4), 3) + "'order by 编号"
     Adodc1.Refresh
     If Adodc1.Recordset.RecordCount > 0 Then
      Adodc1.Recordset.MoveFirst
      Label4(A).Caption = Trim(Adodc1.Recordset.Fields(A))     '赋值给label4(a).caption
     Else
      Label4(A).Caption = ""
     End If
   Else
     Label4(A).Caption = ""
  End If
 Next A
End Sub
Private Sub Check1_Click()     '数据模式
  If Check1.Value = 1 Then SSTab1.Visible = False Else SSTab1.Visible = True
End Sub
Private Sub Comkt_Click()     '调入开台服务
 If Label4(0).Caption = "" Or Label4(1).Caption = "" Then
    MsgBox ("请选择房间!")
  Else
   If Label4(6).Caption = "营业" Or Label4(6).Caption = "维修" Then
    MsgBox ("对不起,您选择的房间正在" & Label4(6).Caption & ",请重新选择!")
   Else
    Load main_dialog_ygxx
    main_dialog_ygxx.Show
    frm_main.Enabled = False
    main_qtgl_ktgl.Enabled = False
   End If
 End If
End Sub
Private Sub Comzt_Click()     '调入转台服务
 If Label4(0).Caption = "" Or Label4(1).Caption = "" Then
   MsgBox ("请选择房间!")
  Else
   If Label4(6).Caption = "空闲" Or Label4(6).Caption = "维修" Then
      MsgBox ("对不起,您选择的房间正在" & Label4(6).Caption & ",请重新选择!")
     Else
      Load main_qtgl_ktgl_ztfw
      main_qtgl_ktgl_ztfw.Show
      frm_main.Enabled = False
      main_qtgl_ktgl.Enabled = False
   End If
 End If
End Sub
Private Sub Combt_Click()     '调入并台服务
 If Label4(0).Caption = "" Or Label4(1).Caption = "" Then
   MsgBox ("请选择房间!")
  Else
   If Label4(6).Caption = "维修" Then
     MsgBox ("对不起,您选择的房间正在" & Label4(6).Caption & ",请重新选择!")
    Else
     Load main_qtgl_ktgl_btfw
     main_qtgl_ktgl_btfw.Show
     frm_main.Enabled = False
   End If
 End If
End Sub
Private Sub Comjc_Click()     '调入加菜服务
 If Label4(0).Caption = "" Or Label4(1).Caption = "" Then
    MsgBox ("请选择房间!")
  Else
   If Label4(6).Caption = "空闲" Or Label4(6).Caption = "维修" Then
      MsgBox ("对不起,您选择的房间正在" & Label4(6).Caption & ",请重新选择!")
     Else
      Load main_qtgl_ktgl_jcfw
      main_qtgl_ktgl_jcfw.Show
      frm_main.Enabled = False
      main_qtgl_ktgl.Enabled = False
   End If
 End If
End Sub
Private Sub Comfind_Click()     '搜索房台信息
  Call list_change     '调用函数
End Sub
Private Sub comend_Click()
  frm_main.Enabled = True
  Unload Me
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -