public static bool SearchPartialList(ListContentCollection contents, SearchContext searchContext, int startChild, int endChild) { if (contents == null) { return(false); } bool flag = false; ListContent listContent = null; while (startChild <= endChild && !flag) { listContent = contents[startChild]; flag = listContent.ReportItemCollection.Search(searchContext); startChild++; } return(flag); }
public override bool Search(SearchContext searchContext) { if (!base.SkipSearch && !this.NoRows) { bool flag = false; ListContentCollection contents = this.Contents; if (searchContext.ItemStartPage != searchContext.ItemEndPage) { int num = 0; int num2 = 0; SearchContext searchContext2 = new SearchContext(searchContext); this.GetListContentOnPage(searchContext.SearchPage, searchContext.ItemStartPage, out num, out num2); int itemStartPage = default(int); int itemEndPage = default(int); this.IsListContentOnThisPage(num, searchContext.SearchPage, searchContext.ItemStartPage, out itemStartPage, out itemEndPage); searchContext2.ItemStartPage = itemStartPage; searchContext2.ItemEndPage = itemEndPage; flag = List.SearchPartialList(contents, searchContext2, num, num); num++; if (!flag && num < num2) { searchContext2.ItemStartPage = searchContext.SearchPage; searchContext2.ItemEndPage = searchContext.SearchPage; flag = List.SearchPartialList(contents, searchContext2, num, num2 - 1); num = num2; } if (!flag && num == num2) { this.IsListContentOnThisPage(num2, searchContext.SearchPage, searchContext.ItemStartPage, out itemStartPage, out itemEndPage); searchContext2.ItemStartPage = itemStartPage; searchContext2.ItemEndPage = itemEndPage; flag = List.SearchPartialList(contents, searchContext2, num2, num2); } } else { flag = List.SearchFullList(contents, searchContext); } return(flag); } return(false); }
public static bool SearchFullList(ListContentCollection contents, SearchContext searchContext) { if (contents == null) { return(false); } bool flag = false; ListContent listContent = null; for (int i = 0; i < contents.Count; i++) { if (flag) { break; } listContent = contents[i]; if (!listContent.Hidden) { flag = listContent.ReportItemCollection.Search(searchContext); } } return(flag); }