📄 syslog.bas
字号:
Attribute VB_Name = "SysLog"
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 上机日志
' 作者:黄涛
' 日期:1998.02.21
'
' LogIn 登录日志进入时间
' LogOut 登录日志退出时间
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
'登录日志进入时间
Public Function LogIn(ByVal strLog As String) As Long
Dim strSql As String
Dim lngLogID As Long
lngLogID = BillPublic.GetNewID("Log")
strSql = "INSERT INTO Log(lngLogID,lngOperatorID,strMachineName,strLog,strLogDate,strLoginTime) " _
& "VALUES(" & lngLogID & "," & gclsBase.OperatorID & ",'" & gclsEniv.MachineName & "','" & strLog & "','" _
& Format(Date, "YYYY-MM-DD") & "','" & Format(time, "HH:MM:SS") & "')"
gclsBase.ExecSQL strSql
LogIn = lngLogID
End Function
'登录日志退出时间
Public Sub LogOut(ByVal lngLogID As Long)
Dim strSql As String
strSql = "Update Log Set strLogoutTime ='" & Format(time, "HH:MM:SS") & "' Where lngLogID = " & lngLogID
gclsBase.ExecSQL strSql
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -