Esempio n. 1
0
 public ActionResult Edit([Bind(Include = "UserId,UserName,Password,Email")] UserInfo userInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(userInfo));
 }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "TodoId,Subject,Body,Date,UserId")] TodoTable todoTable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(todoTable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserId = new SelectList(db.UserInfoes, "UserId", "UserName", todoTable.UserId);
     return(View(todoTable));
 }