File tree 2 files changed +4
-10
lines changed
2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,8 @@ public QueryBase Query
31
31
fetchdoc . LoadXml ( fetch . Query ) ;
32
32
if ( fetchdoc . SelectSingleNode ( "fetch" ) is XmlElement fetchnode )
33
33
{
34
- if ( fetchnode . AttributeInt ( "count" ) is int count )
35
- {
36
- PageSize = count ;
37
- }
38
- if ( fetchnode . AttributeInt ( "page" ) is int page )
39
- {
40
- PageNo = page ;
41
- }
34
+ PageSize = Math . Min ( fetchnode . AttributeInt ( "count" ) ?? 5000 , 5000 ) ;
35
+ PageNo = fetchnode . AttributeInt ( "page" ) ?? 1 ;
42
36
}
43
37
}
44
38
}
@@ -60,7 +54,7 @@ public EntityCollection Results
60
54
PageNo = page ;
61
55
}
62
56
}
63
- if ( result . TotalRecordCount > - 1 && PageSize > 0 )
57
+ if ( result . TotalRecordCount > - 1 && result . TotalRecordCount < 5000 && PageSize > 0 && result . TotalRecordCount > PageSize )
64
58
{
65
59
Pages = ( int ) Math . Ceiling ( ( decimal ) result . TotalRecordCount / PageSize ) ;
66
60
}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ internal void SetData(QueryInfo queryinfo)
59
59
if ( queryinfo . RecordFrom > 1 || queryinfo . Results . MoreRecords )
60
60
{
61
61
mnuRecordsNumbers . Text = $ "Records: { queryinfo . RecordFrom } -{ queryinfo . RecordTo } ";
62
- if ( queryinfo . Results . TotalRecordCount > 0 )
62
+ if ( queryinfo . Results . TotalRecordCount > 0 && queryinfo . Results . TotalRecordCount < 5000 )
63
63
{
64
64
mnuRecordsNumbers . Text += $ " ({ queryinfo . Results . TotalRecordCount } )";
65
65
}
You can’t perform that action at this time.
0 commit comments