Esempio n. 1
0
        public override async Task PreRender()
        {
            await base.PreRender();

            var pageNumber = Convert.ToInt32(Context.Parameters["pageNumber"]);

            var pageInfo = new PageInfo(10, pageNumber);

            Data.PagingOptions.PageIndex = pageNumber == 0 ? 0 : pageNumber - 1;

            var questions = await _questions.GetAnsweredAsync(pageInfo);

            Data.PagingOptions.TotalItemsCount = questions.TotalCount;
            Data.Items = questions.Result;
        }
Esempio n. 2
0
 public Task <IResultWithTotalCount <QuestionDto> > GetAnsweredQuestionsAsync(IPageInfo pagingSettings)
 {
     return(Questions.GetAnsweredAsync(pagingSettings));
 }