Exemplo n.º 1
0
        public Customer Transaction(Customer c, decimal amount, Transction t)
        {
            Customer action = _accountSystem.Transaction(c, amount, t);

            OnChanged(new TransactionEvent(action, c, t), EventArgs.Empty);
            return(action);
        }
        public Customer Transaction(Customer customer, decimal amount, Transction transction)
        {
            Customer action = null;

            switch (transction)
            {
            case Transction.Withdraw:
                action = Withdraw(customer, amount);
                return(action);

                break;

            case Transction.Deposit:
                action = Deposit(customer, amount);
                return(action);

                break;
            }
            return(action);
        }
Exemplo n.º 3
0
 public TransactionEvent(Customer newState, Customer oldState, Transction transaction)
 {
     NewState    = newState;
     OldState    = oldState;
     Transaction = transaction;
 }