Пример #1
0
        private void UpdateAccountBalance()
        {
            try
            {
                _indTriggerAccountBalance.OnGet();

                var start = DateTime.Now;
                if (string.IsNullOrEmpty(FromAccount))
                {
                    _accountBalance = 0.0m;
                }
                else
                {
                    using (AccountQueryServiceClient service = new AccountQueryServiceClient())
                    {
                        _accountBalance = service.GetAccountBalance(FromAccount);
                    }
                }

                var end = DateTime.Now;
                LastError = (end - start).ToString();
            }
            catch (Exception ex)
            {
                while (ex.InnerException != null)
                {
                    ex = ex.InnerException;
                }
                LastError       = ex.Message;
                _accountBalance = 0.0m;
            }
        }
Пример #2
0
        private void UpdateAccountBalance()
        {
            try
            {
                _indTriggerAccountBalance.OnGet();

                var start = DateTime.Now;
                if (string.IsNullOrEmpty(FromAccount))
                    _accountBalance = 0.0m;
                else
                {
                    using (AccountQueryServiceClient service = new AccountQueryServiceClient())
                    {
                        _accountBalance = service.GetAccountBalance(FromAccount);
                    }
                }

                var end = DateTime.Now;
                LastError = (end-start).ToString();
            }
            catch (Exception ex)
            {
                while (ex.InnerException != null)
                    ex = ex.InnerException;
                LastError = ex.Message;
                _accountBalance = 0.0m;
            }
        }