diff --git a/DataBase/版本日志/HJGLDB_DS_2026-04-03_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-04-03_bwj.sql new file mode 100644 index 0000000..eee4892 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-04-03_bwj.sql @@ -0,0 +1,66 @@ + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule) +values('12033BD1-4326-4841-8A2C-B173F4D963F8','ѹβ嵥','SYBData/FinalitemList.aspx',220,'3EAFF140-E5CA-4978-B83D-D2C9F36E0D52','3') +go +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('EB9543A2-D9D5-4935-95D3-B607F35D1849','12033BD1-4326-4841-8A2C-B173F4D963F8','',1) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('32C41FC2-715E-404B-8C16-73930EC7DB88','12033BD1-4326-4841-8A2C-B173F4D963F8','޸',2) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('BC8F3EFE-C09F-4756-B010-3C0A1AD3B258','12033BD1-4326-4841-8A2C-B173F4D963F8','ɾ',3) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('C0EC20CC-B84C-419E-9BA0-F7BCD58845B1','12033BD1-4326-4841-8A2C-B173F4D963F8','',4) +go + + +CREATE TABLE [dbo].[SYBData_FinalitemList]( + [FinalitemListId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [IndividualProject] [nvarchar](50) NULL, + [PipeSectionCode] [nvarchar](50) NULL, + [FinalItemContent] [nvarchar](200) NULL, + [SD_ConUnit] [nvarchar](50) NULL, + [SD_SupervisionUnit] [nvarchar](50) NULL, + [SD_OwnerUnit] [nvarchar](50) NULL, + CONSTRAINT [PK_SYBData_FinalitemList] PRIMARY KEY CLUSTERED +( + [FinalitemListId] 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].[SYBData_FinalitemList] WITH CHECK ADD CONSTRAINT [FK_SYBData_FinalitemList_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[SYBData_FinalitemList] CHECK CONSTRAINT [FK_SYBData_FinalitemList_Base_Project] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_FinalitemList', @level2type=N'COLUMN',@level2name=N'FinalitemListId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_FinalitemList', @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'SYBData_FinalitemList', @level2type=N'COLUMN',@level2name=N'IndividualProject' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѹܶκ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_FinalitemList', @level2type=N'COLUMN',@level2name=N'PipeSectionCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'β' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_FinalitemList', @level2type=N'COLUMN',@level2name=N'FinalItemContent' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȷ-ʩλ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_FinalitemList', @level2type=N'COLUMN',@level2name=N'SD_ConUnit' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȷ-λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_FinalitemList', @level2type=N'COLUMN',@level2name=N'SD_SupervisionUnit' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȷ-ҵλ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_FinalitemList', @level2type=N'COLUMN',@level2name=N'SD_OwnerUnit' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܵϵͳѹβ嵥' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_FinalitemList' +GO + + diff --git a/HJGL_DS/BLL/BLL.csproj b/HJGL_DS/BLL/BLL.csproj index 7d198dd..dc4374e 100644 --- a/HJGL_DS/BLL/BLL.csproj +++ b/HJGL_DS/BLL/BLL.csproj @@ -302,6 +302,7 @@ + diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs index b23bbe4..4476182 100644 --- a/HJGL_DS/BLL/Common/Const.cs +++ b/HJGL_DS/BLL/Common/Const.cs @@ -1957,6 +1957,11 @@ namespace BLL /// 滑动/固定管托安装检验记录 /// public const string SYBData_SlidingFixedMenuId = "C6D77E52-89F0-4A2F-ABC5-5EB010A486B9"; + + /// + /// 试压包检查尾项清单 + /// + public const string SYBData_FinalitemListMenuId = "12033BD1-4326-4841-8A2C-B173F4D963F8"; #endregion #region 报表对应ID diff --git a/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_IsoInfoService.cs b/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_IsoInfoService.cs index 4d50e3a..1b34141 100644 --- a/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_IsoInfoService.cs +++ b/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_IsoInfoService.cs @@ -291,15 +291,15 @@ namespace BLL } /// - /// 获取管线中管道等级 + /// 获取管线中管道类别 /// /// /// public static List GetPipelineLevelList(string projectId) { var list = (from x in Funs.DB.HJGL_PW_IsoInfo - join y in Funs.DB.HJGL_BS_IsoClass on x.ISC_ID equals y.ISC_ID - where x.ProjectId == projectId select y.ISC_IsoName).Distinct().ToList(); + //join y in Funs.DB.HJGL_BS_IsoClass on x.ISC_ID equals y.ISC_ID + where x.ProjectId == projectId select x.PipeLineClass).Distinct().ToList(); return list; } @@ -308,12 +308,12 @@ namespace BLL /// /// /// - public static List GetPipeLineLengthList(string projectId) + public static decimal? GetPipeLineLengthList(string projectId) { - var list = (from x in Funs.DB.HJGL_PW_IsoInfo + decimal? PipeLineLength = (from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == projectId - select x.PipeLineLength.ToString()).Distinct().ToList(); - return list; + select x.PipeLineLength).Sum(); + return PipeLineLength; } } } diff --git a/HJGL_DS/BLL/SYBData/FinalitemListService.cs b/HJGL_DS/BLL/SYBData/FinalitemListService.cs new file mode 100644 index 0000000..4c56e9c --- /dev/null +++ b/HJGL_DS/BLL/SYBData/FinalitemListService.cs @@ -0,0 +1,40 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 管道系统试压尾项清单 + /// + public class FinalitemListService + { + /// + /// 根据项目Id获取管道系统试压尾项清单 + /// + /// + /// + public static List GetListByProjectId(string projectId) + { + return (from x in Funs.DB.SYBData_FinalitemList where x.ProjectId == projectId select x).ToList(); + } + + /// + /// 根据项目Id删除管道系统试压尾项清单 + /// + /// + public static void DeleteFinalItemListByProjectId(string projectId) + { + SGGLDB db = Funs.DB; + var q = (from x in db.SYBData_FinalitemList where x.ProjectId == projectId select x).ToList(); + if (q.Count > 0) + { + db.SYBData_FinalitemList.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + } + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx index cc4073e..f9c226e 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx @@ -1,7 +1,7 @@  - + - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/SYBData/管道系统试压尾项清单.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/SYBData/管道系统试压尾项清单.frx new file mode 100644 index 0000000..36760ae --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/SYBData/管道系统试压尾项清单.frx @@ -0,0 +1,128 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private void Table2_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Table2.PrintRow(0); + Table2.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index cb2b0aa..0552bc7 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -1363,6 +1363,7 @@ + @@ -7258,6 +7259,13 @@ WelderTrain.aspx + + FinalitemList.aspx + ASPXCodeBehind + + + FinalitemList.aspx + HeatTreatmentReport.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx index 46d5bb0..66b1fc8 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx @@ -74,16 +74,16 @@ - - + + - + <%----%> <%----%> - <%----%> + <%-- diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs index 18a4437..3ab1e81 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs @@ -53,16 +53,16 @@ namespace FineUIPro.Web.JGZL this.InitTreeMenu();//加载树 this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; - //管道等级 + //管道类别 this.drpPipelineLevel.DataTextField = "ISC_IsoName"; this.drpPipelineLevel.DataValueField = "ISC_IsoName"; this.drpPipelineLevel.DataSource = BLL.HJGL_PW_IsoInfoService.GetPipelineLevelList(this.drpProjectId.SelectedValue); this.drpPipelineLevel.DataBind(); //管道长度 - this.drpPipelineLength.DataTextField = "PipeLineLength"; - this.drpPipelineLength.DataValueField = "PipeLineLength"; - this.drpPipelineLength.DataSource = BLL.HJGL_PW_IsoInfoService.GetPipeLineLengthList(this.drpProjectId.SelectedValue); - this.drpPipelineLength.DataBind(); + //this.drpPipelineLength.DataTextField = "PipeLineLength"; + //this.drpPipelineLength.DataValueField = "PipeLineLength"; + //this.drpPipelineLength.DataSource = BLL.HJGL_PW_IsoInfoService.GetPipeLineLengthList(this.drpProjectId.SelectedValue); + //this.drpPipelineLength.DataBind(); //this.BindGrid(); PageData(); } @@ -77,7 +77,8 @@ namespace FineUIPro.Web.JGZL txtInstallStartDate.Text = string.Empty; txtInstallEndDate.Text = string.Empty; drpPipelineLevel.SelectedValue = BLL.Const._Null; - drpPipelineLength.SelectedValue = BLL.Const._Null; + //drpPipelineLength.SelectedValue = BLL.Const._Null; + this.txtPipelineLength.Text=string.Empty; txtDesignUnit.Text = string.Empty; txtLosslessTestingAgency.Text = string.Empty; txtInstallationInspection.Text = string.Empty; @@ -112,18 +113,18 @@ namespace FineUIPro.Web.JGZL //this.txtEngineeringCode.Text = report.EngineeringCode; this.txtDeliveryUnit.Text = report.DeliveryUnit; this.txtDeliveryUnitCode.Text = report.DeliveryUnitCode; - this.txtInstallStartDate.Text = report.InstallStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallStartDate) : ""; - this.txtInstallEndDate.Text = report.InstallEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallEndDate) : ""; + this.txtInstallStartDate.Text = report.InstallStartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.InstallStartDate) : ""; + this.txtInstallEndDate.Text = report.InstallEndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.InstallEndDate) : ""; if (!string.IsNullOrEmpty(report.PipelineLevel)) { this.drpPipelineLevel.SelectedValue = report.PipelineLevel; } - if (!string.IsNullOrEmpty(report.PipelineLength)) - { - this.drpPipelineLength.SelectedValue = report.PipelineLength; - } + //if (!string.IsNullOrEmpty(report.PipelineLength)) + //{ + // this.drpPipelineLength.SelectedValue = report.PipelineLength; + //} //this.txtPipelineLevel.Text = report.PipelineLevel; - //this.txtPipelineLength.Text = report.PipelineLength; + this.txtPipelineLength.Text = report.PipelineLength; //this.txtDesignLicenseCode.Text = report.DesignLicenseCode; //this.txtQualificationCertificateCode.Text = report.QualificationCertificateCode; //this.txtInstitutionalApprovalCertificate.Text = report.InstitutionalApprovalCertificate; @@ -162,6 +163,7 @@ namespace FineUIPro.Web.JGZL this.txtConstructionUnit.Text = "浙江石油化工有限公司"; this.txtSpecialEquipmentProductionLicenseCode.Text = "TS3833339-2028"; this.txtRemark.Text = "GB50517-2023"; + this.txtPipelineLength.Text = BLL.HJGL_PW_IsoInfoService.GetPipeLineLengthList(this.tvControlItem.SelectedNodeID).Value.ToString(".##"); } } } @@ -359,9 +361,9 @@ namespace FineUIPro.Web.JGZL newRow["EngineeringCode"] = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode; newRow["DeliveryUnit"] = report.DeliveryUnit; newRow["DeliveryUnitCode"] = report.DeliveryUnitCode; - string InstallStartDate = report.InstallStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallStartDate) : ""; + string InstallStartDate = report.InstallStartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.InstallStartDate) : ""; newRow["InstallStartDate"] = InstallStartDate; - string InstallEndDate = report.InstallEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallEndDate) : ""; + string InstallEndDate = report.InstallEndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.InstallEndDate) : ""; newRow["InstallEndDate"] = InstallEndDate; newRow["PipelineLevel"] = report.PipelineLevel; newRow["PipelineLength"] = report.PipelineLength; @@ -579,12 +581,12 @@ namespace FineUIPro.Web.JGZL { newReport.PipelineLevel = this.drpPipelineLevel.SelectedValue; } - if (!string.IsNullOrEmpty(drpPipelineLength.SelectedValue)) - { - newReport.PipelineLength = this.drpPipelineLength.SelectedValue; - } + //if (!string.IsNullOrEmpty(drpPipelineLength.SelectedValue)) + //{ + // newReport.PipelineLength = this.drpPipelineLength.SelectedValue; + //} //newReport.PipelineLevel = this.txtPipelineLevel.Text.Trim(); - //newReport.PipelineLength = this.txtPipelineLength.Text.Trim(); + newReport.PipelineLength = this.txtPipelineLength.Text.Trim(); newReport.DesignUnit = this.txtDesignUnit.Text.Trim(); newReport.LosslessTestingAgency = this.txtLosslessTestingAgency.Text.Trim(); //newReport.SupervisoryAndInspectionAgency = this.txtSupervisoryAndInspectionAgency.Text.Trim(); diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.designer.cs index 00c6352..c78aa7e 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.designer.cs @@ -195,13 +195,13 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.DropDownList drpPipelineLevel; /// - /// drpPipelineLength 控件。 + /// txtPipelineLength 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList drpPipelineLength; + protected global::FineUIPro.TextBox txtPipelineLength; /// /// txtDesignUnit 控件。 diff --git a/HJGL_DS/FineUIPro.Web/SYBData/FinalitemList.aspx b/HJGL_DS/FineUIPro.Web/SYBData/FinalitemList.aspx new file mode 100644 index 0000000..9a0f9b2 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/SYBData/FinalitemList.aspx @@ -0,0 +1,124 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FinalitemList.aspx.cs" Inherits="FineUIPro.Web.SYBData.FinalitemList" %> + + + + + + + 管道系统试压尾项清单 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/SYBData/FinalitemList.aspx.cs b/HJGL_DS/FineUIPro.Web/SYBData/FinalitemList.aspx.cs new file mode 100644 index 0000000..140b2f2 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/SYBData/FinalitemList.aspx.cs @@ -0,0 +1,423 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.SYBData +{ + public partial class FinalitemList : 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() + { + this.txtIndividualProject.Text = string.Empty; + string projectId = this.tvControlItem.SelectedNodeID; + string strSql = @"SELECT * from SYBData_FinalitemList where 1=1"; + List listStr = new List(); + if (!string.IsNullOrEmpty(projectId)) + { + strSql += " AND ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", projectId)); + } + //if (!string.IsNullOrEmpty(this.txtPipeSectionNumberS.Text)) + //{ + // strSql += " AND PipeSectionNumber like @PipeSectionNumber"; + // listStr.Add(new SqlParameter("@PipeSectionNumber", "%" + this.txtPipeSectionNumberS.Text + "%")); + //} + 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(); + + if (tb.Rows.Count > 0) + { + this.txtIndividualProject.Text = tb.Rows[0]["IndividualProject"].ToString(); + } + + #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 + + #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 txtPipeSectionNumberS_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + string projectId = this.tvControlItem.SelectedNodeID; + if (projectId != null) + { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + string strSql = @"SELECT * from SYBData_FinalitemList where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", projectId)); + //if (!string.IsNullOrEmpty(this.txtPipeSectionNumberS.Text)) + //{ + // strSql += " and PipeSectionNumber like @PipeSectionNumber"; + // listStr.Add(new SqlParameter("@PipeSectionNumber", "%" + this.txtPipeSectionNumberS.Text + "%")); + //} + strSql += " order by PipeSectionCode desc"; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + if (tb.Rows.Count > 0) + { + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("Num"); + dt.Columns.Add("PipeSectionCode"); + dt.Columns.Add("FinalItemContent"); + dt.Columns.Add("SD_ConUnit"); + dt.Columns.Add("SD_SupervisionUnit"); + dt.Columns.Add("SD_OwnerUnit"); + + DataRow[] rows = tb.DefaultView.ToTable().Select(); + int i = 0; + foreach (var row in rows) + { + var newRow = dt.NewRow(); + newRow["Num"] = (i + 1).ToString(); + newRow["PipeSectionCode"] = row["PipeSectionCode"].ToString(); + newRow["FinalItemContent"] = row["FinalItemContent"].ToString(); + newRow["SD_ConUnit"] = row["SD_ConUnit"].ToString(); + newRow["SD_SupervisionUnit"] = row["SD_SupervisionUnit"].ToString(); + newRow["SD_OwnerUnit"] = row["SD_OwnerUnit"].ToString(); + dt.Rows.Add(newRow); + i++; + } + BLL.Common.FastReportService.AddFastreportTable(dt); + + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("IndividualProject", txtIndividualProject.Text.Trim()); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\SYBData\\管道系统试压尾项清单.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)) + { + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + 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 + { + { "FinalitemListId", Guid.NewGuid() }, + { "ProjectId", this.tvControlItem.SelectedNodeID }, + { "PipeSectionCode", "" }, + { "FinalItemContent", "" }, + { "SD_ConUnit", "" }, + { "SD_SupervisionUnit", "" }, + { "SD_OwnerUnit", "" }, + { + "Delete3", + String.Format("", + GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete)) + } + }; + list.Add(defaultObj); + Grid1.DataSource = list; + Grid1.DataBind(); + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + } + + 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); + } + #endregion + + #region 保存 + protected void btnSave_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, + Const.SYBData_FinalitemListMenuId, Const.BtnSave)) + { + saveItem(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + + void saveItem() + { + //FinalitemListService.DeleteFinalItemListByProjectId(this.tvControlItem.SelectedNodeID); + var q = (from x in Funs.DB.SYBData_FinalitemList where x.ProjectId == this.tvControlItem.SelectedNodeID select x).ToList(); + if (q.Count > 0) + { + Funs.DB.SYBData_FinalitemList.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + List detailLists = new List(); + JArray teamGroupData = Grid1.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.SYBData_FinalitemList newDetail = new Model.SYBData_FinalitemList + { + FinalitemListId = values.Value("FinalitemListId"), + ProjectId = this.tvControlItem.SelectedNodeID, + IndividualProject = txtIndividualProject.Text.Trim(), + PipeSectionCode = values.Value("PipeSectionCode"), + FinalItemContent = values.Value("FinalItemContent"), + SD_ConUnit = values.Value("SD_ConUnit"), + SD_SupervisionUnit = values.Value("SD_SupervisionUnit"), + SD_OwnerUnit = values.Value("SD_OwnerUnit"), + }; + detailLists.Add(newDetail); + } + try + { + if (detailLists.Count > 0) + { + Funs.DB.SYBData_FinalitemList.InsertAllOnSubmit(detailLists); + } + Funs.DB.SubmitChanges(); + } + catch (Exception) + { + return; + } + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/SYBData/FinalitemList.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/SYBData/FinalitemList.aspx.designer.cs new file mode 100644 index 0000000..67d0308 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/SYBData/FinalitemList.aspx.designer.cs @@ -0,0 +1,233 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.SYBData +{ + + + public partial class FinalitemList + { + + /// + /// 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; + + /// + /// txtIndividualProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIndividualProject; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAdd; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtPipeSectionCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipeSectionCode; + + /// + /// txtFinalItemContent 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFinalItemContent; + + /// + /// txtSD_ConUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSD_ConUnit; + + /// + /// txtSD_SupervisionUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSD_SupervisionUnit; + + /// + /// txtSD_OwnerUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSD_OwnerUnit; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// WindowPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowPrint; + } +} diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index 7fd3d4a..32d09ac 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -608,6 +608,9 @@ namespace Model partial void InsertSYBData_FileDirectory(SYBData_FileDirectory instance); partial void UpdateSYBData_FileDirectory(SYBData_FileDirectory instance); partial void DeleteSYBData_FileDirectory(SYBData_FileDirectory instance); + partial void InsertSYBData_FinalitemList(SYBData_FinalitemList instance); + partial void UpdateSYBData_FinalitemList(SYBData_FinalitemList instance); + partial void DeleteSYBData_FinalitemList(SYBData_FinalitemList instance); partial void InsertSYBData_PressureTestPackageList(SYBData_PressureTestPackageList instance); partial void UpdateSYBData_PressureTestPackageList(SYBData_PressureTestPackageList instance); partial void DeleteSYBData_PressureTestPackageList(SYBData_PressureTestPackageList instance); @@ -2567,6 +2570,14 @@ namespace Model } } + public System.Data.Linq.Table SYBData_FinalitemList + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table SYBData_PressureTestPackageList { get @@ -4936,6 +4947,8 @@ namespace Model private EntitySet _SYBData_FileDirectory; + private EntitySet _SYBData_FinalitemList; + private EntitySet _SYBData_PressureTestPackageList; private EntitySet _SYBData_SlidingFixed; @@ -5092,6 +5105,7 @@ namespace Model this._SYBData_BlindFlangeInstallationAndRemoval = new EntitySet(new Action(this.attach_SYBData_BlindFlangeInstallationAndRemoval), new Action(this.detach_SYBData_BlindFlangeInstallationAndRemoval)); this._SYBData_Cover = new EntitySet(new Action(this.attach_SYBData_Cover), new Action(this.detach_SYBData_Cover)); this._SYBData_FileDirectory = new EntitySet(new Action(this.attach_SYBData_FileDirectory), new Action(this.detach_SYBData_FileDirectory)); + this._SYBData_FinalitemList = new EntitySet(new Action(this.attach_SYBData_FinalitemList), new Action(this.detach_SYBData_FinalitemList)); this._SYBData_PressureTestPackageList = new EntitySet(new Action(this.attach_SYBData_PressureTestPackageList), new Action(this.detach_SYBData_PressureTestPackageList)); this._SYBData_SlidingFixed = new EntitySet(new Action(this.attach_SYBData_SlidingFixed), new Action(this.detach_SYBData_SlidingFixed)); this._SYBData_SpringSupportHangBracket = new EntitySet(new Action(this.attach_SYBData_SpringSupportHangBracket), new Action(this.detach_SYBData_SpringSupportHangBracket)); @@ -6750,6 +6764,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYBData_FinalitemList_Base_Project", Storage="_SYBData_FinalitemList", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet SYBData_FinalitemList + { + get + { + return this._SYBData_FinalitemList; + } + set + { + this._SYBData_FinalitemList.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYBData_PressureTestPackageList_Base_Project", Storage="_SYBData_PressureTestPackageList", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet SYBData_PressureTestPackageList { @@ -7869,6 +7896,18 @@ namespace Model entity.Base_Project = null; } + private void attach_SYBData_FinalitemList(SYBData_FinalitemList entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_SYBData_FinalitemList(SYBData_FinalitemList entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_SYBData_PressureTestPackageList(SYBData_PressureTestPackageList entity) { this.SendPropertyChanging(); @@ -118225,6 +118264,277 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SYBData_FinalitemList")] + public partial class SYBData_FinalitemList : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _FinalitemListId; + + private string _ProjectId; + + private string _IndividualProject; + + private string _PipeSectionCode; + + private string _FinalItemContent; + + private string _SD_ConUnit; + + private string _SD_SupervisionUnit; + + private string _SD_OwnerUnit; + + private EntityRef _Base_Project; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnFinalitemListIdChanging(string value); + partial void OnFinalitemListIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnIndividualProjectChanging(string value); + partial void OnIndividualProjectChanged(); + partial void OnPipeSectionCodeChanging(string value); + partial void OnPipeSectionCodeChanged(); + partial void OnFinalItemContentChanging(string value); + partial void OnFinalItemContentChanged(); + partial void OnSD_ConUnitChanging(string value); + partial void OnSD_ConUnitChanged(); + partial void OnSD_SupervisionUnitChanging(string value); + partial void OnSD_SupervisionUnitChanged(); + partial void OnSD_OwnerUnitChanging(string value); + partial void OnSD_OwnerUnitChanged(); + #endregion + + public SYBData_FinalitemList() + { + this._Base_Project = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FinalitemListId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string FinalitemListId + { + get + { + return this._FinalitemListId; + } + set + { + if ((this._FinalitemListId != value)) + { + this.OnFinalitemListIdChanging(value); + this.SendPropertyChanging(); + this._FinalitemListId = value; + this.SendPropertyChanged("FinalitemListId"); + this.OnFinalitemListIdChanged(); + } + } + } + + [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="_IndividualProject", DbType="NVarChar(50)")] + public string IndividualProject + { + get + { + return this._IndividualProject; + } + set + { + if ((this._IndividualProject != value)) + { + this.OnIndividualProjectChanging(value); + this.SendPropertyChanging(); + this._IndividualProject = value; + this.SendPropertyChanged("IndividualProject"); + this.OnIndividualProjectChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeSectionCode", DbType="NVarChar(50)")] + public string PipeSectionCode + { + get + { + return this._PipeSectionCode; + } + set + { + if ((this._PipeSectionCode != value)) + { + this.OnPipeSectionCodeChanging(value); + this.SendPropertyChanging(); + this._PipeSectionCode = value; + this.SendPropertyChanged("PipeSectionCode"); + this.OnPipeSectionCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FinalItemContent", DbType="NVarChar(200)")] + public string FinalItemContent + { + get + { + return this._FinalItemContent; + } + set + { + if ((this._FinalItemContent != value)) + { + this.OnFinalItemContentChanging(value); + this.SendPropertyChanging(); + this._FinalItemContent = value; + this.SendPropertyChanged("FinalItemContent"); + this.OnFinalItemContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SD_ConUnit", DbType="NVarChar(50)")] + public string SD_ConUnit + { + get + { + return this._SD_ConUnit; + } + set + { + if ((this._SD_ConUnit != value)) + { + this.OnSD_ConUnitChanging(value); + this.SendPropertyChanging(); + this._SD_ConUnit = value; + this.SendPropertyChanged("SD_ConUnit"); + this.OnSD_ConUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SD_SupervisionUnit", DbType="NVarChar(50)")] + public string SD_SupervisionUnit + { + get + { + return this._SD_SupervisionUnit; + } + set + { + if ((this._SD_SupervisionUnit != value)) + { + this.OnSD_SupervisionUnitChanging(value); + this.SendPropertyChanging(); + this._SD_SupervisionUnit = value; + this.SendPropertyChanged("SD_SupervisionUnit"); + this.OnSD_SupervisionUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SD_OwnerUnit", DbType="NVarChar(50)")] + public string SD_OwnerUnit + { + get + { + return this._SD_OwnerUnit; + } + set + { + if ((this._SD_OwnerUnit != value)) + { + this.OnSD_OwnerUnitChanging(value); + this.SendPropertyChanging(); + this._SD_OwnerUnit = value; + this.SendPropertyChanged("SD_OwnerUnit"); + this.OnSD_OwnerUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYBData_FinalitemList_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.SYBData_FinalitemList.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.SYBData_FinalitemList.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + 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.SYBData_PressureTestPackageList")] public partial class SYBData_PressureTestPackageList : INotifyPropertyChanging, INotifyPropertyChanged {