提交代码

This commit is contained in:
2023-11-24 11:35:23 +08:00
parent 56fe58fe54
commit 31d0b92b8f
9 changed files with 179 additions and 111 deletions
@@ -31,12 +31,12 @@ namespace FineUIPro.Web.HJGL.WeldingReport
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
{
listStr.Add(new SqlParameter("@unitcode", this.drpUnitId.SelectedValue));
{
listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue));
}
else
{
listStr.Add(new SqlParameter("@unitcode", null));
listStr.Add(new SqlParameter("@unitId", null));
}
if (this.drpDetectionType.SelectedValue != BLL.Const._Null)
{
@@ -46,7 +46,14 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{
listStr.Add(new SqlParameter("@detectionTypeId", null));
}
if (!string.IsNullOrEmpty(this.txtFlowingSection.Text.Trim()))
{
listStr.Add(new SqlParameter("@flowingSection", this.txtFlowingSection.Text.Trim()));
}
else
{
listStr.Add(new SqlParameter("@flowingSection", null));
}
if (!string.IsNullOrEmpty(this.txtStarTime.Text))
{
listStr.Add(new SqlParameter("@date1", this.txtStarTime.Text.Trim()));
@@ -64,7 +71,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
listStr.Add(new SqlParameter("@date2", null));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_WelderFirstPassRate", parameter);
DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_CheckResult", parameter);
this.Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
@@ -124,7 +131,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊工一次合格率" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("检测结果汇总" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.Write(GetGridTableHtml(Grid1));