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

📄 frmuser.frm

📁 一个用VB写的财务软件源码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "Mscomctl.ocx"
Begin VB.Form frmUser 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "操作员管理"
   ClientHeight    =   5250
   ClientLeft      =   45
   ClientTop       =   615
   ClientWidth     =   7920
   HelpContextID   =   41
   Icon            =   "frmUser.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5250
   ScaleWidth      =   7920
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   WhatsThisButton =   -1  'True
   WhatsThisHelp   =   -1  'True
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   2745
      Top             =   2655
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   5
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":0442
            Key             =   "Append"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":0896
            Key             =   "Delete"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":09AA
            Key             =   "Modify"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":0DFC
            Key             =   "Quit"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":1264
            Key             =   "Help"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar tBr 
      Align           =   1  'Align Top
      Height          =   570
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   7920
      _ExtentX        =   13970
      _ExtentY        =   1005
      ButtonWidth     =   820
      ButtonHeight    =   953
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   5
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "添加"
            Key             =   "Append"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "修改"
            Key             =   "Modify"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "删除"
            Key             =   "Delete"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            Key             =   "Exit"
            ImageIndex      =   4
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList ilsTvw 
      Left            =   2700
      Top             =   2070
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   6
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":1376
            Key             =   "Master"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":1692
            Key             =   "Admin"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":1AE6
            Key             =   "User"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":1F3A
            Key             =   "Normal"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":238E
            Key             =   "UnSelected"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUser.frx":27E2
            Key             =   "Selected"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.TreeView tvwUser 
      Height          =   4650
      Left            =   0
      TabIndex        =   0
      Top             =   600
      WhatsThisHelpID =   41
      Width           =   7905
      _ExtentX        =   13944
      _ExtentY        =   8202
      _Version        =   393217
      HideSelection   =   0   'False
      LabelEdit       =   1
      Sorted          =   -1  'True
      Style           =   7
      ImageList       =   "ilsTvw"
      Appearance      =   1
   End
   Begin VB.Menu mnuPop 
      Caption         =   "编辑(&E)"
      Begin VB.Menu mnuPopAppend 
         Caption         =   "添加(&A)"
         Shortcut        =   ^A
      End
      Begin VB.Menu mnuPopEdit 
         Caption         =   "修改(&E)"
         Shortcut        =   ^E
      End
      Begin VB.Menu mnuPopDelete 
         Caption         =   "删除(&D)"
         Shortcut        =   ^D
      End
   End
End
Attribute VB_Name = "frmUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
    Dim sSql As String
    Dim rstUser As ADODB.Recordset
    Dim Nodx As Node
    Dim sParKey As String
    
    With tvwUser.Nodes
        Set Nodx = .Add(, , "R", "人员", "User")
        Nodx.Bold = True
        Nodx.Expanded = True
        
        Set Nodx = .Add("R", tvwChild, "Admin", "系统管理员", "Admin")
        Nodx.ForeColor = vbBlue
        Nodx.Expanded = True
        Set Nodx = .Add("R", tvwChild, "Master", "账套主管", "Master")
        Nodx.ForeColor = vbBlue
        Nodx.Expanded = True
        Set Nodx = .Add("R", tvwChild, "Normal", "普通人员", "Normal")
        Nodx.ForeColor = vbBlue
        Nodx.Expanded = True
    
        sSql = "select * from tSYS_User order by userID"
        Set rstUser = New ADODB.Recordset
        rstUser.Open sSql, gloSys.cnnSys, adOpenStatic, adLockOptimistic
        If rstUser.RecordCount <> 0 Then
            Do Until rstUser.EOF
                Select Case rstUser.Fields("tiType").Value
                    Case 0
                        sParKey = "Admin"
                    Case 1
                        sParKey = "Master"
                    Case 2
                        sParKey = "Normal"
                End Select
                .Add sParKey, tvwChild, "k" & rstUser.Fields("userID").Value, _
                        rstUser.Fields("userID").Value & "=" & rstUser.Fields("userName").Value, _
                        "UnSelected", "Selected"
                rstUser.MoveNext
            Loop
        End If
        rstUser.Close
    End With
    
    Call tvwUser_NodeClick(tvwUser.Nodes("R"))
   
End Sub
Private Sub mnuPopAppend_Click()
    Dim frmO As frmUserOne
    Dim adoCmd As ADODB.Command
    
    Set frmO = New frmUserOne
    With frmO
        .ubFunc = True
        .usCode = ""
        .usName = ""
        .Caption = "添加操作员"
        .Show 1, Me
        If .OK Then
            tvwUser.Nodes.Add tvwUser.SelectedItem.Key, tvwChild, "k" & .usCode, _
                    .usCode & "=" & .usName, "UnSelected", "Selected"
            Set adoCmd = New ADODB.Command
            adoCmd.ActiveConnection = gloSys.cnnSys
            adoCmd.CommandType = adCmdText
            adoCmd.CommandText = "INSERT INTO tSYS_User(userID,userName,tiType) values('" & _
                        .usCode & "','" & .usName & "',2)"
            adoCmd.Execute

⌨️ 快捷键说明

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