예제 #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));
 }