Exemple #1
0
        public void Print(Membership mem, Account acc, Cash cash, Check[] checks, Configuration configuration)
        {
            TransactionReport rep = null;

            if (acc != null)
            {
                if (cash != null)
                {
                    rep = PrepareReport(mem, acc, cash, configuration);
                }
                else
                {
                    rep = PrepareReport(mem, acc, checks, configuration);
                }
            }
            else
            {
                rep = PrepareReport(mem, cash, checks, configuration);
            }

            string[]    lines = rep.Report();
            ReceiptForm rf    = new ReceiptForm();

            rf.Show(lines);
        }
Exemple #2
0
        private TransactionReport PrepareReport(Membership mem, Cash cash, Check[] checks, Configuration configuration)
        {
            TransactionReport rep = null;

            if (configuration == Configuration.PRINT_CLEAR)
            {
                rep = new MachineDepositTransactionReport(mem.ID, checks, cash);
            }
            else if (configuration == Configuration.PRINT_REFILL)
            {
                rep = new MachineRefillTransactionReport(mem.ID, cash);
            }

            return(rep);
        }
Exemple #3
0
        private TransactionReport PrepareReport(Membership mem, Account acc, Cash c, Configuration configuration)
        {
            TransactionReport rep = null;

            if (configuration == Configuration.PRINT_DEPOSIT)
            {
                rep = new CashDepositTransactionReport(mem.ID, acc, c);
            }
            else if (configuration == Configuration.PRINT_WITHDRAWL)
            {
                rep = new WithdrawTransactionReport(mem.ID, acc, c);
            }

            return(rep);
        }