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