public ActionResult DeleteConfirmed(int id, string returnUrl) { VtQoh vtQoh = db.VtQohs.Find(id); db.VtQohs.Remove(vtQoh); db.SaveChanges(); return(Redirect(returnUrl)); //return RedirectToAction("Index"); }
//public ActionResult Edit([Bind(Include = "VtQohId,Pn,PartDescription,Qoh,Location,Notes")] VtQoh vtQoh) public ActionResult Edit(VtQoh vtQoh, string returnUrl) { if (ModelState.IsValid) { db.Entry(vtQoh).State = EntityState.Modified; db.SaveChanges(); return(Redirect(returnUrl)); //return RedirectToAction("Index"); } return(View()); //return View(vtQoh); }
//public ActionResult Create([Bind(Include = "VtQohId,Pn,PartDescription,Qoh,Location,Notes")] VtQoh vtQoh) public ActionResult Create(VtQoh vtQoh, string returnUrl) { if (ModelState.IsValid) { db.VtQohs.Add(vtQoh); db.SaveChanges(); return(Redirect(returnUrl)); //return RedirectToAction("Index"); } return(View()); //return View(vtQoh); }
// GET: VtQohs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VtQoh vtQoh = db.VtQohs.Find(id); if (vtQoh == null) { return(HttpNotFound()); } return(View(vtQoh)); }
// GET: VtQohs/Delete/5 public ActionResult Delete(int?id) { ViewBag.ReturnUrl = Request.UrlReferrer; if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VtQoh vtQoh = db.VtQohs.Find(id); if (vtQoh == null) { return(HttpNotFound()); } return(View(vtQoh)); }