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

📄 browruninfo.frm

📁 适合乡镇供电所使用电费处理系统v3 软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            NumListImages   =   8
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "BrowRunInfo.frx":1502
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "BrowRunInfo.frx":181E
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "BrowRunInfo.frx":1B3A
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "BrowRunInfo.frx":1E56
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "BrowRunInfo.frx":2172
               Key             =   ""
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "BrowRunInfo.frx":248E
               Key             =   ""
            EndProperty
            BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "BrowRunInfo.frx":27AA
               Key             =   ""
            EndProperty
            BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "BrowRunInfo.frx":2AC6
               Key             =   ""
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.Toolbar Toolbar2 
         Height          =   570
         Left            =   5250
         TabIndex        =   1
         Top             =   270
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   1005
         ButtonWidth     =   2408
         ButtonHeight    =   1005
         Style           =   1
         TextAlignment   =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   1
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "关闭窗口"
               Key             =   "正"
               ImageIndex      =   1
            EndProperty
         EndProperty
      End
   End
End
Attribute VB_Name = "BrowRunInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const NormalEntry = "正常进入"
Const IllegalityEntry = "非法进入"

Private Sub Check1_Click()
    On Error Resume Next
    If Check1.Value = 1 Then
        Option1.Enabled = False
        Option2.Enabled = False
        Select Case TreeView1.SelectedItem.Parent
               Case "系统管理员"
                       Set MdbR = NdMd.OpenRecordset("select * from 操作纪录 where 操作员='" & Trim(TreeView1.SelectedItem) & "'")
                       ViewData
                    
               Case "普通管理员"
                       Set MdbR = NdMd.OpenRecordset("select * from 操作纪录 where 操作员='" & Trim(TreeView1.SelectedItem) & "'")
                       ViewData
               
               Case "可查看用户"
                       Set MdbR = NdMd.OpenRecordset("select * from 操作纪录 where 操作员='" & Trim(TreeView1.SelectedItem) & "'")
                       ViewData
         End Select
    Else
        Option1.Enabled = True
        Option2.Enabled = True
    End If
End Sub

Private Sub Form_Load()
  Dim node1 As node
  Dim node2 As node
  Dim Node3 As node
  On Error Resume Next
  'If Screen.Width \ Screen.TwipsPerPixelX = 800 And Screen.Height \ Screen.TwipsPerPixelY = 600 Then
  '   Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 1 - 700
  'Else
     Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
  'End If
  TreeView1.Nodes.Clear
  TreeView1.Refresh
  TreeView1.Sorted = True
  OpenMdb
  Set node1 = TreeView1.Nodes.Add(, , , "系统管理员", 1)
  Set MdbR = NdMd.OpenRecordset("select * from 口令权限 where 权限='" & Xt & "'")
  While Not MdbR.eof
        Set node2 = TreeView1.Nodes.Add(node1.Index, tvwChild, , MdbR.Fields!姓名, 1)
        MdbR.MoveNext
  Wend
  Set node1 = TreeView1.Nodes.Add(, , , "普通管理员", 2)
  Set MdbR = NdMd.OpenRecordset("select * from 口令权限 where 权限='" & Pt & "'")
  While Not MdbR.eof
        Set node2 = TreeView1.Nodes.Add(node1.Index, tvwChild, , MdbR.Fields!姓名, 2)
        MdbR.MoveNext
  Wend
  Set node1 = TreeView1.Nodes.Add(, , , "可查看用户", 3)
  Set MdbR = NdMd.OpenRecordset("select * from 口令权限 where 权限='" & Kc & "'")
  While Not MdbR.eof
        Set node2 = TreeView1.Nodes.Add(node1.Index, tvwChild, , MdbR.Fields!姓名, 3)
        MdbR.MoveNext
  Wend
  Option1 = True
  node1.Expanded = True
  MdbR.Close
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    PriRunInfo.Show vbModal
End Sub

Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
    Unload Me
End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)
    On Error GoTo ClearRecord
    Select Case TreeView1.SelectedItem.Parent
           Case "系统管理员"
                If pbUserPermission <> "系统管理员" Then
                   MsgBox "您的权限不够,请于系统管理员联系!", vbInformation
                   Exit Sub
                Else
                    If MsgBox("确定要清除" & Trim(TreeView1.SelectedItem) & "用户的操作纪录吗?(Y/N)", vbYesNo + 32) = vbYes Then
                       NdMd.Execute "DELETE * FROM 操作纪录 WHERE 操作员='" & Trim(TreeView1.SelectedItem) & "'"
                       ListView1.ListItems.Clear
                    End If
                End If
           Case "普通管理员"
                If pbUserPermission <> "系统管理员" Then
                   MsgBox "您的权限不够,请于系统管理员联系!", vbInformation
                   Exit Sub
                Else
                    If MsgBox("确定要清除" & Trim(TreeView1.SelectedItem) & "用户的操作纪录吗?(Y/N)", vbYesNo + 32) = vbYes Then
                       NdMd.Execute "DELETE * FROM 操作纪录 WHERE 操作员='" & Trim(TreeView1.SelectedItem) & "'"
                       ListView1.ListItems.Clear
                    End If
                End If
           Case "可查看用户"
                If pbUserPermission <> "系统管理员" Then
                   MsgBox "您的权限不够,请于系统管理员联系!", vbInformation
                   Exit Sub
                Else
                    If MsgBox("确定要清除" & Trim(TreeView1.SelectedItem) & "用户的操作纪录吗?(Y/N)", vbYesNo + 32) = vbYes Then
                       NdMd.Execute "DELETE * FROM 操作纪录 WHERE 操作员='" & Trim(TreeView1.SelectedItem) & "'"
                       ListView1.ListItems.Clear
                    End If
                End If
    End Select
    Exit Sub
ClearRecord:
            If pbUserPermission <> "系统管理员" Then
               MsgBox "您的权限不够,请于系统管理员联系!", vbInformation
               Exit Sub
            Else
               If MsgBox("如果要清除单项纪录,请单击选项条!" & Chr(13) & "确定要清除全部纪录吗?(Y/N)", vbYesNo + 32) = vbYes Then
                   NdMd.Execute "DELETE * FROM 操作纪录"
                   ListView1.ListItems.Clear
                End If
            End If
           Exit Sub
End Sub

Private Sub TreeView1_NodeClick(ByVal node As MSComctlLib.node)
    On Error Resume Next
    Select Case TreeView1.SelectedItem.Parent
           Case "系统管理员"
                Call StateTree
           Case "普通管理员"
                Call StateTree
           Case "可查看用户"
                Call StateTree
    End Select
    
End Sub

Sub ViewData()
    Dim itmX As ListItem
    On Error Resume Next
    ListView1.ListItems.Clear
    While Not MdbR.eof
        Set itmX = ListView1.ListItems.Add(, , CStr(MdbR!进入日期 & ""))
        If Not IsNull(MdbR!退出日期) Then
           itmX.SubItems(1) = CStr(MdbR!退出日期)
        End If
        If Not IsNull(MdbR!操作情况) Then
            itmX.SubItems(2) = MdbR!操作情况
        End If
        If Not IsNull(MdbR!工作时间) Then
            itmX.SubItems(3) = MdbR!工作时间
        End If
        If Not IsNull(MdbR!备注) Then
            itmX.SubItems(4) = MdbR!备注
        End If
        MdbR.MoveNext
    Wend
End Sub

Sub StateTree()
    On Error Resume Next
    If Check1.Value = 0 Then
        If Option1 Then
           Set MdbR = NdMd.OpenRecordset("select * from 操作纪录 where 操作情况='" & NormalEntry & "' AND 操作员='" & Trim(TreeView1.SelectedItem) & "'")
           ViewData
        End If
        
        If Option2 Then
           Set MdbR = NdMd.OpenRecordset("select * from 操作纪录 where 操作情况='" & IllegalityEntry & "' AND 操作员='" & Trim(TreeView1.SelectedItem) & "'")
           ViewData
        End If
    Else
        Call Check1_Click
    End If

End Sub

⌨️ 快捷键说明

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