/// <summary> 添加日志 /// </summary> /// <param name="item"></param> /// <param name="currAccDbName"></param> /// <returns></returns> public static bool Add(UserFunctionOPLog item, string currAccDbName) { Dictionary<string, string> DicParam = new Dictionary<string, string>(); DicParam.Add("user_id", item.userOP.UserID); DicParam.Add("u_f_log_id", System.Guid.NewGuid().ToString()); DicParam.Add("com_id", item.com_id); DicParam.Add("access_time", item.access_time.ToString()); DicParam.Add("fun_id", item.fun_id.ToString()); return DBHelper.Submit_AddLog("添加用户菜单日志", currAccDbName, "tl_user_function_log", "", "", DicParam); }
/// <summary> 添加日志 /// </summary> /// <param name="item"></param> /// <param name="currAccDbName"></param> /// <returns></returns> public static bool Add(UserFunctionOPLog item, string currAccDbName) { Dictionary<string, string> DicParam = new Dictionary<string, string>(); DicParam.Add("user_id", item.userOP.UserID); DicParam.Add("u_f_log_id", System.Guid.NewGuid().ToString()); DicParam.Add("com_id", item.com_id); DicParam.Add("access_time", item.access_time.ToString()); DicParam.Add("create_time", Common.LocalDateTimeToUtcLong(GlobalStaticObj_Server.Instance.CurrentDateTime).ToString()); DicParam.Add("fun_id", item.fun_id.ToString()); return DBHelper.Submit_AddLog("添加用户菜单日志", currAccDbName, "tl_user_function_log", "", "", DicParam); }
/// <summary> /// 清理所有正在使用的资源。 /// </summary> /// <param name="isDisposing">如果应释放托管资源,为 true;否则为 false</param> protected static void Dispose(bool isDisposing) { if (_alreadyDisposed) return; if (isDisposing) { _userFunctionOPLogQueue = null; _instance = null; //GC.SuppressFinalize(this); } _alreadyDisposed = true; }
public void Add(UserFunctionOPLog item) { UserFunctionOPLogQueue.Enqueue(item); Interlocked.Increment(ref queueLength); lock (SynObject) { if (queueLength > 10 && !runFlag) { ThreadPool.QueueUserWorkItem(new WaitCallback(NewThreadFunc)); } } }
public static void LogFunctionCall(string fun_id, string setId = null) { UserFunctionOPLog FunctionOP_Add = new UserFunctionOPLog(); FunctionOP_Add.com_id = HXC_FuncUtility.GlobalStaticObj_Server.Instance.ComID; FunctionOP_Add.fun_id = fun_id; FunctionOP_Add.userOP = new SYSModel.UserIDOP() { UserID = HXC_FuncUtility.GlobalStaticObj_Server.Instance.UserID, OPName = "菜单功能操作日志" }; BLL.OPLog.Add(FunctionOP_Add, GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode); }
public static void LogFunctionCall(string fun_id, string setbook_id) { ReqeFunStruct reqeFunStruct = new ReqeFunStruct(); reqeFunStruct.SubSysName = SubSysName.ExtendBaseFuncCall; reqeFunStruct.FunName = ComFunCallEnum.LogFunctionCall; reqeFunStruct.AccCode = GlobalStaticObj.CurrAccCode; UserFunctionOPLog FunctionOP_Add = new UserFunctionOPLog(); FunctionOP_Add.com_id = GlobalStaticObj.CurrUserCom_Id; FunctionOP_Add.fun_id = fun_id; FunctionOP_Add.access_time = Common.LocalDateTimeToUtcLong(GlobalStaticObj.CurrentDateTime); FunctionOP_Add.userOP = new SYSModel.UserIDOP() { UserID = GlobalStaticObj.UserID, OPName = "菜单功能操作日志" }; reqeFunStruct.FunObject = FunctionOP_Add; UserIDOP userOp = new SYSModel.UserIDOP() { UserID = GlobalStaticObj.UserID, OPName = "菜单功能操作日志" }; reqeFunStruct.userIDOP = userOp; reqeFunStruct.PCClientCookieStr = GlobalStaticObj.CookieStr; string addStr = HXCCommon.DotNetEncrypt.DESEncrypt.Encrypt(Newtonsoft.Json.JsonConvert.SerializeObject(reqeFunStruct)); if (!WCFClientProxy.TestDataProxy()) { throw new Exception("未能建立同服务器连接!"); } GlobalStaticObj.proxy.JsonOperate(addStr); }