Ejemplo n.º 1
0
        public ActionResult AddStudentToClass(int classId, int studentId)
        {
            GetHelper <Class> .Add(Globals.CLASSES_ADD_API_LINK, classId, studentId);

            var className = GetHelper <Class> .GetById(Globals.CLASSES_API_LINK, classId).name;

            Student student = GetHelper <Student> .GetById(Globals.STUDENTS_API_LINK, studentId);

            var studentName = student.forename + " " + student.surname;

            TempData["message"] = "Pomyślnie dodano studenta " + studentName + " do klasy " + className;

            return(RedirectToAction("Index"));
        }