From bfd4192578399f78cf3932f25f5010a7e95e4f4e Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Wed, 11 Feb 2026 11:21:40 +0800 Subject: [PATCH] =?UTF-8?q?20260211=20=E4=BA=A4=E5=B7=A5=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BLL/JGZL/AcceptanceCertificateService.cs | 10 + HJGL_DS/BLL/JGZL/CommencementReportService.cs | 10 + .../BLL/JGZL/HandoverCertificateService.cs | 10 + .../File/Fastreport/JGZL/工程交工验收证书.frx | 15 +- .../File/Fastreport/JGZL/工程联络单.frx | 36 +- .../JGZL/AcceptanceCertificate.aspx | 58 ++- .../JGZL/AcceptanceCertificate.aspx.cs | 455 +++++++++++------- .../AcceptanceCertificate.aspx.designer.cs | 87 ++-- .../JGZL/CommencementReport.aspx | 58 ++- .../JGZL/CommencementReport.aspx.cs | 404 +++++++--------- .../JGZL/CommencementReport.aspx.designer.cs | 87 ++-- .../JGZL/DocumentDescription.aspx.cs | 1 + .../JGZL/HandoverCertificate.aspx | 52 +- .../JGZL/HandoverCertificate.aspx.cs | 454 +++++++++++------ .../JGZL/HandoverCertificate.aspx.designer.cs | 69 ++- ...lineInstallationQualityCertificate.aspx.cs | 1 + ...ustrialPipelineInstallationSummary.aspx.cs | 7 +- .../JGZL/SpecialEquipmentMaintenance.aspx.cs | 1 + 18 files changed, 1073 insertions(+), 742 deletions(-) diff --git a/HJGL_DS/BLL/JGZL/AcceptanceCertificateService.cs b/HJGL_DS/BLL/JGZL/AcceptanceCertificateService.cs index 7136d15..e8212a0 100644 --- a/HJGL_DS/BLL/JGZL/AcceptanceCertificateService.cs +++ b/HJGL_DS/BLL/JGZL/AcceptanceCertificateService.cs @@ -22,6 +22,16 @@ namespace BLL return Funs.DB.JGZL_AcceptanceCertificate.FirstOrDefault(e => e.CertificateId == certificateId); } + /// + /// 根据项目Id获取工程交工验收证书 + /// + /// + /// + public static Model.JGZL_AcceptanceCertificate GetAcceptanceCertificateByProjectId(string projectId) + { + return Funs.DB.JGZL_AcceptanceCertificate.FirstOrDefault(e => e.ProjectId == projectId); + } + /// /// 增加工程交工验收证书 /// diff --git a/HJGL_DS/BLL/JGZL/CommencementReportService.cs b/HJGL_DS/BLL/JGZL/CommencementReportService.cs index c76c436..9dec114 100644 --- a/HJGL_DS/BLL/JGZL/CommencementReportService.cs +++ b/HJGL_DS/BLL/JGZL/CommencementReportService.cs @@ -22,6 +22,16 @@ namespace BLL return Funs.DB.JGZL_CommencementReport.FirstOrDefault(e => e.CommencementReportId == commencementReportId); } + /// + /// 根据项目获取开工报告 + /// + /// + /// + public static Model.JGZL_CommencementReport GetCommencementReportByProjectId(string projectId) + { + return Funs.DB.JGZL_CommencementReport.FirstOrDefault(e => e.ProjectId == projectId); + } + /// /// 添加工程施工开工报告 /// diff --git a/HJGL_DS/BLL/JGZL/HandoverCertificateService.cs b/HJGL_DS/BLL/JGZL/HandoverCertificateService.cs index 8b2ce63..eb42cbe 100644 --- a/HJGL_DS/BLL/JGZL/HandoverCertificateService.cs +++ b/HJGL_DS/BLL/JGZL/HandoverCertificateService.cs @@ -21,6 +21,16 @@ namespace BLL public static Model.JGZL_HandoverCertificate GetHandoverCertificateById(string handoverCertificateId) { return Funs.DB.JGZL_HandoverCertificate.FirstOrDefault(e => e.HandoverCertificateId == handoverCertificateId); + } + + /// + /// 根据项目Id获取工程中间交接证书 + /// + /// + /// + public static Model.JGZL_HandoverCertificate GetHandoverCertificateByProjectId(string projectId) + { + return Funs.DB.JGZL_HandoverCertificate.FirstOrDefault(e => e.ProjectId == projectId); } /// diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx index cae5a7e..8d5cdb8 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -18,7 +18,7 @@ namespace FastReport { public class ReportScript { - + } } @@ -32,8 +32,8 @@ namespace FastReport - - + + @@ -71,14 +71,17 @@ namespace FastReport - + - + + + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程联络单.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程联络单.frx index 59da180..3a6cdd2 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程联络单.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程联络单.frx @@ -1,5 +1,5 @@  - + @@ -16,8 +16,8 @@ - - + + @@ -65,16 +65,19 @@ - - + + + + + - - + + @@ -83,8 +86,11 @@ - - + + + + + @@ -92,7 +98,7 @@ - + @@ -101,8 +107,8 @@ - - + + @@ -110,8 +116,8 @@ - - + + @@ -127,7 +133,7 @@ - + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx index 6342aec..4b7d176 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx @@ -39,14 +39,54 @@ - + + + <%----%> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- - + --%> - + --%> - + <%-- - + --%> - + --%> diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs index e7c3d79..8b798ec 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs @@ -13,6 +13,23 @@ namespace FineUIPro.Web.JGZL { public partial class AcceptanceCertificate : PageBase { + #region 定义项 + /// + /// 主键 + /// + private string CertificateId + { + get + { + return (string)ViewState["CertificateId"]; + } + set + { + ViewState["CertificateId"] = value; + } + } + #endregion + #region 加载页面 /// /// 加载页面 @@ -23,7 +40,7 @@ namespace FineUIPro.Web.JGZL { if (!IsPostBack) { - this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + //this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.drpProjectId.DataTextField = "ProjectCode"; this.drpProjectId.DataValueField = "ProjectId"; @@ -34,11 +51,62 @@ namespace FineUIPro.Web.JGZL this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.InitTreeMenu();//加载树 this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; - this.BindGrid(); + //this.BindGrid(); + PageData(); } } #endregion + + private void PageData() + { + EmptyText(); + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) + { + this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(projectId); + var project = BLL.Base_ProjectService.GetProjectByProjectId(projectId); + var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(projectId); + var jointCount = (from x in Funs.DB.HJGL_PW_JointInfo where x.ProjectId == projectId select x).Count(); + + var report = BLL.AcceptanceCertificateService.GetAcceptanceCertificateByProjectId(projectId); + if (report != null) + { + this.CertificateId = report.CertificateId; + this.txtContractNumber.Text = report.ContractNumber; + this.txtStartDate.Text = report.StartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.StartDate) : ""; + this.txtEndDate.Text = report.EndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.EndDate) : ""; + if (!string.IsNullOrEmpty(report.ProjectContent)) + { + this.txtProjectContent.Text = report.ProjectContent; + } + else + { + this.txtProjectContent.Text = "本次" + project.ProjectName + "于" + string.Format("{0:yyyy年MM月dd日}", project.StartDate) + "开工,到" + string.Format("{0:yyyy年MM月dd日}", project.EndDate) + "施工结束。该项目共计安装管道" + isoInfo.Count + "条,管道焊缝共计" + jointCount + "道,已按图纸要求的比例进行焊缝无损检测,检测结果均符合设计规定的合格等级。该项目配套的各类管道组成件、支撑件安装质量均满足设计文件以及标准规范要求。目前,管道系统已完成水压试验及压缩空气吹扫工序,试验压力降、管道洁净度等关键指标均符合标准规范的规定标准并已通过业主方验收。"; + } + this.txtAcceptanceOpinion.Text = report.AcceptanceOpinion; + this.txtHeaderMan.Text = report.HeaderMan; + this.txtSupervisoryOpinion.Text = report.SupervisoryOpinion; + } + else + { + this.CertificateId = string.Empty; + this.txtProjectContent.Text = "本次" + project.ProjectName + "于" + string.Format("{0:yyyy年MM月dd日}", project.StartDate) + "开工,到" + string.Format("{0:yyyy年MM月dd日}", project.EndDate) + "施工结束。该项目共计安装管道" + isoInfo.Count + "条,管道焊缝共计" + jointCount + "道,已按图纸要求的比例进行焊缝无损检测,检测结果均符合设计规定的合格等级。该项目配套的各类管道组成件、支撑件安装质量均满足设计文件以及标准规范要求。目前,管道系统已完成水压试验及压缩空气吹扫工序,试验压力降、管道洁净度等关键指标均符合标准规范的规定标准并已通过业主方验收。"; + } + } + } + + private void EmptyText() + { + txtContractNumber.Text = string.Empty; + txtStartDate.Text = string.Empty; + txtEndDate.Text = string.Empty; + txtProjectContent.Text = string.Empty; + txtAcceptanceOpinion.Text = string.Empty; + txtHeaderMan.Text = string.Empty; + txtSupervisoryOpinion.Text = string.Empty; + } + #region 加载树项目 /// /// 加载树 @@ -82,7 +150,8 @@ namespace FineUIPro.Web.JGZL { if (this.tvControlItem.SelectedNodeID != "0") { - this.BindGrid(); + //this.BindGrid(); + PageData(); } } #endregion @@ -91,30 +160,30 @@ namespace FineUIPro.Web.JGZL /// /// 数据绑定 /// - private void BindGrid() - { - //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); - string strSql = @"SELECT * from JGZL_AcceptanceCertificate where 1=1"; - List listStr = new List(); - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - strSql += " AND ProjectId = @ProjectId"; - listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); - } - //else - //{ - // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; - // listStr.Add(new SqlParameter("@ProjectId", projectIds)); - //} - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - // 2.获取当前分页数据 - Grid1.RecordCount = tb.Rows.Count; - //tb = GetFilteredTable(Grid1.FilteredData, tb); - var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = table; - Grid1.DataBind(); - } + //private void BindGrid() + //{ + // //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); + // string strSql = @"SELECT * from JGZL_AcceptanceCertificate where 1=1"; + // List listStr = new List(); + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // strSql += " AND ProjectId = @ProjectId"; + // listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + // } + // //else + // //{ + // // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; + // // listStr.Add(new SqlParameter("@ProjectId", projectIds)); + // //} + // SqlParameter[] parameter = listStr.ToArray(); + // DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + // // 2.获取当前分页数据 + // Grid1.RecordCount = tb.Rows.Count; + // //tb = GetFilteredTable(Grid1.FilteredData, tb); + // var table = this.GetPagedDataTable(Grid1, tb); + // Grid1.DataSource = table; + // Grid1.DataBind(); + //} #endregion #region 分页排序 @@ -124,10 +193,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) - { - BindGrid(); - } + //protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + //{ + // BindGrid(); + //} #endregion #region 排序 @@ -136,10 +205,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Grid1_Sort(object sender, GridSortEventArgs e) - { - BindGrid(); - } + //protected void Grid1_Sort(object sender, GridSortEventArgs e) + //{ + // BindGrid(); + //} #endregion #region 分页选择下拉改变事件 @@ -148,11 +217,11 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) - { - Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); - BindGrid(); - } + //protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + //{ + // Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + // BindGrid(); + //} #endregion #endregion @@ -166,7 +235,8 @@ namespace FineUIPro.Web.JGZL { this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); - BindGrid(); + //BindGrid(); + PageData(); } /// @@ -174,10 +244,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void TextBox_TextChanged(object sender, EventArgs e) - { - this.BindGrid(); - } + //protected void TextBox_TextChanged(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} #endregion #region 打印 @@ -189,29 +259,26 @@ namespace FineUIPro.Web.JGZL protected void btnPrint_Click(object sender, EventArgs e) { string projectId = this.tvControlItem.SelectedNodeID; - if (projectId != null) { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { string initTemplatePath = ""; string rootPath = Server.MapPath("~/"); BLL.Common.FastReportService.ResetData(); - var report = BLL.AcceptanceCertificateService.GetAcceptanceCertificateById(this.Grid1.SelectedRowID); - if (report != null) - { - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); - keyValuePairs.Add("ContractNumber", report.ContractNumber); - keyValuePairs.Add("StartDate", report.StartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.StartDate) : ""); - keyValuePairs.Add("EndDate", report.EndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.EndDate) : ""); - keyValuePairs.Add("ProjectContent", report.ProjectContent); - keyValuePairs.Add("AcceptanceOpinion", report.AcceptanceOpinion); - keyValuePairs.Add("HeaderMan", report.HeaderMan); - keyValuePairs.Add("SupervisoryOpinion", report.SupervisoryOpinion); - BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); - } + var report = BLL.AcceptanceCertificateService.GetAcceptanceCertificateByProjectId(projectId); + if (report != null) + { + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); + keyValuePairs.Add("ContractNumber", report.ContractNumber); + keyValuePairs.Add("StartDate", report.StartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.StartDate) : ""); + keyValuePairs.Add("EndDate", report.EndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.EndDate) : ""); + keyValuePairs.Add("ProjectContent", report.ProjectContent); + keyValuePairs.Add("AcceptanceOpinion", report.AcceptanceOpinion); + keyValuePairs.Add("HeaderMan", report.HeaderMan); + keyValuePairs.Add("SupervisoryOpinion", report.SupervisoryOpinion); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + initTemplatePath = "File\\Fastreport\\JGZL\\工程交工验收证书.frx"; if (File.Exists(rootPath + initTemplatePath)) { @@ -220,7 +287,7 @@ namespace FineUIPro.Web.JGZL } else { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + Alert.ShowInTop("请先保存数据!", MessageBoxIcon.Warning); return; } } @@ -238,140 +305,141 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void btnAdd_Click(object sender, EventArgs e) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } + //protected void btnAdd_Click(object sender, EventArgs e) + //{ + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); + // } + // else + // { + // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + // return; + // } + //} /// /// 双击编辑 /// /// /// - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_AcceptanceCertificateMenuId, BLL.Const.BtnModify)) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?certificateId={0}", this.Grid1.SelectedRowID, "编辑 - "))); - } - else - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } - else - { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + //protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + //{ + // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_AcceptanceCertificateMenuId, BLL.Const.BtnModify)) + // { + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?certificateId={0}", this.Grid1.SelectedRowID, "编辑 - "))); + // } + // else + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // } + // else + // { + // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + // return; + // } + // } + // else + // { + // ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + // } + //} /// /// 右键编辑 /// /// /// - protected void btnMenuEdit_Click(object sender, EventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_AcceptanceCertificateMenuId, BLL.Const.BtnModify)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?certificateId={0}", Grid1.SelectedRowID, "维护 - "))); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + //protected void btnMenuEdit_Click(object sender, EventArgs e) + //{ + // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_AcceptanceCertificateMenuId, BLL.Const.BtnModify)) + // { + // if (Grid1.SelectedRowIndexArray.Length == 0) + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?certificateId={0}", Grid1.SelectedRowID, "维护 - "))); + // } + // else + // { + // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + // } + //} /// /// 右键删除 /// /// /// - protected void btnMenuDelete_Click(object sender, EventArgs e) - { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_AcceptanceCertificateMenuId, Const.BtnDelete)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } + //protected void btnMenuDelete_Click(object sender, EventArgs e) + //{ + // if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_AcceptanceCertificateMenuId, Const.BtnDelete)) + // { + // if (Grid1.SelectedRowIndexArray.Length == 0) + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } - bool isShow = true; - if (Grid1.SelectedRowIndexArray.Length > 1) - { - isShow = false; - } - bool isDelete = false; - foreach (int rowIndex in Grid1.SelectedRowIndexArray) - { - string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - if (judgementDelete(rowID, isShow)) - { - isDelete = true; - BLL.AcceptanceCertificateService.DeleteAcceptanceCertificateById(rowID); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程交工验收证书"); - } - } - if (isDelete) - { - ShowNotify("删除成功!", MessageBoxIcon.Success); - } - this.BindGrid(); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + // bool isShow = true; + // if (Grid1.SelectedRowIndexArray.Length > 1) + // { + // isShow = false; + // } + // bool isDelete = false; + // foreach (int rowIndex in Grid1.SelectedRowIndexArray) + // { + // string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + // if (judgementDelete(rowID, isShow)) + // { + // isDelete = true; + // BLL.AcceptanceCertificateService.DeleteAcceptanceCertificateById(rowID); + // BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程交工验收证书"); + // } + // } + // if (isDelete) + // { + // ShowNotify("删除成功!", MessageBoxIcon.Success); + // } + // this.BindGrid(); + // } + // else + // { + // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + // } + //} #region 判断是否可删除 /// /// 判断是否可以删除 /// /// - private bool judgementDelete(string id, bool isShow) - { - string content = string.Empty; + //private bool judgementDelete(string id, bool isShow) + //{ + // string content = string.Empty; - if (string.IsNullOrEmpty(content)) - { - return true; - } - else - { - if (isShow) - { - Alert.ShowInTop(content, MessageBoxIcon.Error); - } - return false; - } - } + // if (string.IsNullOrEmpty(content)) + // { + // return true; + // } + // else + // { + // if (isShow) + // { + // Alert.ShowInTop(content, MessageBoxIcon.Error); + // } + // return false; + // } + //} #endregion + #endregion #region 关闭弹出窗口及刷新页面 @@ -380,10 +448,51 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) + //protected void Window1_Close(object sender, WindowCloseEventArgs e) + //{ + // this.InitTreeMenu();//加载树 + // this.BindGrid(); + //} + #endregion + + #region 保存 + protected void btnSave_Click(object sender, EventArgs e) { - this.InitTreeMenu();//加载树 - this.BindGrid(); + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_AcceptanceCertificateMenuId, Const.BtnSave)) + { + Model.JGZL_AcceptanceCertificate newReport = new Model.JGZL_AcceptanceCertificate(); + newReport.ContractNumber = this.txtContractNumber.Text.Trim(); + newReport.StartDate = Funs.GetNewDateTime(this.txtStartDate.Text); + newReport.EndDate = Funs.GetNewDateTime(this.txtEndDate.Text); + newReport.ProjectContent = this.txtProjectContent.Text; + newReport.AcceptanceOpinion = this.txtAcceptanceOpinion.Text; + newReport.HeaderMan = this.txtHeaderMan.Text; + newReport.SupervisoryOpinion = this.txtSupervisoryOpinion.Text; + if (!string.IsNullOrEmpty(this.CertificateId)) + { + newReport.CertificateId = this.CertificateId; + BLL.AcceptanceCertificateService.UpdateAcceptanceCertificate(newReport); + ShowNotify("修改成功!", MessageBoxIcon.Success); + } + else + { + newReport.ProjectId = this.tvControlItem.SelectedNodeID; + newReport.CompileMan = this.CurrUser.UserId; + newReport.CompileDate = DateTime.Now; + newReport.CertificateId = SQLHelper.GetNewID(typeof(Model.JGZL_AcceptanceCertificate)); + this.CertificateId = newReport.CertificateId; + BLL.AcceptanceCertificateService.AddAcceptanceCertificate(newReport); + ShowNotify("保存成功!", MessageBoxIcon.Success); + } + + PageData(); + //PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } } #endregion } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.designer.cs index 1a66378..e6b3750 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.designer.cs @@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.ToolbarFill ToolbarFill1; /// - /// btnAdd 控件。 + /// btnSave 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnAdd; + protected global::FineUIPro.Button btnSave; /// /// btnPrint 控件。 @@ -123,49 +123,85 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.Button btnPrint; /// - /// Grid1 控件。 + /// SimpleForm1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Grid Grid1; + protected global::FineUIPro.Form SimpleForm1; /// - /// ToolbarSeparator1 控件。 + /// txtContractNumber 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + protected global::FineUIPro.TextBox txtContractNumber; /// - /// ToolbarText1 控件。 + /// Label1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarText ToolbarText1; + protected global::FineUIPro.Label Label1; /// - /// ddlPageSize 控件。 + /// txtStartDate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList ddlPageSize; + protected global::FineUIPro.DatePicker txtStartDate; /// - /// Window1 控件。 + /// txtEndDate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Window Window1; + protected global::FineUIPro.DatePicker txtEndDate; + + /// + /// txtProjectContent 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtProjectContent; + + /// + /// txtAcceptanceOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtAcceptanceOpinion; + + /// + /// txtHeaderMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHeaderMan; + + /// + /// txtSupervisoryOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtSupervisoryOpinion; /// /// WindowPrint 控件。 @@ -175,32 +211,5 @@ namespace FineUIPro.Web.JGZL /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowPrint; - - /// - /// Menu1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Menu Menu1; - - /// - /// btnMenuEdit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuEdit; - - /// - /// btnMenuDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuDelete; } } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx index d7bc350..ceb53f1 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx @@ -39,14 +39,54 @@ - + + + <%----%> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- - + --%> - + --%> - + <%-- - + --%> - + --%> diff --git a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.cs index c9f1fb4..6c0dd02 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.cs @@ -15,6 +15,38 @@ namespace FineUIPro.Web.JGZL { public partial class CommencementReport : PageBase { + #region 定义项 + /// + /// 主键 + /// + private string CommencementReportId + { + get + { + return (string)ViewState["CommencementReportId"]; + } + set + { + ViewState["CommencementReportId"] = value; + } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + #region 加载页面 /// /// 加载页面 @@ -25,7 +57,7 @@ namespace FineUIPro.Web.JGZL { if (!IsPostBack) { - this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + //this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.drpProjectId.DataTextField = "ProjectCode"; this.drpProjectId.DataValueField = "ProjectId"; @@ -36,11 +68,88 @@ namespace FineUIPro.Web.JGZL this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.InitTreeMenu();//加载树 this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; - this.BindGrid(); + this.ProjectId = this.tvControlItem.SelectedNodeID; + //this.BindGrid(); + PageData(); } } #endregion + private void EmptyText() + { + txtContractNumber.Text = string.Empty; + txtDesignUnit.Text = string.Empty; + txtPlannedStartDate.Text = string.Empty; + txtPlannedEndDate.Text = string.Empty; + txtProjectContent.Text = string.Empty; + txtConditions.Text = string.Empty; + txtReviewOpinion.Text = string.Empty; + txtQualitySupervisionOpinion.Text = string.Empty; + } + + private void PageData() + { + EmptyText(); + //string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(this.ProjectId)) + { + string pipeLineClass = string.Empty; + List pipeLineClassLists = new List(); + var isoInfos = (from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == this.ProjectId select x).ToList(); + foreach (var item in isoInfos) + { + if (!string.IsNullOrEmpty(item.PipeLineClass) && item.PipeLineClass != "/") + { + pipeLineClassLists.Add(item.PipeLineClass); + } + } + foreach (var item in pipeLineClassLists.Distinct()) + { + pipeLineClass += item + "、"; + } + if (!string.IsNullOrEmpty(pipeLineClass)) + { + pipeLineClass = pipeLineClass.Substring(0, pipeLineClass.LastIndexOf('、')); + } + double SumSize = Convert.ToDouble((from x in Funs.DB.HJGL_PW_JointInfo where x.ProjectId == this.ProjectId select x.JOT_Size).Sum()); + + + var report = BLL.CommencementReportService.GetCommencementReportByProjectId(this.ProjectId); + if (report != null) + { + this.CommencementReportId = report.CommencementReportId; + if (!string.IsNullOrEmpty(report.ContractNumber)) + { + this.txtContractNumber.Text = report.ContractNumber; + } + this.txtDesignUnit.Text = report.DesignUnit; + this.txtPlannedStartDate.Text = report.PlannedStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.PlannedStartDate) : ""; + this.txtPlannedEndDate.Text = report.PlannedEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.PlannedEndDate) : ""; + if (!string.IsNullOrEmpty(report.Conditions)) + { + this.txtConditions.Text = report.Conditions; + } + else + { + this.txtConditions.Text = "1、施工方案已经审批:\r\n2、压力管道告知已经办理:\r\n3、材料已经到货并报验合格:\r\n4、人员已经进行技术安全交底:\r\n5、现场已经施工具备开工条件。"; + } + if (!string.IsNullOrEmpty(report.ProjectContent)) + { + this.txtProjectContent.Text = report.ProjectContent; + } + this.txtReviewOpinion.Text = report.ReviewOpinion; + this.txtQualitySupervisionOpinion.Text = report.QualitySupervisionOpinion; + } + else + { + this.CommencementReportId = string.Empty; + this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(this.ProjectId); + this.txtProjectContent.Text = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + ",管道类别为" + pipeLineClass + "级,共计安装压力管道" + isoInfos.Count.ToString() + "条,总吋径量" + SumSize.ToString(".00") + "吋,该项目已经达到开工条件。"; + this.txtConditions.Text = "1、施工方案已经审批:\r\n2、压力管道告知已经办理:\r\n3、材料已经到货并报验合格:\r\n4、人员已经进行技术安全交底:\r\n5、现场已经施工具备开工条件。"; + } + } + } + #region 加载树项目 /// /// 加载树 @@ -84,79 +193,11 @@ namespace FineUIPro.Web.JGZL { if (this.tvControlItem.SelectedNodeID != "0") { - this.BindGrid(); + this.ProjectId = this.tvControlItem.SelectedNodeID; + PageData(); } } - #endregion - - #region 数据绑定 - /// - /// 数据绑定 - /// - private void BindGrid() - { - //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); - string strSql = @"SELECT * from JGZL_CommencementReport where 1=1"; - List listStr = new List(); - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - strSql += " AND ProjectId = @ProjectId"; - listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); - } - //else - //{ - // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; - // listStr.Add(new SqlParameter("@ProjectId", projectIds)); - //} - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - // 2.获取当前分页数据 - Grid1.RecordCount = tb.Rows.Count; - //tb = GetFilteredTable(Grid1.FilteredData, tb); - var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = table; - Grid1.DataBind(); - } - #endregion - - #region 分页排序 - #region 页索引改变事件 - /// - /// 页索引改变事件 - /// - /// - /// - protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) - { - BindGrid(); - } - #endregion - - #region 排序 - /// - /// 排序 - /// - /// - /// - protected void Grid1_Sort(object sender, GridSortEventArgs e) - { - BindGrid(); - } - #endregion - - #region 分页选择下拉改变事件 - /// - /// 分页选择下拉改变事件 - /// - /// - /// - protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) - { - Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); - BindGrid(); - } - #endregion - #endregion + #endregion #region 查询 /// @@ -167,18 +208,9 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + this.ProjectId = this.tvControlItem.SelectedNodeID; this.InitTreeMenu(); - BindGrid(); - } - - /// - /// 查询 - /// - /// - /// - protected void TextBox_TextChanged(object sender, EventArgs e) - { - this.BindGrid(); + PageData(); } #endregion @@ -191,30 +223,27 @@ namespace FineUIPro.Web.JGZL protected void btnPrint_Click(object sender, EventArgs e) { string projectId = this.tvControlItem.SelectedNodeID; - if (projectId != null) { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - string initTemplatePath = ""; - string rootPath = Server.MapPath("~/"); - BLL.Common.FastReportService.ResetData(); + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + var report = BLL.CommencementReportService.GetCommencementReportByProjectId(projectId); + if (report != null) + { + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); + keyValuePairs.Add("ContractNumber", report.ContractNumber); + keyValuePairs.Add("DesignUnit", report.DesignUnit); + keyValuePairs.Add("PlannedStartDate", report.PlannedStartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.PlannedStartDate) : ""); + keyValuePairs.Add("PlannedEndDate", report.PlannedEndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.PlannedEndDate) : ""); + keyValuePairs.Add("ProjectContent", report.ProjectContent); + keyValuePairs.Add("Conditions", report.Conditions); + keyValuePairs.Add("ReviewOpinion", report.ReviewOpinion); + keyValuePairs.Add("QualitySupervisionOpinion", report.QualitySupervisionOpinion); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); - var report = BLL.CommencementReportService.GetCommencementReportById(this.Grid1.SelectedRowID); - if (report != null) - { - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); - keyValuePairs.Add("ContractNumber", report.ContractNumber); - keyValuePairs.Add("DesignUnit", report.DesignUnit); - keyValuePairs.Add("PlannedStartDate", report.PlannedStartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}",report.PlannedStartDate) : ""); - keyValuePairs.Add("PlannedEndDate", report.PlannedEndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}",report.PlannedEndDate) : ""); - keyValuePairs.Add("ProjectContent", report.ProjectContent); - keyValuePairs.Add("Conditions", report.Conditions); - keyValuePairs.Add("ReviewOpinion", report.ReviewOpinion); - keyValuePairs.Add("QualitySupervisionOpinion", report.QualitySupervisionOpinion); - BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); - } initTemplatePath = "File\\Fastreport\\JGZL\\工程施工开工报告.frx"; if (File.Exists(rootPath + initTemplatePath)) { @@ -223,8 +252,7 @@ namespace FineUIPro.Web.JGZL } else { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; + Alert.ShowInTop("请先保存数据!", MessageBoxIcon.Warning); } } else @@ -235,159 +263,49 @@ namespace FineUIPro.Web.JGZL } #endregion - #region 维护 + #region 保存 /// - /// 增加 + /// 保存按钮 /// /// /// - protected void btnAdd_Click(object sender, EventArgs e) + protected void btnSave_Click(object sender, EventArgs e) { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_CommencementReportMenuId, Const.BtnSave)) { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CommencementReportEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } - - /// - /// 双击编辑 - /// - /// - /// - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_CommencementReportMenuId, BLL.Const.BtnModify)) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + Model.JGZL_CommencementReport newReport = new Model.JGZL_CommencementReport(); + newReport.ContractNumber = this.txtContractNumber.Text.Trim(); + newReport.DesignUnit = this.txtDesignUnit.Text.Trim(); + newReport.PlannedStartDate = Funs.GetNewDateTime(this.txtPlannedStartDate.Text); + newReport.PlannedEndDate = Funs.GetNewDateTime(this.txtPlannedEndDate.Text); + newReport.ProjectContent = this.txtProjectContent.Text; + newReport.Conditions = this.txtConditions.Text; + newReport.ReviewOpinion = this.txtReviewOpinion.Text; + newReport.QualitySupervisionOpinion = this.txtQualitySupervisionOpinion.Text; + if (!string.IsNullOrEmpty(this.CommencementReportId)) { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CommencementReportEdit.aspx?commencementReportId={0}", this.Grid1.SelectedRowID, "编辑 - "))); - } - else - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } + newReport.CommencementReportId = this.CommencementReportId; + BLL.CommencementReportService.UpdateCommencementReport(newReport); + ShowNotify("修改成功!", MessageBoxIcon.Success); } else { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; + newReport.ProjectId = this.ProjectId; + newReport.CompileMan = this.CurrUser.UserId; + newReport.CompileDate = DateTime.Now; + newReport.CommencementReportId = SQLHelper.GetNewID(typeof(Model.JGZL_CommencementReport)); + this.CommencementReportId = newReport.CommencementReportId; + BLL.CommencementReportService.AddCommencementReport(newReport); + ShowNotify("保存成功!", MessageBoxIcon.Success); } - } - else - { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } - - /// - /// 右键编辑 - /// - /// - /// - protected void btnMenuEdit_Click(object sender, EventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_CommencementReportMenuId, BLL.Const.BtnModify)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CommencementReportEdit.aspx?commencementReportId={0}", Grid1.SelectedRowID, "维护 - "))); + PageData(); } else { Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; } } - - /// - /// 右键删除 - /// - /// - /// - protected void btnMenuDelete_Click(object sender, EventArgs e) - { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_CommencementReportMenuId, Const.BtnDelete)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - - bool isShow = true; - if (Grid1.SelectedRowIndexArray.Length > 1) - { - isShow = false; - } - bool isDelete = false; - foreach (int rowIndex in Grid1.SelectedRowIndexArray) - { - string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - if (judgementDelete(rowID, isShow)) - { - isDelete = true; - BLL.CommencementReportService.DeleteCommencementReportById(rowID); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程施工开工报告"); - } - } - if (isDelete) - { - ShowNotify("删除成功!", MessageBoxIcon.Success); - } - this.BindGrid(); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } - - #region 判断是否可删除 - /// - /// 判断是否可以删除 - /// - /// - private bool judgementDelete(string id, bool isShow) - { - string content = string.Empty; - - if (string.IsNullOrEmpty(content)) - { - return true; - } - else - { - if (isShow) - { - Alert.ShowInTop(content, MessageBoxIcon.Error); - } - return false; - } - } - #endregion - #endregion - - #region 关闭弹出窗口及刷新页面 - /// - /// 关闭弹出窗口 - /// - /// - /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) - { - this.InitTreeMenu();//加载树 - this.BindGrid(); - } #endregion } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.designer.cs index f5097ed..735c8ac 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.designer.cs @@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.ToolbarFill ToolbarFill1; /// - /// btnAdd 控件。 + /// btnSave 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnAdd; + protected global::FineUIPro.Button btnSave; /// /// btnPrint 控件。 @@ -123,49 +123,85 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.Button btnPrint; /// - /// Grid1 控件。 + /// SimpleForm1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Grid Grid1; + protected global::FineUIPro.Form SimpleForm1; /// - /// ToolbarSeparator1 控件。 + /// txtContractNumber 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + protected global::FineUIPro.TextBox txtContractNumber; /// - /// ToolbarText1 控件。 + /// txtDesignUnit 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarText ToolbarText1; + protected global::FineUIPro.TextBox txtDesignUnit; /// - /// ddlPageSize 控件。 + /// txtPlannedStartDate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList ddlPageSize; + protected global::FineUIPro.DatePicker txtPlannedStartDate; /// - /// Window1 控件。 + /// txtPlannedEndDate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Window Window1; + protected global::FineUIPro.DatePicker txtPlannedEndDate; + + /// + /// txtProjectContent 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtProjectContent; + + /// + /// txtConditions 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtConditions; + + /// + /// txtReviewOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtReviewOpinion; + + /// + /// txtQualitySupervisionOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtQualitySupervisionOpinion; /// /// WindowPrint 控件。 @@ -175,32 +211,5 @@ namespace FineUIPro.Web.JGZL /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowPrint; - - /// - /// Menu1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Menu Menu1; - - /// - /// btnMenuEdit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuEdit; - - /// - /// btnMenuDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuDelete; } } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs index 3843e06..c296d82 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs @@ -190,6 +190,7 @@ namespace FineUIPro.Web.JGZL } else { + this.DocumentDescriptionId = string.Empty; this.txtCompilationBasis.Text = "1、《石油化工建设工程项目交工技术文件规定》(SH/T3503-2017)\r\n2、《国家重大建设项目文件归档要求与档案管理规范》(DA/T28-2018)\r\n3、《石油化工建设工程项目过程技术文件规定》(SH/T3543-2017)"; this.txtConstructionUnit.Text = "浙江石油化工有限公司"; this.txtConstructionCompany.Text = "浙江鼎盛石化工程有限公司"; diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx index 02a4f3c..120d454 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx @@ -39,14 +39,48 @@ - + + + <%----%> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- - + --%> - + --%> - + <%-- - + --%> - + --%> diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs index 6a53185..85e78ab 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs @@ -8,11 +8,29 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; +using System.Drawing.Drawing2D; namespace FineUIPro.Web.JGZL { public partial class HandoverCertificate : PageBase { + #region 定义项 + /// + /// 主键 + /// + private string HandoverCertificateId + { + get + { + return (string)ViewState["HandoverCertificateId"]; + } + set + { + ViewState["HandoverCertificateId"] = value; + } + } + #endregion + #region 加载页面 /// /// 加载页面 @@ -23,7 +41,7 @@ namespace FineUIPro.Web.JGZL { if (!IsPostBack) { - this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + //this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.drpProjectId.DataTextField = "ProjectCode"; this.drpProjectId.DataValueField = "ProjectId"; @@ -34,11 +52,85 @@ namespace FineUIPro.Web.JGZL this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.InitTreeMenu();//加载树 this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; - this.BindGrid(); + //this.BindGrid(); + PageData(); } } #endregion + private void PageData() + { + EmptyText(); + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) + { + string steNames = string.Empty; + List steelLists = new List(); + var isoInfos = (from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == projectId select x).ToList(); + foreach (var item in isoInfos) + { + if (!string.IsNullOrEmpty(item.STE_ID)) + { + steelLists.Add(item.STE_ID); + } + } + foreach (var item in steelLists.Distinct()) + { + var ste = BLL.HJGL_MaterialService.GetSteelBySteID(item); + if (ste != null) + { + steNames += ste.STE_Code + "、"; + } + } + if (!string.IsNullOrEmpty(steNames)) + { + steNames = steNames.Substring(0, steNames.LastIndexOf('、')); + } + + var report = BLL.HandoverCertificateService.GetHandoverCertificateByProjectId(projectId); + if (report != null) + { + this.HandoverCertificateId = report.HandoverCertificateId; + if (!string.IsNullOrEmpty(report.ContractNumber)) + { + this.txtContractNumber.Text = report.ContractNumber; + } + else + { + this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(projectId); + } + this.txtHandoverDate.Text = report.HandoverDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.HandoverDate) : ""; + if (!string.IsNullOrEmpty(report.ProjectContent)) + { + this.txtProjectContent.Text = report.ProjectContent; + } + else + { + this.txtProjectContent.Text = "本次" + BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName + ",已完成100米" + steNames + "材质管道的预制与安装工作。项目配套的支架、阀门、三通等各类管道组成件,安装质量均符合设计及规范要求。共完成管道焊缝" + isoInfos.Count + "道,其中20%焊缝经射线或超声波检测,合格等级全部满足设计标准。目前,管道系统已顺利完成水压试验及压缩空气吹扫工序,试验压力降与管道洁净度指标均达到设计规定。"; + } + this.txtReceiveOpinions.Text = report.ReceiveOpinions; + this.txtHeaderMan.Text = report.HeaderMan; + this.txtSupervisionOpinion.Text = report.SupervisionOpinion; + } + else + { + this.HandoverCertificateId = string.Empty; + this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(projectId); + this.txtProjectContent.Text = "本次" + BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName + ",已完成100米" + steNames + "材质管道的预制与安装工作。项目配套的支架、阀门、三通等各类管道组成件,安装质量均符合设计及规范要求。共完成管道焊缝" + isoInfos.Count + "道,其中20%焊缝经射线或超声波检测,合格等级全部满足设计标准。目前,管道系统已顺利完成水压试验及压缩空气吹扫工序,试验压力降与管道洁净度指标均达到设计规定。"; + } + } + } + + private void EmptyText() + { + txtContractNumber.Text = string.Empty; + txtHandoverDate.Text = string.Empty; + txtProjectContent.Text = string.Empty; + txtReceiveOpinions.Text = string.Empty; + txtHeaderMan.Text = string.Empty; + txtSupervisionOpinion.Text = string.Empty; + } + #region 加载树项目 /// /// 加载树 @@ -82,7 +174,8 @@ namespace FineUIPro.Web.JGZL { if (this.tvControlItem.SelectedNodeID != "0") { - this.BindGrid(); + //this.BindGrid(); + PageData(); } } #endregion @@ -91,30 +184,30 @@ namespace FineUIPro.Web.JGZL /// /// 数据绑定 /// - private void BindGrid() - { - //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); - string strSql = @"SELECT * from JGZL_HandoverCertificate where 1=1"; - List listStr = new List(); - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - strSql += " AND ProjectId = @ProjectId"; - listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); - } - //else - //{ - // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; - // listStr.Add(new SqlParameter("@ProjectId", projectIds)); - //} - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - // 2.获取当前分页数据 - Grid1.RecordCount = tb.Rows.Count; - //tb = GetFilteredTable(Grid1.FilteredData, tb); - var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = table; - Grid1.DataBind(); - } + //private void BindGrid() + //{ + // //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); + // string strSql = @"SELECT * from JGZL_HandoverCertificate where 1=1"; + // List listStr = new List(); + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // strSql += " AND ProjectId = @ProjectId"; + // listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + // } + // //else + // //{ + // // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; + // // listStr.Add(new SqlParameter("@ProjectId", projectIds)); + // //} + // SqlParameter[] parameter = listStr.ToArray(); + // DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + // // 2.获取当前分页数据 + // Grid1.RecordCount = tb.Rows.Count; + // //tb = GetFilteredTable(Grid1.FilteredData, tb); + // var table = this.GetPagedDataTable(Grid1, tb); + // Grid1.DataSource = table; + // Grid1.DataBind(); + //} #endregion #region 分页排序 @@ -124,10 +217,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) - { - BindGrid(); - } + //protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + //{ + // BindGrid(); + //} #endregion #region 排序 @@ -136,10 +229,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Grid1_Sort(object sender, GridSortEventArgs e) - { - BindGrid(); - } + //protected void Grid1_Sort(object sender, GridSortEventArgs e) + //{ + // BindGrid(); + //} #endregion #region 分页选择下拉改变事件 @@ -148,11 +241,11 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) - { - Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); - BindGrid(); - } + //protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + //{ + // Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + // BindGrid(); + //} #endregion #endregion @@ -166,7 +259,8 @@ namespace FineUIPro.Web.JGZL { this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); - BindGrid(); + //BindGrid(); + PageData(); } /// @@ -174,10 +268,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void TextBox_TextChanged(object sender, EventArgs e) - { - this.BindGrid(); - } + //protected void TextBox_TextChanged(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} #endregion #region 打印 @@ -192,13 +286,13 @@ namespace FineUIPro.Web.JGZL if (projectId != null) { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { + //if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + //{ string initTemplatePath = ""; string rootPath = Server.MapPath("~/"); BLL.Common.FastReportService.ResetData(); - var report = BLL.HandoverCertificateService.GetHandoverCertificateById(this.Grid1.SelectedRowID); + var report = BLL.HandoverCertificateService.GetHandoverCertificateByProjectId(projectId); if (report != null) { Dictionary keyValuePairs = new Dictionary(); @@ -210,7 +304,7 @@ namespace FineUIPro.Web.JGZL keyValuePairs.Add("HeaderMan", report.HeaderMan); keyValuePairs.Add("SupervisionOpinion", report.SupervisionOpinion); BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); - } + initTemplatePath = "File\\Fastreport\\JGZL\\工程中间交接证书.frx"; if (File.Exists(rootPath + initTemplatePath)) { @@ -219,7 +313,7 @@ namespace FineUIPro.Web.JGZL } else { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + Alert.ShowInTop("请先保存数据!", MessageBoxIcon.Warning); return; } } @@ -237,140 +331,141 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void btnAdd_Click(object sender, EventArgs e) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } + //protected void btnAdd_Click(object sender, EventArgs e) + //{ + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); + // } + // else + // { + // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + // return; + // } + //} /// /// 双击编辑 /// /// /// - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_HandoverCertificateMenuId, BLL.Const.BtnModify)) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?handoverCertificateId={0}", this.Grid1.SelectedRowID, "编辑 - "))); - } - else - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } - else - { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + //protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + //{ + // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_HandoverCertificateMenuId, BLL.Const.BtnModify)) + // { + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?handoverCertificateId={0}", this.Grid1.SelectedRowID, "编辑 - "))); + // } + // else + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // } + // else + // { + // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + // return; + // } + // } + // else + // { + // ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + // } + //} /// /// 右键编辑 /// /// /// - protected void btnMenuEdit_Click(object sender, EventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_HandoverCertificateMenuId, BLL.Const.BtnModify)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?handoverCertificateId={0}", Grid1.SelectedRowID, "维护 - "))); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + //protected void btnMenuEdit_Click(object sender, EventArgs e) + //{ + // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_HandoverCertificateMenuId, BLL.Const.BtnModify)) + // { + // if (Grid1.SelectedRowIndexArray.Length == 0) + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?handoverCertificateId={0}", Grid1.SelectedRowID, "维护 - "))); + // } + // else + // { + // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + // } + //} /// /// 右键删除 /// /// /// - protected void btnMenuDelete_Click(object sender, EventArgs e) - { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_HandoverCertificateMenuId, Const.BtnDelete)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } + //protected void btnMenuDelete_Click(object sender, EventArgs e) + //{ + // if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_HandoverCertificateMenuId, Const.BtnDelete)) + // { + // if (Grid1.SelectedRowIndexArray.Length == 0) + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } - bool isShow = true; - if (Grid1.SelectedRowIndexArray.Length > 1) - { - isShow = false; - } - bool isDelete = false; - foreach (int rowIndex in Grid1.SelectedRowIndexArray) - { - string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - if (judgementDelete(rowID, isShow)) - { - isDelete = true; - BLL.HandoverCertificateService.DeleteHandoverCertificateById(rowID); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程中间交接证书"); - } - } - if (isDelete) - { - ShowNotify("删除成功!", MessageBoxIcon.Success); - } - this.BindGrid(); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + // bool isShow = true; + // if (Grid1.SelectedRowIndexArray.Length > 1) + // { + // isShow = false; + // } + // bool isDelete = false; + // foreach (int rowIndex in Grid1.SelectedRowIndexArray) + // { + // string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + // if (judgementDelete(rowID, isShow)) + // { + // isDelete = true; + // BLL.HandoverCertificateService.DeleteHandoverCertificateById(rowID); + // BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程中间交接证书"); + // } + // } + // if (isDelete) + // { + // ShowNotify("删除成功!", MessageBoxIcon.Success); + // } + // this.BindGrid(); + // } + // else + // { + // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + // } + //} #region 判断是否可删除 /// /// 判断是否可以删除 /// /// - private bool judgementDelete(string id, bool isShow) - { - string content = string.Empty; + //private bool judgementDelete(string id, bool isShow) + //{ + // string content = string.Empty; - if (string.IsNullOrEmpty(content)) - { - return true; - } - else - { - if (isShow) - { - Alert.ShowInTop(content, MessageBoxIcon.Error); - } - return false; - } - } + // if (string.IsNullOrEmpty(content)) + // { + // return true; + // } + // else + // { + // if (isShow) + // { + // Alert.ShowInTop(content, MessageBoxIcon.Error); + // } + // return false; + // } + //} #endregion + #endregion #region 关闭弹出窗口及刷新页面 @@ -379,10 +474,49 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) + //protected void Window1_Close(object sender, WindowCloseEventArgs e) + //{ + // this.InitTreeMenu();//加载树 + // this.BindGrid(); + //} + #endregion + + #region 保存数据 + protected void btnSave_Click(object sender, EventArgs e) { - this.InitTreeMenu();//加载树 - this.BindGrid(); + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_HandoverCertificateMenuId, Const.BtnSave)) + { + Model.JGZL_HandoverCertificate newReport = new Model.JGZL_HandoverCertificate(); + newReport.ContractNumber = this.txtContractNumber.Text.Trim(); + newReport.HandoverDate = Funs.GetNewDateTime(this.txtHandoverDate.Text); + newReport.ProjectContent = this.txtProjectContent.Text; + newReport.ReceiveOpinions = this.txtReceiveOpinions.Text; + newReport.HeaderMan = this.txtHeaderMan.Text; + newReport.SupervisionOpinion = this.txtSupervisionOpinion.Text; + if (!string.IsNullOrEmpty(this.HandoverCertificateId)) + { + newReport.HandoverCertificateId = this.HandoverCertificateId; + BLL.HandoverCertificateService.UpdateHandoverCertificate(newReport); + ShowNotify("修改成功!", MessageBoxIcon.Success); + } + else + { + newReport.ProjectId = this.tvControlItem.SelectedNodeID; + newReport.CompileMan = this.CurrUser.UserId; + newReport.CompileDate = DateTime.Now; + newReport.HandoverCertificateId = SQLHelper.GetNewID(typeof(Model.JGZL_HandoverCertificate)); + this.HandoverCertificateId = newReport.HandoverCertificateId; + BLL.HandoverCertificateService.AddHandoverCertificate(newReport); + ShowNotify("保存成功!", MessageBoxIcon.Success); + } + PageData(); + //PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } } #endregion } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.designer.cs index ee2b122..bfd71fa 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.designer.cs @@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.ToolbarFill ToolbarFill1; /// - /// btnAdd 控件。 + /// btnSave 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnAdd; + protected global::FineUIPro.Button btnSave; /// /// btnPrint 控件。 @@ -123,49 +123,67 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.Button btnPrint; /// - /// Grid1 控件。 + /// SimpleForm1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Grid Grid1; + protected global::FineUIPro.Form SimpleForm1; /// - /// ToolbarSeparator1 控件。 + /// txtContractNumber 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + protected global::FineUIPro.TextBox txtContractNumber; /// - /// ToolbarText1 控件。 + /// txtHandoverDate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarText ToolbarText1; + protected global::FineUIPro.DatePicker txtHandoverDate; /// - /// ddlPageSize 控件。 + /// txtProjectContent 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList ddlPageSize; + protected global::FineUIPro.TextArea txtProjectContent; /// - /// Window1 控件。 + /// txtReceiveOpinions 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Window Window1; + protected global::FineUIPro.TextArea txtReceiveOpinions; + + /// + /// txtHeaderMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHeaderMan; + + /// + /// txtSupervisionOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtSupervisionOpinion; /// /// WindowPrint 控件。 @@ -175,32 +193,5 @@ namespace FineUIPro.Web.JGZL /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowPrint; - - /// - /// Menu1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Menu Menu1; - - /// - /// btnMenuEdit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuEdit; - - /// - /// btnMenuDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuDelete; } } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs index 4dc531d..8ea738d 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs @@ -156,6 +156,7 @@ namespace FineUIPro.Web.JGZL } else { + this.CertificateId = string.Empty; this.txtInstallationInspection.Text = "浙江省特种设备研究院"; this.txtConstructionUnit.Text = "浙江石油化工有限公司"; this.txtSpecialEquipmentProductionLicenseCode.Text = "TS3833339-2028"; diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs index 18c6634..7251303 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs @@ -143,9 +143,14 @@ namespace FineUIPro.Web.JGZL { newSummary.LosslessRatio = HJGL_DetectionService.GetNDTRateByNDTRID(item.Joty_B_Rate).NDTR_Name;//无损检测比例 } - newSummary.VoltageResistantTestMethod = "水压";//耐压试验方法 + //newSummary.VoltageResistantTestMethod = "水压";//耐压试验方法 newSummary.VoltageResistantTestMedium = "水";//耐压试验介质 + newSummary.LeakageTestMedium = "空气";//泄漏试验介质 newSummary.CleaningMethod = "压缩空气吹扫";//吹扫、清洗方法 + newSummary.VoltageResistantTestPressure = item.ISO_TestPress.Value.ToString(("0.##")) + "MPa";//耐压试验压力 + newSummary.LeakageTestPressure = item.LeakageTest + "MPa";//泄漏试验压力 + newSummary.CorrosionControlMethod = item.ISO_Paint;//腐蚀控制方式 + newSummary.VoltageResistantTestMethod = "水压试验";//耐压试验方法 BLL.IndustrialPipelineInstallationSummaryService.AddIndustrialPipelineInstallationSummary(newSummary); } } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.cs index e2f86ae..327933b 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.cs @@ -210,6 +210,7 @@ namespace FineUIPro.Web.JGZL } else { + this.MaintenanceId = string.Empty; this.txtMaintenanceCode.Text = "0XXX-91330921MA2A2R3F6G-2026"; this.txtConUnit.Text = "浙江鼎盛石化工程有限公司"; this.txtEquipmentCode.Text = "/";