コード例 #1
0
 public ActionResult Edit([Bind(Include = "DeciplineID,DeciplineName")] Decipline decipline)
 {
     if (ModelState.IsValid)
     {
         db.Entry(decipline).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(decipline));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "QuotaID,QuotaName")] Quota quota)
 {
     if (ModelState.IsValid)
     {
         db.Entry(quota).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View());
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "adminid,adminusername,adminpassword")] Admin admin)
 {
     if (ModelState.IsValid)
     {
         db.Entry(admin).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(admin));
 }