public bool RetransErrorPrice(ulong priceItemId) { LastErrorMessage = String.Empty; try { var wcfParameter = new WcfCallParameter() { Value = priceItemId, LogInformation = new LogInformation() { ComputerName = Environment.MachineName, UserName = Environment.UserName } }; _clientProxy = _channelFactory.CreateChannel(); _clientProxy.RetransErrorPrice(wcfParameter); ((ICommunicationObject)_clientProxy).Close(); } catch (FaultException faultException) { LastErrorMessage = faultException.Reason.ToString(); return(false); } finally { AbortClientProxy(); } return(true); }
public HistoryFile GetFileFormHistory(ulong downlogId) { LastErrorMessage = String.Empty; HistoryFile historyFile = null; try { var wcfParameter = new WcfCallParameter() { Value = downlogId, LogInformation = new LogInformation() { ComputerName = Environment.MachineName, UserName = Environment.UserName } }; _clientProxy = _channelFactory.CreateChannel(); historyFile = _clientProxy.GetFileFormHistory(wcfParameter); ((ICommunicationObject)_clientProxy).Close(); } catch (FaultException faultException) { LastErrorMessage = faultException.Reason.ToString(); return(null); } finally { AbortClientProxy(); } return(historyFile); }