Exemplo n.º 1
0
 public ActionResult Edit(School school)
 {
     if (ModelState.IsValid)
     {
         db.School.Add(school);
         db.SaveChanges();
     }
     return(RedirectToAction("Index"));
 }
Exemplo n.º 2
0
 public ActionResult Edit(Pupil pupil)
 {
     if (ModelState.IsValid)
     {
         db.Pupil.Add(pupil);
         db.SaveChanges();
     }
     return(RedirectToAction("Index", new { SchoolId = pupil.SchoolId, SchoolFormId = pupil.SchoolFormId }));
 }
Exemplo n.º 3
0
 public ActionResult Edit(SchoolForm schoolForm)
 {
     if (ModelState.IsValid)
     {
         db.SchoolForm.Add(schoolForm);
         db.SaveChanges();
     }
     return(RedirectToAction("Info", "School", new { id = schoolForm.SchoolId }));
 }