Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
 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));
 }
Exemplo n.º 4
0
 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));
 }
Exemplo n.º 5
0
 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));
 }
Exemplo n.º 6
0
 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));
 }