public ActionResult DeleteConfirmed(int id) { Certificated certificated = db.Certificateds.Find(id); db.Certificateds.Remove(certificated); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,StartDate,StopDate,Name,Number,Where,Explanation")] Certificated certificated) { if (ModelState.IsValid) { db.Entry(certificated).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(certificated)); }
public ActionResult Create([Bind(Include = "ID,StartDate,StopDate,Name,Number,Where,Explanation")] Certificated certificated) { if (ModelState.IsValid) { db.Certificateds.Add(certificated); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(certificated)); }
// GET: Certificateds/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Certificated certificated = db.Certificateds.Find(id); if (certificated == null) { return(HttpNotFound()); } return(View(certificated)); }
public JsonResult DeleteCert(Certificated cert) { return(Json(ppicdb.DeleteCert(cert), JsonRequestBehavior.AllowGet)); }