/// <summary> /// 增加日志 /// </summary> /// <param name="logType"></param> /// <param name="empNo"></param> /// <param name="msg"></param> /// <param name="ip"></param> public static void AddLog(string logType, string empNo, string msg, string ip) { UserLog ul = new UserLog(); ul.OID = (int)DBAccess.GenerOID("UL"); ul.FK_Emp = empNo; ul.LogFlag = logType; ul.Docs = msg; ul.IP = ip; ul.RDT = DataType.CurrentDataTime; try { ul.InsertAsOID(ul.OID); } catch { } }
public static void AddLog(string logType, string empNo, string msg) { UserLog ul = new UserLog(); ul.OID = (int)DBAccess.GenerOID("UL"); ul.FK_Emp = empNo; ul.LogFlag = logType; ul.Docs = msg; ul.RDT = DataType.CurrentDataTime; try { if (BP.SystemConfig.IsBSsystem) { ul.IP = System.Web.HttpContext.Current.Request.UserHostAddress; } ul.InsertAsOID(ul.OID); } catch { } }
/// <summary> /// 写入用户日志 /// </summary> /// <param name="logType">日志类型</param> /// <param name="empNo">操作员编号</param> /// <param name="msg">消息</param> public static void WriteUserLog(string logType, string empNo, string msg) { UserLog ul = new UserLog(); ul.MyPK = DBAccess.GenerGUID(); ul.FK_Emp = empNo; ul.LogFlag = logType; ul.Docs = msg; ul.RDT = DataType.CurrentDataTime; try { if (BP.Sys.SystemConfig.IsBSsystem) { ul.IP = BP.Sys.Glo.Request.UserHostAddress; } } catch { } ul.Insert(); }