コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }