From 945bbd3b2154291b3d4c9437e027fb190af53387 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Thu, 11 Dec 2025 15:46:41 +0800 Subject: [PATCH 1/3] =?UTF-8?q?20251211=20=E5=B7=A5=E7=A8=8B=E4=B8=AD?= =?UTF-8?q?=E9=97=B4=E4=BA=A4=E6=8E=A5=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/HJGLDB_DS_2025-12-11_bwj.sql | 81 ++++ HJGL_DS/BLL/BLL.csproj | 1 + HJGL_DS/BLL/Common/Const.cs | 5 + .../BLL/JGZL/HandoverCertificateService.cs | 83 ++++ .../File/Fastreport/JGZL/工程中间交接证书.frx | 129 ++++++ .../File/Fastreport/JGZL/工程施工开工报告.frx | 46 +- HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj | 16 + .../FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- .../JGZL/CommencementReportEdit.aspx.cs | 28 +- .../JGZL/HandoverCertificate.aspx | 115 +++++ .../JGZL/HandoverCertificate.aspx.cs | 384 ++++++++++++++++ .../JGZL/HandoverCertificate.aspx.designer.cs | 206 +++++++++ .../JGZL/HandoverCertificateEdit.aspx | 57 +++ .../JGZL/HandoverCertificateEdit.aspx.cs | 141 ++++++ .../HandoverCertificateEdit.aspx.designer.cs | 125 +++++ HJGL_DS/Model/Model.cs | 427 ++++++++++++++++++ HJGL_DS/WebAPI/WebAPI.csproj.user | 2 +- 17 files changed, 1821 insertions(+), 27 deletions(-) create mode 100644 DataBase/版本日志/HJGLDB_DS_2025-12-11_bwj.sql create mode 100644 HJGL_DS/BLL/JGZL/HandoverCertificateService.cs create mode 100644 HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程中间交接证书.frx create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.designer.cs create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.designer.cs diff --git a/DataBase/版本日志/HJGLDB_DS_2025-12-11_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2025-12-11_bwj.sql new file mode 100644 index 0000000..4a5ce90 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2025-12-11_bwj.sql @@ -0,0 +1,81 @@ + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule) +values('7BB74C3E-52E6-49C2-91FA-FF73128FF8E6','м佻֤','JGZL/HandoverCertificate.aspx',20,'2A84FA58-8B20-48ED-A621-3EC98CF4AD28','3') +go +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('BFDF8B51-C8EC-486D-9C62-74609ED95323','7BB74C3E-52E6-49C2-91FA-FF73128FF8E6','',1) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('B760900B-51D0-43A0-861B-7402E85C2B03','7BB74C3E-52E6-49C2-91FA-FF73128FF8E6','޸',2) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('D61F53A0-3670-45CF-811B-BA3E2B1B4932','7BB74C3E-52E6-49C2-91FA-FF73128FF8E6','ɾ',3) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('173B2847-A21A-4933-B83D-57A6A5FA75C8','7BB74C3E-52E6-49C2-91FA-FF73128FF8E6','',4) +go + + +CREATE TABLE [dbo].[JGZL_HandoverCertificate]( + [HandoverCertificateId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [ContractNumber] [nvarchar](100) NULL, + [HandoverDate] [datetime] NULL, + [ProjectContent] [nvarchar](2000) NULL, + [ReceiveOpinions] [nvarchar](1000) NULL, + [HeaderMan] [nvarchar](50) NULL, + [SupervisionOpinion] [nvarchar](1000) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + CONSTRAINT [PK_JGZL_HandoverCertificate] PRIMARY KEY CLUSTERED +( + [HandoverCertificateId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[JGZL_HandoverCertificate] WITH CHECK ADD CONSTRAINT [FK_JGZL_HandoverCertificate_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[JGZL_HandoverCertificate] CHECK CONSTRAINT [FK_JGZL_HandoverCertificate_Base_Project] +GO + +ALTER TABLE [dbo].[JGZL_HandoverCertificate] WITH CHECK ADD CONSTRAINT [FK_JGZL_HandoverCertificate_Sys_User] FOREIGN KEY([CompileMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[JGZL_HandoverCertificate] CHECK CONSTRAINT [FK_JGZL_HandoverCertificate_Sys_User] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'HandoverCertificateId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩͬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'ContractNumber' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'HandoverDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'ProjectContent' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'ReceiveOpinions' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʹõλ𣨴' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'HeaderMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ල' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'SupervisionOpinion' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'CompileMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate', @level2type=N'COLUMN',@level2name=N'CompileDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'м佻֤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_HandoverCertificate' +GO + + diff --git a/HJGL_DS/BLL/BLL.csproj b/HJGL_DS/BLL/BLL.csproj index 7faf8e8..342af0f 100644 --- a/HJGL_DS/BLL/BLL.csproj +++ b/HJGL_DS/BLL/BLL.csproj @@ -246,6 +246,7 @@ + diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs index 0456667..8f15fed 100644 --- a/HJGL_DS/BLL/Common/Const.cs +++ b/HJGL_DS/BLL/Common/Const.cs @@ -1759,6 +1759,11 @@ namespace BLL /// 工程施工开工报告 /// public const string JGZL_CommencementReportMenuId = "A4B2E5A9-96A8-460F-885A-BE5FF9B5019E"; + + /// + /// 工程中间交接证书 + /// + public const string JGZL_HandoverCertificateMenuId = "7BB74C3E-52E6-49C2-91FA-FF73128FF8E6"; #endregion #region 报表对应ID diff --git a/HJGL_DS/BLL/JGZL/HandoverCertificateService.cs b/HJGL_DS/BLL/JGZL/HandoverCertificateService.cs new file mode 100644 index 0000000..8b2ce63 --- /dev/null +++ b/HJGL_DS/BLL/JGZL/HandoverCertificateService.cs @@ -0,0 +1,83 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.ServiceModel.Configuration; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 工程中间交接证书 + /// + public class HandoverCertificateService + { + /// + /// 根据主键获取工程中间交接证书 + /// + /// + /// + public static Model.JGZL_HandoverCertificate GetHandoverCertificateById(string handoverCertificateId) + { + return Funs.DB.JGZL_HandoverCertificate.FirstOrDefault(e => e.HandoverCertificateId == handoverCertificateId); + } + + /// + /// 增加工程中间交接证书 + /// + /// + public static void AddHandoverCertificate(Model.JGZL_HandoverCertificate handoverCertificate) + { + SGGLDB db = Funs.DB; + Model.JGZL_HandoverCertificate newHandoverCertificate = new JGZL_HandoverCertificate(); + newHandoverCertificate.HandoverCertificateId = handoverCertificate.HandoverCertificateId; + newHandoverCertificate.ProjectId = handoverCertificate.ProjectId; + newHandoverCertificate.ContractNumber = handoverCertificate.ContractNumber; + newHandoverCertificate.HandoverDate = handoverCertificate.HandoverDate; + newHandoverCertificate.ProjectContent = handoverCertificate.ProjectContent; + newHandoverCertificate.ReceiveOpinions = handoverCertificate.ReceiveOpinions; + newHandoverCertificate.HeaderMan = handoverCertificate.HeaderMan; + newHandoverCertificate.SupervisionOpinion = handoverCertificate.SupervisionOpinion; + newHandoverCertificate.CompileMan = handoverCertificate.CompileMan; + newHandoverCertificate.CompileDate = handoverCertificate.CompileDate; + db.JGZL_HandoverCertificate.InsertOnSubmit(newHandoverCertificate); + db.SubmitChanges(); + } + + /// + /// 修改工程中间交接证书 + /// + /// + public static void UpdateHandoverCertificate(Model.JGZL_HandoverCertificate handoverCertificate) + { + SGGLDB db = Funs.DB; + Model.JGZL_HandoverCertificate newHandoverCertificate = db.JGZL_HandoverCertificate.FirstOrDefault(e => e.HandoverCertificateId == handoverCertificate.HandoverCertificateId); + if (newHandoverCertificate != null) + { + newHandoverCertificate.ContractNumber = handoverCertificate.ContractNumber; + newHandoverCertificate.HandoverDate = handoverCertificate.HandoverDate; + newHandoverCertificate.ProjectContent = handoverCertificate.ProjectContent; + newHandoverCertificate.ReceiveOpinions = handoverCertificate.ReceiveOpinions; + newHandoverCertificate.HeaderMan = handoverCertificate.HeaderMan; + newHandoverCertificate.SupervisionOpinion = handoverCertificate.SupervisionOpinion; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除工程中间交接证书 + /// + /// + public static void DeleteHandoverCertificateById(string handoverCertificateId) + { + Model.SGGLDB db = Funs.DB; + Model.JGZL_HandoverCertificate handoverCertificate = db.JGZL_HandoverCertificate.FirstOrDefault(e => e.HandoverCertificateId == handoverCertificateId); + if (handoverCertificate != null) + { + db.JGZL_HandoverCertificate.DeleteOnSubmit(handoverCertificate); + db.SubmitChanges(); + } + } + } +} diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程中间交接证书.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程中间交接证书.frx new file mode 100644 index 0000000..544b3ce --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程中间交接证书.frx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程施工开工报告.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程施工开工报告.frx index c32eae1..07278cc 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程施工开工报告.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程施工开工报告.frx @@ -1,5 +1,5 @@  - + @@ -11,16 +11,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -28,7 +28,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -44,7 +44,7 @@ - + @@ -52,7 +52,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -84,7 +84,7 @@ - + @@ -94,11 +94,11 @@ - - - - - + + + + + diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index 8f7f6b2..d2f8d5f 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -1243,6 +1243,8 @@ + + @@ -6536,6 +6538,20 @@ CommencementReportEdit.aspx + + HandoverCertificate.aspx + ASPXCodeBehind + + + HandoverCertificate.aspx + + + HandoverCertificateEdit.aspx + ASPXCodeBehind + + + HandoverCertificateEdit.aspx + Login.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user index bf54086..8aa7c11 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -2,7 +2,7 @@ true - Debug|Any CPU + Release|Any CPU diff --git a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReportEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReportEdit.aspx.cs index 409b475..3765ba5 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReportEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReportEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using FastReport; using System; using System.Collections.Generic; using System.Linq; @@ -57,7 +58,7 @@ namespace FineUIPro.Web.JGZL if (!string.IsNullOrEmpty(this.CommencementReportId)) { var report = BLL.CommencementReportService.GetCommencementReportById(this.CommencementReportId); - if (report!=null) + if (report != null) { this.txtContractNumber.Text = report.ContractNumber; this.txtDesignUnit.Text = report.DesignUnit; @@ -69,7 +70,30 @@ namespace FineUIPro.Web.JGZL this.txtQualitySupervisionOpinion.Text = report.QualitySupervisionOpinion; } } - + else + { + 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()); + 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") + "吋,该项目已经达到开工条件。"; + } } } #endregion diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx new file mode 100644 index 0000000..02a4f3c --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx @@ -0,0 +1,115 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HandoverCertificate.aspx.cs" Inherits="FineUIPro.Web.JGZL.HandoverCertificate" %> + + + + + + + 工程中间交接证书 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs new file mode 100644 index 0000000..0c1cac2 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs @@ -0,0 +1,384 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.IO; + +namespace FineUIPro.Web.JGZL +{ + public partial class HandoverCertificate : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + + this.drpProjectId.DataTextField = "ProjectCode"; + this.drpProjectId.DataValueField = "ProjectId"; + this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + this.drpProjectId.DataBind(); + Funs.FineUIPleaseSelect(this.drpProjectId); + + this.InitTreeMenu();//加载树 + } + } + #endregion + + #region 加载树项目 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + TreeNode rootNode = new TreeNode(); + rootNode.Text = "项目"; + rootNode.ToolTip = "项目"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + this.tvControlItem.Nodes.Add(rootNode); + + List projects = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + if (this.drpProjectId.SelectedValue != BLL.Const._Null) + { + projects = projects.Where(e => e.ProjectId == this.drpProjectId.SelectedValue).ToList(); + } + foreach (var item in projects) + { + TreeNode rootProjectNode = new TreeNode();//定义根节点 + rootProjectNode.Text = item.ProjectCode; + rootProjectNode.NodeID = item.ProjectId; + rootProjectNode.EnableClickEvent = true; + rootProjectNode.Expanded = true; + rootProjectNode.ToolTip = item.ProjectName; + rootProjectNode.CommandName = "项目名称"; + rootNode.Nodes.Add(rootProjectNode); + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + if (this.tvControlItem.SelectedNodeID != "0") + { + this.BindGrid(); + } + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + 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 分页排序 + #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 + + #region 查询 + /// + ///查询 + /// + /// + /// + protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + this.InitTreeMenu(); + } + + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + 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.HandoverCertificateService.GetHandoverCertificateById(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("HandoverDate", report.HandoverDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.HandoverDate) : ""); + keyValuePairs.Add("ProjectContent", report.ProjectContent); + keyValuePairs.Add("ReceiveOpinions", report.ReceiveOpinions); + 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)) + { + PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + } + else + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + #endregion + + #region 维护 + /// + /// 增加 + /// + /// + /// + 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 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; + } + + 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; + + 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/HandoverCertificate.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.designer.cs new file mode 100644 index 0000000..ee2b122 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.designer.cs @@ -0,0 +1,206 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class HandoverCertificate + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProjectId; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAdd; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + 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/HandoverCertificateEdit.aspx b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx new file mode 100644 index 0000000..770051a --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx @@ -0,0 +1,57 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HandoverCertificateEdit.aspx.cs" Inherits="FineUIPro.Web.JGZL.HandoverCertificateEdit" %> + + + + + + + 编辑工程中间交接证书 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs new file mode 100644 index 0000000..14f9886 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs @@ -0,0 +1,141 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.JGZL +{ + public partial class HandoverCertificateEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string HandoverCertificateId + { + get + { + return (string)ViewState["HandoverCertificateId"]; + } + set + { + ViewState["HandoverCertificateId"] = value; + } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = Request.Params["projectId"]; + this.HandoverCertificateId = Request.Params["handoverCertificateId"]; + if (!string.IsNullOrEmpty(this.HandoverCertificateId)) + { + var report = BLL.HandoverCertificateService.GetHandoverCertificateById(this.HandoverCertificateId); + if (report != null) + { + this.txtContractNumber.Text = report.ContractNumber; + this.txtHandoverDate.Text = report.HandoverDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.HandoverDate) : ""; + this.txtProjectContent.Text = report.ProjectContent; + this.txtReceiveOpinions.Text = report.ReceiveOpinions; + this.txtHeaderMan.Text = report.HeaderMan; + this.txtSupervisionOpinion.Text = report.SupervisionOpinion; + } + } + else + { + 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()); + 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") + "吋,该项目已经达到交接条件。"; + + } + } + } + #endregion + + #region 提交按钮 + /// + /// 提交按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + 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); + } + else + { + newReport.ProjectId = this.ProjectId; + 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); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.designer.cs new file mode 100644 index 0000000..40f74d7 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class HandoverCertificateEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// txtContractNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtContractNumber; + + /// + /// txtHandoverDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtHandoverDate; + + /// + /// txtProjectContent 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtProjectContent; + + /// + /// txtReceiveOpinions 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtReceiveOpinions; + + /// + /// txtHeaderMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHeaderMan; + + /// + /// txtSupervisionOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtSupervisionOpinion; + } +} diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index 26745b7..5646c06 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -374,6 +374,9 @@ namespace Model partial void InsertJGZL_CommencementReport(JGZL_CommencementReport instance); partial void UpdateJGZL_CommencementReport(JGZL_CommencementReport instance); partial void DeleteJGZL_CommencementReport(JGZL_CommencementReport instance); + partial void InsertJGZL_HandoverCertificate(JGZL_HandoverCertificate instance); + partial void UpdateJGZL_HandoverCertificate(JGZL_HandoverCertificate instance); + partial void DeleteJGZL_HandoverCertificate(JGZL_HandoverCertificate instance); partial void InsertOAM_UesrQualified(OAM_UesrQualified instance); partial void UpdateOAM_UesrQualified(OAM_UesrQualified instance); partial void DeleteOAM_UesrQualified(OAM_UesrQualified instance); @@ -1738,6 +1741,14 @@ namespace Model } } + public System.Data.Linq.Table JGZL_HandoverCertificate + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table OAM_UesrQualified { get @@ -4321,6 +4332,8 @@ namespace Model private EntitySet _JGZL_CommencementReport; + private EntitySet _JGZL_HandoverCertificate; + private EntitySet _Project_Installation; private EntitySet _Project_RoleButtonPower; @@ -4446,6 +4459,7 @@ namespace Model this._HJGL_WeldingProcedure_WeldRepairCard = new EntitySet(new Action(this.attach_HJGL_WeldingProcedure_WeldRepairCard), new Action(this.detach_HJGL_WeldingProcedure_WeldRepairCard)); this._HJGL_WeldingProcedure_WeldHotProcessCard = new EntitySet(new Action(this.attach_HJGL_WeldingProcedure_WeldHotProcessCard), new Action(this.detach_HJGL_WeldingProcedure_WeldHotProcessCard)); this._JGZL_CommencementReport = new EntitySet(new Action(this.attach_JGZL_CommencementReport), new Action(this.detach_JGZL_CommencementReport)); + this._JGZL_HandoverCertificate = new EntitySet(new Action(this.attach_JGZL_HandoverCertificate), new Action(this.detach_JGZL_HandoverCertificate)); this._Project_Installation = new EntitySet(new Action(this.attach_Project_Installation), new Action(this.detach_Project_Installation)); this._Project_RoleButtonPower = new EntitySet(new Action(this.attach_Project_RoleButtonPower), new Action(this.detach_Project_RoleButtonPower)); this._Project_RolePower = new EntitySet(new Action(this.attach_Project_RolePower), new Action(this.detach_Project_RolePower)); @@ -5526,6 +5540,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_HandoverCertificate_Base_Project", Storage="_JGZL_HandoverCertificate", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JGZL_HandoverCertificate + { + get + { + return this._JGZL_HandoverCertificate; + } + set + { + this._JGZL_HandoverCertificate.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Project_Installation_Base_Project", Storage="_Project_Installation", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Project_Installation { @@ -6196,6 +6223,18 @@ namespace Model entity.Base_Project = null; } + private void attach_JGZL_HandoverCertificate(JGZL_HandoverCertificate entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JGZL_HandoverCertificate(JGZL_HandoverCertificate entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Project_Installation(Project_Installation entity) { this.SendPropertyChanging(); @@ -79592,6 +79631,366 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JGZL_HandoverCertificate")] + public partial class JGZL_HandoverCertificate : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _HandoverCertificateId; + + private string _ProjectId; + + private string _ContractNumber; + + private System.Nullable _HandoverDate; + + private string _ProjectContent; + + private string _ReceiveOpinions; + + private string _HeaderMan; + + private string _SupervisionOpinion; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnHandoverCertificateIdChanging(string value); + partial void OnHandoverCertificateIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnContractNumberChanging(string value); + partial void OnContractNumberChanged(); + partial void OnHandoverDateChanging(System.Nullable value); + partial void OnHandoverDateChanged(); + partial void OnProjectContentChanging(string value); + partial void OnProjectContentChanged(); + partial void OnReceiveOpinionsChanging(string value); + partial void OnReceiveOpinionsChanged(); + partial void OnHeaderManChanging(string value); + partial void OnHeaderManChanged(); + partial void OnSupervisionOpinionChanging(string value); + partial void OnSupervisionOpinionChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JGZL_HandoverCertificate() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandoverCertificateId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string HandoverCertificateId + { + get + { + return this._HandoverCertificateId; + } + set + { + if ((this._HandoverCertificateId != value)) + { + this.OnHandoverCertificateIdChanging(value); + this.SendPropertyChanging(); + this._HandoverCertificateId = value; + this.SendPropertyChanged("HandoverCertificateId"); + this.OnHandoverCertificateIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNumber", DbType="NVarChar(100)")] + public string ContractNumber + { + get + { + return this._ContractNumber; + } + set + { + if ((this._ContractNumber != value)) + { + this.OnContractNumberChanging(value); + this.SendPropertyChanging(); + this._ContractNumber = value; + this.SendPropertyChanged("ContractNumber"); + this.OnContractNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandoverDate", DbType="DateTime")] + public System.Nullable HandoverDate + { + get + { + return this._HandoverDate; + } + set + { + if ((this._HandoverDate != value)) + { + this.OnHandoverDateChanging(value); + this.SendPropertyChanging(); + this._HandoverDate = value; + this.SendPropertyChanged("HandoverDate"); + this.OnHandoverDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectContent", DbType="NVarChar(2000)")] + public string ProjectContent + { + get + { + return this._ProjectContent; + } + set + { + if ((this._ProjectContent != value)) + { + this.OnProjectContentChanging(value); + this.SendPropertyChanging(); + this._ProjectContent = value; + this.SendPropertyChanged("ProjectContent"); + this.OnProjectContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReceiveOpinions", DbType="NVarChar(1000)")] + public string ReceiveOpinions + { + get + { + return this._ReceiveOpinions; + } + set + { + if ((this._ReceiveOpinions != value)) + { + this.OnReceiveOpinionsChanging(value); + this.SendPropertyChanging(); + this._ReceiveOpinions = value; + this.SendPropertyChanged("ReceiveOpinions"); + this.OnReceiveOpinionsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HeaderMan", DbType="NVarChar(50)")] + public string HeaderMan + { + get + { + return this._HeaderMan; + } + set + { + if ((this._HeaderMan != value)) + { + this.OnHeaderManChanging(value); + this.SendPropertyChanging(); + this._HeaderMan = value; + this.SendPropertyChanged("HeaderMan"); + this.OnHeaderManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionOpinion", DbType="NVarChar(1000)")] + public string SupervisionOpinion + { + get + { + return this._SupervisionOpinion; + } + set + { + if ((this._SupervisionOpinion != value)) + { + this.OnSupervisionOpinionChanging(value); + this.SendPropertyChanging(); + this._SupervisionOpinion = value; + this.SendPropertyChanged("SupervisionOpinion"); + this.OnSupervisionOpinionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_HandoverCertificate_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JGZL_HandoverCertificate.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JGZL_HandoverCertificate.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_HandoverCertificate_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.JGZL_HandoverCertificate.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JGZL_HandoverCertificate.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.OAM_UesrQualified")] public partial class OAM_UesrQualified : INotifyPropertyChanging, INotifyPropertyChanged { @@ -101043,6 +101442,8 @@ namespace Model private EntitySet _JGZL_CommencementReport; + private EntitySet _JGZL_HandoverCertificate; + private EntitySet _Project_User; private EntitySet _Project_UserButtonPower; @@ -101125,6 +101526,7 @@ namespace Model this._HJGL_Sys_UserShowColumns = new EntitySet(new Action(this.attach_HJGL_Sys_UserShowColumns), new Action(this.detach_HJGL_Sys_UserShowColumns)); this._HJGL_WeldingProcedure_WeldHotProcessCard = new EntitySet(new Action(this.attach_HJGL_WeldingProcedure_WeldHotProcessCard), new Action(this.detach_HJGL_WeldingProcedure_WeldHotProcessCard)); this._JGZL_CommencementReport = new EntitySet(new Action(this.attach_JGZL_CommencementReport), new Action(this.detach_JGZL_CommencementReport)); + this._JGZL_HandoverCertificate = new EntitySet(new Action(this.attach_JGZL_HandoverCertificate), new Action(this.detach_JGZL_HandoverCertificate)); this._Project_User = new EntitySet(new Action(this.attach_Project_User), new Action(this.detach_Project_User)); this._Project_UserButtonPower = new EntitySet(new Action(this.attach_Project_UserButtonPower), new Action(this.detach_Project_UserButtonPower)); this._Project_UserPower = new EntitySet(new Action(this.attach_Project_UserPower), new Action(this.detach_Project_UserPower)); @@ -101776,6 +102178,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_HandoverCertificate_Sys_User", Storage="_JGZL_HandoverCertificate", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JGZL_HandoverCertificate + { + get + { + return this._JGZL_HandoverCertificate; + } + set + { + this._JGZL_HandoverCertificate.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Project_User_Sys_User", Storage="_Project_User", ThisKey="UserId", OtherKey="UserId", DeleteRule="NO ACTION")] public EntitySet Project_User { @@ -102155,6 +102570,18 @@ namespace Model entity.Sys_User = null; } + private void attach_JGZL_HandoverCertificate(JGZL_HandoverCertificate entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JGZL_HandoverCertificate(JGZL_HandoverCertificate entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_Project_User(Project_User entity) { this.SendPropertyChanging(); diff --git a/HJGL_DS/WebAPI/WebAPI.csproj.user b/HJGL_DS/WebAPI/WebAPI.csproj.user index a48b337..28be9c4 100644 --- a/HJGL_DS/WebAPI/WebAPI.csproj.user +++ b/HJGL_DS/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU FolderProfile true From e365ff41c25abd61242d62399fced17f4d8c17c9 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Fri, 12 Dec 2025 09:49:41 +0800 Subject: [PATCH 2/3] 20251212 --- HJGL_DS/FineUIPro.Web/ErrLog.txt | 61 +------------------ .../JGZL/HandoverCertificateEdit.aspx.cs | 23 ++++--- 2 files changed, 14 insertions(+), 70 deletions(-) diff --git a/HJGL_DS/FineUIPro.Web/ErrLog.txt b/HJGL_DS/FineUIPro.Web/ErrLog.txt index b27fd49..5f28270 100644 --- a/HJGL_DS/FineUIPro.Web/ErrLog.txt +++ b/HJGL_DS/FineUIPro.Web/ErrLog.txt @@ -1,60 +1 @@ - -错误信息开始=====> -错误类型:SqlException -错误信息:在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错) -错误堆栈: - 在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) - 在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) - 在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) - 在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) - 在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) - 在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) - 在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) - 在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) - 在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) - 在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) - 在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) - 在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) - 在 System.Data.SqlClient.SqlConnection.Open() - 在 System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user) - 在 System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe() - 在 System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode() - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute[TResult](Expression expression) - 在 System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate) - 在 FineUIPro.Web.Login.btnLogin_Click(Object sender, EventArgs e) - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:11/11/2025 15:17:16 -出错文件:http://localhost:64304/Login.aspx -IP地址:::1 - -出错时间:11/11/2025 15:17:16 - - -错误信息开始=====> -错误类型:IndexOutOfRangeException -错误信息:无法找到列 CompileDate。 -错误堆栈: - 在 System.Data.DataTable.ParseSortString(String sortString) - 在 System.Data.DataView.CheckSort(String sort) - 在 System.Data.DataView.set_Sort(String value) - 在 FineUIPro.Web.PageBase.GetPagedDataTable(Grid Grid1, DataTable tb) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\common\PageBase.cs:行号 328 - 在 FineUIPro.Web.HJGL.MaterialManage.QualityCertificate.BindGrid() 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\MaterialManage\QualityCertificate.aspx.cs:行号 63 - 在 FineUIPro.Web.HJGL.MaterialManage.QualityCertificate.Page_Load(Object sender, EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\MaterialManage\QualityCertificate.aspx.cs:行号 31 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/09/2025 16:42:15 -出错文件:http://localhost:64304/HJGL/MaterialManage/QualityCertificate.aspx -IP地址:::1 -操作人员:管理员 - -出错时间:12/09/2025 16:42:15 - + \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs index 14f9886..91f1175 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs @@ -69,28 +69,31 @@ namespace FineUIPro.Web.JGZL } else { - string pipeLineClass = string.Empty; - List pipeLineClassLists = new List(); + string steNames = string.Empty; + List steelLists = 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 != "/") + if (!string.IsNullOrEmpty(item.STE_ID)) { - pipeLineClassLists.Add(item.PipeLineClass); + steelLists.Add(item.STE_ID); } } - foreach (var item in pipeLineClassLists.Distinct()) + foreach (var item in steelLists.Distinct()) { - pipeLineClass += item + "、"; + var ste = BLL.HJGL_MaterialService.GetSteelBySteID(item); + if (ste!=null) + { + steNames += ste.STE_Code + "、"; + } } - if (!string.IsNullOrEmpty(pipeLineClass)) + if (!string.IsNullOrEmpty(steNames)) { - pipeLineClass = pipeLineClass.Substring(0, pipeLineClass.LastIndexOf('、')); + steNames = steNames.Substring(0, steNames.LastIndexOf('、')); } double SumSize = Convert.ToDouble((from x in Funs.DB.HJGL_PW_JointInfo where x.ProjectId == this.ProjectId select x.JOT_Size).Sum()); 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.txtProjectContent.Text = "本次" + BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + ",已完成100米" + steNames + "材质管道的预制与安装工作。项目配套的支架、阀门、三通等各类管道组成件,安装质量均符合设计及规范要求。共完成管道焊缝" + isoInfos.Count + "道,其中20%焊缝经射线或超声波检测,合格等级全部满足设计标准。目前,管道系统已顺利完成水压试验及压缩空气吹扫工序,试验压力降与管道洁净度指标均达到设计规定。"; } } } From ac7fd183873918acb2fdb13f36184abbf05709c5 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Sat, 13 Dec 2025 15:10:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?20251213=20=E5=B7=A5=E7=A8=8B=E4=BA=A4?= =?UTF-8?q?=E5=B7=A5=E9=AA=8C=E6=94=B6=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/HJGLDB_DS_2025-12-12_bwj.sql | 83 ++++ HJGL_DS/BLL/BLL.csproj | 1 + HJGL_DS/BLL/Common/Const.cs | 5 + .../BLL/JGZL/AcceptanceCertificateService.cs | 84 ++++ .../File/Fastreport/JGZL/工程中间交接证书.frx | 8 +- .../File/Fastreport/JGZL/工程交工验收证书.frx | 140 ++++++ .../File/Fastreport/JGZL/工程施工开工报告.frx | 10 +- HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj | 16 + .../JGZL/AcceptanceCertificate.aspx | 118 +++++ .../JGZL/AcceptanceCertificate.aspx.cs | 385 +++++++++++++++ .../AcceptanceCertificate.aspx.designer.cs | 206 ++++++++ .../JGZL/AcceptanceCertificateEdit.aspx | 63 +++ .../JGZL/AcceptanceCertificateEdit.aspx.cs | 146 ++++++ ...AcceptanceCertificateEdit.aspx.designer.cs | 143 ++++++ .../JGZL/HandoverCertificateEdit.aspx.cs | 1 - HJGL_DS/Model/Model.cs | 451 ++++++++++++++++++ 16 files changed, 1850 insertions(+), 10 deletions(-) create mode 100644 DataBase/版本日志/HJGLDB_DS_2025-12-12_bwj.sql create mode 100644 HJGL_DS/BLL/JGZL/AcceptanceCertificateService.cs create mode 100644 HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.designer.cs create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx.cs create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx.designer.cs diff --git a/DataBase/版本日志/HJGLDB_DS_2025-12-12_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2025-12-12_bwj.sql new file mode 100644 index 0000000..63c8a6d --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2025-12-12_bwj.sql @@ -0,0 +1,83 @@ +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule) +values('13172551-E58A-4F87-A090-3B8476FAA517','֤̽','JGZL/AcceptanceCertificate.aspx',30,'2A84FA58-8B20-48ED-A621-3EC98CF4AD28','3') +go +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('9892C865-8D7B-4868-9A1D-ACC7B14F42FA','13172551-E58A-4F87-A090-3B8476FAA517','',1) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('EB5BE4D5-C0D6-4BF4-A588-54E379C43972','13172551-E58A-4F87-A090-3B8476FAA517','޸',2) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('3151FAB3-CBA8-40F9-9A28-6E109516FE11','13172551-E58A-4F87-A090-3B8476FAA517','ɾ',3) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('A9EC1E01-525B-49CB-8EC0-C62DDF483A51','13172551-E58A-4F87-A090-3B8476FAA517','',4) +go + +CREATE TABLE [dbo].[JGZL_AcceptanceCertificate]( + [CertificateId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [ContractNumber] [nvarchar](100) NULL, + [StartDate] [datetime] NULL, + [EndDate] [datetime] NULL, + [ProjectContent] [nvarchar](2000) NULL, + [AcceptanceOpinion] [nvarchar](1000) NULL, + [HeaderMan] [nvarchar](50) NULL, + [SupervisoryOpinion] [nvarchar](1000) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + CONSTRAINT [PK_JGZL_AcceptanceCertificate] PRIMARY KEY CLUSTERED +( + [CertificateId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[JGZL_AcceptanceCertificate] WITH CHECK ADD CONSTRAINT [FK_JGZL_AcceptanceCertificate_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[JGZL_AcceptanceCertificate] CHECK CONSTRAINT [FK_JGZL_AcceptanceCertificate_Base_Project] +GO + +ALTER TABLE [dbo].[JGZL_AcceptanceCertificate] WITH CHECK ADD CONSTRAINT [FK_JGZL_AcceptanceCertificate_Sys_User] FOREIGN KEY([CompileMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[JGZL_AcceptanceCertificate] CHECK CONSTRAINT [FK_JGZL_AcceptanceCertificate_Sys_User] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'CertificateId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩͬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'ContractNumber' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵʿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'StartDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'EndDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'ProjectContent' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'AcceptanceOpinion' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʹõλ𣨴' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'HeaderMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ල' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'SupervisoryOpinion' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'CompileMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate', @level2type=N'COLUMN',@level2name=N'CompileDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֤̽' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AcceptanceCertificate' +GO + + diff --git a/HJGL_DS/BLL/BLL.csproj b/HJGL_DS/BLL/BLL.csproj index 342af0f..f27c43c 100644 --- a/HJGL_DS/BLL/BLL.csproj +++ b/HJGL_DS/BLL/BLL.csproj @@ -245,6 +245,7 @@ + diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs index 8f15fed..80e4b1e 100644 --- a/HJGL_DS/BLL/Common/Const.cs +++ b/HJGL_DS/BLL/Common/Const.cs @@ -1764,6 +1764,11 @@ namespace BLL /// 工程中间交接证书 /// public const string JGZL_HandoverCertificateMenuId = "7BB74C3E-52E6-49C2-91FA-FF73128FF8E6"; + + /// + /// 工程交工验收证书 + /// + public const string JGZL_AcceptanceCertificateMenuId = "13172551-E58A-4F87-A090-3B8476FAA517"; #endregion #region 报表对应ID diff --git a/HJGL_DS/BLL/JGZL/AcceptanceCertificateService.cs b/HJGL_DS/BLL/JGZL/AcceptanceCertificateService.cs new file mode 100644 index 0000000..7136d15 --- /dev/null +++ b/HJGL_DS/BLL/JGZL/AcceptanceCertificateService.cs @@ -0,0 +1,84 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 工程交工验收证书 + /// + public class AcceptanceCertificateService + { + /// + /// 根据主键获取工程交工验收证书 + /// + /// + /// + public static Model.JGZL_AcceptanceCertificate GetAcceptanceCertificateById(string certificateId) + { + return Funs.DB.JGZL_AcceptanceCertificate.FirstOrDefault(e => e.CertificateId == certificateId); + } + + /// + /// 增加工程交工验收证书 + /// + /// + public static void AddAcceptanceCertificate(Model.JGZL_AcceptanceCertificate acceptanceCertificate) + { + SGGLDB db = Funs.DB; + Model.JGZL_AcceptanceCertificate newAcceptanceCertificate = new JGZL_AcceptanceCertificate(); + newAcceptanceCertificate.CertificateId = acceptanceCertificate.CertificateId; + newAcceptanceCertificate.ProjectId = acceptanceCertificate.ProjectId; + newAcceptanceCertificate.ContractNumber = acceptanceCertificate.ContractNumber; + newAcceptanceCertificate.StartDate = acceptanceCertificate.StartDate; + newAcceptanceCertificate.EndDate = acceptanceCertificate.EndDate; + newAcceptanceCertificate.ProjectContent = acceptanceCertificate.ProjectContent; + newAcceptanceCertificate.AcceptanceOpinion = acceptanceCertificate.AcceptanceOpinion; + newAcceptanceCertificate.HeaderMan = acceptanceCertificate.HeaderMan; + newAcceptanceCertificate.SupervisoryOpinion = acceptanceCertificate.SupervisoryOpinion; + newAcceptanceCertificate.CompileMan = acceptanceCertificate.CompileMan; + newAcceptanceCertificate.CompileDate = acceptanceCertificate.CompileDate; + db.JGZL_AcceptanceCertificate.InsertOnSubmit(newAcceptanceCertificate); + db.SubmitChanges(); + } + + /// + /// 修改工程交工验收证书 + /// + /// + public static void UpdateAcceptanceCertificate(Model.JGZL_AcceptanceCertificate acceptanceCertificate) + { + SGGLDB db = Funs.DB; + Model.JGZL_AcceptanceCertificate newAcceptanceCertificate = db.JGZL_AcceptanceCertificate.FirstOrDefault(e => e.CertificateId == acceptanceCertificate.CertificateId); + if (newAcceptanceCertificate != null) + { + newAcceptanceCertificate.ContractNumber = acceptanceCertificate.ContractNumber; + newAcceptanceCertificate.StartDate = acceptanceCertificate.StartDate; + newAcceptanceCertificate.EndDate = acceptanceCertificate.EndDate; + newAcceptanceCertificate.ProjectContent = acceptanceCertificate.ProjectContent; + newAcceptanceCertificate.AcceptanceOpinion = acceptanceCertificate.AcceptanceOpinion; + newAcceptanceCertificate.HeaderMan = acceptanceCertificate.HeaderMan; + newAcceptanceCertificate.SupervisoryOpinion = acceptanceCertificate.SupervisoryOpinion; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除工程交工验收证书 + /// + /// + public static void DeleteAcceptanceCertificateById(string certificateId) + { + SGGLDB db = Funs.DB; + Model.JGZL_AcceptanceCertificate acceptanceCertificate = db.JGZL_AcceptanceCertificate.FirstOrDefault(e => e.CertificateId == certificateId); + if (acceptanceCertificate != null) + { + db.JGZL_AcceptanceCertificate.DeleteOnSubmit(acceptanceCertificate); + db.SubmitChanges(); + } + } + } +} diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程中间交接证书.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程中间交接证书.frx index 544b3ce..4ca659b 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程中间交接证书.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程中间交接证书.frx @@ -1,5 +1,5 @@  - + @@ -48,7 +48,7 @@
- + @@ -57,7 +57,7 @@ - + @@ -75,7 +75,7 @@ - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx new file mode 100644 index 0000000..4992977 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程施工开工报告.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程施工开工报告.frx index 07278cc..d34f8fd 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程施工开工报告.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程施工开工报告.frx @@ -1,5 +1,5 @@  - + @@ -54,7 +54,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -70,7 +70,7 @@ - + @@ -78,7 +78,7 @@ - + diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index d2f8d5f..858cb46 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -1241,6 +1241,8 @@ + + @@ -6524,6 +6526,20 @@ WeldInspectionCheckRecordItem.aspx + + AcceptanceCertificate.aspx + ASPXCodeBehind + + + AcceptanceCertificate.aspx + + + AcceptanceCertificateEdit.aspx + ASPXCodeBehind + + + AcceptanceCertificateEdit.aspx + CommencementReport.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx new file mode 100644 index 0000000..6342aec --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx @@ -0,0 +1,118 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AcceptanceCertificate.aspx.cs" Inherits="FineUIPro.Web.JGZL.AcceptanceCertificate" %> + + + + + + + 工程交工验收证书 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs new file mode 100644 index 0000000..f1eb59d --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs @@ -0,0 +1,385 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.IO; + +namespace FineUIPro.Web.JGZL +{ + public partial class AcceptanceCertificate : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + + this.drpProjectId.DataTextField = "ProjectCode"; + this.drpProjectId.DataValueField = "ProjectId"; + this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + this.drpProjectId.DataBind(); + Funs.FineUIPleaseSelect(this.drpProjectId); + + this.InitTreeMenu();//加载树 + } + } + #endregion + + #region 加载树项目 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + TreeNode rootNode = new TreeNode(); + rootNode.Text = "项目"; + rootNode.ToolTip = "项目"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + this.tvControlItem.Nodes.Add(rootNode); + + List projects = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + if (this.drpProjectId.SelectedValue != BLL.Const._Null) + { + projects = projects.Where(e => e.ProjectId == this.drpProjectId.SelectedValue).ToList(); + } + foreach (var item in projects) + { + TreeNode rootProjectNode = new TreeNode();//定义根节点 + rootProjectNode.Text = item.ProjectCode; + rootProjectNode.NodeID = item.ProjectId; + rootProjectNode.EnableClickEvent = true; + rootProjectNode.Expanded = true; + rootProjectNode.ToolTip = item.ProjectName; + rootProjectNode.CommandName = "项目名称"; + rootNode.Nodes.Add(rootProjectNode); + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + if (this.tvControlItem.SelectedNodeID != "0") + { + this.BindGrid(); + } + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + 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 分页排序 + #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 + + #region 查询 + /// + ///查询 + /// + /// + /// + protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + this.InitTreeMenu(); + } + + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + 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); + } + initTemplatePath = "File\\Fastreport\\JGZL\\工程交工验收证书.frx"; + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + } + else + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + #endregion + + #region 维护 + /// + /// 增加 + /// + /// + /// + 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 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; + } + + 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; + + 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/AcceptanceCertificate.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.designer.cs new file mode 100644 index 0000000..1a66378 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.designer.cs @@ -0,0 +1,206 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class AcceptanceCertificate + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProjectId; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAdd; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + 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/AcceptanceCertificateEdit.aspx b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx new file mode 100644 index 0000000..fd3b966 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx @@ -0,0 +1,63 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AcceptanceCertificateEdit.aspx.cs" Inherits="FineUIPro.Web.JGZL.AcceptanceCertificateEdit" %> + + + + + + + 编辑工程交工验收证书 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx.cs new file mode 100644 index 0000000..ccf6eac --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx.cs @@ -0,0 +1,146 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.JGZL +{ + public partial class AcceptanceCertificateEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string CertificateId + { + get + { + return (string)ViewState["CertificateId"]; + } + set + { + ViewState["CertificateId"] = value; + } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = Request.Params["projectId"]; + this.CertificateId = Request.Params["certificateId"]; + if (!string.IsNullOrEmpty(this.CertificateId)) + { + var report = BLL.AcceptanceCertificateService.GetAcceptanceCertificateById(this.CertificateId); + if (report != null) + { + 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) : ""; + this.txtProjectContent.Text = report.ProjectContent; + this.txtAcceptanceOpinion.Text = report.AcceptanceOpinion; + this.txtHeaderMan.Text = report.HeaderMan; + this.txtSupervisoryOpinion.Text = report.SupervisoryOpinion; + } + } + else + { + //string steNames = string.Empty; + //List steelLists = 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.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('、')); + //} + //double SumSize = Convert.ToDouble((from x in Funs.DB.HJGL_PW_JointInfo where x.ProjectId == this.ProjectId select x.JOT_Size).Sum()); + this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(this.ProjectId); + //this.txtProjectContent.Text = "本次" + BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + ",已完成100米" + steNames + "材质管道的预制与安装工作。项目配套的支架、阀门、三通等各类管道组成件,安装质量均符合设计及规范要求。共完成管道焊缝" + isoInfos.Count + "道,其中20%焊缝经射线或超声波检测,合格等级全部满足设计标准。目前,管道系统已顺利完成水压试验及压缩空气吹扫工序,试验压力降与管道洁净度指标均达到设计规定。"; + } + } + } + #endregion + + #region 提交按钮 + /// + /// 提交按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + 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); + } + else + { + newReport.ProjectId = this.ProjectId; + 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); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx.designer.cs new file mode 100644 index 0000000..82f18c4 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificateEdit.aspx.designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class AcceptanceCertificateEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// txtContractNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtContractNumber; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + 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; + } +} diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs index 91f1175..d46b999 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificateEdit.aspx.cs @@ -91,7 +91,6 @@ namespace FineUIPro.Web.JGZL { steNames = steNames.Substring(0, steNames.LastIndexOf('、')); } - double SumSize = Convert.ToDouble((from x in Funs.DB.HJGL_PW_JointInfo where x.ProjectId == this.ProjectId select x.JOT_Size).Sum()); this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(this.ProjectId); this.txtProjectContent.Text = "本次" + BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + ",已完成100米" + steNames + "材质管道的预制与安装工作。项目配套的支架、阀门、三通等各类管道组成件,安装质量均符合设计及规范要求。共完成管道焊缝" + isoInfos.Count + "道,其中20%焊缝经射线或超声波检测,合格等级全部满足设计标准。目前,管道系统已顺利完成水压试验及压缩空气吹扫工序,试验压力降与管道洁净度指标均达到设计规定。"; } diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index 5646c06..4de670b 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -371,6 +371,9 @@ namespace Model partial void InsertHJGL_WeldingProcedure_WeldRepairCard(HJGL_WeldingProcedure_WeldRepairCard instance); partial void UpdateHJGL_WeldingProcedure_WeldRepairCard(HJGL_WeldingProcedure_WeldRepairCard instance); partial void DeleteHJGL_WeldingProcedure_WeldRepairCard(HJGL_WeldingProcedure_WeldRepairCard instance); + partial void InsertJGZL_AcceptanceCertificate(JGZL_AcceptanceCertificate instance); + partial void UpdateJGZL_AcceptanceCertificate(JGZL_AcceptanceCertificate instance); + partial void DeleteJGZL_AcceptanceCertificate(JGZL_AcceptanceCertificate instance); partial void InsertJGZL_CommencementReport(JGZL_CommencementReport instance); partial void UpdateJGZL_CommencementReport(JGZL_CommencementReport instance); partial void DeleteJGZL_CommencementReport(JGZL_CommencementReport instance); @@ -1733,6 +1736,14 @@ namespace Model } } + public System.Data.Linq.Table JGZL_AcceptanceCertificate + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table JGZL_CommencementReport { get @@ -4330,6 +4341,8 @@ namespace Model private EntitySet _HJGL_WeldingProcedure_WeldHotProcessCard; + private EntitySet _JGZL_AcceptanceCertificate; + private EntitySet _JGZL_CommencementReport; private EntitySet _JGZL_HandoverCertificate; @@ -4458,6 +4471,7 @@ namespace Model this._HJGL_WeldingProcedure_WeldingProcessCard = new EntitySet(new Action(this.attach_HJGL_WeldingProcedure_WeldingProcessCard), new Action(this.detach_HJGL_WeldingProcedure_WeldingProcessCard)); this._HJGL_WeldingProcedure_WeldRepairCard = new EntitySet(new Action(this.attach_HJGL_WeldingProcedure_WeldRepairCard), new Action(this.detach_HJGL_WeldingProcedure_WeldRepairCard)); this._HJGL_WeldingProcedure_WeldHotProcessCard = new EntitySet(new Action(this.attach_HJGL_WeldingProcedure_WeldHotProcessCard), new Action(this.detach_HJGL_WeldingProcedure_WeldHotProcessCard)); + this._JGZL_AcceptanceCertificate = new EntitySet(new Action(this.attach_JGZL_AcceptanceCertificate), new Action(this.detach_JGZL_AcceptanceCertificate)); this._JGZL_CommencementReport = new EntitySet(new Action(this.attach_JGZL_CommencementReport), new Action(this.detach_JGZL_CommencementReport)); this._JGZL_HandoverCertificate = new EntitySet(new Action(this.attach_JGZL_HandoverCertificate), new Action(this.detach_JGZL_HandoverCertificate)); this._Project_Installation = new EntitySet(new Action(this.attach_Project_Installation), new Action(this.detach_Project_Installation)); @@ -5527,6 +5541,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_AcceptanceCertificate_Base_Project", Storage="_JGZL_AcceptanceCertificate", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JGZL_AcceptanceCertificate + { + get + { + return this._JGZL_AcceptanceCertificate; + } + set + { + this._JGZL_AcceptanceCertificate.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_CommencementReport_Base_Project", Storage="_JGZL_CommencementReport", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet JGZL_CommencementReport { @@ -6211,6 +6238,18 @@ namespace Model entity.Base_Project = null; } + private void attach_JGZL_AcceptanceCertificate(JGZL_AcceptanceCertificate entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JGZL_AcceptanceCertificate(JGZL_AcceptanceCertificate entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_JGZL_CommencementReport(JGZL_CommencementReport entity) { this.SendPropertyChanging(); @@ -79223,6 +79262,390 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JGZL_AcceptanceCertificate")] + public partial class JGZL_AcceptanceCertificate : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CertificateId; + + private string _ProjectId; + + private string _ContractNumber; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _ProjectContent; + + private string _AcceptanceOpinion; + + private string _HeaderMan; + + private string _SupervisoryOpinion; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCertificateIdChanging(string value); + partial void OnCertificateIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnContractNumberChanging(string value); + partial void OnContractNumberChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); + partial void OnProjectContentChanging(string value); + partial void OnProjectContentChanged(); + partial void OnAcceptanceOpinionChanging(string value); + partial void OnAcceptanceOpinionChanged(); + partial void OnHeaderManChanging(string value); + partial void OnHeaderManChanged(); + partial void OnSupervisoryOpinionChanging(string value); + partial void OnSupervisoryOpinionChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JGZL_AcceptanceCertificate() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CertificateId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CertificateId + { + get + { + return this._CertificateId; + } + set + { + if ((this._CertificateId != value)) + { + this.OnCertificateIdChanging(value); + this.SendPropertyChanging(); + this._CertificateId = value; + this.SendPropertyChanged("CertificateId"); + this.OnCertificateIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNumber", DbType="NVarChar(100)")] + public string ContractNumber + { + get + { + return this._ContractNumber; + } + set + { + if ((this._ContractNumber != value)) + { + this.OnContractNumberChanging(value); + this.SendPropertyChanging(); + this._ContractNumber = value; + this.SendPropertyChanged("ContractNumber"); + this.OnContractNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectContent", DbType="NVarChar(2000)")] + public string ProjectContent + { + get + { + return this._ProjectContent; + } + set + { + if ((this._ProjectContent != value)) + { + this.OnProjectContentChanging(value); + this.SendPropertyChanging(); + this._ProjectContent = value; + this.SendPropertyChanged("ProjectContent"); + this.OnProjectContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AcceptanceOpinion", DbType="NVarChar(1000)")] + public string AcceptanceOpinion + { + get + { + return this._AcceptanceOpinion; + } + set + { + if ((this._AcceptanceOpinion != value)) + { + this.OnAcceptanceOpinionChanging(value); + this.SendPropertyChanging(); + this._AcceptanceOpinion = value; + this.SendPropertyChanged("AcceptanceOpinion"); + this.OnAcceptanceOpinionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HeaderMan", DbType="NVarChar(50)")] + public string HeaderMan + { + get + { + return this._HeaderMan; + } + set + { + if ((this._HeaderMan != value)) + { + this.OnHeaderManChanging(value); + this.SendPropertyChanging(); + this._HeaderMan = value; + this.SendPropertyChanged("HeaderMan"); + this.OnHeaderManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisoryOpinion", DbType="NVarChar(1000)")] + public string SupervisoryOpinion + { + get + { + return this._SupervisoryOpinion; + } + set + { + if ((this._SupervisoryOpinion != value)) + { + this.OnSupervisoryOpinionChanging(value); + this.SendPropertyChanging(); + this._SupervisoryOpinion = value; + this.SendPropertyChanged("SupervisoryOpinion"); + this.OnSupervisoryOpinionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_AcceptanceCertificate_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JGZL_AcceptanceCertificate.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JGZL_AcceptanceCertificate.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_AcceptanceCertificate_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.JGZL_AcceptanceCertificate.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JGZL_AcceptanceCertificate.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JGZL_CommencementReport")] public partial class JGZL_CommencementReport : INotifyPropertyChanging, INotifyPropertyChanged { @@ -101440,6 +101863,8 @@ namespace Model private EntitySet _HJGL_WeldingProcedure_WeldHotProcessCard; + private EntitySet _JGZL_AcceptanceCertificate; + private EntitySet _JGZL_CommencementReport; private EntitySet _JGZL_HandoverCertificate; @@ -101525,6 +101950,7 @@ namespace Model this._HJGL_Sys_DataInTemp = new EntitySet(new Action(this.attach_HJGL_Sys_DataInTemp), new Action(this.detach_HJGL_Sys_DataInTemp)); this._HJGL_Sys_UserShowColumns = new EntitySet(new Action(this.attach_HJGL_Sys_UserShowColumns), new Action(this.detach_HJGL_Sys_UserShowColumns)); this._HJGL_WeldingProcedure_WeldHotProcessCard = new EntitySet(new Action(this.attach_HJGL_WeldingProcedure_WeldHotProcessCard), new Action(this.detach_HJGL_WeldingProcedure_WeldHotProcessCard)); + this._JGZL_AcceptanceCertificate = new EntitySet(new Action(this.attach_JGZL_AcceptanceCertificate), new Action(this.detach_JGZL_AcceptanceCertificate)); this._JGZL_CommencementReport = new EntitySet(new Action(this.attach_JGZL_CommencementReport), new Action(this.detach_JGZL_CommencementReport)); this._JGZL_HandoverCertificate = new EntitySet(new Action(this.attach_JGZL_HandoverCertificate), new Action(this.detach_JGZL_HandoverCertificate)); this._Project_User = new EntitySet(new Action(this.attach_Project_User), new Action(this.detach_Project_User)); @@ -102165,6 +102591,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_AcceptanceCertificate_Sys_User", Storage="_JGZL_AcceptanceCertificate", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JGZL_AcceptanceCertificate + { + get + { + return this._JGZL_AcceptanceCertificate; + } + set + { + this._JGZL_AcceptanceCertificate.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_CommencementReport_Sys_User", Storage="_JGZL_CommencementReport", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet JGZL_CommencementReport { @@ -102558,6 +102997,18 @@ namespace Model entity.Sys_User = null; } + private void attach_JGZL_AcceptanceCertificate(JGZL_AcceptanceCertificate entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JGZL_AcceptanceCertificate(JGZL_AcceptanceCertificate entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_JGZL_CommencementReport(JGZL_CommencementReport entity) { this.SendPropertyChanging();