1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| using Common;
| using Dao;
| using System;
|
| public class WriteSysLogHelper
| {
| public static void WriteSysLog(string userName, int menuid, int refid, string Ramark, string IP)
| {
| if (string.IsNullOrEmpty(userName))
| throw new ArgumentException("登录超时,请重新登录!");
| if (string.IsNullOrEmpty(IP))
| throw new ArgumentException("非法登录");
| try
| {
| using (SysOperationLogDao sysOperationLogDao = new SysOperationLogDao())
| sysOperationLogDao.AddLog(userName, menuid, refid, Ramark, IP);
| }
| catch (Exception ex)
| {
| LogHelper.Error("系统日志写入失败!:" + ex.Message, new object[0]);
| }
| }
|
|
|
|
| }
|
|