From 7f09e37c5c310775e2637f895e540d3197ef6977 Mon Sep 17 00:00:00 2001 From: 10191 <506754232@qq.com> Date: Wed, 8 Nov 2023 10:28:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=9C=88=E6=8A=A5(=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=B1=87=E6=80=BB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CQMSMonthReportProjectSum.aspx | 2 +- .../CQMSMonthReportProjectSum.aspx.cs | 19 ++++++++++++------- .../HSSEMonthReportProjectSum.aspx | 2 +- .../HSSEMonthReportProjectSum.aspx.cs | 18 ++++++++++++------ 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/CQMSMonthReportProjectSum.aspx b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/CQMSMonthReportProjectSum.aspx index 5c6b90ef..f4606ede 100644 --- a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/CQMSMonthReportProjectSum.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/CQMSMonthReportProjectSum.aspx @@ -34,7 +34,7 @@ diff --git a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/CQMSMonthReportProjectSum.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/CQMSMonthReportProjectSum.aspx.cs index 5c420ff9..980034b6 100644 --- a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/CQMSMonthReportProjectSum.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/CQMSMonthReportProjectSum.aspx.cs @@ -120,7 +120,7 @@ namespace FineUIPro.Web.ZHGL.ManagementReport { Response.ClearContent(); string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("管理月报B" + 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; this.Grid1.PageSize = 500; @@ -142,7 +142,10 @@ namespace FineUIPro.Web.ZHGL.ManagementReport sb.Append(""); foreach (GridColumn column in grid.Columns) { - sb.AppendFormat("{0}", column.HeaderText); + if ("MonthReportItemId" != column.ColumnID) + { + sb.AppendFormat("{0}", column.HeaderText); + } } sb.Append(""); foreach (GridRow row in grid.Rows) @@ -150,14 +153,16 @@ namespace FineUIPro.Web.ZHGL.ManagementReport sb.Append(""); foreach (GridColumn column in grid.Columns) { - string html = row.Values[column.ColumnIndex].ToString(); - if (column.ColumnID == "tfNumber") + if ("MonthReportItemId" != column.ColumnID) { - html = (row.FindControl("lblNumber") as AspNet.Label).Text; + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("{0}", html); } - sb.AppendFormat("{0}", html); } - sb.Append(""); } diff --git a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReportProjectSum.aspx b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReportProjectSum.aspx index 3fee1b7d..462f817c 100644 --- a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReportProjectSum.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReportProjectSum.aspx @@ -34,7 +34,7 @@ diff --git a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReportProjectSum.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReportProjectSum.aspx.cs index c16d00a8..243df7a3 100644 --- a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReportProjectSum.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReportProjectSum.aspx.cs @@ -120,7 +120,7 @@ namespace FineUIPro.Web.ZHGL.ManagementReport { Response.ClearContent(); string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("管理月报B" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("HSSE管理月报(项目汇总)" + filename, System.Text.Encoding.UTF8) + ".xls"); Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = 500; @@ -142,7 +142,10 @@ namespace FineUIPro.Web.ZHGL.ManagementReport sb.Append(""); foreach (GridColumn column in grid.Columns) { - sb.AppendFormat("{0}", column.HeaderText); + if ("MonthReportItemId" != column.ColumnID) + { + sb.AppendFormat("{0}", column.HeaderText); + } } sb.Append(""); foreach (GridRow row in grid.Rows) @@ -150,12 +153,15 @@ namespace FineUIPro.Web.ZHGL.ManagementReport sb.Append(""); foreach (GridColumn column in grid.Columns) { - string html = row.Values[column.ColumnIndex].ToString(); - if (column.ColumnID == "tfNumber") + if ("MonthReportItemId" != column.ColumnID) { - html = (row.FindControl("lblNumber") as AspNet.Label).Text; + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("{0}", html); } - sb.AppendFormat("{0}", html); } sb.Append("");