示例#1
0
 public ActionResult Edit([Bind(Include = "id,username,fullName,email,password,signupDate")] Admin admin)
 {
     if (ModelState.IsValid)
     {
         db.Entry(admin).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(admin));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "id,setId,imgURL_thumb,imgURL_full")] Piece piece)
 {
     if (ModelState.IsValid)
     {
         db.Entry(piece).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.setId = new SelectList(db.Sets, "id", "name", piece.setId);
     return(View(piece));
 }
示例#3
0
 public ActionResult Edit([Bind(Include = "id,name,description,userId,creationDate,likes,sizeData,combinationData")] Set set)
 {
     if (ModelState.IsValid)
     {
         db.Entry(set).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.userId = new SelectList(db.Users, "id", "username", set.userId);
     return(View(set));
 }