public void sendInterBankTransfer(InterBankTransfer interBankTransfer) { var senderAccount = this.AccountList.Find(b => b.ID == interBankTransfer.getSenderID()); senderAccount.Withdraw(interBankTransfer.getAmount()); InterBankOfBank.SendInterBankTransfer(interBankTransfer); }
public void SendBackInterBankTransfer(InterBankTransfer interBankTransfer) { var returnTransfer = new InterBankTransfer(interBankTransfer.getReceiverBank(), interBankTransfer.getReceiverID(), interBankTransfer.getSenderBank(), interBankTransfer.getSenderID(), interBankTransfer.getAmount()); SendInterBankTransfer(returnTransfer); }