コード例 #1
0
        public override bool Execute()
        {
            if (IdBankAccount <= 0)
            {
                Information = StringSource.BankAccountNotFound();
                return(false);
            }

            using (var service = new BankServiceClient()) {
                BankAccount = service.GetBankAccountById(IdBankAccount);

                if (BankAccount != null)
                {
                    service.RemoveBankAccount(BankAccount);

                    Information = StringSource.BankAccountRemoved();
                    return(true);
                }
                else
                {
                    Information = StringSource.BankAccountNotFound();
                    return(false);
                }
            }
        }