48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using Ninject;
|
|
using System;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.IBLL.Base;
|
|
using WX.CRM.Model.Entity;
|
|
|
|
namespace WX.CRM.WebHelper.UserRight
|
|
{
|
|
public class OperationLogHelper
|
|
{
|
|
|
|
private readonly IBAS_OPERATIONLOG _operationLog;
|
|
ValidationErrors errors = new ValidationErrors();
|
|
public OperationLogHelper()
|
|
{
|
|
this._operationLog = Infrastructure.NinjectControllerFactory.ninjectKernel.Get<IBAS_OPERATIONLOG>();
|
|
|
|
}
|
|
|
|
|
|
public void AddOperationLog(decimal userid, decimal eid, string mark)
|
|
{
|
|
try
|
|
{
|
|
BAS_OPERATIONLOG oplog = new BAS_OPERATIONLOG();
|
|
oplog.CLIENTIP = Utility.GetIp();
|
|
oplog.OPREMARK = mark;
|
|
oplog.OPTIME = DateTime.Now;
|
|
oplog.OPUSER_EID = eid;
|
|
oplog.OPUSER_ID = userid;
|
|
oplog.REQUESTURL = Utility.GetClassAndMethodName(2);
|
|
|
|
_operationLog.Create(ref errors, oplog);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error(ex.Message + ex.StackTrace);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
}
|