检验批委托速度优化
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Data.SqlClient;
|
||||
using System.Text;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace FineUIPro.Web.Welder
|
||||
{
|
||||
@@ -29,6 +30,8 @@ namespace FineUIPro.Web.Welder
|
||||
this.drpUnit.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpUnit);
|
||||
|
||||
txtStartDate.SelectedDate = DateTime.Now.AddDays(-30).Date;
|
||||
txtEndDate.SelectedDate = DateTime.Now.Date;
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
@@ -36,7 +39,11 @@ namespace FineUIPro.Web.Welder
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
/* new SqlParameter("@pageIndex", Grid1.PageIndex+1),
|
||||
new SqlParameter("@pageSize", Grid1.PageSize)*/
|
||||
};
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitId", this.drpUnit.SelectedValue));
|
||||
@@ -65,12 +72,19 @@ namespace FineUIPro.Web.Welder
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
sw.Start();
|
||||
|
||||
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("HJGL_sp_FilmInfo", parameter);
|
||||
this.Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
sw.Stop();
|
||||
TimeSpan dt = sw.Elapsed;
|
||||
}
|
||||
|
||||
#region 页索引改变事件
|
||||
|
||||
Reference in New Issue
Block a user