public ActionResult CreateProduct(Transaction trans) { var dao = new TransactionDao(); int id = dao.InsertTransaction(trans); if (id > 0) { return(RedirectToAction("Index", "Transaction")); } else { ModelState.AddModelError("", "Khong them san pham thanh cong"); } return(View("Index", "Home")); }
public Transaction AddTransaction(NewTransaction newTransaction) { var transactionDao = new TransactionDao(); return(transactionDao.InsertTransaction(newTransaction)); }