Example #1
0
 public ActionResult Edit(ExpenseType expensetype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(expensetype).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(expensetype);
 }
Example #2
0
        public ActionResult Create(ExpenseType expensetype)
        {
            if (ModelState.IsValid)
            {
                db.ExpenseTypes.Add(expensetype);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(expensetype);
        }