private void RaisePageLoaded(IDataSourcePage page, int fullCount, int actualPageSize)
        {
            if (_pageLoaded != null)
            {
                _currentFullCount = fullCount;
                if (_currentSchema == null)
                {
                    IDataSourceSchema currentSchema = null;
                    if (page != null)
                    {
                        currentSchema = page.Schema();
                    }

                    _currentSchema = currentSchema;
                    if (SchemaChanged != null)
                    {
                        SchemaChanged(this, new DataSourceDataProviderSchemaChangedEventArgs(_currentSchema, _currentFullCount));
                    }
                }

                if (page.PageIndex() != ODataVirtualDataSourceDataProviderWorker.SchemaRequestIndex)
                {
                    _pageLoaded(page, fullCount, actualPageSize);
                }
            }
        }
コード例 #2
0
        private void OnPageLoaded(IDataSourcePage page, int currentFullCount, int actualPageSize)
        {
            if (!_isControlInitialized)
            {
                InitControls();
            }

            if (BeforePageLoaded != null)
            {
                BeforePageLoaded(this, new DataSourcePageEventArgs {
                    Page = page
                });
            }

            string message;
            bool   isCryticalError;

            var odataPage = page as ODataDataSourcePage;

            if (odataPage != null)
            {
                message         = odataPage.Message;
                isCryticalError = odataPage.IsCryticalError;
            }
            else
            {
                message         = null;
                isCryticalError = false;
            }

            var args = new VisualParams
            {
                Message          = message,
                CurrentFullCount = currentFullCount,
                IsCryticalError  = isCryticalError,
            };

            UpdateTemplateVisualState(args);

            //Message = "Количество " + currentFullCount;
        }
        private void RaisePageLoaded(IDataSourcePage page, int fullCount, int actualPageSize)
        {
            if (_pageLoaded != null)
            {
                _currentFullCount = fullCount;
                if (_currentSchema == null)
                {
                    IDataSourceSchema currentSchema = null;
                    if (page != null)
                    {
                        currentSchema = page.Schema();
                    }

                    _currentSchema = currentSchema;
                    if (SchemaChanged != null)
                    {
                        SchemaChanged(this, new DataSourceDataProviderSchemaChangedEventArgs(_currentSchema, _currentFullCount));
                    }
                }

                if (page.PageIndex() != ODataVirtualDataSourceDataProviderWorker.SchemaRequestIndex)
                {
                    _pageLoaded(page, fullCount, actualPageSize);
                }
            }
        }