public static async Task GoToLastPage(this ITableDataSet tableDataSet)
 {
     if (!tableDataSet.PageableOptions.IsLastPage)
     {
         await tableDataSet.GoToPage(tableDataSet.PageableOptions.PagesCount - 1);
     }
 }
 public static async Task GoToFirstPage(this ITableDataSet tableDataSet)
 {
     if (!tableDataSet.PageableOptions.IsFirstPage)
     {
         await tableDataSet.GoToPage(0);
     }
 }
Beispiel #3
0
        protected override Task OnInitAsync()
        {
            dataAdapterWasEmptyInOnInit = DataAdapter == null;

            tableDataSet = GetTableDataSet() ?? new TableDataSet <EmptyDataSetItem>(Enumerable.Empty <EmptyDataSetItem>().AsQueryable());

            return(tableDataSet.GoToPage(0));
        }
        public static Task GoToPreviousPage(this ITableDataSet tableDataSet)
        {
            if (!tableDataSet.PageableOptions.IsFirstPage)
            {
                return(tableDataSet.GoToPage(tableDataSet.PageableOptions.CurrentPage - 1));
            }

            return(Task.FromResult(0));
        }
        public static Task GoToNextPage(this ITableDataSet tableDataSet)
        {
            if (!tableDataSet.PageableOptions.IsLastPage)
            {
                return(tableDataSet.GoToPage(tableDataSet.PageableOptions.CurrentPage + 1));
            }

            return(Task.FromResult(0));
        }
Beispiel #6
0
        public static Task GoToLastPage(this ITableDataSet tableDataSet)
        {
            if (!tableDataSet.PageableOptions.IsLastPage)
            {
                tableDataSet.GoToPage(tableDataSet.PageableOptions.PagesCount - 1);
            }

            return(Task.FromResult(0));
        }
Beispiel #7
0
        public static Task GoToFirstPage(this ITableDataSet tableDataSet)
        {
            if (!tableDataSet.PageableOptions.IsFirstPage)
            {
                tableDataSet.GoToPage(0);
            }

            return(Task.FromResult(0));
        }
        protected override async Task OnParametersSetAsync()
        {
            if (dataAdapterWasEmptyInOnInit && DataAdapter != null)
            {
                ConventionsSet.ApplyConventions(DataAdapter.UnderlyingTypeOfItem);
                tableDataSet = GetTableDataSet();

                await tableDataSet.GoToPage(0);
            }
        }
Beispiel #9
0
        protected override Task OnParametersSetAsync()
        {
            if (dataAdapterWasEmptyInOnInit && DataAdapter != null)
            {
                tableDataSet = GetTableDataSet();
                return(tableDataSet.GoToPage(0));
            }

            return(Task.FromResult(0));
        }
        protected override Task OnParametersSetAsync()
        {
            if (dataAdapterWasEmptyInOnInit && DataAdapter != null)
            {
                ConventionsSet.ApplyConventions(DataAdapter.UnderlyingTypeOfItem);
                tableDataSet = GetTableDataSet();
                return(tableDataSet.GoToPage(0));
            }

            return(Task.FromResult(0));
        }
        public async Task ReloadCurrentPage()
        {
            if (currentTableDataSet is null)
            {
                return;
            }

            await currentTableDataSet.GoToPage(currentTableDataSet.PageableOptions.CurrentPage);

            AfterReloadPage?.Invoke();
        }
        protected override async Task OnInitAsync()
        {
            dataAdapterWasEmptyInOnInit = DataAdapter == null;
            if (!dataAdapterWasEmptyInOnInit)
            {
                ConventionsSet.ApplyConventions(DataAdapter.UnderlyingTypeOfItem);
            }

            tableDataSet = GetTableDataSet();

            await tableDataSet.GoToPage(0);
        }
 public Task GoToPage(int index)
 => tableDataSet.GoToPage(index);
Beispiel #14
0
 public Task GoToPage(int index)
 {
     return(tableDataSet.GoToPage(index));
 }