Example #1
0
 public ActionResult Edit([Bind(Include = "Id,Name")] Courses courses)
 {
     if (ModelState.IsValid)
     {
         db.Entry(courses).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(courses));
 }
Example #2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Controller,Action")] Sidebars sidebars)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sidebars).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sidebars));
 }
Example #3
0
 public ActionResult Edit([Bind(Include = "Id,Name,ClassId")] Students students)
 {
     if (ModelState.IsValid)
     {
         db.Entry(students).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(students));
 }
Example #4
0
 public ActionResult Edit([Bind(Include = "Id,Name")] Teachers teachers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(teachers).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(teachers);
 }
Example #5
0
 public ActionResult Edit([Bind(Include = "Id,ClassId,CourseId,TeacherId")] CoursMangements coursMangements)
 {
     if (ModelState.IsValid)
     {
         db.Entry(coursMangements).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(coursMangements));
 }