Esempio n. 1
0
 public ActionResult Edit_Mission([Bind(Include = "MID,CID,MName,MDetail")] Mission mission)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mission).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index_Mission"));
     }
     return(View(mission));
 }
Esempio n. 2
0
 public ActionResult Edit_Admin([Bind(Include = "AID,APassword,AName")] Admin admin)
 {
     if (ModelState.IsValid)
     {
         db.Entry(admin).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(admin));
 }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "TEID,MID,GID,TeacherA,GroupAchievementLevel")] TeacherAssessment teacherAssessment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(teacherAssessment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(teacherAssessment));
 }
Esempio n. 4
0
 public ActionResult Edit_Course([Bind(Include = "CID,TID,CName")] Course course)
 {
     if (ModelState.IsValid)
     {
         db.Entry(course).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index_Course"));
     }
     ViewBag.TID = new SelectList(db.Teachers, "TID", "TName", course.TID);
     return(View(course));
 }