public void Deposit(DepositRequest depositRequest) { BankAccount bankAccount = _bankRepository.FindBy(depositRequest.AccountId); bankAccount.Deposit(depositRequest.Amount, ""); _bankRepository.Save(bankAccount); }
protected void btnDeposit_Click(object sender, EventArgs e) { ApplicationBankAccountService service = new ApplicationBankAccountService(); DepositRequest request = new DepositRequest(); Guid AccId = new Guid(ddlBankAccounts.SelectedValue.ToString()); request.AccountId = AccId; request.Amount = Decimal.Parse(txtAmount.Text); service.Deposit(request); DisplaySelectedAccount(); }