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

📄 frmoption1.frm

📁 餐饮茶馆管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmOption1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "菜单管理"
   ClientHeight    =   5175
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8100
   Icon            =   "frmOption1.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   5175
   ScaleWidth      =   8100
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox pic2 
      BorderStyle     =   0  'None
      Height          =   4290
      Left            =   195
      ScaleHeight     =   4290
      ScaleWidth      =   7740
      TabIndex        =   7
      Top             =   420
      Width           =   7740
      Begin Threed.SSCommand cmdSelectUnit 
         Height          =   270
         Left            =   7380
         TabIndex        =   16
         Top             =   1635
         Width           =   255
         _Version        =   65536
         _ExtentX        =   450
         _ExtentY        =   476
         _StockProps     =   78
         BevelWidth      =   1
         RoundedCorners  =   0   'False
         Picture         =   "frmOption1.frx":000C
      End
      Begin VB.TextBox txtCode 
         Height          =   300
         Left            =   5940
         MaxLength       =   12
         TabIndex        =   3
         Top             =   2265
         Width           =   1695
      End
      Begin VB.TextBox txtDW 
         Height          =   300
         Left            =   5940
         MaxLength       =   12
         TabIndex        =   2
         Top             =   1620
         Width           =   1710
      End
      Begin VB.TextBox txtDJ 
         Height          =   300
         Left            =   5940
         MaxLength       =   8
         TabIndex        =   1
         Top             =   975
         Width           =   1695
      End
      Begin VB.TextBox txtPM 
         Height          =   300
         Left            =   5940
         MaxLength       =   30
         TabIndex        =   0
         Top             =   300
         Width           =   1695
      End
      Begin VB.CommandButton cmdClose 
         Cancel          =   -1  'True
         Height          =   405
         Left            =   6435
         Picture         =   "frmOption1.frx":02F4
         Style           =   1  'Graphical
         TabIndex        =   6
         Top             =   3690
         Width           =   1215
      End
      Begin VB.CommandButton cmdDel 
         Height          =   405
         Left            =   5070
         Picture         =   "frmOption1.frx":1A60
         Style           =   1  'Graphical
         TabIndex        =   5
         Top             =   3690
         Width           =   1215
      End
      Begin VB.CommandButton cmdAdd 
         Enabled         =   0   'False
         Height          =   405
         Left            =   3810
         Picture         =   "frmOption1.frx":31CC
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   3690
         Width           =   1215
      End
      Begin MSFlexGridLib.MSFlexGrid Grid1 
         Height          =   3390
         Left            =   105
         TabIndex        =   8
         Top             =   150
         Width           =   5520
         _ExtentX        =   9737
         _ExtentY        =   5980
         _Version        =   393216
         Cols            =   3
         BackColorSel    =   14737632
         ForeColorSel    =   32768
         BackColorBkg    =   12632256
         AllowBigSelection=   0   'False
         FocusRect       =   0
         SelectionMode   =   1
         BorderStyle     =   0
         Appearance      =   0
      End
      Begin Threed.SSCommand cmdSelectType 
         Height          =   270
         Left            =   7365
         TabIndex        =   19
         Top             =   2985
         Width           =   255
         _Version        =   65536
         _ExtentX        =   450
         _ExtentY        =   476
         _StockProps     =   78
         BevelWidth      =   1
         RoundedCorners  =   0   'False
         Picture         =   "frmOption1.frx":4938
      End
      Begin VB.TextBox cmbType 
         Height          =   300
         Left            =   5940
         MaxLength       =   20
         TabIndex        =   18
         Top             =   2970
         Width           =   1695
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "==所属的类别=="
         ForeColor       =   &H00008000&
         Height          =   180
         Index           =   1
         Left            =   5925
         TabIndex        =   17
         Top             =   2715
         Width           =   1665
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "==物品的代码=="
         ForeColor       =   &H00008000&
         Height          =   180
         Index           =   0
         Left            =   5970
         TabIndex        =   15
         Top             =   2025
         Width           =   1665
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "==物品的单位=="
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   5970
         TabIndex        =   14
         Top             =   1380
         Width           =   1665
      End
      Begin VB.Line Line4 
         X1              =   90
         X2              =   5655
         Y1              =   135
         Y2              =   135
      End
      Begin VB.Line Line3 
         BorderColor     =   &H00FFFFFF&
         X1              =   90
         X2              =   5655
         Y1              =   3540
         Y2              =   3540
      End
      Begin VB.Line Line2 
         BorderColor     =   &H00FFFFFF&
         X1              =   5655
         X2              =   5655
         Y1              =   150
         Y2              =   3555
      End
      Begin VB.Line Line1 
         X1              =   90
         X2              =   90
         Y1              =   150
         Y2              =   3525
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "==物品的单价=="
         ForeColor       =   &H000040C0&
         Height          =   180
         Left            =   5970
         TabIndex        =   10
         Top             =   750
         Width           =   1665
      End
      Begin VB.Label Label2 
         Caption         =   "==新物品名称=="
         ForeColor       =   &H00800000&
         Height          =   255
         Left            =   5970
         TabIndex        =   9
         Top             =   75
         Width           =   1710
      End
   End
   Begin VB.Line Line5 
      BorderColor     =   &H00808080&
      Index           =   5
      X1              =   3195
      X2              =   6105
      Y1              =   4950
      Y2              =   4950
   End
   Begin VB.Line Line5 
      BorderColor     =   &H00808080&
      Index           =   4
      X1              =   3180
      X2              =   6090
      Y1              =   4875
      Y2              =   4875
   End
   Begin VB.Line Line5 
      BorderColor     =   &H00808080&
      Index           =   3
      X1              =   3165
      X2              =   6075
      Y1              =   4800
      Y2              =   4800
   End
   Begin VB.Line Line5 
      BorderColor     =   &H00FFFFFF&
      Index           =   2
      X1              =   3210
      X2              =   6120
      Y1              =   4965
      Y2              =   4965
   End
   Begin VB.Line Line5 
      BorderColor     =   &H00FFFFFF&
      Index           =   1
      X1              =   3195
      X2              =   6105
      Y1              =   4890
      Y2              =   4890
   End
   Begin VB.Line Line5 
      BorderColor     =   &H00FFFFFF&
      Index           =   0
      X1              =   3180
      X2              =   6090
      Y1              =   4815
      Y2              =   4815
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "温州东化计算机科技有限公司"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00808080&
      Height          =   255
      Index           =   0
      Left            =   135
      TabIndex        =   11
      Top             =   4770
      Width           =   3315
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "温州东化计算机科技有限公司"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00808080&
      Height          =   255
      Index           =   2
      Left            =   135
      TabIndex        =   13
      Top             =   4770
      Width           =   3315
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "温州东化计算机科技有限公司"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Index           =   1
      Left            =   150
      TabIndex        =   12
      Top             =   4785
      Width           =   3315
   End
End
Attribute VB_Name = "frmOption1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub cmbType_GotFocus()

  SetItFocus cmbType
  
End Sub

Private Sub cmbType_KeyDown(KeyCode As Integer, Shift As Integer)

  DirectFocus txtCode, cmdAdd, cmbType, cmbType, KeyCode

End Sub

Private Sub cmbType_KeyPress(KeyAscii As Integer)

 If KeyAscii = 13 And Trim(cmbType) <> "" Then
    KeyAscii = 0
    If cmdAdd.Enabled = True Then cmdAdd.SetFocus
  Else
    KeyAscii = 0
    cmdSelectType.Value = True
 End If
 
End Sub

Private Sub cmdAdd_Click()

   On Error GoTo Err_Add
   
  '查询Code
   If GetCode(Trim(txtCode), "代码", "EatList") = False Then
      MsgBox "对不起,该物品的代码已经存在,请修改代码后再添加。", vbOKOnly + vbInformation, "代码重复"
      txtCode = ""
      txtCode.SetFocus
      Exit Sub
   End If
  '添加记录
   AddRecord txtPM, "名称", CCur(txtDJ), "单价", txtDW, "单位", txtCode, "代码", cmbType.Text, "MenuType", "EatList"
   
   sName = txtPM
   
  '刷新
   ConfigGrid
   
  '恢复
   txtPM = "": txtDJ = "": txtCode = ""
   txtPM.SetFocus
     Exit Sub
Err_Add:
 MsgBox "添加记录错误!    " & vbCrLf & vbCrLf & Err.Description, vbCritical
 
End Sub

Private Sub cmdAddLine_Click()

 ' 添加到列表框
 listLine.AddItem txtAddLine
 txtAddLine.Text = ""
 txtAddLine.SetFocus
 
End Sub

Private Sub cmdCancel_Click()

  Unload Me
  
End Sub

Private Sub cmdClose_Click()

   Unload Me
   
End Sub

Private Sub cmdDel_Click()

  On Error GoTo Err_del
  If Grid1.Text = "" Then
     MsgBox "请先选择一种物品后,再按删除按钮。    ", vbExclamation
  End If
  
  ' 删除
    If MsgBox("真的删除 [ " & Grid1.Text & " ] 吗?    ", vbYesNo + vbCritical) = vbNo Then
       Exit Sub
    End If
    
    DelRecord Grid1.Text, "名称", "EatList"
    
  ' 刷新数据
    Grid1.RemoveItem Grid1.Row
    txtPM.SetFocus
    
      Exit Sub
Err_del:
 MsgBox "记录删除错误!    " & vbCrLf & vbCrLf & Err.Description, vbCritical
 
End Sub

Private Sub cmdDelLine_Click()
  
   On Error GoTo Err_lineDel
   If listLine.ListIndex = -1 Then
      MsgBox "请先选择需要删除的语句,然后按删除按钮。    ", vbExclamation
      txtAddLine.SetFocus
      Exit Sub
   End If
   
   ' 删除
     listLine.RemoveItem listLine.ListIndex
     txtAddLine.SetFocus
       Exit Sub
Err_lineDel:
 MsgBox "行删除错误!    " & vbCrLf & vbCrLf & Err.Description, vbCritical
 
End Sub

Private Sub cmdOK_Click()

   On Error GoTo Err_Save
  ' 保存选项======================================================
    
    Unload Me
      Exit Sub
Err_Save:
 MsgBox "保存选项错误!    " & vbCrLf & vbCrLf & Err.Description, vbCritical
 
End Sub

Private Sub Command1_Click()

 Unload Me
 
End Sub

Private Sub Command2_Click()

 Unload Me
 
End Sub

Private Sub Command3_Click()

  If txtCompany = "" Then
     txtCompany = "东化科技"

⌨️ 快捷键说明

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