You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using DSWeb.Common.DB;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DSWeb.Common.Helper
|
|
{
|
|
public static class OpLogHelper
|
|
{
|
|
/// <summary>
|
|
/// 新增操作日志记录
|
|
/// </summary>
|
|
/// <param name="cate"></param>
|
|
/// <param name="opUser"></param>
|
|
/// <param name="relativeId"></param>
|
|
/// <param name="opName"></param>
|
|
/// <param name="opStatus"></param>
|
|
/// <param name="extData"></param>
|
|
/// <param name="remark"></param>
|
|
public static void OpLog(string cate, string opUser, string relativeId, string opName = "", string opStatus = "", string extData = "", string remark = "")
|
|
{
|
|
CommonDataContext commonData = new CommonDataContext();
|
|
SysOpLog sysLog = new SysOpLog();
|
|
sysLog.GID = Guid.NewGuid().ToString().Replace("-", "");
|
|
sysLog.CateId = cate;
|
|
sysLog.OpName = opName;
|
|
sysLog.RelativeId = relativeId;
|
|
sysLog.OpUser = opUser;
|
|
sysLog.OpStatus = opStatus;
|
|
sysLog.OpTime = DateTime.Now;
|
|
sysLog.ExtData = extData;
|
|
sysLog.Remark = remark;
|
|
|
|
commonData.SysOpLogs.Add(sysLog);
|
|
commonData.SaveChanges();
|
|
}
|
|
}
|
|
}
|