Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 /// <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("写入日志发生错误!");
     }
 }
Exemplo n.º 3
0
        public static DataTable GetLogFieldDef(string tableName)
        {
            IBridge_EditLogHistory bridge = CreateEditLogHistoryBridge();

            return(bridge.GetLogFieldDef(tableName));
        }
Exemplo n.º 4
0
        public static bool SaveFieldDef(DataTable data)
        {
            IBridge_EditLogHistory bridge = CreateEditLogHistoryBridge();

            return(bridge.SaveFieldDef(data));
        }
Exemplo n.º 5
0
        public static DataSet SearchLog(string logUser, string tableName, DateTime dateFrom, DateTime dateTo)
        {
            IBridge_EditLogHistory bridge = CreateEditLogHistoryBridge();

            return(bridge.SearchLog(logUser, tableName, dateFrom, dateTo));
        }
Exemplo n.º 6
0
        private IBridge_EditLogHistory _DAL_Instance = null;//数据层实例

        public ADODirect_Log()
        {
            _DAL_Instance = new dalEditLogHistory(Loginer.CurrentUser);
        }
Exemplo n.º 7
0
        private IBridge_EditLogHistory _DAL_Instance = null; //数据层实例

        #endregion Fields

        #region Constructors

        public ADODirect_Log()
        {
            _DAL_Instance = new dalEditLogHistory(Loginer.CurrentUser);
        }