安全危害因素清单【第二版】

This commit is contained in:
2026-04-02 17:00:38 +08:00
parent 3ec7008e0a
commit 5f7620614d
21 changed files with 922 additions and 72 deletions
@@ -46,7 +46,6 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
////权限按钮方法
this.GetButtonPower();
btnNew.OnClientClick = Window1.GetShowReference("HazardFactorSafetyEdit.aspx") + "return false;";
//btnImport.OnClientClick = Window1.GetShowReference("HazardFactorSafetyIn.aspx") + "return false;";
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
@@ -236,6 +235,7 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnNew.Hidden = false;
this.btnImport.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
@@ -254,6 +254,16 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
}
#endregion
/// <summary>
/// 导入按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HazardFactorSafetyIn.aspx?ProjectId={0}", this.ProjectId, "导入 - ")));
}
#region
/// <summary>
@@ -264,8 +274,10 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
protected void btnOut_Click(object sender, EventArgs e)
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("安全危害因素清单" + filename, System.Text.Encoding.UTF8) + ".xls");
string year = !string.IsNullOrWhiteSpace(this.drpYear.SelectedValue) && this.drpYear.SelectedValue != Const._Null ? $"{this.drpYear.SelectedValue}年" : string.Empty;
string month = !string.IsNullOrWhiteSpace(this.drpMonth.SelectedValue) && this.drpMonth.SelectedValue != Const._Null ? $"{this.drpMonth.SelectedValue}月" : string.Empty;
string fileName = System.Web.HttpUtility.UrlEncode($"{year}{month}安全危害因素清单" + Funs.GetNewFileName(), System.Text.Encoding.UTF8);
Response.AddHeader("content-disposition", "attachment; filename=" + fileName + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
this.Grid1.PageSize = 10000;