public ActionResult DeleteConfirmed(string id) { supplierdetail supplierdetail = db.supplierdetails.Find(id); db.supplierdetails.Remove(supplierdetail); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ProductID,ProductDescription,MaterialName,VendorName,VendorAddress")] supplierdetail supplierdetail) { if (ModelState.IsValid) { db.Entry(supplierdetail).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(supplierdetail)); }
public ActionResult Create([Bind(Include = "ProductID,ProductDescription,MaterialName,VendorName,VendorAddress")] supplierdetail supplierdetail) { if (ModelState.IsValid) { db.supplierdetails.Add(supplierdetail); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(supplierdetail)); }
// GET: supplierdetails/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } supplierdetail supplierdetail = db.supplierdetails.Find(id); if (supplierdetail == null) { return(HttpNotFound()); } return(View(supplierdetail)); }