示例#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();
            }
        }
示例#3
0
 public void Insert(TransactionTbl transaction)
 {
     var transactionRepo = RepositoryFactory.Create("Transaction");
     transactionRepo.Insert(transaction);
 }
示例#4
0
 public void Delete(TransactionTbl transaction)
 {
     var transactionRepo = RepositoryFactory.Create("Transaction");
     transactionRepo.Delete(transaction);
 }