public void RetransPriceSmartMsMq(uint priceId)
 {
     try {
         if (_msmqChannelFactory != null)
         {
             _msmqClientProxy = _msmqChannelFactory.CreateChannel();
             _msmqClientProxy.RetransPriceSmart(priceId);
             ((ICommunicationObject)_msmqClientProxy).Close();
         }
     }
     finally {
         AbortMsmqClientProxy();
     }
 }
 public bool RetransPrice(ulong priceItemId, bool msmqUse)
 {
     LastErrorMessage = String.Empty;
     try {
         var parameter = new WcfCallParameter()
         {
             Value          = priceItemId,
             LogInformation = new LogInformation()
             {
                 ComputerName = Environment.MachineName,
                 UserName     = Environment.UserName
             }
         };
         if (!msmqUse)
         {
             _clientProxy = _channelFactory.CreateChannel();
             _clientProxy.RetransPrice(parameter);
             ((ICommunicationObject)_clientProxy).Close();
         }
         else if (_msmqChannelFactory != null)
         {
             _msmqClientProxy = _msmqChannelFactory.CreateChannel();
             _msmqClientProxy.RetransPrice(parameter);
             ((ICommunicationObject)_msmqClientProxy).Close();
         }
     }
     catch (FaultException faultException) {
         LastErrorMessage = faultException.Reason.ToString();
         return(false);
     }
     finally {
         if (!msmqUse)
         {
             AbortClientProxy();
         }
         else if (_msmqChannelFactory != null)
         {
             AbortMsmqClientProxy();
         }
     }
     return(true);
 }