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