protected void storeSystemApplication_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            PageQueryParams pageQueryParams = WebUIHelper.GetPageQueryParamFromStoreRefreshDataEventArgs(e, 10);

            RecordSortor recordSortor = WebUIHelper.GetRecordSortorFromStoreRefreshDataEventArgs(e);

            storeSystemApplication.DataSource = SystemApplicationWrapper.FindAllByOrderBy(recordSortor.OrderByColumnName, recordSortor.IsDesc, pageQueryParams);
            e.Total = pageQueryParams.RecordCount;

            storeSystemApplication.DataBind();
        }
Exemple #2
0
        protected void storeSystemApplication_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            string sortFieldName = "";

            if (e.Sort != null)
            {
                sortFieldName = e.Sort;
            }

            int startIndex = 0;

            if (e.Start > -1)
            {
                startIndex = e.Start;
            }

            int limit = this.PagingToolBar1.PageSize;

            int pageIndex = 1;

            if ((startIndex % limit) == 0)
            {
                pageIndex = startIndex / limit + 1;
            }
            else
            {
                pageIndex = startIndex / limit;
            }

            PageQueryParams pageQueryParams = new PageQueryParams();

            pageQueryParams.PageSize  = limit;
            pageQueryParams.PageIndex = pageIndex;

            storeSystemApplication.DataSource = SystemApplicationWrapper.FindAllByOrderBy(sortFieldName, (e.Dir == Ext.Net.SortDirection.DESC), pageQueryParams);
            e.Total = pageQueryParams.RecordCount;

            storeSystemApplication.DataBind();
        }