Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            AccountServiceClient asc = new AccountServiceClient();
            int     accountNumber    = int.Parse(txtAccountNumber.Text);
            Account account          = asc.GetAccount(accountNumber);

            if (account != null)
            {
                richTextBox1.Text =
                    "account number: " + account.AccountNumber + "\n" +
                    "current balance: " + account.Balance.ToString("c") + "\n" +
                    "bank: " + account.Bank;
            }
            else
            {
                richTextBox1.Text =
                    "No such account exists";
            }
        }