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

📄 frmclearlog.frm

📁 金算盘软件代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmClearLog 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "清除操作日志"
   ClientHeight    =   1935
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4545
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1935
   ScaleWidth      =   4545
   StartUpPosition =   2  '屏幕中心
   Begin VB.OptionButton opClearLog 
      Caption         =   "筛选结果(&D)"
      Height          =   180
      Index           =   2
      Left            =   600
      TabIndex        =   5
      Top             =   1320
      Width           =   1335
   End
   Begin VB.OptionButton opClearLog 
      Caption         =   "当前数据(&C)"
      Height          =   180
      Index           =   1
      Left            =   600
      TabIndex        =   4
      Top             =   960
      Value           =   -1  'True
      Width           =   1335
   End
   Begin VB.OptionButton opClearLog 
      Caption         =   "全部(&A)"
      Height          =   180
      Index           =   0
      Left            =   600
      TabIndex        =   3
      Top             =   600
      Width           =   975
   End
   Begin VB.CommandButton cmdOk 
      Height          =   350
      Index           =   0
      Left            =   3240
      Style           =   1  'Graphical
      TabIndex        =   0
      Tag             =   "1001"
      Top             =   240
      UseMaskColor    =   -1  'True
      Width           =   1155
   End
   Begin VB.CommandButton cmdOk 
      Height          =   350
      Index           =   1
      Left            =   3240
      Style           =   1  'Graphical
      TabIndex        =   1
      Tag             =   "1002"
      Top             =   615
      UseMaskColor    =   -1  'True
      Width           =   1155
   End
   Begin VB.Label lblClearLog 
      Caption         =   " 清除选择"
      Height          =   255
      Left            =   600
      TabIndex        =   2
      Top             =   230
      Width           =   975
   End
End
Attribute VB_Name = "frmClearLog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' 清除操作日志
' 作者:冉升
''
'  接口:ClearLog 显示清除操作日志卡片
'
'
'
Option Explicit
Private lngCurrentID As Long  '当前ID号
Private strWhere As String    '筛选条件
'Private WithEvents mclsMainControl As MainControl '主控对象



Private Sub cmdOK_Click(Index As Integer)
    Dim strSql As String
    Dim intMsg As Integer
    Dim blnclealog As Boolean
    
    Select Case Index
        Case 0
            If opClearLog(0).Value = True Then
                intMsg = ShowMsg(0, "你确实要清除全部操作日志吗?", _
                         vbQuestion + vbYesNo + MB_TASKMODAL, Me.Caption)
                If intMsg = vbYes Then
                   If ClearAll Then
                      gclsSys.SendMessage Me.hwnd, Message.msglog
                      Unload Me
                      Exit Sub
                   End If
                ElseIf intMsg = vbNo Then
                   Unload Me
                   Exit Sub
                End If
                Exit Sub
            End If
            If opClearLog(1).Value = True Then
               If lngCurrentID <= 0 Then
                  Unload Me
                  Exit Sub
               Else
                  intMsg = ShowMsg(0, "你确实要清除当前选择的操作日志吗?", _
                          vbQuestion + vbYesNoCancel + MB_TASKMODAL, Me.Caption)
                  If intMsg = vbYes Then
                     strSql = "delete from log where lngLogID=" & lngCurrentID
                     blnclealog = gclsBase.ExecSQL(strSql)
                     If blnclealog = True Then
                        gclsSys.SendMessage Me.hwnd, Message.msglog
                        Unload Me
                        Exit Sub
                     End If
                  ElseIf intMsg = vbNo Then
                     Unload Me
                     Exit Sub
                  End If
               End If
            End If
            
            If opClearLog(2).Value = True Then
               intMsg = ShowMsg(0, "你确实要清除当前按筛选结果选择的操作日志吗?", _
                        vbQuestion + vbYesNo + MB_TASKMODAL, Me.Caption)
               If intMsg = vbYes Then
                  If strWhere = "" Then
                     strSql = "delete from log"
                  Else
                     strSql = "delete from log where " & strWhere
                  End If
                  blnclealog = gclsBase.ExecSQL(strSql)
                  If blnclealog = True Then
                     gclsSys.SendMessage Me.hwnd, Message.msglog
                     Unload Me
                     Exit Sub
                  End If
               ElseIf intMsg = vbNo Then
                  Unload Me
                  Exit Sub
               End If
            End If
        Case 1
            Unload Me
    End Select
End Sub

Private Sub Form_Activate()
 SetHelpID C2lng(Me.HelpContextID)

End Sub

Private Sub Form_Load()
    On Error GoTo ErrHandle
    Me.HelpContextID = 10216
    'Set mclsMainControl = gclsSys.MainControls.Add(Me)
    Utility.LoadFormResPicture Me
    frmLogList.IsShowCard = True
    Exit Sub
    Dim edtErrReturn As ErrDealType
ErrHandle:
    edtErrReturn = Errors.ErrorsDeal
    
    If edtErrReturn = edtResume Then
         Resume
    Else
         On Error Resume Next
         Unload Me
    End If
End Sub

Private Sub Form_Paint()
    FrameBox Me.hwnd, 240, 240, 3015, 1695
End Sub
Private Function ClearAll() As Boolean
    Dim strSql As String
    
    ClearAll = False
    strSql = "DELETE FROM Log "
    ClearAll = gclsBase.ExecSQL(strSql)
End Function

Public Sub ClearLog(Optional ByVal lngID As Long = 0, Optional ByVal strofWhere As String = "")
    lngCurrentID = lngID
    strWhere = strofWhere
    
    If Me.WindowState = 1 Then Me.WindowState = 0
    Show vbModal
    'Refresh
    'ZOrder 0
End Sub

Private Sub Form_Resize()
  ' Me.Width = 4635
End Sub

Private Sub Form_Unload(Cancel As Integer)
    On Error Resume Next
    frmLogList.IsShowCard = False
    Utility.UnLoadFormResPicture Me
End Sub

Private Sub opClearLog_Click(Index As Integer)
'    If opClearLog(Index).Value Then
'       opClearLog(Index).Value = 0
'    Else
'       opClearLog(Index).Value = 1
'    End If
End Sub

Private Sub Option1_Click()

End Sub

⌨️ 快捷键说明

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