Ejemplo n.º 1
0
 /// <summary>
 /// Commits one action of the transaction.
 /// </summary>
 /// <param name="userContext">The user context.</param>
 /// <param name="transac">The transac.</param>
 /// <param name="index">The index.</param>
 /// <param name="action">The action.</param>
 protected override void CommitAction(IUserContext userContext, TransacInfo transac, int index, TransacActionInfo action)
 {
     object referenceObject = null;
     if (action.Type == TransacActionType.Insert)
     {
         referenceObject = action.TargetInstance;
     }
     else
     {
         referenceObject = action.SourceInstance;
     }
     IMetamodelEntity metamodelEntity = IoC.Get<ISecurityManager>().MetamodelManager.GetEntity(referenceObject.GetType());
     if (metamodelEntity != null)
     {
         if (metamodelEntity.AuditType == AuditType.Simple)
         {
             AuditTransacAction actionEntity = new AuditTransacAction();
             actionEntity.AuditTransacId = Convert.ToInt32(transac.TransacId);
             actionEntity.AuditTransacActionIx = index + 1;
             actionEntity.EntityId = metamodelEntity.EntId;
             actionEntity.PrimaryKey = metamodelEntity.GetStringKey(referenceObject);
             userContext.Context.Add(actionEntity);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Commits one action of the transaction.
 /// </summary>
 /// <param name="userContext">The user context.</param>
 /// <param name="transac">The transac.</param>
 /// <param name="index">The index.</param>
 /// <param name="action">The action.</param>
 protected abstract void CommitAction(IUserContext userContext, TransacInfo transac, int index, TransacActionInfo action);
Ejemplo n.º 3
0
 /// <summary>
 /// Commits one action of the transaction.
 /// </summary>
 /// <param name="userContext">The user context.</param>
 /// <param name="transac">The transac.</param>
 /// <param name="index">The index.</param>
 /// <param name="action">The action.</param>
 protected abstract void CommitAction(IUserContext userContext, TransacInfo transac, int index, TransacActionInfo action);
Ejemplo n.º 4
0
 /// <summary>
 /// Commits one action of the transaction.
 /// </summary>
 /// <param name="userContext">The user context.</param>
 /// <param name="transac">The transac.</param>
 /// <param name="index">The index.</param>
 /// <param name="action">The action.</param>
 protected override void CommitAction(IUserContext userContext, TransacInfo transac, int index, TransacActionInfo action)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Commits one action of the transaction.
 /// </summary>
 /// <param name="userContext">The user context.</param>
 /// <param name="transac">The transac.</param>
 /// <param name="index">The index.</param>
 /// <param name="action">The action.</param>
 protected override void CommitAction(IUserContext userContext, TransacInfo transac, int index, TransacActionInfo action)
 {
 }