/// <summary> /// 记录单表日志 /// </summary> /// <param name="changes">修改后的数据</param> /// <param name="tableName">表名</param> /// <param name="keyFieldName">记录的主键,比较新旧数据时用于定位</param> public void WriteLog(DataTable original, DataTable changes) { string GUID = Guid.NewGuid().ToString().Replace("-", ""); IBridge_EditLogHistory bridge = bllBusinessLog.CreateEditLogHistoryBridge(); bridge.WriteLog(GUID, original, changes, _SummaryTableName, _KeyFieldName, true); }
/// <summary> /// 写入日志 /// </summary> /// <param name="original">原始数据</param> /// <param name="changes">修改后的数据</param> public override void WriteLog(DataSet original, DataSet changes) { //单独处理,即使错误,不向外抛出异常 try { string logID = Guid.NewGuid().ToString().Replace("-", ""); //本次日志ID IBridge_EditLogHistory logBridge = bllBusinessLog.CreateEditLogHistoryBridge(); logBridge.WriteLog(logID, original.Tables[0], changes.Tables[0], tb_PO.__TableName, tb_PO.__KeyName, true); //主表 //明细表的修改日志,系统不支持自动生成,请手工调整代码 //SystemLog.WriteLog(logID, original.Tables[1], changes.Tables[1], tb_PO.__TableName, tb_PO.__KeyName, false); } catch { Msg.Warning("写入日志发生错误!"); } }
public static DataTable GetLogFieldDef(string tableName) { IBridge_EditLogHistory bridge = CreateEditLogHistoryBridge(); return(bridge.GetLogFieldDef(tableName)); }
public static bool SaveFieldDef(DataTable data) { IBridge_EditLogHistory bridge = CreateEditLogHistoryBridge(); return(bridge.SaveFieldDef(data)); }
public static DataSet SearchLog(string logUser, string tableName, DateTime dateFrom, DateTime dateTo) { IBridge_EditLogHistory bridge = CreateEditLogHistoryBridge(); return(bridge.SearchLog(logUser, tableName, dateFrom, dateTo)); }
private IBridge_EditLogHistory _DAL_Instance = null;//数据层实例 public ADODirect_Log() { _DAL_Instance = new dalEditLogHistory(Loginer.CurrentUser); }
private IBridge_EditLogHistory _DAL_Instance = null; //数据层实例 #endregion Fields #region Constructors public ADODirect_Log() { _DAL_Instance = new dalEditLogHistory(Loginer.CurrentUser); }