Exemplo n.º 1
0
        public IActionResult Index(int?year, int?month)
        {
            ViewBag.text       = "Calendar";
            ViewBag.StudioName = _studioDataAccess.GetStudioInfo(GetCurrentStudioId()).Name;
            //calendarHelp.AddDaysToCalendar();
            List <DayVM> days = calendarDataAccess.GetDays();

            var model = new CalendarSearchVM();

            model.Year  = year ?? DateTime.Now.Year;
            model.Month = month ?? DateTime.Now.Month;
            model.Days  = days;

            model.CalendarData = calendarDataAccess.GetAllClassesShedule(model, GetCurrentStudioId());

            return(View("Views/Studio/Calendar.cshtml", model));
        }