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

📄 frmmain.frm

📁 用户登录及权限管理的通用的模块需要SQL数据库
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.MDIForm frmMain 
   BackColor       =   &H8000000C&
   Caption         =   "用户登录与权限管理通用模块"
   ClientHeight    =   4830
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   7680
   LinkTopic       =   "MDIForm1"
   StartUpPosition =   3  'Windows Default
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   1560
      Top             =   2160
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   8
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0000
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":015A
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":02B4
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0706
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0860
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1AE2
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2D64
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":363E
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar tbToolBar 
      Align           =   1  'Align Top
      Height          =   615
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   7680
      _ExtentX        =   13547
      _ExtentY        =   1085
      ButtonWidth     =   1455
      ButtonHeight    =   926
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   10
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "添加"
            Key             =   "Add"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "修改"
            Key             =   "Edit"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "删除"
            Key             =   "Delete"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "刷新"
            Key             =   "Refresh"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "收款"
            Key             =   "Get"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "付款"
            Key             =   "Offer"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "报表预览"
            Key             =   "Preview"
            ImageIndex      =   7
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "报表打印"
            Key             =   "Print"
            ImageIndex      =   8
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.StatusBar sbStatusBar 
      Align           =   2  'Align Bottom
      Height          =   270
      Left            =   0
      TabIndex        =   0
      Top             =   4560
      Width           =   7680
      _ExtentX        =   13547
      _ExtentY        =   476
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   7885
            Text            =   "Status"
            TextSave        =   "Status"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            AutoSize        =   2
            TextSave        =   "2005-12-13"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            AutoSize        =   2
            TextSave        =   "11:04"
         EndProperty
      EndProperty
   End
   Begin VB.Menu menuSystem 
      Caption         =   "系统"
      Begin VB.Menu mnuUserAdd 
         Caption         =   "用户管理"
      End
      Begin VB.Menu mnuUserPermission 
         Caption         =   "用户权限管理"
      End
      Begin VB.Menu mnuUserbar 
         Caption         =   "-"
      End
      Begin VB.Menu menuModifypwd 
         Caption         =   "修改密码"
      End
      Begin VB.Menu menuExit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu menuSetup 
      Caption         =   "基本信息设置"
      Visible         =   0   'False
   End
   Begin VB.Menu menuCustomerinfo 
      Caption         =   "进货信息管理"
      Visible         =   0   'False
   End
   Begin VB.Menu menuProduct 
      Caption         =   "生产信息管理"
      Visible         =   0   'False
   End
   Begin VB.Menu menuMticket 
      Caption         =   "销售信息管理"
      Visible         =   0   'False
   End
   Begin VB.Menu menuKucun 
      Caption         =   "库存信息管理"
      Visible         =   0   'False
   End
   Begin VB.Menu menuCAIWU 
      Caption         =   "财务"
      Visible         =   0   'False
   End
   Begin VB.Menu mnuWork 
      Caption         =   "操作(&O)"
      Visible         =   0   'False
      Begin VB.Menu mnuWorkAdd 
         Caption         =   "添加(&A)"
      End
      Begin VB.Menu mnuWorkEdit 
         Caption         =   "修改(&E)"
      End
      Begin VB.Menu mnuWorkDelete 
         Caption         =   "删除(&D)"
      End
      Begin VB.Menu mnuWorkRefresh 
         Caption         =   "刷新(&R)"
      End
      Begin VB.Menu sys1 
         Caption         =   "-"
      End
      Begin VB.Menu mnuPreview 
         Caption         =   "报表预览"
      End
      Begin VB.Menu mnuPrint 
         Caption         =   "报表打印"
      End
      Begin VB.Menu sys2 
         Caption         =   "-"
      End
      Begin VB.Menu mnuWorkGet 
         Caption         =   "收款"
      End
      Begin VB.Menu mnuWorkOffer 
         Caption         =   "付款"
      End
   End
   Begin VB.Menu mnuWindow 
      Caption         =   "窗口(&W)"
      Begin VB.Menu mnuWindowCascade 
         Caption         =   "层叠(&C)"
      End
      Begin VB.Menu mnuWindowTileHorizontal 
         Caption         =   "横向平铺(&H)"
      End
      Begin VB.Menu mnuWindowTileVertical 
         Caption         =   "纵向平铺(&V)"
      End
      Begin VB.Menu mnuWindowArrangeIcons 
         Caption         =   "排列图标(&A)"
      End
   End
   Begin VB.Menu menuHelp 
      Caption         =   "帮助"
      Begin VB.Menu menuAbout 
         Caption         =   "About"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub MDIForm_Load()
    Dim sSQL As String
    Dim recTest As adodb.Recordset
    Dim recTemp As adodb.Recordset
    Dim MsgText As String
    
    Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
    Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
    Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
    Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
    
    '进入时间
    sDate = Format(Now, "yyyy-mm-dd hh:mm")
    
    
    '根据权限显示菜单
    sSQL = "select * from permission where id='" & sUserName & "'"
    Set recTest = ExecuteSQL(sSQL, MsgText)
    
    Do While Not recTest.EOF
        Select Case recTest!module
            Case 10
                menuSetup.Visible = True
                '写日志
                sSQL = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',10)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSQL, MsgText)
                'recTemp.Close

            Case 11
                menuCustomerinfo.Visible = True
                '写日志
                sSQL = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',11)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSQL, MsgText)
                'recTemp.Close
                
            Case 12
                menuProduct.Visible = True
                '写日志
                sSQL = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',12)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSQL, MsgText)
                'recTemp.Close
                
            Case 13

⌨️ 快捷键说明

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