From 5f72f3f0b0ce8604104bcb31fca5f3a8dbdb9b59 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Fri, 13 Mar 2026 20:29:31 +0800 Subject: [PATCH] =?UTF-8?q?20260313=20=E7=AE=A1=E9=81=93=E6=9D=90=E6=96=99?= =?UTF-8?q?=E6=9D=90=E8=B4=A8=E6=A0=87=E8=AF=86=E6=A3=80=E6=9F=A5=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...alIdentificationInspectionRecordService.cs | 17 +- .../JGZL/管道材料材质标识检查记录.frx | 4 +- .../JGZL/ElectrostaticGrounding.aspx | 2 +- ...aterialIdentificationInspectionRecord.aspx | 236 +++++------ ...rialIdentificationInspectionRecord.aspx.cs | 367 ++++++++++-------- ...ificationInspectionRecord.aspx.designer.cs | 126 ++++-- .../JGZL/SteelPipeCheckRecord.aspx.cs | 17 +- 7 files changed, 454 insertions(+), 315 deletions(-) diff --git a/HJGL_DS/BLL/JGZL/MaterialIdentificationInspectionRecordService.cs b/HJGL_DS/BLL/JGZL/MaterialIdentificationInspectionRecordService.cs index 60e0d2c..84e08eb 100644 --- a/HJGL_DS/BLL/JGZL/MaterialIdentificationInspectionRecordService.cs +++ b/HJGL_DS/BLL/JGZL/MaterialIdentificationInspectionRecordService.cs @@ -1,6 +1,7 @@ using Model; using System.Linq; using System.Collections.Generic; +using System.Resources; namespace BLL { @@ -18,6 +19,11 @@ namespace BLL e.RecordId == recordId); } + public static List GetListsByProjectId(string projectId) + { + return (from x in Funs.DB.JGZL_MaterialIdentificationInspectionRecord where x.ProjectId == projectId select x).ToList(); + } + /// /// 添加管道材料材质标识检查记录 /// @@ -86,7 +92,16 @@ namespace BLL } } - + public static void DeleteListsByProjectId(string projectId) + { + SGGLDB db = Funs.DB; + var q = (from x in db.JGZL_MaterialIdentificationInspectionRecord where x.ProjectId == projectId select x).ToList(); + if (q.Count>0) + { + db.JGZL_MaterialIdentificationInspectionRecord.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + } } diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道材料材质标识检查记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道材料材质标识检查记录.frx index 747ce37..7cddf5f 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道材料材质标识检查记录.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道材料材质标识检查记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ElectrostaticGrounding.aspx b/HJGL_DS/FineUIPro.Web/JGZL/ElectrostaticGrounding.aspx index 4ce85a9..c33d630 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/ElectrostaticGrounding.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/ElectrostaticGrounding.aspx @@ -40,7 +40,7 @@ <%-- --%> - + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx b/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx index b223bb1..fe3e35b 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx @@ -4,127 +4,135 @@ - + 管道材料材质标识检查记录 -
- - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + EnableTextSelection="True" AutoScroll="true" OnPreDataBound="Grid1_PreDataBound"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.cs index 1e2631e..b2285ca 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.cs @@ -1,16 +1,44 @@ using BLL; +using FastReport.DevComponents.DotNetBar; +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 MaterialIdentificationInspectionRecord : PageBase { + #region 定义项 + + /// + /// 主键 + /// + private string RecordId + { + get { return (string)ViewState["RecordId"]; } + set { ViewState["RecordId"] = value; } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get { return (string)ViewState["ProjectId"]; } + set { ViewState["ProjectId"] = value; } + } + + /// + /// 定义集合 + /// + private static List items = new List(); + #endregion + #region 加载页面 /// /// 加载页面 @@ -28,13 +56,78 @@ namespace FineUIPro.Web.JGZL 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; + + //管线 + this.drpIsoId.DataTextField = "ISO_IsoNo"; + this.drpIsoId.DataValueField = "ISO_IsoNo"; + this.drpIsoId.DataSource = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId); + this.drpIsoId.DataBind(); + + PageInfo(); + } + } + + private void PageInfo() + { + items.Clear(); + if (!string.IsNullOrEmpty(this.ProjectId)) + { + var reportLists = BLL.MaterialIdentificationInspectionRecordService.GetListsByProjectId(this.ProjectId); + if (reportLists.Count > 0) + { + var isoLists = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId); + foreach (var item in isoLists) + { + var iso = (from x in Funs.DB.JGZL_MaterialIdentificationInspectionRecord where x.ProjectId == this.ProjectId && x.ISO_Id == item.ISO_IsoNo select x).FirstOrDefault(); + if (iso == null) + { + Model.JGZL_MaterialIdentificationInspectionRecord newReport = new Model.JGZL_MaterialIdentificationInspectionRecord(); + newReport.RecordId = SQLHelper.GetNewID(); + newReport.ProjectId = this.ProjectId; + newReport.ISO_Id = item.ISO_IsoNo; + if (!string.IsNullOrEmpty(item.STE_ID)) + { + newReport.STE_ID = BLL.HJGL_MaterialService.GetSteelBySteID(item.STE_ID).STE_Code; + } + newReport.Specifications = item.Specification; + reportLists.Add(newReport); + } + } + if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue) && this.drpIsoId.SelectedValue != BLL.Const._Null) + { + reportLists = reportLists.Where(x => x.ISO_Id.Contains(this.drpIsoId.SelectedValue)).ToList(); + } + this.Grid1.DataSource = reportLists; + this.Grid1.DataBind(); + } + else + { + var isoLists = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId); + foreach (var iso in isoLists) + { + Model.JGZL_MaterialIdentificationInspectionRecord newReport = new Model.JGZL_MaterialIdentificationInspectionRecord(); + newReport.RecordId = SQLHelper.GetNewID(); + newReport.ProjectId = this.ProjectId; + newReport.ISO_Id = iso.ISO_IsoNo; + if (!string.IsNullOrEmpty(iso.STE_ID)) + { + newReport.STE_ID = BLL.HJGL_MaterialService.GetSteelBySteID(iso.STE_ID).STE_Code; + } + newReport.Specifications = iso.Specification; + items.Add(newReport); + } + + if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue) && this.drpIsoId.SelectedValue != BLL.Const._Null) + { + items = items.Where(x => x.ISO_Id.Contains(this.drpIsoId.SelectedValue)).ToList(); + } + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } } } #endregion @@ -101,6 +194,7 @@ namespace FineUIPro.Web.JGZL { if (this.tvControlItem.SelectedNodeID != "0") { + this.ProjectId = this.tvControlItem.SelectedNodeID; this.BindGrid(); } } @@ -112,17 +206,10 @@ namespace FineUIPro.Web.JGZL /// private void BindGrid() { - string strSql = @"SELECT a.*,b.ISO_IsoNo,c.STE_Code from JGZL_MaterialIdentificationInspectionRecord a - left join HJGL_PW_IsoInfo b on a.ISO_Id = b.ISO_Id - left join HJGL_BS_Steel c on a.STE_ID = c.STE_ID - where 1=1 "; + string strSql = @"SELECT * FROM JGZL_MaterialIdentificationInspectionRecord where ProjectId=@projectId"; List listStr = new List(); - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - strSql += " AND a.ProjectId = @ProjectId"; - listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); - } - + listStr.Add(new SqlParameter("@projectId", this.ProjectId)); + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -179,8 +266,9 @@ 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(); + this.tvControlItem.SelectedNodeID = this.ProjectId; BindGrid(); } @@ -203,17 +291,15 @@ namespace FineUIPro.Web.JGZL /// protected void btnPrint_Click(object sender, EventArgs e) { - string projectId = this.tvControlItem.SelectedNodeID; - - if (projectId != null) + if (!string.IsNullOrEmpty(this.ProjectId)) { - string initTemplatePath = ""; - string rootPath = Server.MapPath("~/"); - BLL.Common.FastReportService.ResetData(); + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); string strSql = @"SELECT * from JGZL_MaterialIdentificationInspectionRecord where ProjectId = @projectId order by CompileDate "; List listStr = new List(); - listStr.Add(new SqlParameter("@projectId", projectId)); + listStr.Add(new SqlParameter("@projectId", this.ProjectId)); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -232,8 +318,8 @@ namespace FineUIPro.Web.JGZL foreach (var row in rows) { var newRow = dt.NewRow(); - newRow["ISO_IsoNo"] = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(row["ISO_Id"].ToString()).ISO_IsoNo; - newRow["STE_Code"] = BLL.HJGL_MaterialService.GetSteelBySteID(row["STE_ID"].ToString()).STE_Code; + newRow["ISO_IsoNo"] = row["ISO_Id"].ToString(); + newRow["STE_Code"] = row["STE_ID"].ToString(); newRow["Specifications"] = row["Specifications"].ToString(); newRow["PrescribedColor"] = row["PrescribedColor"].ToString(); newRow["TubeIdentificationStatus"] = row["TubeIdentificationStatus"].ToString(); @@ -246,14 +332,14 @@ namespace FineUIPro.Web.JGZL Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); - BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); - initTemplatePath = "File\\Fastreport\\JGZL\\管道材料材质标识检查记录.frx"; - if (File.Exists(rootPath + initTemplatePath)) - { - PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); - } + 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 { @@ -273,7 +359,34 @@ namespace FineUIPro.Web.JGZL { if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialIdentificationInspectionRecordEdit.aspx?projectId={0}", 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 + { + { "RecordId", Guid.NewGuid() }, + { "ISO_IsoNo", "" }, + { "STE_Code", "" }, + { "Specifications", "" }, + { "PrescribedColor", "" }, + { "TubeIdentificationStatus", "" }, + { "PipeFittingName", "" }, + { "PipeFittingStatus", "" }, + { "Conclusion", "" }, + { + "Delete3", + String.Format("", + GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete)) + } + }; + list.Add(defaultObj); + Grid1.DataSource = list; + Grid1.DataBind(); } else { @@ -281,141 +394,85 @@ namespace FineUIPro.Web.JGZL return; } } - - /// - /// 双击编辑 - /// - /// - /// - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + protected void Grid1_PreDataBound(object sender, EventArgs e) { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_MaterialIdentificationInspectionRecordMenuId, BLL.Const.BtnModify)) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialIdentificationInspectionRecordEdit.aspx?recordId={0}", this.Grid1.SelectedRowID, "编辑 - "))); - } - else - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } - else - { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } + // 设置LinkButtonField的点击客户端事件 + LinkButtonField deleteField = Grid1.FindColumn("Delete3") as LinkButtonField; + deleteField.OnClientClick = GetDeleteScriptGrid1(); } /// - /// 右键编辑 - /// - /// - /// - protected void btnMenuEdit_Click(object sender, EventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_MaterialIdentificationInspectionRecordMenuId, BLL.Const.BtnModify)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialIdentificationInspectionRecordEdit.aspx?recordId={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_MaterialIdentificationInspectionRecordMenuId, 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.MaterialIdentificationInspectionRecordService.DeleteRecordById(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) + private string GetDeleteScriptGrid1() { - string content = string.Empty; - - if (string.IsNullOrEmpty(content)) - { - return true; - } - else - { - if (isShow) - { - Alert.ShowInTop(content, MessageBoxIcon.Error); - } - return false; - } + return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question, + Grid1.GetDeleteSelectedRowsReference(), String.Empty); } - #endregion + #endregion - #region 关闭弹出窗口及刷新页面 + #region 提交按钮 /// - /// 关闭弹出窗口 + /// 提交按钮 /// /// /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) + protected void btnSave_Click(object sender, EventArgs e) { - this.InitTreeMenu();//加载树 - this.BindGrid(); + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_MaterialIdentificationInspectionRecordMenuId, Const.BtnSave)) + { + items.Clear(); + BLL.MaterialIdentificationInspectionRecordService.DeleteListsByProjectId(this.ProjectId); + JArray teamGroupData = Grid1.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.JGZL_MaterialIdentificationInspectionRecord newDetail = new Model.JGZL_MaterialIdentificationInspectionRecord + { + RecordId = values.Value("RecordId"), + ProjectId = this.ProjectId, + ISO_Id = values.Value("ISO_Id"), + STE_ID = values.Value("STE_ID"), + Specifications = values.Value("Specifications"), + PrescribedColor = values.Value("PrescribedColor"), + TubeIdentificationStatus = values.Value("TubeIdentificationStatus"), + PipeFittingName = values.Value("PipeFittingName"), + PipeFittingStatus = values.Value("PipeFittingStatus"), + Conclusion = values.Value("Conclusion"), + CompileMan = this.CurrUser.UserId, + CompileDate = DateTime.Now + }; + items.Add(newDetail); + } + try + { + if (items.Count > 0) + { + Funs.DB.JGZL_MaterialIdentificationInspectionRecord.InsertAllOnSubmit(items); + } + Funs.DB.SubmitChanges(); + } + catch (Exception) + { + return; + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + //PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } } #endregion + + protected void drpIsoId_SelectedIndexChanged(object sender, EventArgs e) + { + PageInfo(); + } } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.designer.cs index 5835189..2845efd 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.designer.cs @@ -95,6 +95,15 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.Toolbar Toolbar2; + /// + /// drpIsoId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpIsoId; + /// /// ToolbarFill1 控件。 /// @@ -113,6 +122,15 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.Button btnAdd; + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + /// /// btnPrint 控件。 /// @@ -131,6 +149,78 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.Grid Grid1; + /// + /// txtISO_Id 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtISO_Id; + + /// + /// txtSTE_Code 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSTE_Code; + + /// + /// txtSpecifications 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSpecifications; + + /// + /// txtPrescribedColor 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPrescribedColor; + + /// + /// txtTubeIdentificationStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTubeIdentificationStatus; + + /// + /// txtPipeFittingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipeFittingName; + + /// + /// txtPipeFittingStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipeFittingStatus; + + /// + /// txtConclusion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConclusion; + /// /// ToolbarSeparator1 控件。 /// @@ -158,15 +248,6 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.DropDownList ddlPageSize; - /// - /// Window1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window1; - /// /// WindowPrint 控件。 /// @@ -175,32 +256,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/SteelPipeCheckRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/SteelPipeCheckRecord.aspx.cs index 3133016..0e6a97e 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/SteelPipeCheckRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/SteelPipeCheckRecord.aspx.cs @@ -278,8 +278,10 @@ namespace FineUIPro.Web.JGZL newMainData["ShrinkageHole"] = report.ShrinkageHole; newMainData["HeavyLeather"] = report.HeavyLeather; newMainData["Other"] = report.Other; - newMainData["ImageUrl"] = Funs.RootPath + report.Remark.Substring(report.Remark.IndexOf('/')); - + if (!string.IsNullOrEmpty(report.Remark)) + { + newMainData["ImageUrl"] = Funs.RootPath + report.Remark.Substring(report.Remark.IndexOf('/')); + } dtMainData.Rows.Add(newMainData); BLL.Common.FastReportService.AddFastreportTable(dtMainData); @@ -567,11 +569,14 @@ namespace FineUIPro.Web.JGZL var r = BLL.SteelPipeCheckRecordService.GetSteelPipeReportById(this.RecordId); if (r != null) { - string url = r.Remark.Substring(r.Remark.IndexOf('/')); - if (File.Exists(Funs.RootPath + url)) + if (!string.IsNullOrEmpty(r.Remark)) { - //删除被覆盖的图片 - File.Delete(Funs.RootPath + url); + string url = r.Remark.Substring(r.Remark.IndexOf('/')); + if (File.Exists(Funs.RootPath + url)) + { + //删除被覆盖的图片 + File.Delete(Funs.RootPath + url); + } } } newReport.RecordId = this.RecordId;