Пример #1
0
 public void DeleteSettlementScale(smART.ViewModel.Settlement businessEntity, smART.Model.Settlement modelEntity, smART.Model.smARTDBContext dbContext)
 {
     try {
         smART.Model.Scale scale = dbContext.T_Scale.FirstOrDefault(i => i.ID == modelEntity.Scale.ID);
         if (scale != null)
         {
             scale.Updated_By                = modelEntity.Updated_By;
             scale.Last_Updated_Date         = modelEntity.Last_Updated_Date;
             scale.Ticket_Settled            = false;
             scale.Settlement_Diff_NetWeight = 0;
             dbContext.SaveChanges();
         }
     }
     catch (Exception ex) {
         bool rethrow;
         rethrow = BusinessRuleExceptionHandler.HandleException(ref ex, businessEntity.Updated_By, businessEntity.GetType().Name, businessEntity.ID.ToString());
         if (rethrow)
         {
             throw ex;
         }
     }
 }
Пример #2
0
 public void Added(smART.ViewModel.Settlement businessEntity, smART.Model.Settlement modelEntity, smART.Model.smARTDBContext dbContext)
 {
     UpdateScale(businessEntity, modelEntity, dbContext);
 }
Пример #3
0
 public void Deleted(smART.ViewModel.Settlement businessEntity, smART.Model.Settlement modelEntity, smART.Model.smARTDBContext dbContext)
 {
     DeleteSettlementScale(businessEntity, modelEntity, dbContext);
 }