This commit is contained in:
geh
2025-08-11 16:00:35 +08:00
parent 9c98470736
commit c68f8c7150
3 changed files with 11 additions and 21 deletions
@@ -264,26 +264,16 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
}
protected void btnOut_Click(object sender, EventArgs e)
{
DateTime dt = DateTime.Now;
string filename = dt.Year.ToString() + dt.Month.ToString() + dt.Day.ToString() + dt.Hour.ToString() + dt.Minute.ToString() + dt.Second.ToString();
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.ClearContent();
string filename = Funs.GetNewFileName();
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("<meta http-equiv=Content-Type content=text/html;charset=UTF-8>");
Response.AppendHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("控制点检查检测合格率统计" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/ms-excel";
this.EnableViewState = false;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
this.Grid1.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.Flush();
this.Grid1.PageSize = this.Grid1.RecordCount;
this.BindGvInspectionManagement(null);
Response.Write(GetGridTableHtml(Grid1));
Response.End();
}
}