示例#1
0
        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);
        }
示例#2
0
        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);
            }
        }
示例#3
0
 public CKIRProxy(CBank bu, IKIRMediator ku)
 {
     this.bankUtility   = bu;
     this.kirUtility    = ku;
     this.kirOperations = new List <COperation>();
 }