Exemplo n.º 1
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());
        }
Exemplo n.º 2
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));
        }
Exemplo n.º 3
0
        public ActionResult ViewLessons()
        {
            List <DateTime> dates = LessonsDB.GetLessonsDates();
            List <List <LessonFullInf> > lessons = new List <List <LessonFullInf> >();
            int lessonsCount = LessonsDB.GetLessonsCount();

            for (int i = 0; i < dates.Count(); i++)
            {
                lessons.Add(LessonsDB.GetLessonsInDate(dates[i]));
            }

            List <Class> classes = ClassesDB.GetClasses();

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

            ViewBag.Subjects = subjects;
            ViewBag.Classes  = classes;
            ViewBag.Dates    = dates;
            ViewBag.Lessons  = lessons;

            return(View());
        }