public ActionResult Edit([Bind(Include = "ShortId,Username,password,Role")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(user)); }
public ActionResult Edit([Bind(Include = "JobId,JobPosition,JobType,PostedDate,PostedBy,numberofPostions,SupervisoryOrganisation,fulfilldate,JobStatus")] Job job) { if (ModelState.IsValid) { db.Entry(job).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(job)); }
public ActionResult Edit([Bind(Include = "JobId,Locationname")] Location location) { if (ModelState.IsValid) { db.Entry(location).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.JobId = new SelectList(db.Jobs, "JobId", "JobId", location.JobId); return(View(location)); }