public bool WithDraw(CBank bank, CAccount acc, decimal amount) { bool positive = false; WithDraw withdraw = new WithDraw(amount, acc); IOperation oper = withdraw; if (acc.GetSaldo() >= amount) { acc.DoOperation(oper); acc.GetHistory().AddToHistory(withdraw); positive = true; } return(positive); }
public bool WithDraw(CBank bank, CAccount acc, decimal amount) { if (this.bank.WithDraw(bank, acc, amount)) { return(true); } else { WithDraw withdraw = new WithDraw(amount, acc); IOperation oper = withdraw; acc.DoOperation(oper); acc.GetHistory().AddToHistory(withdraw); return(true); } }
public CKIRProxy(CBank bu, IKIRMediator ku) { this.bankUtility = bu; this.kirUtility = ku; this.kirOperations = new List <COperation>(); }