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));
 }
示例#3
0
 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));
 }