Ejemplo n.º 1
0
        Transaction CreateTransaction(MenuOption type)
        {
            Transaction temp = null;

            switch (type)
            {
            case MenuOption.BALANCE_INQUIRY:
                temp = new BalanceInquiry(currentAccountNumber, screen, bankDatabase);
                break;

            case MenuOption.WITHDRAWAL:
                temp = new Withdrawal(currentAccountNumber, screen, bankDatabase, keypad, cashDispenser);
                break;

            case MenuOption.DEPOSIT:
                temp = new Deposit(currentAccountNumber, screen, bankDatabase, keypad, depositSlot);
                break;
            }
            return(temp);
        }
        private Transaction CreateTransaction(MenuOption type)
        {
            Transaction temp = null;

            switch (type)
            {
            case MenuOption.BalanceInquiry:
                temp = new BalanceInquiry(autentication._currentAccountNumber, _bankDatabase);
                break;

            case MenuOption.Withdrawal:
                temp = new Withdrawal(autentication._currentAccountNumber, _bankDatabase);
                break;

            case MenuOption.Deposit:
                temp = new Deposit(autentication._currentAccountNumber, _bankDatabase);
                break;
            }

            return(temp);
        }
Ejemplo n.º 3
0
        private Transaction CreateTransaction(MenuOption type)
        {
            Transaction temp = null;

            switch (type)
            {
            case MenuOption.BalanceInquiry:
                temp = new BalanceInquiry(_currentAccountNumber, _screen, _bankDatabase);
                break;

            case MenuOption.Withdrawal:
                temp = new Withdrawal(_currentAccountNumber, _screen, _bankDatabase, _keypad, _cashDispenser);
                break;

            case MenuOption.Deposit:
                temp = new Deposit(_currentAccountNumber, _screen, _bankDatabase, _keypad, _depositSlot);
                break;
            }

            return(temp);
        }