Beispiel #1
0
 public void CancelOrder(Entities.Order pOrder)
 {
     using (TransactionScope lScope = new TransactionScope())
     using (VideoStoreEntityModelContainer lContainer = new VideoStoreEntityModelContainer())
     {
         try
         {
             pOrder.RevertStockLevels();
             lContainer.Orders.ApplyChanges(pOrder);
             SendOrderDeclinedEmail(pOrder);
             lContainer.SaveChanges();
             lScope.Complete();
         }
         catch (Exception lException)
         {
             SendOrderErrorMessage(pOrder, lException);
             throw;
         }
     }
 }