コード例 #1
0
        private void getData()
        {
            int currentPage = -1;
            ViewRegistryPresenterState state = session["{F48C43C9-6723-4a30-B114-A40295BDE72A}"] as ViewRegistryPresenterState;

            if (state != null && view.PageSize != state.pageSize && view.CurrentPage == view.PageCount)
            {
                currentPage = (int)(view.CurrentPage * state.pageSize / view.PageSize);
            }

            view.RegistryItems = service.GetItemsPage(view.UserID, registryId, (currentPage != -1) ? currentPage : view.CurrentPage, view.PageSize, view.StartDate, view.EndDate, view.ShowInvoices);
            view.PageCount     = service.TotalItemsCount / view.PageSize + (service.TotalItemsCount % view.PageSize > 0 ? 1 : 0);
            if (currentPage != -1)
            {
                view.CurrentPage = currentPage;
            }

            saveState();
        }
コード例 #2
0
ファイル: ViewRegistryPresenter.cs プロジェクト: radtek/eSoda
        private void getData()
        {
            int currentPage = -1;
            ViewRegistryPresenterState state = session["{F48C43C9-6723-4a30-B114-A40295BDE72A}"] as ViewRegistryPresenterState;

            if (state != null && view.PageSize != state.pageSize && view.CurrentPage == view.PageCount)
            {
                currentPage = (int)(view.CurrentPage * state.pageSize / view.PageSize);
            }

            view.RegistryItems = service.GetItemsPage(view.UserID, registryId, (currentPage != -1) ? currentPage : view.CurrentPage, view.PageSize, view.StartDate, view.EndDate,
                                                      view.SearchIncomeDate, view.SearchDocumentDate, view.SearchDocumentNumber, view.SearchSenderName,
                                                      view.SearchCorrespondenceCategory, view.SearchCorrespondenceType, view.SearchTypeValue,
                                                      view.SearchCorrespondenceKind, view.SearchCategoryValue,
                                                      view.SearchCorrespondenceStatus, view.SearchCorrespondenceDept, view.SearchCorrespondenceWorker, view.ShowInvoices);
            view.PageCount = service.TotalItemsCount / view.PageSize + (service.TotalItemsCount % view.PageSize > 0 ? 1 : 0);
            if (currentPage != -1)
            {
                view.CurrentPage = currentPage;
            }

            saveState();
        }