public ActionResult DeleteConfirmed(int id) { InvStatu invStatu = db.InvStatus.Find(id); db.InvStatus.Remove(invStatu); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "InvID,InvName")] InvStatu invStatu) { if (ModelState.IsValid) { db.Entry(invStatu).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(invStatu)); }
public ActionResult Create([Bind(Include = "InvID,InvName")] InvStatu invStatu) { if (ModelState.IsValid) { db.InvStatus.Add(invStatu); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(invStatu)); }
// GET: InvStatus/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } InvStatu invStatu = db.InvStatus.Find(id); if (invStatu == null) { return(HttpNotFound()); } return(View(invStatu)); }