Пример #1
0
        void view_PageChanged(object sender, PagerEventArgs e)
        {
            switch (e.EventType)
            {
            case PagerPage.GoToPage: view.CurrentPage = view.CurrentPage; break;

            case PagerPage.First: view.CurrentPage = 1; break;

            case PagerPage.Previous: if (view.CurrentPage > 1)
                {
                    view.CurrentPage -= 1;
                }
                break;

            case PagerPage.Next: if (view.CurrentPage < view.PageCount)
                {
                    view.CurrentPage += 1;
                }
                break;

            case PagerPage.Last: view.CurrentPage = view.PageCount; break;
            }
            OnSearch();
        }
Пример #2
0
        private void changeCurrentPage(object sender, PagerEventArgs e)
        {
            switch (e.EventType)
            {
            case PagerPage.GoToPage: view.CurrentPage = view.CurrentPage; break;

            case PagerPage.First: view.CurrentPage = 1; break;

            case PagerPage.Previous: if (view.CurrentPage > 1)
                {
                    view.CurrentPage -= 1;
                }
                break;

            case PagerPage.Next: if (view.CurrentPage < view.PageCount)
                {
                    view.CurrentPage += 1;
                }
                break;

            case PagerPage.Last: view.CurrentPage = view.PageCount; break;
            }
            getData();
        }