Exemplo n.º 1
0
 public void BeforeUpdate(DbContext context, IEnumerable <Order> entities)
 {
     foreach (var order in entities)
     {
         order.ModifiedDate = Now;
         order.EnforceCorrectValuesOnDiscount();
         OrderTriggerHelper.SetDateBeforeUpdate(order, Now);
         OrderTriggerHelper.EnforceRecalculateChange(order);
     }
 }
Exemplo n.º 2
0
 public void BeforeCreate(DbContext context, IEnumerable <Order> entities)
 {
     foreach (var order in entities)
     {
         order.StatusOrder = StatusOrder.CLOSE;
         order.EnforceCorrectValuesOnDiscount();
         OrderTriggerHelper.SetDateBeforeCreate(order, Now);
         OrderTriggerHelper.EnforceRecalculateChange(order);
     }
 }