Beispiel #1
0
        public ActionResult AddClassForm()
        {
            List <TeacherShortInf> teachers = TeachersDB.GetTeachersShortInf();

            ViewBag.Teachers = teachers;
            return(View());
        }
Beispiel #2
0
        public ActionResult SearchTeachersBySurname(string Person)
        {
            string[] parts = Person.Split(' ');
            List <TeacherShortInf> teachers = new List <TeacherShortInf>();

            if (parts.Length == 3)
            {
                string part1 = parts[0];
                string part2 = parts[1];
                string part3 = parts[2];

                teachers = TeachersDB.SearchTeacherByThreeParameters(part1, part2, part3);
            }
            else if (parts.Length == 2)
            {
                string part1 = parts[0];
                string part2 = parts[1];

                teachers = TeachersDB.SearchTeacherByTwoParameters(part1, part2);
            }

            ViewBag.Teachers = TeachersDB.GetTeachersShortInf();

            if (teachers.Count != 0)
            {
                ViewBag.Teacher = teachers[0];
            }

            return(PartialView(teachers));
        }
Beispiel #3
0
        public ActionResult EditClassInformation(int action)
        {
            ClassWithManagment     Class    = ClassesDB.GetClassFullInf(action);
            List <TeacherShortInf> teachers = TeachersDB.GetTeachersShortInf();

            ViewBag.Teachers = teachers;
            return(View(Class));
        }
Beispiel #4
0
        public ActionResult AddLessonForm()
        {
            List <Class> classes = ClassesDB.GetClasses();

            ViewBag.Classes = classes;
            List <TeacherShortInf> teachers = TeachersDB.GetTeachersShortInf();

            ViewBag.Teachers = teachers;
            List <Subject> subjects = SubjectsDB.GetSubjects();

            ViewBag.Subjects = subjects;
            return(View());
        }
Beispiel #5
0
        public ActionResult EditLesson(int lessonID)
        {
            LessonFullInf lesson  = LessonsDB.GetLessonFullInf(lessonID);
            List <Class>  classes = ClassesDB.GetClasses();

            ViewBag.Classes = classes;
            List <TeacherShortInf> teachers = TeachersDB.GetTeachersShortInf();

            ViewBag.Teachers = teachers;
            List <Subject> subjects = SubjectsDB.GetSubjects();

            ViewBag.Subjects = subjects;
            return(View(lesson));
        }
Beispiel #6
0
        public ActionResult ViewTeachers()
        {
            List <TeacherShortInf> t = TeachersDB.GetTeachersShortInf();

            return(View(t));
        }