public ActionResult DeleteConfirmed(int id) { Item_value item_value = db.item_val.Find(id); db.item_val.Remove(item_value); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /Itemvalue/Delete/5 public ActionResult Delete(int id = 0) { Item_value item_value = db.item_val.Find(id); if (item_value == null) { return(HttpNotFound()); } return(View(item_value)); }
public ActionResult Edit(Item_value item_value) { if (ModelState.IsValid) { db.Entry(item_value).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(item_value)); }
public ActionResult Create(Item_value item_value) { if (ModelState.IsValid) { db.item_val.Add(item_value); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(item_value)); }