diff --git a/DataBase/版本日志/HJGLDB_DS_2026-02-12_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-02-12_bwj.sql new file mode 100644 index 0000000..81e191f --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-02-12_bwj.sql @@ -0,0 +1,105 @@ + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule) +values('68C050BD-0EDC-473C-BD87-EE4A403F0132','ȹռ¼','JGZL/InsulationAcceptanceRecord.aspx',430,'2A84FA58-8B20-48ED-A621-3EC98CF4AD28','3') +go +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('F05CC125-5AE9-4887-A9FE-AD768049A5EC','68C050BD-0EDC-473C-BD87-EE4A403F0132','',1) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('D92A2ECA-174A-408F-A6F4-D60F4CE9E077','68C050BD-0EDC-473C-BD87-EE4A403F0132','޸',2) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('B6EE8A4C-11ED-4F72-BA8D-B0F7EA80AD41','68C050BD-0EDC-473C-BD87-EE4A403F0132','ɾ',3) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('E6D2D75A-8316-4988-8664-9A6C41111F5C','68C050BD-0EDC-473C-BD87-EE4A403F0132','',4) +go +CREATE TABLE [dbo].[JGZL_InsulationAcceptanceRecord]( + [InsulationAcceptanceRecordId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [HeatInsulationArea] [nvarchar](500) NULL, + [InsulationStructure] [nvarchar](500) NULL, + [AcceptanceConclusion] [nvarchar](500) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + CONSTRAINT [PK_JGZL_InsulationAcceptanceRecord] PRIMARY KEY CLUSTERED +( + [InsulationAcceptanceRecordId] 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_InsulationAcceptanceRecord] WITH CHECK ADD CONSTRAINT [FK_JGZL_InsulationAcceptanceRecord_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[JGZL_InsulationAcceptanceRecord] CHECK CONSTRAINT [FK_JGZL_InsulationAcceptanceRecord_Base_Project] +GO + +ALTER TABLE [dbo].[JGZL_InsulationAcceptanceRecord] WITH CHECK ADD CONSTRAINT [FK_JGZL_InsulationAcceptanceRecord_Sys_User] FOREIGN KEY([CompileMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[JGZL_InsulationAcceptanceRecord] CHECK CONSTRAINT [FK_JGZL_InsulationAcceptanceRecord_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_InsulationAcceptanceRecord', @level2type=N'COLUMN',@level2name=N'InsulationAcceptanceRecordId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_InsulationAcceptanceRecord', @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_InsulationAcceptanceRecord', @level2type=N'COLUMN',@level2name=N'HeatInsulationArea' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƚṹ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_InsulationAcceptanceRecord', @level2type=N'COLUMN',@level2name=N'InsulationStructure' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ս' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_InsulationAcceptanceRecord', @level2type=N'COLUMN',@level2name=N'AcceptanceConclusion' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_InsulationAcceptanceRecord', @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_InsulationAcceptanceRecord', @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_InsulationAcceptanceRecord' +GO + + + + +CREATE TABLE [dbo].[JGZL_InsulationAcceptanceRecordItem]( + [InsulationAcceptanceRecordItemId] [nvarchar](50) NOT NULL, + [InsulationAcceptanceRecordId] [nvarchar](50) NULL, + [CheckCode] [nvarchar](50) NULL, + [CheckItem] [nvarchar](200) NULL, + [CheckResult] [nvarchar](50) NULL, + CONSTRAINT [PK_JGZL_InsulationAcceptanceRecordItem] PRIMARY KEY CLUSTERED +( + [InsulationAcceptanceRecordItemId] 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_InsulationAcceptanceRecordItem] WITH CHECK ADD CONSTRAINT [FK_JGZL_InsulationAcceptanceRecordItem_JGZL_InsulationAcceptanceRecord] FOREIGN KEY([InsulationAcceptanceRecordItemId]) +REFERENCES [dbo].[JGZL_InsulationAcceptanceRecord] ([InsulationAcceptanceRecordId]) +GO + +ALTER TABLE [dbo].[JGZL_InsulationAcceptanceRecordItem] CHECK CONSTRAINT [FK_JGZL_InsulationAcceptanceRecordItem_JGZL_InsulationAcceptanceRecord] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_InsulationAcceptanceRecordItem', @level2type=N'COLUMN',@level2name=N'InsulationAcceptanceRecordId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_InsulationAcceptanceRecordItem', @level2type=N'COLUMN',@level2name=N'CheckCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿҪ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_InsulationAcceptanceRecordItem', @level2type=N'COLUMN',@level2name=N'CheckItem' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_InsulationAcceptanceRecordItem', @level2type=N'COLUMN',@level2name=N'CheckResult' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȹռ¼ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_InsulationAcceptanceRecordItem' +GO + + diff --git a/HJGL_DS/BLL/BLL.csproj b/HJGL_DS/BLL/BLL.csproj index 2904cba..41c26fd 100644 --- a/HJGL_DS/BLL/BLL.csproj +++ b/HJGL_DS/BLL/BLL.csproj @@ -249,6 +249,8 @@ + + diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs index cec10f2..93a547e 100644 --- a/HJGL_DS/BLL/Common/Const.cs +++ b/HJGL_DS/BLL/Common/Const.cs @@ -1905,6 +1905,11 @@ namespace BLL /// public const string JGZL_FileDirectoryMenuId = "729387AD-488D-4451-AEB4-570306747351"; + /// + /// 隔热工程质量验收记录 + /// + public const string JGZL_InsulationAcceptanceRecordMenuId = "68C050BD-0EDC-473C-BD87-EE4A403F0132"; + #endregion #region 报表对应ID diff --git a/HJGL_DS/BLL/JGZL/InsulationAcceptanceRecordItemService.cs b/HJGL_DS/BLL/JGZL/InsulationAcceptanceRecordItemService.cs new file mode 100644 index 0000000..2dab09a --- /dev/null +++ b/HJGL_DS/BLL/JGZL/InsulationAcceptanceRecordItemService.cs @@ -0,0 +1,58 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Caching.Hosting; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 隔热工程质量验收记录明细表 + /// + public class InsulationAcceptanceRecordItemService + { + /// + /// 根据主键Id获取明细信息 + /// + /// + /// + public static List GetItemsByInsulationAcceptanceRecordId(string insulationAcceptanceRecordId) + { + return (from x in Funs.DB.JGZL_InsulationAcceptanceRecordItem where x.InsulationAcceptanceRecordId == insulationAcceptanceRecordId select x).ToList(); + } + + /// + /// 添加 + /// + /// + public static void AddInsulationAcceptanceRecordItem(Model.JGZL_InsulationAcceptanceRecordItem item) + { + SGGLDB db = Funs.DB; + Model.JGZL_InsulationAcceptanceRecordItem newItem = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem.InsulationAcceptanceRecordItemId=item.InsulationAcceptanceRecordItemId; + newItem.InsulationAcceptanceRecordId=item.InsulationAcceptanceRecordId; + newItem.CheckCode=item.CheckCode; + newItem.CheckItem=item.CheckItem; + newItem.CheckResult = item.CheckResult; + db.JGZL_InsulationAcceptanceRecordItem.InsertOnSubmit(newItem); + db.SubmitChanges(); + } + + /// + /// 根据主键Id删除相关明细信息 + /// + /// + public static void DeleteItemByInsulationAcceptanceRecordId(string insulationAcceptanceRecordId) + { + SGGLDB db = Funs.DB; + var q = (from x in db.JGZL_InsulationAcceptanceRecordItem where x.InsulationAcceptanceRecordId == insulationAcceptanceRecordId select x).ToList(); + if (q!=null) + { + db.JGZL_InsulationAcceptanceRecordItem.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + } + } +} diff --git a/HJGL_DS/BLL/JGZL/InsulationAcceptanceRecordService.cs b/HJGL_DS/BLL/JGZL/InsulationAcceptanceRecordService.cs new file mode 100644 index 0000000..33e4812 --- /dev/null +++ b/HJGL_DS/BLL/JGZL/InsulationAcceptanceRecordService.cs @@ -0,0 +1,76 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 隔热工程质量验收记录 + /// + public class InsulationAcceptanceRecordService + { + /// + /// 根据主键获取隔热工程质量验收记录 + /// + /// + /// + public static Model.JGZL_InsulationAcceptanceRecord GetInsulationAcceptanceRecordById(string insulationAcceptanceRecordId) + { + return Funs.DB.JGZL_InsulationAcceptanceRecord.FirstOrDefault(e => e.InsulationAcceptanceRecordId == insulationAcceptanceRecordId); + } + + /// + /// 添加 + /// + /// + public static void AddInsulationAcceptanceRecord(Model.JGZL_InsulationAcceptanceRecord record) + { + SGGLDB db = Funs.DB; + Model.JGZL_InsulationAcceptanceRecord newReport = new JGZL_InsulationAcceptanceRecord(); + newReport.InsulationAcceptanceRecordId = record.InsulationAcceptanceRecordId; + newReport.ProjectId = record.ProjectId; + newReport.HeatInsulationArea = record.HeatInsulationArea; + newReport.InsulationStructure = record.InsulationStructure; + newReport.AcceptanceConclusion = record.AcceptanceConclusion; + newReport.CompileMan = record.CompileMan; + newReport.CompileDate = record.CompileDate; + db.JGZL_InsulationAcceptanceRecord.InsertOnSubmit(newReport); + db.SubmitChanges(); + } + + /// + /// 修改 + /// + /// + public static void UpdateInsulationAcceptanceRecord(Model.JGZL_InsulationAcceptanceRecord record) + { + SGGLDB db = Funs.DB; + Model.JGZL_InsulationAcceptanceRecord newReport = db.JGZL_InsulationAcceptanceRecord.FirstOrDefault(e => e.InsulationAcceptanceRecordId == record.InsulationAcceptanceRecordId); + if (newReport != null) + { + newReport.HeatInsulationArea = record.HeatInsulationArea; + newReport.InsulationStructure = record.InsulationStructure; + newReport.AcceptanceConclusion = record.AcceptanceConclusion; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除隔热工程质量验收记录 + /// + /// + public static void DeleteInsulationAcceptanceRecordById(string insulationAcceptanceRecordId) + { + SGGLDB db = Funs.DB; + Model.JGZL_InsulationAcceptanceRecord report = db.JGZL_InsulationAcceptanceRecord.FirstOrDefault(e => e.InsulationAcceptanceRecordId == insulationAcceptanceRecordId); + if (report != null) + { + db.JGZL_InsulationAcceptanceRecord.DeleteOnSubmit(report); + db.SubmitChanges(); + } + } + } +} \ No newline at end of file diff --git a/HJGL_DS/BLL/JGZL/NDTPersonService.cs b/HJGL_DS/BLL/JGZL/NDTPersonService.cs index f06318c..4a85d5f 100644 --- a/HJGL_DS/BLL/JGZL/NDTPersonService.cs +++ b/HJGL_DS/BLL/JGZL/NDTPersonService.cs @@ -76,5 +76,16 @@ namespace BLL db.SubmitChanges(); } } + + public static void DeleteNDTPersonByProjectId(string projectId) + { + SGGLDB db = Funs.DB; + var q = (from x in db.JGZL_NDTPerson where x.ProjectId == projectId select x).ToList(); + if (q!=null) + { + db.JGZL_NDTPerson.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + } } } diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/合格焊工登记表.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/合格焊工登记表.frx index 906fa91..ae182da 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/合格焊工登记表.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/合格焊工登记表.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/无损检测人员登记表.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/无损检测人员登记表.frx index 0f4ba82..e0dfd7b 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/无损检测人员登记表.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/无损检测人员登记表.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + 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..c5d9833 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/档案移交表.frx @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx index 53e23c3..7cc2fa3 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -50,7 +50,7 @@ namespace FastReport } - + @@ -67,8 +67,8 @@ namespace FastReport - - + + @@ -81,7 +81,7 @@ namespace FastReport - + @@ -127,7 +127,7 @@ namespace FastReport - + @@ -157,8 +157,8 @@ namespace FastReport - - + + @@ -189,15 +189,15 @@ namespace FastReport - + - - - + + + @@ -220,7 +220,7 @@ namespace FastReport - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接接头报检检查记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接接头报检检查记录.frx index df82d05..2aa7f31 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接接头报检检查记录.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接接头报检检查记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + 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..5210fde --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/隔热工程质量验收记录.frx @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index 375e2c5..7253bbd 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -1247,6 +1247,8 @@ + + @@ -6634,6 +6636,20 @@ FileDirectory.aspx + + InsulationAcceptanceRecord.aspx + ASPXCodeBehind + + + InsulationAcceptanceRecord.aspx + + + InsulationAcceptanceRecordEdit.aspx + ASPXCodeBehind + + + InsulationAcceptanceRecordEdit.aspx + PressureTestOfPipelineSystemConfirmationRecord.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecord.aspx b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecord.aspx new file mode 100644 index 0000000..b11898d --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecord.aspx @@ -0,0 +1,115 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InsulationAcceptanceRecord.aspx.cs" Inherits="FineUIPro.Web.JGZL.InsulationAcceptanceRecord" %> + + + + + + + 隔热工程质量验收记录 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecord.aspx.cs new file mode 100644 index 0000000..06edfcf --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecord.aspx.cs @@ -0,0 +1,415 @@ +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 InsulationAcceptanceRecord : 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.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.InitTreeMenu();//加载树 + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + this.BindGrid(); + } + } + #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 strSql = @"SELECT * from JGZL_InsulationAcceptanceRecord 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)); + } + 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.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + this.InitTreeMenu(); + BindGrid(); + } + + /// + /// 查询 + /// + /// + /// + 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.InsulationAcceptanceRecordService.GetInsulationAcceptanceRecordById(this.Grid1.SelectedRowID); + if (report != null) + { + DataTable dt = new DataTable(); + dt.TableName = "MainData"; + dt.Columns.Add("ProjectName"); + dt.Columns.Add("HeatInsulationArea"); + dt.Columns.Add("InsulationStructure"); + dt.Columns.Add("AcceptanceConclusion"); + dt.Columns.Add("CompileDate"); + + var newRow = dt.NewRow(); + newRow["ProjectName"] = BLL.Base_ProjectService.GetProjectByProjectId(report.ProjectId).ProjectName; + newRow["HeatInsulationArea"] = report.HeatInsulationArea; + newRow["InsulationStructure"] = report.InsulationStructure; + newRow["AcceptanceConclusion"] = report.AcceptanceConclusion; + string CompileDate = string.Format("{0:yyyy年MM月dd日}", report.CompileDate); + newRow["CompileDate"] = CompileDate; + dt.Rows.Add(newRow); + BLL.Common.FastReportService.AddFastreportTable(dt); + + var itemList = BLL.InsulationAcceptanceRecordItemService.GetItemsByInsulationAcceptanceRecordId(this.Grid1.SelectedRowID); + if (itemList.Count > 0) + { + DataTable itemdt = new DataTable(); + itemdt.TableName = "Data"; + itemdt.Columns.Add("CheckCode"); + itemdt.Columns.Add("CheckItem"); + itemdt.Columns.Add("CheckResult"); + + foreach (var item in itemList) + { + var newRow2 = itemdt.NewRow(); + newRow2["CheckCode"] = item.CheckCode; + newRow2["CheckItem"] = item.CheckItem; + newRow2["CheckResult"] = item.CheckResult; + itemdt.Rows.Add(newRow2); + } + BLL.Common.FastReportService.AddFastreportTable(itemdt); + } + Dictionary keyValuePairs = new Dictionary(); + //keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); + 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("InsulationAcceptanceRecordEdit.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_InsulationAcceptanceRecordMenuId, BLL.Const.BtnModify)) + { + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InsulationAcceptanceRecordEdit.aspx?insulationAcceptanceRecordId={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_InsulationAcceptanceRecordMenuId, BLL.Const.BtnModify)) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InsulationAcceptanceRecordEdit.aspx?insulationAcceptanceRecordId={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_InsulationAcceptanceRecordMenuId, 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.InsulationAcceptanceRecordItemService.DeleteItemByInsulationAcceptanceRecordId(rowID); + BLL.InsulationAcceptanceRecordService.DeleteInsulationAcceptanceRecordById(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/InsulationAcceptanceRecord.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecord.aspx.designer.cs new file mode 100644 index 0000000..be4e125 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecord.aspx.designer.cs @@ -0,0 +1,206 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class InsulationAcceptanceRecord + { + + /// + /// 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/InsulationAcceptanceRecordEdit.aspx b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecordEdit.aspx new file mode 100644 index 0000000..7a68901 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecordEdit.aspx @@ -0,0 +1,80 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InsulationAcceptanceRecordEdit.aspx.cs" Inherits="FineUIPro.Web.JGZL.InsulationAcceptanceRecordEdit" %> + + + + + + + 编辑隔热工程质量验收记录 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecordEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecordEdit.aspx.cs new file mode 100644 index 0000000..8366b14 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecordEdit.aspx.cs @@ -0,0 +1,232 @@ +using BLL; +using Newtonsoft.Json.Linq; +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 InsulationAcceptanceRecordEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string InsulationAcceptanceRecordId + { + get + { + return (string)ViewState["InsulationAcceptanceRecordId"]; + } + set + { + ViewState["InsulationAcceptanceRecordId"] = value; + } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List items = new List(); + #endregion + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = Request.Params["projectId"]; + this.InsulationAcceptanceRecordId = Request.Params["insulationAcceptanceRecordId"]; + if (!string.IsNullOrEmpty(this.InsulationAcceptanceRecordId)) + { + var report = BLL.InsulationAcceptanceRecordService.GetInsulationAcceptanceRecordById(this.InsulationAcceptanceRecordId); + if (report != null) + { + this.InsulationAcceptanceRecordId = report.InsulationAcceptanceRecordId; + this.txtHeatInsulationArea.Text = report.HeatInsulationArea; + this.txtInsulationStructure.Text = report.InsulationStructure; + this.txtAcceptanceConclusion.Text = report.AcceptanceConclusion; + } + items.Clear(); + items = BLL.InsulationAcceptanceRecordItemService.GetItemsByInsulationAcceptanceRecordId(this.InsulationAcceptanceRecordId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + else + { + InitItemData(); + } + } + } + + /// + /// 加载默认明细 + /// + private void InitItemData() + { + items.Clear(); + Model.JGZL_InsulationAcceptanceRecordItem newItem = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem.CheckCode = "1"; + newItem.CheckItem = "原材料符合设计及有关规范要求,具有出厂质量证明文件及复验报告"; + newItem.CheckResult = ""; + items.Add(newItem); + + Model.JGZL_InsulationAcceptanceRecordItem newItem2 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem2.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem2.CheckCode = "2"; + newItem2.CheckItem = "设备、管道按规定进行了压力试验,防腐涂层完毕"; + newItem2.CheckResult = ""; + items.Add(newItem2); + + Model.JGZL_InsulationAcceptanceRecordItem newItem3 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem3.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem3.CheckCode = "3"; + newItem3.CheckItem = "具有工序交接记录"; + newItem3.CheckResult = ""; + items.Add(newItem3); + + Model.JGZL_InsulationAcceptanceRecordItem newItem4 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem4.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem4.CheckCode = "4"; + newItem4.CheckItem = "管支、托架处的隔热层结构不影响活动面的自由伸缩"; + newItem4.CheckResult = ""; + items.Add(newItem4); + + Model.JGZL_InsulationAcceptanceRecordItem newItem5 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem5.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem5.CheckCode = "5"; + newItem5.CheckItem = "成型制品同层错缝、内外层压缝,伸缩缝留置正确,嵌缝充填或粘贴紧密、厚度偏差符合规范规定"; + newItem5.CheckResult = ""; + items.Add(newItem5); + + Model.JGZL_InsulationAcceptanceRecordItem newItem6 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem6.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem6.CheckCode = "6"; + newItem6.CheckItem = "缠裹材料同层靠紧,内外层缠裹方向相反,接缝错开,厚度偏差符合规范规定"; + newItem6.CheckResult = ""; + items.Add(newItem6); + + Model.JGZL_InsulationAcceptanceRecordItem newItem7 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem7.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem7.CheckCode = "7"; + newItem7.CheckItem = "散状材料和浇注材料,填充密实、均匀,厚度偏差符合规范规定"; + newItem7.CheckResult = ""; + items.Add(newItem7); + + Model.JGZL_InsulationAcceptanceRecordItem newItem8 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem8.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem8.CheckCode = "8"; + newItem8.CheckItem = "粘贴于隔热层上,无脱落和鼓包现象,表面平整,厚度符合规范规定"; + newItem8.CheckResult = ""; + items.Add(newItem8); + + Model.JGZL_InsulationAcceptanceRecordItem newItem9 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem9.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem9.CheckCode = "9"; + newItem9.CheckItem = "金属保护层应压边,搭接缝、表面平整度符合规范规定,无脱壳和凹凸不平"; + newItem9.CheckResult = ""; + items.Add(newItem9); + + Model.JGZL_InsulationAcceptanceRecordItem newItem10 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem10.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem10.CheckCode = "10"; + newItem10.CheckItem = "卷材保护层应紧贴表面,无褶皱和开裂"; + newItem10.CheckResult = ""; + items.Add(newItem10); + + Model.JGZL_InsulationAcceptanceRecordItem newItem11 = new Model.JGZL_InsulationAcceptanceRecordItem(); + newItem11.InsulationAcceptanceRecordItemId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecordItem)); + newItem11.CheckCode = "11"; + newItem11.CheckItem = "抹面保护层应平整、光滑,端部棱角整齐,无显著裂纹,表面平整度符合规范规定"; + newItem11.CheckResult = ""; + items.Add(newItem11); + + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + + protected void btnSave_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_InsulationAcceptanceRecordMenuId, Const.BtnSave)) + { + Model.JGZL_InsulationAcceptanceRecord newReport = new Model.JGZL_InsulationAcceptanceRecord(); + newReport.HeatInsulationArea = this.txtHeatInsulationArea.Text.Trim(); + newReport.InsulationStructure = this.txtInsulationStructure.Text.Trim(); + newReport.AcceptanceConclusion = this.txtAcceptanceConclusion.Text.Trim(); + if (!string.IsNullOrEmpty(this.InsulationAcceptanceRecordId)) + { + newReport.InsulationAcceptanceRecordId = this.InsulationAcceptanceRecordId; + BLL.InsulationAcceptanceRecordService.UpdateInsulationAcceptanceRecord(newReport); + } + else + { + newReport.ProjectId = this.ProjectId; + newReport.CompileMan = this.CurrUser.UserId; + newReport.CompileDate = DateTime.Now; + newReport.InsulationAcceptanceRecordId = SQLHelper.GetNewID(typeof(Model.JGZL_InsulationAcceptanceRecord)); + this.InsulationAcceptanceRecordId = newReport.InsulationAcceptanceRecordId; + BLL.InsulationAcceptanceRecordService.AddInsulationAcceptanceRecord(newReport); + } + saveItem(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + + void saveItem() + { + BLL.InsulationAcceptanceRecordItemService.DeleteItemByInsulationAcceptanceRecordId(this.InsulationAcceptanceRecordId); + List detailLists = new List(); + JArray teamGroupData = Grid1.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.JGZL_InsulationAcceptanceRecordItem newDetail = new Model.JGZL_InsulationAcceptanceRecordItem + { + InsulationAcceptanceRecordItemId = values.Value("InsulationAcceptanceRecordItemId"), + InsulationAcceptanceRecordId = this.InsulationAcceptanceRecordId, + CheckCode = values.Value("CheckCode"), + CheckItem = values.Value("CheckItem"), + CheckResult = values.Value("CheckResult") + }; + detailLists.Add(newDetail); + } + try + { + if (detailLists.Count > 0) + { + Funs.DB.JGZL_InsulationAcceptanceRecordItem.InsertAllOnSubmit(detailLists); + } + Funs.DB.SubmitChanges(); + } + catch (Exception) + { + return; + } + } + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecordEdit.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecordEdit.aspx.designer.cs new file mode 100644 index 0000000..2b91d29 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/InsulationAcceptanceRecordEdit.aspx.designer.cs @@ -0,0 +1,134 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class InsulationAcceptanceRecordEdit + { + + /// + /// 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; + + /// + /// txtHeatInsulationArea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtHeatInsulationArea; + + /// + /// txtInsulationStructure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtInsulationStructure; + + /// + /// txtAcceptanceConclusion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtAcceptanceConclusion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtCheckCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckCode; + + /// + /// txtCheckItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckItem; + + /// + /// txtCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckResult; + } +} diff --git a/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx b/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx index 27dcc4f..00346fe 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx @@ -37,9 +37,11 @@ + + @@ -49,31 +51,51 @@ + EnableTextSelection="True" AutoScroll="true" OnPreDataBound="Grid1_PreDataBound"> + + + + + + + + + + + + + + + + + + - + <%-- - + --%> @@ -92,30 +114,30 @@ - + --%> - + <%-- - + --%> - + --%> diff --git a/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.cs index 2de737c..82de6c7 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.cs @@ -8,6 +8,7 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; +using Newtonsoft.Json.Linq; namespace FineUIPro.Web.JGZL { @@ -93,19 +94,19 @@ namespace FineUIPro.Web.JGZL /// private void BindGrid() { - //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); + string projectId = this.tvControlItem.SelectedNodeID; string strSql = @"SELECT * from JGZL_NDTPerson where 1=1"; List listStr = new List(); - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + if (!string.IsNullOrEmpty(projectId)) { strSql += " AND ProjectId = @ProjectId"; - listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + listStr.Add(new SqlParameter("@ProjectId", projectId)); + } + if (!string.IsNullOrEmpty(this.txtPersonNameS.Text)) + { + strSql += " AND PersonName like @PersonName"; + listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonNameS.Text + "%")); } - //else - //{ - // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; - // listStr.Add(new SqlParameter("@ProjectId", projectIds)); - //} SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); // 2.获取当前分页数据 @@ -114,6 +115,38 @@ namespace FineUIPro.Web.JGZL var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); + + #region 没有数据默认增加一行空白行 + if (tb.Rows.Count == 0) + { + JArray teamGroupData = Grid1.GetMergedData(); + List list = new List(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + list.Add(values); + } + + JObject defaultObj = new JObject + { + { "NDTPersonId", Guid.NewGuid() }, + { "ProjectId", projectId}, + { "PersonName", "" }, + { "CertificateNumber", "" }, + { "QualifiedProjectCode", "" }, + { "Levels", "" }, + { "ValidityDate", "" }, + { + "Delete3", + String.Format("", + GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete)) + } + }; + list.Add(defaultObj); + Grid1.DataSource = list; + Grid1.DataBind(); + } + #endregion } #endregion @@ -174,9 +207,9 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void TextBox_TextChanged(object sender, EventArgs e) + protected void txtPersonNameS_TextChanged(object sender, EventArgs e) { - this.BindGrid(); + BindGrid(); } #endregion @@ -195,46 +228,60 @@ namespace FineUIPro.Web.JGZL string rootPath = Server.MapPath("~/"); BLL.Common.FastReportService.ResetData(); - string strSql = @"SELECT * from JGZL_NDTPerson where ProjectId = @ProjectId order by CompileDate desc"; + string strSql = @"SELECT * from JGZL_NDTPerson where ProjectId = @ProjectId"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", projectId)); + if (!string.IsNullOrEmpty(this.txtPersonNameS.Text)) + { + strSql += " and PersonName like @personName"; + listStr.Add(new SqlParameter("@personName", "%" + this.txtPersonNameS.Text + "%")); + } + strSql += " order by ValidityDate desc"; SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - DataTable dt = new DataTable(); - dt.TableName = "Data"; - dt.Columns.Add("Num"); - dt.Columns.Add("PersonName"); - dt.Columns.Add("CertificateNumber"); - dt.Columns.Add("QualifiedProjectCode"); - dt.Columns.Add("Levels"); - dt.Columns.Add("ValidityDate"); - - DataRow[] rows = tb.DefaultView.ToTable().Select(); - int i = 0; - foreach (var row in rows) + if (tb.Rows.Count > 0) { - var newRow = dt.NewRow(); - newRow["Num"] = (i + 1).ToString(); - newRow["PersonName"] = row["PersonName"].ToString(); - newRow["CertificateNumber"] = row["CertificateNumber"].ToString(); - newRow["QualifiedProjectCode"] = row["QualifiedProjectCode"].ToString(); - newRow["Levels"] = row["Levels"].ToString(); - string ValidityDate= string.Format("{0:yyyy-MM-dd}", row["ValidityDate"]); - newRow["ValidityDate"] = ValidityDate; - dt.Rows.Add(newRow); - i++; + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("Num"); + dt.Columns.Add("PersonName"); + dt.Columns.Add("CertificateNumber"); + dt.Columns.Add("QualifiedProjectCode"); + dt.Columns.Add("Levels"); + dt.Columns.Add("ValidityDate"); + + DataRow[] rows = tb.DefaultView.ToTable().Select(); + int i = 0; + foreach (var row in rows) + { + var newRow = dt.NewRow(); + newRow["Num"] = (i + 1).ToString(); + newRow["PersonName"] = row["PersonName"].ToString(); + newRow["CertificateNumber"] = row["CertificateNumber"].ToString(); + newRow["QualifiedProjectCode"] = row["QualifiedProjectCode"].ToString(); + newRow["Levels"] = row["Levels"].ToString(); + string ValidityDate = string.Format("{0:yyyy-MM-dd}", row["ValidityDate"]); + newRow["ValidityDate"] = ValidityDate; + dt.Rows.Add(newRow); + i++; + } + BLL.Common.FastReportService.AddFastreportTable(dt); + + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); + 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))); + } } - BLL.Common.FastReportService.AddFastreportTable(dt); - - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); - BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\无损检测人员登记表.frx"; - if (File.Exists(rootPath + initTemplatePath)) + else { - PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + Alert.ShowInTop("没有可打印的数据!", MessageBoxIcon.Warning); + return; } } else @@ -254,36 +301,37 @@ namespace FineUIPro.Web.JGZL protected void btnAdd_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("NDTPersonEdit.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_NDTPersonMenuId, BLL.Const.BtnModify)) { if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + JArray teamGroupData = Grid1.GetMergedData(); + List list = new List(); + foreach (JObject teamGroupRow in teamGroupData) { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("NDTPersonEdit.aspx?NDTPersonId={0}", this.Grid1.SelectedRowID, "编辑 - "))); - } - else - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; + JObject values = teamGroupRow.Value("values"); + list.Add(values); } + + JObject defaultObj = new JObject + { + { "NDTPersonId", Guid.NewGuid() }, + { "ProjectId", this.tvControlItem.SelectedNodeID }, + { "PersonName", "" }, + { "CertificateNumber", "" }, + { "QualifiedProjectCode", "" }, + { "Levels", "" }, + { "ValidityDate", "" }, + { + "Delete3", + String.Format("", + GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete)) + } + }; + list.Add(defaultObj); + Grid1.DataSource = list; + Grid1.DataBind(); + + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("NDTPersonEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); } else { @@ -291,99 +339,146 @@ namespace FineUIPro.Web.JGZL return; } } - else - { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } } + protected void Grid1_PreDataBound(object sender, EventArgs e) + { + // 设置LinkButtonField的点击客户端事件 + LinkButtonField deleteField = Grid1.FindColumn("Delete3") as LinkButtonField; + deleteField.OnClientClick = GetDeleteScriptGrid1(); + } + + /// + /// 删除提示 + /// + /// + private string GetDeleteScriptGrid1() + { + return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question, + Grid1.GetDeleteSelectedRowsReference(), String.Empty); + } + + + /// + /// 双击编辑 + /// + /// + /// + //protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + //{ + // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_NDTPersonMenuId, BLL.Const.BtnModify)) + // { + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("NDTPersonEdit.aspx?NDTPersonId={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_NDTPersonMenuId, BLL.Const.BtnModify)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("NDTPersonEdit.aspx?NDTPersonId={0}", Grid1.SelectedRowID, "维护 - "))); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + //protected void btnMenuEdit_Click(object sender, EventArgs e) + //{ + // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_NDTPersonMenuId, BLL.Const.BtnModify)) + // { + // if (Grid1.SelectedRowIndexArray.Length == 0) + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("NDTPersonEdit.aspx?NDTPersonId={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_NDTPersonMenuId, Const.BtnDelete)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } + //protected void btnMenuDelete_Click(object sender, EventArgs e) + //{ + // if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_NDTPersonMenuId, 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.NDTPersonService.DeleteNDTPersonByNDTPersonId(rowID); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除无损检测人员登记表"); - } - } - if (isDelete) - { - ShowNotify("删除成功!", MessageBoxIcon.Success); - } - this.BindGrid(); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + // bool isShow = true; + // if (Grid1.SelectedRowIndexArray.Length > 1) + // { + // isShow = false; + // } + // bool isDelete = false; + // foreach (int rowIndex in Grid1.SelectedRowIndexArray) + // { + // string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + // if (judgementDelete(rowID, isShow)) + // { + // isDelete = true; + // BLL.NDTPersonService.DeleteNDTPersonByNDTPersonId(rowID); + // BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除无损检测人员登记表"); + // } + // } + // if (isDelete) + // { + // ShowNotify("删除成功!", MessageBoxIcon.Success); + // } + // this.BindGrid(); + // } + // else + // { + // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + // } + //} #region 判断是否可删除 /// /// 判断是否可以删除 /// /// - private bool judgementDelete(string id, bool isShow) - { - string content = string.Empty; + //private bool judgementDelete(string id, bool isShow) + //{ + // string content = string.Empty; - if (string.IsNullOrEmpty(content)) - { - return true; - } - else - { - if (isShow) - { - Alert.ShowInTop(content, MessageBoxIcon.Error); - } - return false; - } - } + // if (string.IsNullOrEmpty(content)) + // { + // return true; + // } + // else + // { + // if (isShow) + // { + // Alert.ShowInTop(content, MessageBoxIcon.Error); + // } + // return false; + // } + //} #endregion #endregion @@ -393,11 +488,66 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) - { - this.InitTreeMenu();//加载树 - this.BindGrid(); - } + //protected void Window1_Close(object sender, WindowCloseEventArgs e) + //{ + // this.InitTreeMenu();//加载树 + // this.BindGrid(); + //} #endregion + + #region 保存 + protected void btnSave_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, + Const.JGZL_NDTPersonMenuId, Const.BtnSave)) + { + saveItem(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + + void saveItem() + { + BLL.NDTPersonService.DeleteNDTPersonByProjectId(this.tvControlItem.SelectedNodeID); + List detailLists = new List(); + JArray teamGroupData = Grid1.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.JGZL_NDTPerson newDetail = new Model.JGZL_NDTPerson + { + NDTPersonId = values.Value("NDTPersonId"), + ProjectId = this.tvControlItem.SelectedNodeID, + PersonName = values.Value("PersonName"), + CertificateNumber = values.Value("CertificateNumber"), + QualifiedProjectCode = values.Value("QualifiedProjectCode"), + Levels = values.Value("Levels"), + ValidityDate = Funs.GetNewDateTime(values.Value("ValidityDate")), + CompileMan = this.CurrUser.UserId, + CompileDate = DateTime.Now + }; + detailLists.Add(newDetail); + } + try + { + if (detailLists.Count > 0) + { + Funs.DB.JGZL_NDTPerson.InsertAllOnSubmit(detailLists); + } + Funs.DB.SubmitChanges(); + } + catch (Exception) + { + return; + } + } + #endregion } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.designer.cs index 5bcf4fd..ff6f01b 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.designer.cs @@ -95,6 +95,15 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.Toolbar Toolbar2; + /// + /// txtPersonNameS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonNameS; + /// /// ToolbarFill1 控件。 /// @@ -113,6 +122,15 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.Button btnAdd; + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + /// /// btnPrint 控件。 /// @@ -131,6 +149,51 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.Grid Grid1; + /// + /// txtPersonName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonName; + + /// + /// txtCertificateNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCertificateNumber; + + /// + /// txtQualifiedProjectCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtQualifiedProjectCode; + + /// + /// txtLevels 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLevels; + + /// + /// txtValidityDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtValidityDate; + /// /// ToolbarSeparator1 控件。 /// @@ -158,15 +221,6 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.DropDownList ddlPageSize; - /// - /// Window1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window1; - /// /// WindowPrint 控件。 /// @@ -175,32 +229,5 @@ namespace FineUIPro.Web.JGZL /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowPrint; - - /// - /// Menu1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Menu Menu1; - - /// - /// btnMenuEdit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuEdit; - - /// - /// btnMenuDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuDelete; } } diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index ca7f6f3..8fdc654 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -416,6 +416,12 @@ namespace Model partial void InsertJGZL_IndustrialPipelineInstallationSummary(JGZL_IndustrialPipelineInstallationSummary instance); partial void UpdateJGZL_IndustrialPipelineInstallationSummary(JGZL_IndustrialPipelineInstallationSummary instance); partial void DeleteJGZL_IndustrialPipelineInstallationSummary(JGZL_IndustrialPipelineInstallationSummary instance); + partial void InsertJGZL_InsulationAcceptanceRecord(JGZL_InsulationAcceptanceRecord instance); + partial void UpdateJGZL_InsulationAcceptanceRecord(JGZL_InsulationAcceptanceRecord instance); + partial void DeleteJGZL_InsulationAcceptanceRecord(JGZL_InsulationAcceptanceRecord instance); + partial void InsertJGZL_InsulationAcceptanceRecordItem(JGZL_InsulationAcceptanceRecordItem instance); + partial void UpdateJGZL_InsulationAcceptanceRecordItem(JGZL_InsulationAcceptanceRecordItem instance); + partial void DeleteJGZL_InsulationAcceptanceRecordItem(JGZL_InsulationAcceptanceRecordItem instance); partial void InsertJGZL_LeakTestOfPipelineSystemRecord(JGZL_LeakTestOfPipelineSystemRecord instance); partial void UpdateJGZL_LeakTestOfPipelineSystemRecord(JGZL_LeakTestOfPipelineSystemRecord instance); partial void DeleteJGZL_LeakTestOfPipelineSystemRecord(JGZL_LeakTestOfPipelineSystemRecord instance); @@ -1958,6 +1964,22 @@ namespace Model } } + public System.Data.Linq.Table JGZL_InsulationAcceptanceRecord + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table JGZL_InsulationAcceptanceRecordItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table JGZL_LeakTestOfPipelineSystemRecord { get @@ -4749,6 +4771,8 @@ namespace Model private EntitySet _JGZL_IndustrialPipelineInstallationSummary; + private EntitySet _JGZL_InsulationAcceptanceRecord; + private EntitySet _JGZL_LeakTestOfPipelineSystemRecord; private EntitySet _JGZL_MaterialIdentificationInspectionRecord; @@ -4920,6 +4944,7 @@ namespace Model this._JGZL_HandoverCertificate = new EntitySet(new Action(this.attach_JGZL_HandoverCertificate), new Action(this.detach_JGZL_HandoverCertificate)); this._JGZL_IndustrialPipelineInstallationQualityCertificate = new EntitySet(new Action(this.attach_JGZL_IndustrialPipelineInstallationQualityCertificate), new Action(this.detach_JGZL_IndustrialPipelineInstallationQualityCertificate)); this._JGZL_IndustrialPipelineInstallationSummary = new EntitySet(new Action(this.attach_JGZL_IndustrialPipelineInstallationSummary), new Action(this.detach_JGZL_IndustrialPipelineInstallationSummary)); + this._JGZL_InsulationAcceptanceRecord = new EntitySet(new Action(this.attach_JGZL_InsulationAcceptanceRecord), new Action(this.detach_JGZL_InsulationAcceptanceRecord)); this._JGZL_LeakTestOfPipelineSystemRecord = new EntitySet(new Action(this.attach_JGZL_LeakTestOfPipelineSystemRecord), new Action(this.detach_JGZL_LeakTestOfPipelineSystemRecord)); this._JGZL_MaterialIdentificationInspectionRecord = new EntitySet(new Action(this.attach_JGZL_MaterialIdentificationInspectionRecord), new Action(this.detach_JGZL_MaterialIdentificationInspectionRecord)); this._JGZL_MaterialQualityCertificateDoc = new EntitySet(new Action(this.attach_JGZL_MaterialQualityCertificateDoc), new Action(this.detach_JGZL_MaterialQualityCertificateDoc)); @@ -6173,6 +6198,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_InsulationAcceptanceRecord_Base_Project", Storage="_JGZL_InsulationAcceptanceRecord", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JGZL_InsulationAcceptanceRecord + { + get + { + return this._JGZL_InsulationAcceptanceRecord; + } + set + { + this._JGZL_InsulationAcceptanceRecord.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_LeakTestOfPipelineSystemRecord_Base_Project", Storage="_JGZL_LeakTestOfPipelineSystemRecord", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet JGZL_LeakTestOfPipelineSystemRecord { @@ -7208,6 +7246,18 @@ namespace Model entity.Base_Project = null; } + private void attach_JGZL_InsulationAcceptanceRecord(JGZL_InsulationAcceptanceRecord entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JGZL_InsulationAcceptanceRecord(JGZL_InsulationAcceptanceRecord entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_JGZL_LeakTestOfPipelineSystemRecord(JGZL_LeakTestOfPipelineSystemRecord entity) { this.SendPropertyChanging(); @@ -87090,6 +87140,525 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JGZL_InsulationAcceptanceRecord")] + public partial class JGZL_InsulationAcceptanceRecord : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InsulationAcceptanceRecordId; + + private string _ProjectId; + + private string _HeatInsulationArea; + + private string _InsulationStructure; + + private string _AcceptanceConclusion; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + private EntityRef _JGZL_InsulationAcceptanceRecordItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInsulationAcceptanceRecordIdChanging(string value); + partial void OnInsulationAcceptanceRecordIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnHeatInsulationAreaChanging(string value); + partial void OnHeatInsulationAreaChanged(); + partial void OnInsulationStructureChanging(string value); + partial void OnInsulationStructureChanged(); + partial void OnAcceptanceConclusionChanging(string value); + partial void OnAcceptanceConclusionChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JGZL_InsulationAcceptanceRecord() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + this._JGZL_InsulationAcceptanceRecordItem = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InsulationAcceptanceRecordId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InsulationAcceptanceRecordId + { + get + { + return this._InsulationAcceptanceRecordId; + } + set + { + if ((this._InsulationAcceptanceRecordId != value)) + { + this.OnInsulationAcceptanceRecordIdChanging(value); + this.SendPropertyChanging(); + this._InsulationAcceptanceRecordId = value; + this.SendPropertyChanged("InsulationAcceptanceRecordId"); + this.OnInsulationAcceptanceRecordIdChanged(); + } + } + } + + [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="_HeatInsulationArea", DbType="NVarChar(500)")] + public string HeatInsulationArea + { + get + { + return this._HeatInsulationArea; + } + set + { + if ((this._HeatInsulationArea != value)) + { + this.OnHeatInsulationAreaChanging(value); + this.SendPropertyChanging(); + this._HeatInsulationArea = value; + this.SendPropertyChanged("HeatInsulationArea"); + this.OnHeatInsulationAreaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InsulationStructure", DbType="NVarChar(500)")] + public string InsulationStructure + { + get + { + return this._InsulationStructure; + } + set + { + if ((this._InsulationStructure != value)) + { + this.OnInsulationStructureChanging(value); + this.SendPropertyChanging(); + this._InsulationStructure = value; + this.SendPropertyChanged("InsulationStructure"); + this.OnInsulationStructureChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AcceptanceConclusion", DbType="NVarChar(500)")] + public string AcceptanceConclusion + { + get + { + return this._AcceptanceConclusion; + } + set + { + if ((this._AcceptanceConclusion != value)) + { + this.OnAcceptanceConclusionChanging(value); + this.SendPropertyChanging(); + this._AcceptanceConclusion = value; + this.SendPropertyChanged("AcceptanceConclusion"); + this.OnAcceptanceConclusionChanged(); + } + } + } + + [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_InsulationAcceptanceRecord_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_InsulationAcceptanceRecord.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JGZL_InsulationAcceptanceRecord.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_InsulationAcceptanceRecord_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_InsulationAcceptanceRecord.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JGZL_InsulationAcceptanceRecord.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_InsulationAcceptanceRecordItem_JGZL_InsulationAcceptanceRecord", Storage="_JGZL_InsulationAcceptanceRecordItem", ThisKey="InsulationAcceptanceRecordId", OtherKey="InsulationAcceptanceRecordItemId", IsUnique=true, IsForeignKey=false, DeleteRule="NO ACTION")] + public JGZL_InsulationAcceptanceRecordItem JGZL_InsulationAcceptanceRecordItem + { + get + { + return this._JGZL_InsulationAcceptanceRecordItem.Entity; + } + set + { + JGZL_InsulationAcceptanceRecordItem previousValue = this._JGZL_InsulationAcceptanceRecordItem.Entity; + if (((previousValue != value) + || (this._JGZL_InsulationAcceptanceRecordItem.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._JGZL_InsulationAcceptanceRecordItem.Entity = null; + previousValue.JGZL_InsulationAcceptanceRecord = null; + } + this._JGZL_InsulationAcceptanceRecordItem.Entity = value; + if ((value != null)) + { + value.JGZL_InsulationAcceptanceRecord = this; + } + this.SendPropertyChanged("JGZL_InsulationAcceptanceRecordItem"); + } + } + } + + 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_InsulationAcceptanceRecordItem")] + public partial class JGZL_InsulationAcceptanceRecordItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InsulationAcceptanceRecordItemId; + + private string _InsulationAcceptanceRecordId; + + private string _CheckCode; + + private string _CheckItem; + + private string _CheckResult; + + private EntityRef _JGZL_InsulationAcceptanceRecord; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInsulationAcceptanceRecordItemIdChanging(string value); + partial void OnInsulationAcceptanceRecordItemIdChanged(); + partial void OnInsulationAcceptanceRecordIdChanging(string value); + partial void OnInsulationAcceptanceRecordIdChanged(); + partial void OnCheckCodeChanging(string value); + partial void OnCheckCodeChanged(); + partial void OnCheckItemChanging(string value); + partial void OnCheckItemChanged(); + partial void OnCheckResultChanging(string value); + partial void OnCheckResultChanged(); + #endregion + + public JGZL_InsulationAcceptanceRecordItem() + { + this._JGZL_InsulationAcceptanceRecord = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InsulationAcceptanceRecordItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InsulationAcceptanceRecordItemId + { + get + { + return this._InsulationAcceptanceRecordItemId; + } + set + { + if ((this._InsulationAcceptanceRecordItemId != value)) + { + if (this._JGZL_InsulationAcceptanceRecord.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnInsulationAcceptanceRecordItemIdChanging(value); + this.SendPropertyChanging(); + this._InsulationAcceptanceRecordItemId = value; + this.SendPropertyChanged("InsulationAcceptanceRecordItemId"); + this.OnInsulationAcceptanceRecordItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InsulationAcceptanceRecordId", DbType="NVarChar(50)")] + public string InsulationAcceptanceRecordId + { + get + { + return this._InsulationAcceptanceRecordId; + } + set + { + if ((this._InsulationAcceptanceRecordId != value)) + { + this.OnInsulationAcceptanceRecordIdChanging(value); + this.SendPropertyChanging(); + this._InsulationAcceptanceRecordId = value; + this.SendPropertyChanged("InsulationAcceptanceRecordId"); + this.OnInsulationAcceptanceRecordIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckCode", DbType="NVarChar(50)")] + public string CheckCode + { + get + { + return this._CheckCode; + } + set + { + if ((this._CheckCode != value)) + { + this.OnCheckCodeChanging(value); + this.SendPropertyChanging(); + this._CheckCode = value; + this.SendPropertyChanged("CheckCode"); + this.OnCheckCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckItem", DbType="NVarChar(200)")] + public string CheckItem + { + get + { + return this._CheckItem; + } + set + { + if ((this._CheckItem != value)) + { + this.OnCheckItemChanging(value); + this.SendPropertyChanging(); + this._CheckItem = value; + this.SendPropertyChanged("CheckItem"); + this.OnCheckItemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckResult", DbType="NVarChar(50)")] + public string CheckResult + { + get + { + return this._CheckResult; + } + set + { + if ((this._CheckResult != value)) + { + this.OnCheckResultChanging(value); + this.SendPropertyChanging(); + this._CheckResult = value; + this.SendPropertyChanged("CheckResult"); + this.OnCheckResultChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_InsulationAcceptanceRecordItem_JGZL_InsulationAcceptanceRecord", Storage="_JGZL_InsulationAcceptanceRecord", ThisKey="InsulationAcceptanceRecordItemId", OtherKey="InsulationAcceptanceRecordId", IsForeignKey=true)] + public JGZL_InsulationAcceptanceRecord JGZL_InsulationAcceptanceRecord + { + get + { + return this._JGZL_InsulationAcceptanceRecord.Entity; + } + set + { + JGZL_InsulationAcceptanceRecord previousValue = this._JGZL_InsulationAcceptanceRecord.Entity; + if (((previousValue != value) + || (this._JGZL_InsulationAcceptanceRecord.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._JGZL_InsulationAcceptanceRecord.Entity = null; + previousValue.JGZL_InsulationAcceptanceRecordItem = null; + } + this._JGZL_InsulationAcceptanceRecord.Entity = value; + if ((value != null)) + { + value.JGZL_InsulationAcceptanceRecordItem = this; + this._InsulationAcceptanceRecordItemId = value.InsulationAcceptanceRecordId; + } + else + { + this._InsulationAcceptanceRecordItemId = default(string); + } + this.SendPropertyChanged("JGZL_InsulationAcceptanceRecord"); + } + } + } + + 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_LeakTestOfPipelineSystemRecord")] public partial class JGZL_LeakTestOfPipelineSystemRecord : INotifyPropertyChanging, INotifyPropertyChanged { @@ -118178,6 +118747,8 @@ namespace Model private EntitySet _JGZL_IndustrialPipelineInstallationSummary; + private EntitySet _JGZL_InsulationAcceptanceRecord; + private EntitySet _JGZL_LeakTestOfPipelineSystemRecord; private EntitySet _JGZL_MaterialIdentificationInspectionRecord; @@ -118306,6 +118877,7 @@ namespace Model this._JGZL_HandoverCertificate = new EntitySet(new Action(this.attach_JGZL_HandoverCertificate), new Action(this.detach_JGZL_HandoverCertificate)); this._JGZL_IndustrialPipelineInstallationQualityCertificate = new EntitySet(new Action(this.attach_JGZL_IndustrialPipelineInstallationQualityCertificate), new Action(this.detach_JGZL_IndustrialPipelineInstallationQualityCertificate)); this._JGZL_IndustrialPipelineInstallationSummary = new EntitySet(new Action(this.attach_JGZL_IndustrialPipelineInstallationSummary), new Action(this.detach_JGZL_IndustrialPipelineInstallationSummary)); + this._JGZL_InsulationAcceptanceRecord = new EntitySet(new Action(this.attach_JGZL_InsulationAcceptanceRecord), new Action(this.detach_JGZL_InsulationAcceptanceRecord)); this._JGZL_LeakTestOfPipelineSystemRecord = new EntitySet(new Action(this.attach_JGZL_LeakTestOfPipelineSystemRecord), new Action(this.detach_JGZL_LeakTestOfPipelineSystemRecord)); this._JGZL_MaterialIdentificationInspectionRecord = new EntitySet(new Action(this.attach_JGZL_MaterialIdentificationInspectionRecord), new Action(this.detach_JGZL_MaterialIdentificationInspectionRecord)); this._JGZL_MaterialQualityCertificateDoc = new EntitySet(new Action(this.attach_JGZL_MaterialQualityCertificateDoc), new Action(this.detach_JGZL_MaterialQualityCertificateDoc)); @@ -119130,6 +119702,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_InsulationAcceptanceRecord_Sys_User", Storage="_JGZL_InsulationAcceptanceRecord", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JGZL_InsulationAcceptanceRecord + { + get + { + return this._JGZL_InsulationAcceptanceRecord; + } + set + { + this._JGZL_InsulationAcceptanceRecord.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_LeakTestOfPipelineSystemRecord_Sys_User", Storage="_JGZL_LeakTestOfPipelineSystemRecord", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet JGZL_LeakTestOfPipelineSystemRecord { @@ -119874,6 +120459,18 @@ namespace Model entity.Sys_User = null; } + private void attach_JGZL_InsulationAcceptanceRecord(JGZL_InsulationAcceptanceRecord entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JGZL_InsulationAcceptanceRecord(JGZL_InsulationAcceptanceRecord entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_JGZL_LeakTestOfPipelineSystemRecord(JGZL_LeakTestOfPipelineSystemRecord entity) { this.SendPropertyChanging();