protected override void PrepareOperationLog(AUObjectOperationContext context) { AUOperationLog log = AUOperationLog.CreateLogFromEnvironment(); log.ResourceID = this.Data.ID; log.SchemaType = this.Data.SchemaType; log.OperationType = this.OperationType; log.Category = this.Data.Schema.Category; log.Subject = string.Format("{0}: {1} 于 {2}", EnumItemDescriptionAttribute.GetDescription(this.OperationType), AUCommon.DisplayNameFor(this.Data), AUCommon.DisplayNameFor(this.actualParent)); //log.SearchContent = this.Data.ToFullTextString() + " " + this.Container.ToFullTextString(); context.Logs.Add(log); }
protected override void PrepareOperationLog(AUObjectOperationContext context) { AUOperationLog log = AUOperationLog.CreateLogFromEnvironment(); log.ResourceID = this.scope.ID; log.SchemaType = this.scope.SchemaType; log.OperationType = this.OperationType; log.Category = this.scope.Schema.Category; log.Subject = string.Format("{0}: {1}", EnumItemDescriptionAttribute.GetDescription(this.OperationType), this.scope.ID); log.SearchContent = ""; // this.ownerObj.ToFullTextString(); context.Logs.Add(log); }
protected override void PrepareOperationLog(AUObjectOperationContext context) { AUOperationLog log = AUOperationLog.CreateLogFromEnvironment(); log.ResourceID = ((SchemaObjectBase)this._Parent).ID; log.SchemaType = ((SchemaObjectBase)this._Parent).SchemaType; log.OperationType = this.OperationType; log.Category = ((SchemaObjectBase)this._Parent).Schema.Category; log.Subject = string.Format("{0}: {1}", EnumItemDescriptionAttribute.GetDescription(this.OperationType), ((SCBase)this._Parent).Name); log.SearchContent = ((SchemaObjectBase)this._Parent).ToFullTextString(); context.Logs.Add(log); }
/// <summary> /// 创建一个基本的日志 /// </summary> /// <param name="data"></param> /// <param name="opType"></param> /// <param name="message"></param> /// <returns></returns> internal static Logs.AUOperationLog ToOperationLog(this SchemaObjectBase data, Executors.AUOperationType opType, string message) { data.NullCheck("data"); AUOperationLog log = AUOperationLog.CreateLogFromEnvironment(); log.ResourceID = data.ID; log.SchemaType = data.SchemaType; log.OperationType = opType; log.Category = data.Schema.Category; log.Subject = message; log.SearchContent = data.ToFullTextString(); return(log); }
protected override void PrepareOperationLog(AUObjectOperationContext context) { if (this.RelationExisted == false) { AUOperationLog log = AUOperationLog.CreateLogFromEnvironment(); log.ResourceID = this._Object.ID; log.SchemaType = this._Object.SchemaType; log.OperationType = this.OperationType; log.Category = this._Object.Schema.Category; log.Subject = string.Format("{0}: {1} 从 {2} 至 {3}", EnumItemDescriptionAttribute.GetDescription(this.OperationType), this._Object.Name, AUCommon.DisplayNameFor(this._SourceObject), AUCommon.DisplayNameFor(this._ActualTarget)); log.SearchContent = this._Object.ToFullTextString() + " " + AUCommon.FullTextFor(this._SourceObject) + " " + this._ActualTarget.ToFullTextString(); context.Logs.Add(log); } else { AUOperationLog log = AUOperationLog.CreateLogFromEnvironment(); log.ResourceID = this._Object.ID; log.SchemaType = this._Object.SchemaType; log.OperationType = this.OperationType; log.Category = this._Object.Schema.Category; log.Subject = string.Format("{0}: {1} 从 {2} 至 {3}(跳过已经存在的关系)", EnumItemDescriptionAttribute.GetDescription(this.OperationType), this._Object.Name, AUCommon.DisplayNameFor(this._SourceObject), AUCommon.DisplayNameFor(this._Target)); log.SearchContent = this._Object.ToFullTextString() + " " + AUCommon.DisplayNameFor(this._SourceObject) + " " + this._ActualTarget.ToFullTextString(); context.Logs.Add(log); } }