protected override void Dispose(bool disposing)
 {
     if (disposing && paymentDeadlineRepository != null)
     {
         paymentDeadlineRepository.Dispose();
         paymentDeadlineRepository = null;
     }
     base.Dispose(disposing);
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (wayOfExceptionRepository != null)
         {
             wayOfExceptionRepository.Dispose();
             wayOfExceptionRepository = null;
         }
         if (customerRepository != null)
         {
             customerRepository.Dispose();
             customerRepository = null;
         }
         if (productRepository != null)
         {
             productRepository.Dispose();
             productRepository = null;
         }
         if (saleModalityRepository != null)
         {
             saleModalityRepository.Dispose();
             saleModalityRepository = null;
         }
         if (geographicAreaRepository != null)
         {
             geographicAreaRepository.Dispose();
             geographicAreaRepository = null;
         }
         if (paymentDeadlineRepository != null)
         {
             paymentDeadlineRepository.Dispose();
             paymentDeadlineRepository = null;
         }
         if (exchangeTypeRepository != null)
         {
             exchangeTypeRepository.Dispose();
             exchangeTypeRepository = null;
         }
         if (productQuoteService != null)
         {
             productQuoteService.Dispose();
             productQuoteService = null;
         }
         if (deliveryAmountRepository != null)
         {
             deliveryAmountRepository.Dispose();
             deliveryAmountRepository = null;
         }
         if (stockTimeRepository != null)
         {
             stockTimeRepository.Dispose();
             stockTimeRepository = null;
         }
         if (globalVariableRepository != null)
         {
             globalVariableRepository.Dispose();
             globalVariableRepository = null;
         }
     }
     base.Dispose(disposing);
 }
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Free managed resources
                if (_productQuoteRepository != null)
                {
                    _productQuoteRepository.Dispose();
                }
                if (_productRepository != null)
                {
                    _productRepository.Dispose();
                }
                if (_workflowMessageService != null)
                {
                    _workflowMessageService.Dispose();
                }
                if (_pdfService != null)
                {
                    _pdfService.Dispose();
                }
                if (_saleModalityProductRepository != null)
                {
                    _saleModalityProductRepository.Dispose();
                }
                if (_saleModalityCreditRatingRepository != null)
                {
                    _saleModalityCreditRatingRepository.Dispose();
                }
                if (_globalVariableRepository != null)
                {
                    _globalVariableRepository.Dispose();
                }
                if (_customerOrderRepository != null)
                {
                    _customerOrderRepository.Dispose();
                }
                if (_customerRepository != null)
                {
                    _customerRepository.Dispose();
                }
                if (_transportTypeRepository != null)
                {
                    _transportTypeRepository.Dispose();
                }
                if (_geographicAreaTransportTypeRepository != null)
                {
                    _geographicAreaTransportTypeRepository.Dispose();
                }
                if (_packagingRepository != null)
                {
                    _packagingRepository.Dispose();
                }

                if (_rofexRepository != null)
                {
                    _rofexRepository.Dispose();
                }
                if (_paymentDeadlineRepository != null)
                {
                    _paymentDeadlineRepository.Dispose();
                }
                if (_shipmentTrackingRepository != null)
                {
                    _shipmentTrackingRepository.Dispose();
                }
                if (_customerProductRepository != null)
                {
                    _customerProductRepository.Dispose();
                }
                if (_customerOrderService != null)
                {
                    _customerOrderService.Dispose();
                }
                if (_transportService != null)
                {
                    _transportService.Dispose();
                }
                if (_marginServices != null)
                {
                    _marginServices.Dispose();
                }
                if (_wayOfExceptionRepository != null)
                {
                    _wayOfExceptionRepository.Dispose();
                }
                if (_wayOfExceptionServices != null)
                {
                    _wayOfExceptionServices.Dispose();
                }
            }
        }