Beispiel #1
0
 public ActionResult Edit([Bind(Include = "Id,Name,Controller,Action")] ActionLinks actionLinks)
 {
     if (ModelState.IsValid)
     {
         db.Entry(actionLinks).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(actionLinks));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "id,name,xingbie")] teacher teacher)
 {
     if (ModelState.IsValid)
     {
         db.Entry(teacher).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(teacher));
 }
 public ActionResult Edit([Bind(Include = "id,ClassId,CourseId,TeacherId")] CourseManagements courseManagements)
 {
     if (ModelState.IsValid)
     {
         db.Entry(courseManagements).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(courseManagements));
 }
 public ActionResult Edit([Bind(Include = "id,Name,TeacherId")] classs classs)
 {
     if (ModelState.IsValid)
     {
         db.Entry(classs).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(classs));
 }
Beispiel #5
0
 public ActionResult Edit([Bind(Include = "id,name,xuehao")] student student)
 {
     if (ModelState.IsValid)
     {
         db.Entry(student).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(student));
 }