安全危害因素清单【第二版】
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user