コード例 #1
0
        private void LockAccount()
        {
            if (this.BankAccountToLock != null)
            {
                MainModuleServiceClient client = new MainModuleServiceClient();
                client.ChangeBankAccountAsync(this.BankAccountToLock);

                client.ChangeBankAccountCompleted += delegate(object s, AsyncCompletedEventArgs e)
                {
                    if (!e.Cancelled && e.Error == null)
                    {
                        this.BankAccountToLock = null;
                        this.RefreshBankAccountsStatus();
                    }
                    else
                    {
                        MessageBox.Show(e.Error.Message, "Perform Transfer", MessageBoxButton.OK);
                    }
                };
            }
        }
コード例 #2
0
        private void LockAccount()
        {
            if (this.BankAccountToLock != null)
            {
                MainModuleServiceClient client = new MainModuleServiceClient();
                client.ChangeBankAccountAsync(this.BankAccountToLock);

                client.ChangeBankAccountCompleted += delegate(object s, AsyncCompletedEventArgs e)
                {
                    if (!e.Cancelled && e.Error == null)
                    {
                        this.BankAccountToLock = null;
                        this.RefreshBankAccountsStatus();
                    }
                    else
                        MessageBox.Show(e.Error.Message, "Perform Transfer", MessageBoxButton.OK);
                };
            }
        }