Esempio n. 1
0
        public void testInsertTransaction()
        {
            transactionManager transactionMgr = new transactionManager();
            TransactionTbl myTransaction = new TransactionTbl()
            {
                amount = 3.55,
                customer = 4,
                description = "Cash Outlay",
                fund = "A10",
                project = "1556",
                gl1 = "1016",
                gl2 = "2110",
                gl3 = "4556",
                gl4 = "4660",
                status = "Held"
            };

            transactionMgr.Insert(myTransaction);
        }
        public ViewResult Index(Transaction transaction)
        {
            if (ModelState.IsValid)
            {
                transactionManager mgr = new transactionManager();
                TransactionTbl postTransaction = new TransactionTbl();

                postTransaction.amount = transaction.amount;
                postTransaction.customer = transaction.customer;
                postTransaction.description = transaction.description;
                postTransaction.fund = transaction.fund;
                postTransaction.gl1 = transaction.gl1;
                postTransaction.gl2 = transaction.gl2;
                postTransaction.gl3 = transaction.gl3;
                postTransaction.gl4 = transaction.gl4;

                mgr.Insert(postTransaction);
                return View("Posted", transaction);
            }
            else
            {
                return View();
            }
        }
Esempio n. 3
0
 public void testListRetrieval()
 {
     transactionManager transactionMgr = new transactionManager();
     List<TransactionTbl> myList = transactionMgr.GetAllTransactions().ToList<TransactionTbl>();
     Assert.IsTrue(myList.Count > 0);
 }