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; } } }
public void Modified(smART.ViewModel.Invoice businessEntity, smART.Model.Invoice modelEntity, smART.Model.smARTDBContext dbContext) { }