Exemplo n.º 1
0
        private void UpdateAccountBalance()
        {
            try
            {
                _indTriggerAccountBalance.OnGet();

                var start = DateTime.Now;
                if (string.IsNullOrEmpty(FromAccount))
                {
                    _accountBalance = 0.0m;
                }
                else
                {
                    using (AccountServiceClient service = new AccountServiceClient())
                    {
                        _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;
            }
        }
Exemplo n.º 2
0
        private void UpdateAccountBalance()
        {
            try
            {
                _indTriggerAccountBalance.OnGet();

                var start = DateTime.Now;
                if (string.IsNullOrEmpty(FromAccount))
                    _accountBalance = 0.0m;
                else
                {
                    using (AccountServiceClient service = new AccountServiceClient())
                    {
                        _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;
            }
        }