Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Id,NotebookOwner,DateCreated,LastModified,Title,Desctiption,Body")] Notebook notebook)
 {
     if (ModelState.IsValid)
     {
         db.Entry(notebook).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(Json(notebook, JsonRequestBehavior.AllowGet));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Username,FirstName,LastName,Email,AccountCreatedOnDate,LastLoggin,isAdmin,isTeacher")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "Id,Owner,DateCreated,LastModified,Font,Back,DeckId,Rating")] Notecard notecard)
 {
     if (ModelState.IsValid)
     {
         db.Entry(notecard).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(Json(notecard, JsonRequestBehavior.AllowGet));
 }