111
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using NPOI.OpenXmlFormats.Wordprocessing;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.SS.Util;
|
||||
using NPOI.Util;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -69,7 +70,7 @@ namespace FineUIPro.Web.ContinuousPrint
|
||||
}
|
||||
|
||||
}
|
||||
str += " ORDER BY a.CH_TrustDate DESC";
|
||||
//str += " ORDER BY a.CH_TrustDate DESC";
|
||||
|
||||
string strSql = @"select a.CH_TrustID,a.CH_TrustCode,a.CH_TrustDate,a.CH_Printer,
|
||||
a.CH_PrintDate,b.ProjectCode,b.ProjectName,b.ShortName,b.StartDate,b.EndDate
|
||||
@@ -79,7 +80,14 @@ namespace FineUIPro.Web.ContinuousPrint
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", ProjectId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
Grid2.DataSource = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
DataView view = dt.DefaultView;
|
||||
if (!string.IsNullOrEmpty(Grid2.SortField) && view.Count > 0)
|
||||
{
|
||||
view.Sort = String.Format("{0} {1}", Grid2.SortField, Grid2.SortDirection);
|
||||
}
|
||||
DataTable table = view.ToTable();
|
||||
Grid2.DataSource = table;
|
||||
Grid2.DataBind();
|
||||
Grid2.SelectAllRows();
|
||||
}
|
||||
@@ -115,8 +123,6 @@ namespace FineUIPro.Web.ContinuousPrint
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user