Example #1
0
 ///<Summary>
 ///DeleteAllOrderDetails
 ///This method deletes all BOOrderDetails objects from its collection
 ///</Summary>
 ///<returns>
 ///void
 ///</returns>
 ///<parameters>
 ///
 ///</parameters>
 public virtual void DeleteAllOrderDetails()
 {
     Doing(this);
     RegisterDataObject(_iOrderDetailsRepository, null);
     BeginTransaction(_iOrderDetailsRepository, "deleteAllOrderDetails");
     try
     {
         _iOrderDetailsRepository.DeleteAllByProductID(_productID.Value);
         CommitTransaction(_iOrderDetailsRepository);
         Done(this);
         if (_boOrderDetailsCollection != null)
         {
             _boOrderDetailsCollection.Clear();
             _boOrderDetailsCollection = null;
         }
     }
     catch (Exception ex)
     {
         Failed(this, ex);
         RollbackTransaction(_iOrderDetailsRepository, "deleteAllOrderDetails");
         Handle(this, ex);
     }
 }