Ejemplo n.º 1
0
 public void Deleted(smART.ViewModel.Invoice businessEntity, smART.Model.Invoice modelEntity, smART.Model.smARTDBContext dbContext)
 {
     try {
         if (businessEntity.Invoice_Type.Equals("local sales", StringComparison.InvariantCultureIgnoreCase))
         {
             IEnumerable <Model.Scale> scales = dbContext.T_Scale.Where(o => o.Invoice.ID == businessEntity.ID);
             foreach (var scale in scales)
             {
                 scale.Invoice = null;
             }
             dbContext.SaveChanges();
         }
     }
     catch (Exception ex) {
         bool rethrow;
         rethrow = BusinessRuleExceptionHandler.HandleException(ref ex, modelEntity.Updated_By, modelEntity.GetType().Name, modelEntity.ID.ToString());
         if (rethrow)
         {
             throw ex;
         }
     }
 }
Ejemplo n.º 2
0
 public void Modified(smART.ViewModel.Invoice businessEntity, smART.Model.Invoice modelEntity, smART.Model.smARTDBContext dbContext)
 {
 }