diff --git a/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs index 85cb3dd2..d2988bd9 100644 --- a/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs @@ -1110,33 +1110,44 @@ namespace FineUIPro.Web.CQMS.Solution } string id = HFConstructSolutionId.Text; Model.Solution_CQMSConstructSolution constructSolution = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(id); - if (constructSolution.State == Const.CQMSConstructSolution_Audit || constructSolution.State == Const.CQMSConstructSolution_ReCompile) + if (constructSolution != null) { - Model.Solution_CQMSConstructSolutionApprove approve = CQMSConstructSolutionApproveService.GetConstructSolutionApproveByApproveMan(id, CurrUser.UserId); - if (approve != null || CurrUser.UserId == Const.sysglyId) + if (constructSolution.State == Const.CQMSConstructSolution_Audit || constructSolution.State == Const.CQMSConstructSolution_ReCompile) + { + Model.Solution_CQMSConstructSolutionApprove approve = CQMSConstructSolutionApproveService.GetConstructSolutionApproveByApproveMan(id, CurrUser.UserId); + if (approve != null || CurrUser.UserId == Const.sysglyId) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + ContactImg, HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId))); + } + else + { + if (!constructSolution.CompileMan.Equals(CurrUser.UserId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}&&editorMode={3}", + ContactImg, HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId, "view"))); + } + + } + } + else { PageContext.RegisterStartupScript(WindowAtt.GetShowReference( String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", ContactImg, HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId))); } - else - { - if (!constructSolution.CompileMan.Equals(CurrUser.UserId)) - { - PageContext.RegisterStartupScript(WindowAtt.GetShowReference( - String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}&&editorMode={3}", - ContactImg, HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId,"view"))); - } - - } } else { PageContext.RegisterStartupScript(WindowAtt.GetShowReference( String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", ContactImg, HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId))); + } + } protected void btnapprove_Click(object sender, EventArgs e)