Example #1
0
 public ActionResult Edit(Role role)
 {
     if (ModelState.IsValid)
     {
         db.Entry(role).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(role));
 }
 public ActionResult Edit(JobCategory jobcategory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jobcategory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(jobcategory));
 }
Example #3
0
 public ActionResult Edit(User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.RoleId = new SelectList(db.Roles, "RoleId", "RoleName", user.RoleId);
     return(View(user));
 }
Example #4
0
 public ActionResult Edit(JobDescription jobdescription)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jobdescription).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.JobCategoryId = new SelectList(db.JobCategories, "JobCategoryId", "CategoryName", jobdescription.JobCategoryId);
     ViewBag.UserId        = new SelectList(db.Users, "UserId", "UserName", jobdescription.UserId);
     return(View(jobdescription));
 }