From 04b42f1813df73221773af27f9ae975fdc22ea5e Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Wed, 11 Mar 2026 14:16:45 +0800 Subject: [PATCH] =?UTF-8?q?20260311=20=E9=98=B2=E8=85=90=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E9=AA=8C=E6=94=B6=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/HJGLDB_DS_2026-03-11_bwj.sql | 40 + ...osionEngineeringInspectionRecordService.cs | 11 + .../Fastreport/JGZL/防腐工程质量验收记录.frx | 28 +- ...icorrosionEngineeringInspectionRecord.aspx | 239 ++++-- ...rrosionEngineeringInspectionRecord.aspx.cs | 778 +++++++++++++----- ...gineeringInspectionRecord.aspx.designer.cs | 119 ++- ...pelineInstallationInspectionRecord.aspx.cs | 3 +- HJGL_DS/Model/Model.cs | 242 +++++- 8 files changed, 1151 insertions(+), 309 deletions(-) create mode 100644 DataBase/版本日志/HJGLDB_DS_2026-03-11_bwj.sql diff --git a/DataBase/版本日志/HJGLDB_DS_2026-03-11_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-03-11_bwj.sql new file mode 100644 index 0000000..49aa628 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-03-11_bwj.sql @@ -0,0 +1,40 @@ + +CREATE TABLE [dbo].[JGZL_AnticorrosionEngineeringInspectionRecordCheckItems]( + [CheckItemsId] [nvarchar](50) NOT NULL, + [AnticorrosionId] [nvarchar](50) NOT NULL, + [CheckItem] [nvarchar](150) NULL, + [CheckResult] [nvarchar](50) NULL, + [Sort] [int] NULL, + CONSTRAINT [PK_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems] PRIMARY KEY CLUSTERED +( + [CheckItemsId] 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_AnticorrosionEngineeringInspectionRecordCheckItems] WITH CHECK ADD CONSTRAINT [FK_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems_JGZL_AnticorrosionEngineeringInspectionRecord] FOREIGN KEY([AnticorrosionId]) +REFERENCES [dbo].[JGZL_AnticorrosionEngineeringInspectionRecord] ([AnticorrosionId]) +GO + +ALTER TABLE [dbo].[JGZL_AnticorrosionEngineeringInspectionRecordCheckItems] CHECK CONSTRAINT [FK_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems_JGZL_AnticorrosionEngineeringInspectionRecord] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AnticorrosionEngineeringInspectionRecordCheckItems', @level2type=N'COLUMN',@level2name=N'CheckItemsId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AnticorrosionEngineeringInspectionRecordCheckItems', @level2type=N'COLUMN',@level2name=N'AnticorrosionId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿҪ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AnticorrosionEngineeringInspectionRecordCheckItems', @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_AnticorrosionEngineeringInspectionRecordCheckItems', @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_AnticorrosionEngineeringInspectionRecordCheckItems', @level2type=N'COLUMN',@level2name=N'Sort' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ռ¼Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_AnticorrosionEngineeringInspectionRecordCheckItems' +GO + + diff --git a/HJGL_DS/BLL/JGZL/AnticorrosionEngineeringInspectionRecordService.cs b/HJGL_DS/BLL/JGZL/AnticorrosionEngineeringInspectionRecordService.cs index 9445c7f..3568bb4 100644 --- a/HJGL_DS/BLL/JGZL/AnticorrosionEngineeringInspectionRecordService.cs +++ b/HJGL_DS/BLL/JGZL/AnticorrosionEngineeringInspectionRecordService.cs @@ -17,6 +17,17 @@ namespace BLL e.AnticorrosionId == anticorrosionId); } + /// + /// 根据项目Id获取防腐工程质量验收记录 + /// + /// + /// + public static Model.JGZL_AnticorrosionEngineeringInspectionRecord GetAnticorrosionReportByProjectId(string projectId) + { + return Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecord.FirstOrDefault(e => + e.ProjectId == projectId); + } + /// /// 添加防腐工程质量验收记录 /// diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/防腐工程质量验收记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/防腐工程质量验收记录.frx index b7a9878..57ed50f 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 } - + @@ -57,6 +57,14 @@ namespace FastReport + + + + + + + + @@ -132,7 +140,7 @@ namespace FastReport - + @@ -140,7 +148,7 @@ namespace FastReport - + @@ -148,7 +156,7 @@ namespace FastReport - + @@ -156,7 +164,7 @@ namespace FastReport - + @@ -164,7 +172,7 @@ namespace FastReport - + @@ -172,7 +180,7 @@ namespace FastReport - + @@ -180,7 +188,7 @@ namespace FastReport - + @@ -188,7 +196,7 @@ namespace FastReport - + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx b/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx index d5900a0..3d73cb1 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx @@ -4,49 +4,169 @@ - + 防腐工程质量验收记录 -
- - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + --%> + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + <%-- + + --%> + + <%-- - - - - - - + + + + <%-- - - + --%> + + <%-- - - - + --%> + + + <%----%> - \ No newline at end of file + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.cs index a380f4d..eae719b 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.cs @@ -1,15 +1,48 @@ using BLL; +using FastReport; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; -using System.Data.SqlClient; using System.Data; -using System.Linq; +using System.Data.SqlClient; using System.IO; +using System.Linq; namespace FineUIPro.Web.JGZL { public partial class AnticorrosionEngineeringInspectionRecord : PageBase { + #region 定义项 + + /// + /// 主键 + /// + private string AnticorrosionId + { + get { return (string)ViewState["AnticorrosionId"]; } + set { ViewState["AnticorrosionId"] = value; } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get { return (string)ViewState["ProjectId"]; } + set { ViewState["ProjectId"] = value; } + } + + /// + /// 明细集合 + /// + private static List recordItems = new List(); + + /// + /// 检查项目集合 + /// + private static List checkItems = new List(); + #endregion + #region 加载页面 /// /// 加载页面 @@ -20,20 +53,129 @@ namespace FineUIPro.Web.JGZL { if (!IsPostBack) { - this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + //this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.drpProjectId.DataTextField = "ProjectCode"; this.drpProjectId.DataValueField = "ProjectId"; this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); this.drpProjectId.DataBind(); Funs.FineUIPleaseSelect(this.drpProjectId); - // 默认显示选中的项目 - if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) - { - this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; - } - + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.InitTreeMenu();//加载树 + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + this.ProjectId = this.tvControlItem.SelectedNodeID; + + DataInfo(); + } + } + + private void DataInfo() + { + recordItems.Clear(); + checkItems.Clear(); + this.AnticorrosionId = string.Empty; + this.txtAnticorrosionCurrentStatus.Text = string.Empty; + this.txtAnticorrosionPart.Text = string.Empty; + this.txtAnticorrosionRequire.Text = string.Empty; + //this.txtInspectionConclusion.Text = string.Empty; + if (!string.IsNullOrEmpty(this.ProjectId)) + { + var report = BLL.AnticorrosionEngineeringInspectionRecordService.GetAnticorrosionReportByProjectId(this.ProjectId); + if (report != null) + { + this.AnticorrosionId = report.AnticorrosionId; + this.txtAnticorrosionCurrentStatus.Text = report.AnticorrosionCurrentStatus; + this.txtAnticorrosionPart.Text = report.AnticorrosionPart; + this.txtAnticorrosionRequire.Text = report.AnticorrosionRequire; + //this.txtInspectionConclusion.Text = report.InspectionConclusion; + + recordItems = BLL.AnticorrosionEngineeringInspectionRecordItemService.GetAnticorrosionReportItemByAnticorrosionId(this.AnticorrosionId); + this.Grid1.DataSource = recordItems; + this.Grid1.DataBind(); + + checkItems = (from x in Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where x.AnticorrosionId == AnticorrosionId orderby x.Sort ascending select x).ToList(); + this.Grid2.DataSource = checkItems; + this.Grid2.DataBind(); + } + else + { + Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems checkItem1 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(); + checkItem1.CheckItemsId = SQLHelper.GetNewID(); + checkItem1.Sort = 1; + checkItem1.CheckItem = "原材料符合设计要求及有关规范规定,具有出厂质量合格证明文件及复验报告"; + checkItem1.CheckResult = "合格"; + checkItems.Add(checkItem1); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems checkItem2 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(); + checkItem2.CheckItemsId = SQLHelper.GetNewID(); + checkItem2.Sort = 2; + checkItem2.CheckItem = "设备、管道按规定进行了压力试验,具有工序交接记录"; + checkItem2.CheckResult = "合格"; + checkItems.Add(checkItem2); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems checkItem3 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(); + checkItem3.CheckItemsId = SQLHelper.GetNewID(); + checkItem3.Sort = 3; + checkItem3.CheckItem = "基层表面处理方法正确,处理结果符合设计等级要求"; + checkItem3.CheckResult = "合格"; + checkItems.Add(checkItem3); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems checkItem4 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(); + checkItem4.CheckItemsId = SQLHelper.GetNewID(); + checkItem4.Sort = 4; + checkItem4.CheckItem = "隔离层材料使用正确,层数或厚度符合规范规定"; + checkItem4.CheckResult = "合格"; + checkItems.Add(checkItem4); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems checkItem5 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(); + checkItem5.CheckItemsId = SQLHelper.GetNewID(); + checkItem5.Sort = 5; + checkItem5.CheckItem = "防腐层材料的配比、试验符合有关规范规定,报告齐全"; + checkItem5.CheckResult = "合格"; + checkItems.Add(checkItem5); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems checkItem6 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(); + checkItem6.CheckItemsId = SQLHelper.GetNewID(); + checkItem6.Sort = 6; + checkItem6.CheckItem = "防腐底层材料使用正确,层数、厚度符合规范规定"; + checkItem6.CheckResult = "合格"; + checkItems.Add(checkItem6); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems checkItem7 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(); + checkItem7.CheckItemsId = SQLHelper.GetNewID(); + checkItem7.Sort = 7; + checkItem7.CheckItem = "防腐中间层材料使用正确,层数、厚度符合规范规定"; + checkItem7.CheckResult = "合格"; + checkItems.Add(checkItem7); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems checkItem8 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(); + checkItem8.CheckItemsId = SQLHelper.GetNewID(); + checkItem8.Sort = 8; + checkItem8.CheckItem = "防腐面层材料使用正确,层数、厚度符合规范规定"; + checkItem8.CheckResult = "合格"; + checkItems.Add(checkItem8); + + this.Grid2.DataSource = checkItems; + this.Grid2.DataBind(); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordItem item1 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordItem(); + item1.AnticorrosionItemId = SQLHelper.GetNewID(); + item1.Part = "底层"; + recordItems.Add(item1); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordItem item2 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordItem(); + item2.AnticorrosionItemId = SQLHelper.GetNewID(); + item2.Part = "中间层"; + recordItems.Add(item2); + + Model.JGZL_AnticorrosionEngineeringInspectionRecordItem item3 = new Model.JGZL_AnticorrosionEngineeringInspectionRecordItem(); + item3.AnticorrosionItemId = SQLHelper.GetNewID(); + item3.Part = "面层"; + recordItems.Add(item3); + + this.Grid1.DataSource = recordItems; + this.Grid1.DataBind(); + } } } #endregion @@ -83,10 +225,10 @@ namespace FineUIPro.Web.JGZL rootNode.Nodes.Add(rootProjectNode); } - if (this.tvControlItem.SelectedNodeID != "0") - { - this.BindGrid(); - } + //if (this.tvControlItem.SelectedNodeID != "0") + //{ + //this.BindGrid(); + //} } #endregion @@ -100,7 +242,9 @@ namespace FineUIPro.Web.JGZL { if (this.tvControlItem.SelectedNodeID != "0") { - this.BindGrid(); + //this.BindGrid(); + this.ProjectId = this.tvControlItem.SelectedNodeID; + this.DataInfo(); } } #endregion @@ -109,23 +253,23 @@ namespace FineUIPro.Web.JGZL /// /// 数据绑定 /// - private void BindGrid() - { - string strSql = @"SELECT * from JGZL_AnticorrosionEngineeringInspectionRecord 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)); - } + //private void BindGrid() + //{ + // string strSql = @"SELECT * from JGZL_AnticorrosionEngineeringInspectionRecord 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); - Grid1.RecordCount = tb.Rows.Count; - var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = table; - Grid1.DataBind(); - } + // SqlParameter[] parameter = listStr.ToArray(); + // DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + // Grid1.RecordCount = tb.Rows.Count; + // var table = this.GetPagedDataTable(Grid1, tb); + // Grid1.DataSource = table; + // Grid1.DataBind(); + //} #endregion #region 分页排序 @@ -135,10 +279,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) - { - BindGrid(); - } + //protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + //{ + // BindGrid(); + //} #endregion #region 排序 @@ -147,10 +291,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Grid1_Sort(object sender, GridSortEventArgs e) - { - BindGrid(); - } + //protected void Grid1_Sort(object sender, GridSortEventArgs e) + //{ + // BindGrid(); + //} #endregion #region 分页选择下拉改变事件 @@ -159,11 +303,11 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) - { - Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); - BindGrid(); - } + //protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + //{ + // Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + // BindGrid(); + //} #endregion #endregion @@ -175,9 +319,11 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { - this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + this.ProjectId = this.drpProjectId.SelectedValue; this.InitTreeMenu(); - BindGrid(); + this.tvControlItem.SelectedNodeID = this.ProjectId; + DataInfo(); + //BindGrid(); } /// @@ -187,7 +333,7 @@ namespace FineUIPro.Web.JGZL /// protected void TextBox_TextChanged(object sender, EventArgs e) { - this.BindGrid(); + //this.BindGrid(); } #endregion @@ -203,63 +349,107 @@ namespace FineUIPro.Web.JGZL if (projectId != null) { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + //if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + //{ + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + var report = BLL.AnticorrosionEngineeringInspectionRecordService.GetAnticorrosionReportById(this.AnticorrosionId); + if (report != null) { - string initTemplatePath = ""; - string rootPath = Server.MapPath("~/"); - BLL.Common.FastReportService.ResetData(); + //string strSql1 = @"SELECT * from JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where AnticorrosionId = @anticorrosionId order by Sort"; + //List listStr1 = new List(); + //listStr1.Add(new SqlParameter("@anticorrosionId", this.AnticorrosionId)); + //SqlParameter[] parameter1 = listStr1.ToArray(); + //DataTable checkItems = SQLHelper.GetDataTableRunText(strSql1, parameter1); - var report = BLL.AnticorrosionEngineeringInspectionRecordService.GetAnticorrosionReportById(this.Grid1.SelectedRowID); - if (report != null) + //DataTable dt1 = new DataTable(); + //dt1.TableName = "CheckItemData"; + //dt1.Columns.Add("CheckItem"); + //dt1.Columns.Add("CheckResult"); + + //DataRow[] checkItemrows = checkItems.DefaultView.ToTable().Select(); + //foreach (var row in checkItemrows) + //{ + // var newRow = dt1.NewRow(); + // newRow["CheckItem"] = row["CheckItem"].ToString(); + // newRow["CheckResult"] = row["CheckResult"].ToString(); + // dt1.Rows.Add(newRow); + //} + //BLL.Common.FastReportService.AddFastreportTable(dt1); + + + string strSql = @"SELECT * from JGZL_AnticorrosionEngineeringInspectionRecordItem where AnticorrosionId = @anticorrosionId "; + List listStr = new List(); + listStr.Add(new SqlParameter("@anticorrosionId", this.AnticorrosionId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("Part"); + dt.Columns.Add("MaterialName"); + dt.Columns.Add("Grade"); + dt.Columns.Add("Manufacturer"); + dt.Columns.Add("PlanFilmThickness"); + dt.Columns.Add("ActualFilmThickness"); + + DataRow[] rows = tb.DefaultView.ToTable().Select(); + foreach (var row in rows) { - string strSql = @"SELECT * from JGZL_AnticorrosionEngineeringInspectionRecordItem where AnticorrosionId = @anticorrosionId "; - List listStr = new List(); - listStr.Add(new SqlParameter("@anticorrosionId", this.Grid1.SelectedRowID)); - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - - DataTable dt = new DataTable(); - dt.TableName = "Data"; - dt.Columns.Add("Part"); - dt.Columns.Add("MaterialName"); - dt.Columns.Add("Grade"); - dt.Columns.Add("Manufacturer"); - dt.Columns.Add("PlanFilmThickness"); - dt.Columns.Add("ActualFilmThickness"); - - DataRow[] rows = tb.DefaultView.ToTable().Select(); - foreach (var row in rows) - { - var newRow = dt.NewRow(); - newRow["Part"] = row["Part"].ToString(); - newRow["MaterialName"] = row["MaterialName"].ToString(); - newRow["Grade"] = row["Grade"].ToString(); - newRow["Manufacturer"] = row["Manufacturer"].ToString(); - newRow["PlanFilmThickness"] = row["PlanFilmThickness"].ToString(); - newRow["ActualFilmThickness"] = row["ActualFilmThickness"].ToString(); - dt.Rows.Add(newRow); - } - BLL.Common.FastReportService.AddFastreportTable(dt); - - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); - keyValuePairs.Add("AnticorrosionCurrentStatus", report.AnticorrosionCurrentStatus); - keyValuePairs.Add("AnticorrosionPart", report.AnticorrosionPart); - keyValuePairs.Add("AnticorrosionRequire", report.AnticorrosionRequire); - keyValuePairs.Add("InspectionConclusion", report.InspectionConclusion); - 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))); + var newRow = dt.NewRow(); + newRow["Part"] = row["Part"].ToString(); + newRow["MaterialName"] = row["MaterialName"].ToString(); + newRow["Grade"] = row["Grade"].ToString(); + newRow["Manufacturer"] = row["Manufacturer"].ToString(); + newRow["PlanFilmThickness"] = row["PlanFilmThickness"].ToString(); + newRow["ActualFilmThickness"] = row["ActualFilmThickness"].ToString(); + dt.Rows.Add(newRow); } + BLL.Common.FastReportService.AddFastreportTable(dt); + + var checkItem1 = (from x in Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where x.AnticorrosionId == AnticorrosionId && x.Sort==1 select x).FirstOrDefault(); + var checkItem2 = (from x in Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where x.AnticorrosionId == AnticorrosionId && x.Sort == 2 select x).FirstOrDefault(); + var checkItem3 = (from x in Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where x.AnticorrosionId == AnticorrosionId && x.Sort == 3 select x).FirstOrDefault(); + var checkItem4 = (from x in Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where x.AnticorrosionId == AnticorrosionId && x.Sort == 4 select x).FirstOrDefault(); + var checkItem5 = (from x in Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where x.AnticorrosionId == AnticorrosionId && x.Sort == 5 select x).FirstOrDefault(); + var checkItem6 = (from x in Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where x.AnticorrosionId == AnticorrosionId && x.Sort == 6 select x).FirstOrDefault(); + var checkItem7 = (from x in Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where x.AnticorrosionId == AnticorrosionId && x.Sort == 7 select x).FirstOrDefault(); + var checkItem8 = (from x in Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems where x.AnticorrosionId == AnticorrosionId && x.Sort == 8 select x).FirstOrDefault(); + + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); + keyValuePairs.Add("AnticorrosionCurrentStatus", report.AnticorrosionCurrentStatus); + keyValuePairs.Add("AnticorrosionPart", report.AnticorrosionPart); + keyValuePairs.Add("AnticorrosionRequire", report.AnticorrosionRequire); + keyValuePairs.Add("InspectionConclusion", report.InspectionConclusion); + keyValuePairs.Add("CheckResult1", checkItem1.CheckResult); + keyValuePairs.Add("CheckResult2", checkItem2.CheckResult); + keyValuePairs.Add("CheckResult3", checkItem3.CheckResult); + keyValuePairs.Add("CheckResult4", checkItem4.CheckResult); + keyValuePairs.Add("CheckResult5", checkItem5.CheckResult); + keyValuePairs.Add("CheckResult6", checkItem6.CheckResult); + keyValuePairs.Add("CheckResult7", checkItem7.CheckResult); + keyValuePairs.Add("CheckResult8", checkItem8.CheckResult); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); } else { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + ShowAlert("请先保存数据!", MessageBoxIcon.Warning); return; } + 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 { @@ -275,140 +465,140 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void btnAdd_Click(object sender, EventArgs e) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AnticorrosionEngineeringInspectionRecordEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } + //protected void btnAdd_Click(object sender, EventArgs e) + //{ + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AnticorrosionEngineeringInspectionRecordEdit.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_AnticorrosionEngineeringInspectionRecordMenuId, BLL.Const.BtnModify)) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AnticorrosionEngineeringInspectionRecordEdit.aspx?anticorrosionId={0}", this.Grid1.SelectedRowID, "编辑 - "))); - } - else - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } - else - { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + //protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + //{ + // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_AnticorrosionEngineeringInspectionRecordMenuId, BLL.Const.BtnModify)) + // { + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AnticorrosionEngineeringInspectionRecordEdit.aspx?anticorrosionId={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_AnticorrosionEngineeringInspectionRecordMenuId, BLL.Const.BtnModify)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AnticorrosionEngineeringInspectionRecordEdit.aspx?anticorrosionId={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_AnticorrosionEngineeringInspectionRecordMenuId, BLL.Const.BtnModify)) + // { + // if (Grid1.SelectedRowIndexArray.Length == 0) + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AnticorrosionEngineeringInspectionRecordEdit.aspx?anticorrosionId={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_AnticorrosionEngineeringInspectionRecordMenuId, 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_AnticorrosionEngineeringInspectionRecordMenuId, 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.AnticorrosionEngineeringInspectionRecordItemService.DeleteAnticorrosionReportItemByAnticorrosionId(rowID); - BLL.AnticorrosionEngineeringInspectionRecordService.DeleteAnticorrosionReportById(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.AnticorrosionEngineeringInspectionRecordItemService.DeleteAnticorrosionReportItemByAnticorrosionId(rowID); + // BLL.AnticorrosionEngineeringInspectionRecordService.DeleteAnticorrosionReportById(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 @@ -418,11 +608,189 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) + //protected void Window1_Close(object sender, WindowCloseEventArgs e) + //{ + // this.InitTreeMenu();//加载树 + // this.BindGrid(); + //} + #endregion + + #region 数据行 + + protected void btnAddGrid1_Click(object sender, EventArgs e) { - this.InitTreeMenu();//加载树 - this.BindGrid(); + Grid1.Hidden = false; + + 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 + { + { "AnticorrosionItemId", Guid.NewGuid() }, + { "AnticorrosionId", AnticorrosionId }, + { "Part", "" }, + { "MaterialName", "" }, + { "Grade", "" }, + { "Manufacturer", "" }, + { "PlanFilmThickness", "" }, + { "ActualFilmThickness", "" }, + { + "Delete3", + String.Format("", + GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete)) + } + }; + list.Add(defaultObj); + Grid1.DataSource = list; + Grid1.DataBind(); } + + protected void Grid3_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 获取Grid数据 + + + void saveItem() + { + 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_AnticorrosionEngineeringInspectionRecordItem newDetail = new Model.JGZL_AnticorrosionEngineeringInspectionRecordItem + { + AnticorrosionItemId = values.Value("AnticorrosionItemId"), + AnticorrosionId = AnticorrosionId, + Part = values.Value("Part"), + MaterialName = values.Value("MaterialName"), + Grade = values.Value("Grade"), + Manufacturer = values.Value("Manufacturer"), + PlanFilmThickness = values.Value("PlanFilmThickness"), + ActualFilmThickness = values.Value("ActualFilmThickness"), + }; + detailLists.Add(newDetail); + } + + try + { + var result = Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordItem.Where(a => a.AnticorrosionId == AnticorrosionId); + Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordItem.DeleteAllOnSubmit(result); + if (detailLists.Count > 0) + { + Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordItem.InsertAllOnSubmit(detailLists); + } + + Funs.DB.SubmitChanges(); + } + catch (Exception) + { + return; + } + } + + void saveCheckItem() + { + checkItems.Clear(); + JArray teamGroupData = Grid2.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems newCheckItem = new Model.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems + { + CheckItemsId = values.Value("CheckItemsId"), + AnticorrosionId = AnticorrosionId, + CheckItem = values.Value("CheckItem"), + CheckResult = values.Value("CheckResult"), + Sort = Funs.GetNewInt(values.Value("Sort")) + }; + checkItems.Add(newCheckItem); + } + try + { + var result = Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems.Where(a => a.AnticorrosionId == AnticorrosionId); + Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems.DeleteAllOnSubmit(result); + if (checkItems.Count > 0) + { + Funs.DB.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems.InsertAllOnSubmit(checkItems); + } + Funs.DB.SubmitChanges(); + } + catch (Exception) + { + return; + } + } + + #endregion + + #region 提交按钮 + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, + Const.JGZL_AnticorrosionEngineeringInspectionRecordMenuId, Const.BtnSave)) + { + Model.JGZL_AnticorrosionEngineeringInspectionRecord newReport = new Model.JGZL_AnticorrosionEngineeringInspectionRecord(); + newReport.AnticorrosionCurrentStatus = this.txtAnticorrosionCurrentStatus.Text.Trim(); + newReport.AnticorrosionPart = this.txtAnticorrosionPart.Text.Trim(); + newReport.AnticorrosionRequire = this.txtAnticorrosionRequire.Text; + //newReport.InspectionConclusion = this.txtInspectionConclusion.Text; + if (!string.IsNullOrEmpty(this.AnticorrosionId)) + { + newReport.AnticorrosionId = this.AnticorrosionId; + BLL.AnticorrosionEngineeringInspectionRecordService.UpdateAnticorrosionReport(newReport); + } + else + { + newReport.ProjectId = this.ProjectId; + newReport.CompileMan = this.CurrUser.UserId; + newReport.CompileDate = DateTime.Now; + newReport.AnticorrosionId = SQLHelper.GetNewID(typeof(Model.JGZL_AnticorrosionEngineeringInspectionRecord)); + this.AnticorrosionId = newReport.AnticorrosionId; + BLL.AnticorrosionEngineeringInspectionRecordService.AddAnticorrosionReport(newReport); + } + //保存明细 + saveCheckItem(); + saveItem(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + //PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + #endregion } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.designer.cs index 416c7be..6273950 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.designer.cs @@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.ToolbarFill ToolbarFill1; /// - /// btnAdd 控件。 + /// btnSave 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnAdd; + protected global::FineUIPro.Button btnSave; /// /// btnPrint 控件。 @@ -122,6 +122,60 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.Button btnPrint; + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtAnticorrosionCurrentStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAnticorrosionCurrentStatus; + + /// + /// txtAnticorrosionPart 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtAnticorrosionPart; + + /// + /// txtAnticorrosionRequire 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtAnticorrosionRequire; + + /// + /// Grid2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid2; + + /// + /// drpCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckResult; + /// /// Grid1 控件。 /// @@ -132,40 +186,58 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.Grid Grid1; /// - /// ToolbarSeparator1 控件。 + /// txtPart 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + protected global::FineUIPro.TextBox txtPart; /// - /// ToolbarText1 控件。 + /// txtMaterialName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarText ToolbarText1; + protected global::FineUIPro.TextBox txtMaterialName; /// - /// ddlPageSize 控件。 + /// txtGrade 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList ddlPageSize; + protected global::FineUIPro.TextBox txtGrade; /// - /// Window1 控件。 + /// txtManufacturer 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Window Window1; + protected global::FineUIPro.TextBox txtManufacturer; + + /// + /// txtPlanFilmThickness 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPlanFilmThickness; + + /// + /// txtActualFilmThickness 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtActualFilmThickness; /// /// WindowPrint 控件。 @@ -175,32 +247,5 @@ namespace FineUIPro.Web.JGZL /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowPrint; - - /// - /// Menu1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Menu Menu1; - - /// - /// btnMenuEdit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuEdit; - - /// - /// btnMenuDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuDelete; } } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.cs index 514d3b1..4615484 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/PipelineInstallationInspectionRecord.aspx.cs @@ -95,7 +95,8 @@ namespace FineUIPro.Web.JGZL { this.RecordId = string.Empty; this.txtProfessionalEngineering.Text = "管道安装工程"; - //this.txtDrawingNumber.Text = BLL.Base_ProjectService.GetProjectCode(this.ProjectId); + this.txtDrawingNumber.Text = "/"; + this.txtInspectionItems.Text = "经检查," + BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + "管道安装施工质量符合 SH/T 3501-2021《石油化工有毒、可燃介质钢制管道工程施工及验收规范》及 GB 50517-2010《石油化工金属管道工程施工质量验收规范》的相关规定。管道组成件的材质、规格、型号均符合设计文件要求,管道支吊架的安装位置、间距、固定方式及紧固情况均满足施工及规范要求;管道安装坡度、标高、坐标位置准确,连接牢固可靠,整体安装质量合格。本项目管道组成件及管道支撑件安装符合设计及规范规定,满足工程验收要求。"; } } } diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index c8f2599..ce50836 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -377,6 +377,9 @@ namespace Model partial void InsertJGZL_AnticorrosionEngineeringInspectionRecord(JGZL_AnticorrosionEngineeringInspectionRecord instance); partial void UpdateJGZL_AnticorrosionEngineeringInspectionRecord(JGZL_AnticorrosionEngineeringInspectionRecord instance); partial void DeleteJGZL_AnticorrosionEngineeringInspectionRecord(JGZL_AnticorrosionEngineeringInspectionRecord instance); + partial void InsertJGZL_AnticorrosionEngineeringInspectionRecordCheckItems(JGZL_AnticorrosionEngineeringInspectionRecordCheckItems instance); + partial void UpdateJGZL_AnticorrosionEngineeringInspectionRecordCheckItems(JGZL_AnticorrosionEngineeringInspectionRecordCheckItems instance); + partial void DeleteJGZL_AnticorrosionEngineeringInspectionRecordCheckItems(JGZL_AnticorrosionEngineeringInspectionRecordCheckItems instance); partial void InsertJGZL_AnticorrosionEngineeringInspectionRecordItem(JGZL_AnticorrosionEngineeringInspectionRecordItem instance); partial void UpdateJGZL_AnticorrosionEngineeringInspectionRecordItem(JGZL_AnticorrosionEngineeringInspectionRecordItem instance); partial void DeleteJGZL_AnticorrosionEngineeringInspectionRecordItem(JGZL_AnticorrosionEngineeringInspectionRecordItem instance); @@ -1863,6 +1866,14 @@ namespace Model } } + public System.Data.Linq.Table JGZL_AnticorrosionEngineeringInspectionRecordCheckItems + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table JGZL_AnticorrosionEngineeringInspectionRecordItem { get @@ -27499,7 +27510,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialType", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialType", DbType="NVarChar(200)")] public string MaterialType { get @@ -80901,6 +80912,8 @@ namespace Model private EntityRef _Sys_User; + private EntitySet _JGZL_AnticorrosionEngineeringInspectionRecordCheckItems; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -80928,6 +80941,7 @@ namespace Model this._Base_Project = default(EntityRef); this._JGZL_AnticorrosionEngineeringInspectionRecordItem = new EntitySet(new Action(this.attach_JGZL_AnticorrosionEngineeringInspectionRecordItem), new Action(this.detach_JGZL_AnticorrosionEngineeringInspectionRecordItem)); this._Sys_User = default(EntityRef); + this._JGZL_AnticorrosionEngineeringInspectionRecordCheckItems = new EntitySet(new Action(this.attach_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems), new Action(this.detach_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems)); OnCreated(); } @@ -81181,6 +81195,20 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems_JGZL_AnticorrosionEngi" + + "neeringInspectionRecord", Storage="_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems", ThisKey="AnticorrosionId", OtherKey="AnticorrosionId", DeleteRule="NO ACTION")] + public EntitySet JGZL_AnticorrosionEngineeringInspectionRecordCheckItems + { + get + { + return this._JGZL_AnticorrosionEngineeringInspectionRecordCheckItems; + } + set + { + this._JGZL_AnticorrosionEngineeringInspectionRecordCheckItems.Assign(value); + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -81212,6 +81240,218 @@ namespace Model this.SendPropertyChanging(); entity.JGZL_AnticorrosionEngineeringInspectionRecord = null; } + + private void attach_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(JGZL_AnticorrosionEngineeringInspectionRecordCheckItems entity) + { + this.SendPropertyChanging(); + entity.JGZL_AnticorrosionEngineeringInspectionRecord = this; + } + + private void detach_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems(JGZL_AnticorrosionEngineeringInspectionRecordCheckItems entity) + { + this.SendPropertyChanging(); + entity.JGZL_AnticorrosionEngineeringInspectionRecord = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems")] + public partial class JGZL_AnticorrosionEngineeringInspectionRecordCheckItems : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CheckItemsId; + + private string _AnticorrosionId; + + private string _CheckItem; + + private string _CheckResult; + + private System.Nullable _Sort; + + private EntityRef _JGZL_AnticorrosionEngineeringInspectionRecord; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCheckItemsIdChanging(string value); + partial void OnCheckItemsIdChanged(); + partial void OnAnticorrosionIdChanging(string value); + partial void OnAnticorrosionIdChanged(); + partial void OnCheckItemChanging(string value); + partial void OnCheckItemChanged(); + partial void OnCheckResultChanging(string value); + partial void OnCheckResultChanged(); + partial void OnSortChanging(System.Nullable value); + partial void OnSortChanged(); + #endregion + + public JGZL_AnticorrosionEngineeringInspectionRecordCheckItems() + { + this._JGZL_AnticorrosionEngineeringInspectionRecord = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckItemsId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CheckItemsId + { + get + { + return this._CheckItemsId; + } + set + { + if ((this._CheckItemsId != value)) + { + this.OnCheckItemsIdChanging(value); + this.SendPropertyChanging(); + this._CheckItemsId = value; + this.SendPropertyChanged("CheckItemsId"); + this.OnCheckItemsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AnticorrosionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string AnticorrosionId + { + get + { + return this._AnticorrosionId; + } + set + { + if ((this._AnticorrosionId != value)) + { + if (this._JGZL_AnticorrosionEngineeringInspectionRecord.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnAnticorrosionIdChanging(value); + this.SendPropertyChanging(); + this._AnticorrosionId = value; + this.SendPropertyChanged("AnticorrosionId"); + this.OnAnticorrosionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckItem", DbType="NVarChar(150)")] + 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.ColumnAttribute(Storage="_Sort", DbType="Int")] + public System.Nullable Sort + { + get + { + return this._Sort; + } + set + { + if ((this._Sort != value)) + { + this.OnSortChanging(value); + this.SendPropertyChanging(); + this._Sort = value; + this.SendPropertyChanged("Sort"); + this.OnSortChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_AnticorrosionEngineeringInspectionRecordCheckItems_JGZL_AnticorrosionEngi" + + "neeringInspectionRecord", Storage="_JGZL_AnticorrosionEngineeringInspectionRecord", ThisKey="AnticorrosionId", OtherKey="AnticorrosionId", IsForeignKey=true)] + public JGZL_AnticorrosionEngineeringInspectionRecord JGZL_AnticorrosionEngineeringInspectionRecord + { + get + { + return this._JGZL_AnticorrosionEngineeringInspectionRecord.Entity; + } + set + { + JGZL_AnticorrosionEngineeringInspectionRecord previousValue = this._JGZL_AnticorrosionEngineeringInspectionRecord.Entity; + if (((previousValue != value) + || (this._JGZL_AnticorrosionEngineeringInspectionRecord.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._JGZL_AnticorrosionEngineeringInspectionRecord.Entity = null; + previousValue.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems.Remove(this); + } + this._JGZL_AnticorrosionEngineeringInspectionRecord.Entity = value; + if ((value != null)) + { + value.JGZL_AnticorrosionEngineeringInspectionRecordCheckItems.Add(this); + this._AnticorrosionId = value.AnticorrosionId; + } + else + { + this._AnticorrosionId = default(string); + } + this.SendPropertyChanged("JGZL_AnticorrosionEngineeringInspectionRecord"); + } + } + } + + 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_AnticorrosionEngineeringInspectionRecordItem")]