/// <summary> /// 根据环境信息初始化Log。 /// 初始化的属性包括:CreateTime , OperatorID, OperatorName /// </summary> /// <returns></returns> public static SqlIncomeSyncLog CreateLogFromEnvironment() { SqlIncomeSyncLog log = new SqlIncomeSyncLog(); log.CreateTime = SCActionContext.Current.TimePoint; if (DeluxePrincipal.IsAuthenticated) { log.OperatorID = DeluxeIdentity.CurrentUser.ID; log.OperatorName = DeluxeIdentity.CurrentUser.Name; } return log; }
public override void WriteStartLog(SyncSession session) { var log = SqlIncomeSyncLog.CreateLogFromEnvironment(); log.LogID = UuidHelper.NewUuidString(); log.StartTime = DateTime.Now; log.EndTime = new DateTime(9999, 9, 9); log.SourceName = this.sourceName; log.Status = IncomeSyncStatus.Running; Adapters.SqlIncomeLogAdapter.Instance.Update(log); this.log = log; }
/// <summary> /// 根据环境信息初始化Log。 /// 初始化的属性包括:CreateTime , OperatorID, OperatorName /// </summary> /// <returns></returns> public static SqlIncomeSyncLog CreateLogFromEnvironment() { SqlIncomeSyncLog log = new SqlIncomeSyncLog(); log.CreateTime = SCActionContext.Current.TimePoint; if (DeluxePrincipal.IsAuthenticated) { log.OperatorID = DeluxeIdentity.CurrentUser.ID; log.OperatorName = DeluxeIdentity.CurrentUser.Name; } return(log); }
public override void WriteStartLog(SyncSession session) { var log = SqlIncomeSyncLog.CreateLogFromEnvironment(); log.LogID = UuidHelper.NewUuidString(); log.StartTime = DateTime.Now; log.EndTime = new DateTime(9999, 9, 9); log.SourceName = this.sourceName; log.Status = IncomeSyncStatus.Running; Adapters.SqlIncomeLogAdapter.Instance.Update(log); this.log = log; }