예제 #1
0
파일: Bank.cs 프로젝트: lukeses/bank
        public void sendInterBankTransfer(InterBankTransfer interBankTransfer)
        {
            var senderAccount = this.AccountList.Find(b => b.ID == interBankTransfer.getSenderID());

            senderAccount.Withdraw(interBankTransfer.getAmount());
            InterBankOfBank.SendInterBankTransfer(interBankTransfer);
        }
예제 #2
0
파일: InterBank.cs 프로젝트: lukeses/bank
        public void SendBackInterBankTransfer(InterBankTransfer interBankTransfer)
        {
            var returnTransfer = new InterBankTransfer(interBankTransfer.getReceiverBank(), interBankTransfer.getReceiverID(),
                                                       interBankTransfer.getSenderBank(), interBankTransfer.getSenderID(), interBankTransfer.getAmount());

            SendInterBankTransfer(returnTransfer);
        }