From 98e79d401c2aadd0d2495101421e8b772ac7a391 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Wed, 2 Apr 2025 09:11:50 +0800 Subject: [PATCH] =?UTF-8?q?20250402=20=E9=99=84=E4=BB=B6=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AttachFile/webuploader2.aspx.cs | 32 ++++++++++++++++--- .../IncidentInvestigationEdit.aspx.cs | 20 ++++++------ 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs b/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs index 5fb510b..b6ce757 100644 --- a/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs +++ b/FCL/FineUIPro.Web/AttachFile/webuploader2.aspx.cs @@ -51,6 +51,19 @@ namespace FineUIPro.Web.AttachFile } } + public string AType + { + get + { + return (string)ViewState["AType"]; + } + set + { + ViewState["AType"] = value; + } + } + + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) @@ -68,12 +81,21 @@ namespace FineUIPro.Web.AttachFile AttachPath = Request.QueryString["path"]; ParamStr = sessionName + "|" + AttachPath; MenuId = Request.QueryString["menuId"]; - - string t = Request.QueryString["type"]; - if (t == "-1") + try { - this.Toolbar1.Hidden = true; - this.Grid1.Columns[4].Hidden = true; + AType = Request.QueryString["type"]; + if (!string.IsNullOrEmpty(AType)) + { + if (AType == "view") + { + this.Toolbar1.Hidden = true; + this.Grid1.Columns[4].Hidden = true; + + } + } + } + catch { + } BindGrid(); } diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs index f3176c0..31d363b 100644 --- a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs @@ -1678,7 +1678,7 @@ namespace FineUIPro.Web.ContractorQuality { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.EMC_Punishment)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=edit&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); } /// @@ -1688,21 +1688,21 @@ namespace FineUIPro.Web.ContractorQuality /// protected void lbtnViewAttach_Click(object sender, EventArgs e) { - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=-1&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=view&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); } - /// - /// 质量调查相关附件 - /// - /// - /// - protected void btnAttach2_Click(object sender, EventArgs e) + /// + /// 质量调查相关附件 + /// + /// + /// + protected void btnAttach2_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录 { this.hdId.Text = SQLHelper.GetNewID(typeof(Model.EMC_Punishment)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=0&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=2", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=edit&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=2", this.PunishmentId, BLL.Const.IncidentInvestigationMenuId))); } /// @@ -1712,7 +1712,7 @@ namespace FineUIPro.Web.ContractorQuality /// protected void lbtnViewAttach2_Click(object sender, EventArgs e) { - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=-1&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=2", this.hdId.Text, BLL.Const.IncidentInvestigationMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader2.aspx?type=view&toKeyId={0}&path=FileUpload/SES/EMC_Punishment&menuId={1}&strParam=2", this.PunishmentId, BLL.Const.IncidentInvestigationMenuId))); } #endregion