Ejemplo n.º 1
0
 public virtual void Transfer(Decimal sum)
 {
     TransactionChain = new DebitTransfer(SourceAccount, DestinationAccount);
     TransactionChain
     .SetNext(new DepositTransfer(SourceAccount, DestinationAccount))
     .SetNext(new CreditTransfer(SourceAccount, DestinationAccount));
     TransactionChain.Transfer(sum);
 }
Ejemplo n.º 2
0
 public virtual void Withdraw(Decimal sum)
 {
     TransactionChain = new DebitWithdraw(SourceAccount);
     TransactionChain
     .SetNext(new DepositWithdraw(SourceAccount))
     .SetNext(new CreditWithdraw(SourceAccount));
     TransactionChain.Withdraw(sum);
 }