Exemple #1
0
        protected void storeSystemUser_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            List <QueryFilter> filters = new List <QueryFilter>();

            filters.Add(new QueryFilter(SystemUserWrapper.PROPERTY_NAME_ISAPPROVED, "True", FilterFunction.EqualTo));
            filters.Add(new QueryFilter(SystemUserWrapper.PROPERTY_NAME_USERTYPE, "SPCOM", FilterFunction.EqualTo));

            int recordCount = 0;

            storeSPUser.DataSource = SystemUserWrapper.FindAllByOrderByAndFilter(filters, "", (e.Dir == Coolite.Ext.Web.SortDirection.DESC), 1, 20, out recordCount);


            storeSPUser.DataBind();
        }
Exemple #2
0
        protected void storeSystemUser_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            PageQueryParams pageQueryParams = WebUIHelper.GetPageQueryParamFromStoreRefreshDataEventArgs(e, this.PagingToolBar1);

            RecordSortor recordSortor = WebUIHelper.GetRecordSortorFromStoreRefreshDataEventArgs(e);

            List <QueryFilter> queryFilters = new List <QueryFilter>();

            queryFilters.Add(new QueryFilter(SystemUserWrapper.PROPERTY_NAME_USERLOGINID, SystemUserWrapper.DEV_USER_ID, FilterFunction.NotEqualTo));

            if (!string.IsNullOrEmpty(this.txtSearchName.Text.Trim()))
            {
                queryFilters.Add(new QueryFilter(SystemUserWrapper.PROPERTY_NAME_USERLOGINID, this.txtSearchName.Text.Trim(), FilterFunction.Contains));
            }

            storeSystemUser.DataSource = SystemUserWrapper.FindAllByOrderByAndFilter(queryFilters, recordSortor.OrderByColumnName, recordSortor.IsDesc, pageQueryParams);
            e.Total = pageQueryParams.RecordCount;

            storeSystemUser.DataBind();
        }
        protected void storeSystemUser_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            int    recordCount   = 0;
            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;
            }

            List <QueryFilter> filters = new List <QueryFilter>();

            filters.Add(new QueryFilter(SystemUserWrapper.PROPERTY_NAME_ISAPPROVED, "True", FilterFunction.EqualTo));
            filters.Add(new QueryFilter(SystemUserWrapper.PROPERTY_NAME_USERTYPE, "SPCOM", FilterFunction.EqualTo));

            storeSystemUser.DataSource = SystemUserWrapper.FindAllByOrderByAndFilter(filters, sortFieldName, (e.Dir == Coolite.Ext.Web.SortDirection.DESC), pageIndex, limit, out recordCount);
            e.TotalCount = recordCount;

            storeSystemUser.DataBind();
        }