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

📄 form_log.frm

📁 新世纪ERP系统管理源代码
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form Frm_Log 
   Caption         =   "上机日志"
   ClientHeight    =   5385
   ClientLeft      =   1785
   ClientTop       =   1830
   ClientWidth     =   8550
   HelpContextID   =   1020
   Icon            =   "Form_Log.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   5385
   ScaleWidth      =   8550
   StartUpPosition =   2  '屏幕中心
   WindowState     =   2  'Maximized
   Begin MSComctlLib.ImageList ImageList2 
      Left            =   5940
      Top             =   2310
      _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         =   "Form_Log.frx":038A
            Key             =   "L"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form_Log.frx":0726
            Key             =   "gl"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form_Log.frx":0AC2
            Key             =   "sc"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form_Log.frx":0E5E
            Key             =   "sx"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form_Log.frx":11FA
            Key             =   "tc"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   570
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   8550
      _ExtentX        =   15081
      _ExtentY        =   1005
      ButtonWidth     =   820
      ButtonHeight    =   953
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList2"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   6
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "过滤"
            Key             =   "Filtrate"
            ImageKey        =   "gl"
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   4
            Object.Width           =   200
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "删除"
            Key             =   "Del"
            ImageKey        =   "sc"
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "刷新"
            Key             =   "R"
            ImageKey        =   "sx"
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   4
            Object.Width           =   200
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            Key             =   "Exit"
            ImageKey        =   "tc"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   6495
      Left            =   0
      TabIndex        =   0
      Top             =   570
      Width           =   8535
      _ExtentX        =   15055
      _ExtentY        =   11456
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      FullRowSelect   =   -1  'True
      _Version        =   393217
      Icons           =   "ImageList2"
      SmallIcons      =   "ImageList2"
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   7
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "开始时间"
         Object.Width           =   3617
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "用户"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   2
         Text            =   "工作站"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   3
         Text            =   "网络用户名"
         Object.Width           =   2646
      EndProperty
      BeginProperty ColumnHeader(5) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   4
         Text            =   "操作内容"
         Object.Width           =   4410
      EndProperty
      BeginProperty ColumnHeader(6) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   5
         Text            =   "子系统"
         Object.Width           =   3528
      EndProperty
      BeginProperty ColumnHeader(7) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   6
         Text            =   "状态"
         Object.Width           =   1411
      EndProperty
   End
End
Attribute VB_Name = "Frm_Log"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Form_Resize()
    On Error Resume Next
    ListView1.Width = Me.Width - 100
    ListView1.Height = Me.Height - Toolbar1.Height - 400
End Sub



Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    On Error GoTo error_exit
    Select Case Button.Key
           Case "Exit"
                 Unload Me
                 
           Case "Del"
                If Trim(ListView1.Tag) <> "" Then
                   Dim Ssql As String
                   If vbNo = MsgBox("你是否要删除这些日志?", vbYesNo + 32) Then Exit Sub
                   Dim i As Integer
                   For i = 1 To ListView1.ListItems.Count
                        Ssql = "delete " & Me.Tag & ".dbo.System_Log where id=" & Mid(ListView1.ListItems.Item(i).Key, 2, Len(ListView1.ListItems.Item(i).Key))
                        Conn_System.Execute Ssql
                   Next
                End If
                Log_Where ListView1.Tag
           Case "R"
                 Log_Where ListView1.Tag
           Case "Filtrate"
                 Frm_logSelect.Tag = Me.Tag
                 Frm_logSelect.Show 1
                 '------------------
                Log_Where ListView1.Tag
                 '------------------
    End Select
    
    Exit Sub
error_exit:
    MsgBox Err.Description, 16

End Sub

Sub Log_Where(sql As String)
    On Error GoTo error_exit
      Dim aDo_DataBase As New Recordset
      Dim Ssql As String
      If Trim(sql) = "" Then Exit Sub
        Ssql = "select a.*,b.czymc from " & Me.Tag & ".dbo.System_Log a," & Me.Tag & ".dbo.Gy_Czygl B where a.userid=b.czybm and " & sql
        Set aDo_DataBase = Conn_System.Execute(Ssql)
         ListView1.ListItems.Clear
        With aDo_DataBase
        Do While Not .EOF
            Set mitem = ListView1.ListItems.Add()
            mitem.Text = !GeginDate
            mitem.SmallIcon = "L"
           ' mitem.Icon = ""
            mitem.SubItems(1) = "" & !czymc
            mitem.SubItems(2) = "" & !WorkstationName
            mitem.SubItems(3) = Trim("" & !netusername)
            mitem.SubItems(4) = "" & !WorkList
            mitem.SubItems(5) = "" & !SystemName
            mitem.SubItems(6) = Trim("" & !State)
            mitem.Key = "T" & !Id
           
            .MoveNext
        Loop
        .Close
        Set aDo_DataBase = Nothing
        End With
        
    Exit Sub
error_exit:
    MsgBox Err.Description, 16
End Sub



⌨️ 快捷键说明

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