public ActionResult DeleteConfirmed(byte id) { tbl_jobCorrespondents tbl_jobCorrespondents = db.tbl_jobCorrespondents.Find(id); db.tbl_jobCorrespondents.Remove(tbl_jobCorrespondents); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "jobCorrespondentID,jobID,name,email,active")] tbl_jobCorrespondents tbl_jobCorrespondents) { if (ModelState.IsValid) { db.Entry(tbl_jobCorrespondents).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.jobID = new SelectList(db.tbl_Jobs, "jobID", "description", tbl_jobCorrespondents.jobID); return(View(tbl_jobCorrespondents)); }
// GET: jobCorrespondents/Details/5 public ActionResult Details(byte?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_jobCorrespondents tbl_jobCorrespondents = db.tbl_jobCorrespondents.Find(id); if (tbl_jobCorrespondents == null) { return(HttpNotFound()); } return(View(tbl_jobCorrespondents)); }
// GET: jobCorrespondents/Edit/5 public ActionResult Edit(byte?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_jobCorrespondents tbl_jobCorrespondents = db.tbl_jobCorrespondents.Find(id); if (tbl_jobCorrespondents == null) { return(HttpNotFound()); } ViewBag.jobID = new SelectList(db.tbl_Jobs, "jobID", "description", tbl_jobCorrespondents.jobID); return(View(tbl_jobCorrespondents)); }