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