Esempio n. 1
0
        private async Task SetSelectListAsync()
        {
            TvProgramSelectList = new SelectList(await _tvProgramService.GetTvProgramsAsync(),
                                                 nameof(TvProgram.Id), nameof(TvProgram.Name));

            CornerSelectList = new SelectList((await _cornerService.GetCornersAsync()).Where(x => x.TvProgramId == TvProgramId),
                                              nameof(Corner.Id), nameof(Corner.Name));
        }
Esempio n. 2
0
        public async Task OnGetAsync()
        {
            TvProgramSelectList = new SelectList(await _tvProgramService.GetTvProgramsAsync(),
                                                 nameof(TvProgram.Id), nameof(TvProgram.Name));

            VideoSourceSelectList = new SelectList(await _videoSourceService.GetVideoSourcesAsync(),
                                                   nameof(VideoSource.Id), nameof(VideoSource.Name));

            ArticleSourceSelectList = new SelectList(await _articleSourceService.GetArticleSourcesAsync(),
                                                     nameof(ArticleSource.Id), nameof(ArticleSource.Name));

            CornerSelectList = new SelectList(await _cornerService.GetCornersAsync(),
                                              nameof(Corner.Id), nameof(Corner.Name));

            SpecificationIndexViewModel = await _specificationViewModelService.SearchSpecifications(Filter);
        }
Esempio n. 3
0
        public async Task OnGetAsync()
        {
            TvProgramSelectList = new SelectList(await _tvProgramService.GetTvProgramsAsync(),
                                                 nameof(TvProgram.Id), nameof(TvProgram.Name));

            if (TvProgramId == null)
            {
                return;
            }

            var broadcastViewModel = await _broadcastViewModelService
                                     .GetBroadcastViewModel((int)TvProgramId, AirDate);

            if (broadcastViewModel == null)
            {
                await _broadcastService
                .CreateBroadcastWithDefaultSchedulesAsync((int)TvProgramId, AirDate);

                broadcastViewModel = await _broadcastViewModelService
                                     .GetBroadcastViewModel((int)TvProgramId, AirDate);
            }

            ScheduleViewModels = broadcastViewModel.ScheduleViewModels.OrderBy(x => x.Sequence).ToList();
        }