diff --git a/SGGL/FineUIPro.Web/Door/InOutRecord.aspx.cs b/SGGL/FineUIPro.Web/Door/InOutRecord.aspx.cs index abc71fa1..fe572ab1 100644 --- a/SGGL/FineUIPro.Web/Door/InOutRecord.aspx.cs +++ b/SGGL/FineUIPro.Web/Door/InOutRecord.aspx.cs @@ -162,8 +162,24 @@ namespace FineUIPro.Web.Door List resId = new List(); if (tbres != null) { - foreach(DataRow row in tbres.Rows) + int pageIndex = Grid1.PageIndex; + int pageSize = Grid1.PageSize; + + + + + + int rowbegin = pageIndex * pageSize; + int rowend = (pageIndex + 1) * pageSize; + if (rowend > tbres.Rows.Count) { + rowend = tbres.Rows.Count; + } + + for (int i = rowbegin; i < rowend; i++) + { + + DataRow row = tbres.Rows[i]; resId.Add(row["NewID"].ToString()); } } @@ -173,7 +189,7 @@ namespace FineUIPro.Web.Door DataTable tb = SQLHelper.GetDataTableRunText(sqlData, null); Grid1.RecordCount = tbres.Rows.Count; - //var table = this.GetPagedDataTable(Grid1, tb); + var table = this.GetPagedDataTable(Grid1, tb); this.OutputSummaryData(tbres); ///取合计值 Grid1.DataSource = tb;