Esempio n. 1
0
 public ActionResult Edit([Bind(Include = "Id,Name,Email,Password")] TeamMember teamMember)
 {
     if (ModelState.IsValid)
     {
         db.Entry(teamMember).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(teamMember));
 }
 public ActionResult Edit([Bind(Include = "Id,TeamMemberId,Description,DueDate,IsDone")] TaskToDo taskToDo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(taskToDo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.TeamMemberId = new SelectList(db.TeamMembers, "Id", "Name", taskToDo.TeamMemberId);
     return(View(taskToDo));
 }