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

            return View(uom_type);
        }