public ActionResult AddExpense() { Exp_Cat ec = new Models.Exp_Cat(); ViewBag.Expcat = ec.all(); return(View()); }
public ActionResult DeleteExp_Cat(int a) { Exp_Cat ec = new Models.Exp_Cat(); ec.EC_ID = a; ec.delete(); return(RedirectToAction("Exp_Cat")); }
public ActionResult UpdateExp_Cat(int a) { Exp_Cat ec = new Models.Exp_Cat(); ec.EC_ID = a; ec.search(); return(View(ec)); }
public ActionResult UpdateExpense(int a) { Expense e = new Models.Expense(); Exp_Cat ec = new Models.Exp_Cat(); ViewBag.Expcat = ec.all(); e.E_ID = a; e.search(); return(View(e)); }
public ActionResult AddExpense(Expense e) { Admin ad = new Admin(); ad.A_ID = Convert.ToInt32(Session["Admin"]); ad.searchbyid(); e.Add_By = ad.Name; e.add(); Exp_Cat ec = new Models.Exp_Cat(); ViewBag.expcat = ec.all(); return(RedirectToAction("Expense")); }
public ActionResult Expense() { Expense ex = new Models.Expense(); Exp_Cat ec = new Models.Exp_Cat(); ViewBag.ec = ec.all(); if (TempData["type"] != null) { if (TempData["type"] == "ecid") { ex.EC_Name = TempData["value"].ToString(); ec.searchbyname(); return(View(ex.expensebyecid())); } else { ex.Name = (string)TempData["value"]; return(View(ex.expbyname())); } } return(View(ex.all())); }