Esempio n. 1
0
        public DatesOfWeek GetDatesOfWeek()
        {
            DatesOfWeek dates = new DatesOfWeek();

            dates.MondayDate    = FirstDateOfWeekISO8601();
            dates.TuesdayDate   = dates.MondayDate.AddDays(1);
            dates.WednesdayDate = dates.MondayDate.AddDays(2);
            dates.ThursdayDate  = dates.MondayDate.AddDays(3);
            dates.FridayDate    = dates.MondayDate.AddDays(4);

            return(dates);
        }
Esempio n. 2
0
        public IActionResult Index(ScheduleView model)
        {
            DateManager            dateManager = new DateManager(model.Week);
            DatesOfWeek            dates       = dateManager.GetDatesOfWeek();
            IEnumerable <Schedule> schedules   = scheduleRepository.GetSchedules(dates.MondayDate, model.GradeID);
            var grades = gradeRepository.GetGradeList();

            ViewBag.Grades      = new SelectListGarde(grades.ToList()).GetSelectList();
            ViewBag.LessonTime  = lessonTimeRepository.GetLessonTime().ToList();
            ViewBag.Teachers    = teacherRepository.GetTeachers().ToList();
            ViewBag.Schedules   = schedules.ToList();
            ViewBag.DateManager = dates;

            return(View(model));
        }