public ActionResult Edit([Bind(Include = "Id,Name,CodeName,Description,PossibleStartDate,PossibleEndDate,Duration,Status")] Project project) { if (ModelState.IsValid) { db.Entry(project).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(project)); }
public ActionResult Edit([Bind(Include = "Id,Name")] Role role) { if (ModelState.IsValid) { db.Entry(role).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(role)); }
public ActionResult Edit([Bind(Include = "Id,Name,Email,DefaultPassword,UserStatus,RoleId")] User user) { if (ModelState.IsValid) { db.Entry(user).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RoleId = new SelectList(db.Roles, "Id", "Name", user.RoleId); return(View(user)); }
public ActionResult Edit([Bind(Include = "Id,Description,DueDate,Priority,ProjectId,UserId")] ProjectTask projecttask) { if (ModelState.IsValid) { db.Entry(projecttask).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ProjectId = new SelectList(db.Projects, "Id", "Name", projecttask.ProjectId); ViewBag.UserId = new SelectList(db.Users, "Id", "Name", projecttask.UserId); return(View(projecttask)); }
public ActionResult Edit([Bind(Include = "Id,UserId,ProjectId")] UserProject userproject) { if (ModelState.IsValid) { db.Entry(userproject).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ProjectId = new SelectList(db.Projects, "Id", "Name", userproject.ProjectId); ViewBag.UserId = new SelectList(db.Users, "Id", "Name", userproject.UserId); return(View(userproject)); }
public ActionResult Edit([Bind(Include = "Id,ProjectId,TaskId,CommentedBy")] Comment comment) { if (ModelState.IsValid) { db.Entry(comment).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ProjectId = new SelectList(db.Projects, "Id", "Name", comment.ProjectId); ViewBag.TaskId = new SelectList(db.ProjectTasks, "Id", "Description", comment.TaskId); ViewBag.CommentedBy = new SelectList(db.Users, "Id", "Name", comment.CommentedBy); return(View(comment)); }