protected void storeSPClientGroup_Refresh(object sender, StoreRefreshDataEventArgs e) { List <QueryFilter> filters = new List <QueryFilter>(); List <SPClientGroupWrapper> channels = SPClientGroupWrapper.FindAllByOrderByAndFilter(filters, SPClientGroupWrapper.PROPERTY_NAME_ID, true); storeSPClientGroup.DataSource = channels; storeSPClientGroup.DataBind(); }
protected void storeSPClientGroup_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> queryFilters = new List <QueryFilter>(); string clientName = ""; if (!string.IsNullOrEmpty(this.txtSreachName.Text.Trim())) { clientName = this.txtSreachName.Text.Trim(); queryFilters.Add(new QueryFilter(SPClientGroupWrapper.PROPERTY_NAME_NAME, clientName, FilterFunction.Contains)); } storeSPClientGroup.DataSource = SPClientGroupWrapper.FindAllByOrderByAndFilter(queryFilters, sortFieldName, (e.Dir == SortDirection.DESC), pageIndex, limit, out recordCount); e.TotalCount = recordCount; storeSPClientGroup.DataBind(); }