public function PageLoad($userTimezone) { $session = ServiceLocator::GetServer()->GetUserSession(); $this->page->BindSchedules($this->scheduleRepository->GetAll()); $this->page->BindResources($this->resourceRepository->GetResourceList()); $startDateString = $this->page->GetStartDate(); $endDateString = $this->page->GetEndDate(); $startDate = $this->GetDate($startDateString, $userTimezone, -7); $endDate = $this->GetDate($endDateString, $userTimezone, 7); $scheduleId = $this->page->GetScheduleId(); $resourceId = $this->page->GetResourceId(); $this->page->SetStartDate($startDate); $this->page->SetEndDate($endDate); $this->page->SetScheduleId($scheduleId); $this->page->SetResourceId($resourceId); $filter = new BlackoutFilter($startDate, $endDate, $scheduleId, $resourceId); $blackouts = $this->manageBlackoutsService->LoadFiltered($this->page->GetPageNumber(), $this->page->GetPageSize(), $filter, $session); $this->page->BindBlackouts($blackouts->Results()); $this->page->BindPageInfo($blackouts->PageInfo()); $this->page->ShowPage(); }