This commit is contained in:
2025-02-14 16:48:50 +08:00
parent 86b1e8b3da
commit 6d4a7e82a7
51 changed files with 1888 additions and 339 deletions
@@ -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();
}