Ejemplo n.º 1
0
 public ActionResult ViewLessons(int action = 0, int delete = 0, int addMark = 0, int absent = 0)
 {
     if (delete != 0)
     {
         LessonsDB.DeleteLesson(delete);
         return(RedirectToAction("ViewLessons", "Parent"));
     }
     return(RedirectToAction("ViewLessons", "Parent"));
 }
Ejemplo n.º 2
0
 public ActionResult ViewLessons(int action = 0, int delete = 0, int addMark = 0, int absent = 0)
 {
     if (delete != 0)
     {
         LessonsDB.DeleteLesson(delete);
         return(RedirectToAction("ViewLessons", "Teacher"));
     }
     else if (action != 0)
     {
         return(RedirectToAction("EditLesson", "Teacher", new { lessonID = action }));
     }
     else if (addMark != 0)
     {
         return(RedirectToAction("AddMarkForm", "Teacher", new { lessonID = addMark }));
     }
     else
     {
         return(RedirectToAction("SelectAbsentPupils", "Teacher", new { lessonID = absent }));
     }
 }