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

📄 main_fzgj_jsb.frm

📁 餐饮企业的管理系统主要包括前台管理、后台管理、财务管理、报表打印等功能
💻 FRM
📖 第 1 页 / 共 2 页
字号:
               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
         SplitCount      =   1
         BeginProperty Split0 
            MarqueeStyle    =   4
            BeginProperty Column00 
               ColumnWidth     =   540.284
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   1019.906
            EndProperty
            BeginProperty Column02 
               ColumnWidth     =   2534.74
            EndProperty
            BeginProperty Column03 
               ColumnWidth     =   6284.977
            EndProperty
         EndProperty
      End
      Begin VB.Frame Frame1 
         Height          =   3765
         Left            =   -74865
         TabIndex        =   7
         Top             =   405
         Width           =   9795
         Begin MSAdodcLib.Adodc Adodc1 
            Height          =   360
            Left            =   3945
            Top             =   2025
            Visible         =   0   'False
            Width           =   1395
            _ExtentX        =   2461
            _ExtentY        =   635
            ConnectMode     =   0
            CursorLocation  =   3
            IsolationLevel  =   -1
            ConnectionTimeout=   15
            CommandTimeout  =   30
            CursorType      =   3
            LockType        =   3
            CommandType     =   8
            CursorOptions   =   0
            CacheSize       =   50
            MaxRecords      =   0
            BOFAction       =   0
            EOFAction       =   0
            ConnectStringType=   1
            Appearance      =   1
            BackColor       =   -2147483643
            ForeColor       =   -2147483640
            Orientation     =   0
            Enabled         =   -1
            Connect         =   ""
            OLEDBString     =   ""
            OLEDBFile       =   ""
            DataSourceName  =   ""
            OtherAttributes =   ""
            UserName        =   ""
            Password        =   ""
            RecordSource    =   ""
            Caption         =   "Adodc1"
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "宋体"
               Size            =   9
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            _Version        =   393216
         End
         Begin VB.TextBox txtDate 
            BackColor       =   &H80000018&
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   5040
            TabIndex        =   17
            Top             =   270
            Width           =   1455
         End
         Begin VB.CommandButton cmdEnd 
            Caption         =   "退  出"
            Height          =   315
            Left            =   8640
            TabIndex        =   13
            Top             =   270
            Width           =   1005
         End
         Begin VB.TextBox txtTitle 
            BackColor       =   &H80000018&
            Height          =   300
            Left            =   1035
            TabIndex        =   11
            Top             =   270
            Width           =   3240
         End
         Begin VB.CommandButton cmdSave 
            Caption         =   "保存(&S)"
            Height          =   315
            Left            =   7650
            TabIndex        =   10
            Top             =   270
            Width           =   1005
         End
         Begin VB.CommandButton cmdAdd 
            Caption         =   "记事(&J)"
            Height          =   315
            Left            =   6660
            TabIndex        =   9
            Top             =   270
            Width           =   1005
         End
         Begin VB.TextBox txtMemo 
            BackColor       =   &H80000018&
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   2970
            Left            =   1050
            MultiLine       =   -1  'True
            ScrollBars      =   2  'Vertical
            TabIndex        =   8
            Top             =   660
            Width           =   8595
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            Caption         =   "日期:"
            Height          =   180
            Left            =   4425
            TabIndex        =   16
            Top             =   315
            Width           =   540
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            Caption         =   "记事内容:"
            Height          =   180
            Left            =   120
            TabIndex        =   14
            Top             =   645
            Width           =   900
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "记事标题:"
            Height          =   180
            Left            =   120
            TabIndex        =   12
            Top             =   315
            Width           =   900
         End
      End
   End
End
Attribute VB_Name = "main_fzgj_jsb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub cmd_End_Click()
  Unload Me
End Sub

Private Sub CmdAdd_Click()
  txtDate.text = Format(Date, "yyyy-mm-dd")  '使用Format函数将系统当前日期格式为长日期格式,Date函数返回系统当前日期
  '关于Format函数和Date函数的详细说明或实例参见《Visual Basic编程词典》软件函数应用部分,该部分对所有函数都有详细语法说明和最实用的应用实例。
  txtTitle.text = ""
  txtMemo.text = ""
  cmdSave.Enabled = True
  cmdAdd.Enabled = False
  txtDate.Enabled = True
  txtTitle.Enabled = True
  txtMemo.Enabled = True
  txtTitle.SetFocus
End Sub

Private Sub cmdDel_Click()
  If txt_Title.text = "" Then
     MsgBox "请在查询选项卡中数据列表中选择你要删除的数据 !", vbOKOnly + vbQuestion, "提示"
     SSTab1.Tab = 1
     Exit Sub
  End If
  If MsgBox("是否清除当前数据? ", vbOKCancel + vbQuestion, "提示") = vbOK Then
    Adodc2.Recordset.Delete
    sqlStr = "select * from 记事本"
    Call FunAdo(Adodc2, sqlStr)
    Adodc2.Refresh
  End If
End Sub

Private Sub cmdEnd_Click()
  Unload Me
End Sub

Private Sub cmdExit_Click()
  Unload Me
End Sub

Private Sub cmdFind_Click()
  If opTitle.Value Then
     sqlStr = "select * from 记事本 where 标题 like '" + txtFindTitle.text + "%'"
     Call FunAdo(Adodc2, sqlStr)
     Adodc2.Refresh
  ElseIf opDate.Value Then
     sqlStr = "select * from 记事本 where 日期 ='" & DTPicker1.Value & "'"
     Call FunAdo(Adodc2, sqlStr)
     Adodc2.Refresh
  End If
End Sub

Private Sub cmdsave_Click()
  If txtTitle.text = "" Then
     MsgBox "标题不能为空 !", vbOKOnly + vbQuestion, "提示"
     txtTitle.SetFocus               '使文本框获得焦点
     Exit Sub
  End If
  Adodc1.Recordset.AddNew
  Adodc1.Recordset.Fields(1).Value = txtDate.text
  Adodc1.Recordset.Fields(2).Value = txtTitle.text
  Adodc1.Recordset.Fields(3).Value = txtMemo.text
  Adodc1.Recordset.Update
  Sql = "select * from 记事本"
  Call FunAdo(Adodc1, Sql)
  Adodc1.Refresh
  MsgBox "记事成功!  ", vbOKOnly + vbQuestion, "提示"
  cmdAdd.Enabled = True
  cmdSave.Enabled = False
  txtDate.text = ""
  txtTitle.text = ""
  txtMemo.text = ""
  txtDate.Enabled = False
  txtTitle.Enabled = False
  txtMemo.Enabled = False
End Sub

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer) '触发DataGrid控件时,将表格中数据赋值给相应的文本框中。
  On Error Resume Next
  txt_Date.text = Adodc2.Recordset.Fields(1)
  txt_Title.text = Adodc2.Recordset.Fields(2)
  txt_Memo.text = Adodc2.Recordset.Fields(3)
End Sub

Private Sub Form_Load()
  Sql = "select * from 记事本"
  Call FunAdo(Adodc1, Sql)
  Call FunAdo(Adodc2, Sql)
  Adodc1.Refresh
  txtDate.text = ""
  txtTitle.text = ""
  txtMemo.text = ""
  txtDate.Enabled = False
  txtTitle.Enabled = False
  txtMemo.Enabled = False
  cmdSave.Enabled = False
  On Error Resume Next
  txt_Date.text = Adodc2.Recordset.Fields(1)
  txt_Title.text = Adodc2.Recordset.Fields(2)
  txt_Memo.text = Adodc2.Recordset.Fields(3)
End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)
  If SSTab1.Tab = 0 Then
     cmdSave.Enabled = False
     cmdAdd.Enabled = True
     txtDate.text = ""
     txtTitle.text = ""
     txtMemo.text = ""
     txtDate.Enabled = False
     txtTitle.Enabled = False
     txtMemo.Enabled = False
  ElseIf SSTab1.Tab = 1 Then
'     Adodc2.RecordSource = "select * from 记事本"
'     Adodc2.Refresh
  End If
End Sub



⌨️ 快捷键说明

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