diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index 77417425..6ea53edc 100644 Binary files a/.vs/SGGL_SeDin/v17/.wsuo and b/.vs/SGGL_SeDin/v17/.wsuo differ diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs index 9b81de27..56fdfc57 100644 --- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs @@ -172,33 +172,38 @@ namespace FineUIPro.Web.HJGL.DataImport protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { - e.Node.Nodes.Clear(); - if (e.Node.CommandName == "单位工程") + if (e.Node.Nodes[0].NodeID == "加载管线...") { - var pipeline = (from x in PipelineService.hJGL_Pipelines - where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID - && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim()) - orderby x.PipelineCode - select x).ToList(); - foreach (var item in pipeline) + e.Node.Nodes.Clear(); + if (e.Node.CommandName == "单位工程") { - var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count(); - //var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count(); - TreeNode newNode = new TreeNode(); - //if (jotCount > weldJotCount) - //{ - // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - //} - //else - //{ - // newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; - //} - newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; - newNode.NodeID = item.PipelineId; - newNode.EnableClickEvent = true; - e.Node.Nodes.Add(newNode); + var pipeline = (from x in PipelineService.hJGL_Pipelines + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID + && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim()) + orderby x.PipelineCode + select x).ToList(); + foreach (var item in pipeline) + { + var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count(); + //var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count(); + TreeNode newNode = new TreeNode(); + //if (jotCount > weldJotCount) + //{ + // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + //} + //else + //{ + // newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; + //} + newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; + newNode.NodeID = item.PipelineId; + newNode.EnableClickEvent = true; + e.Node.Nodes.Add(newNode); + } } + } + } @@ -215,8 +220,8 @@ namespace FineUIPro.Web.HJGL.DataImport if (tvControlItem.SelectedNode.CommandName== "单位工程") { this.hdUnitWorkId.Text=tvControlItem.SelectedNode.NodeID.ToString(); - this.BindGrid1("", this.hdUnitWorkId.Text); - this.BindGrid2("", this.hdUnitWorkId.Text); + //this.BindGrid1("", this.hdUnitWorkId.Text); + //this.BindGrid2("", this.hdUnitWorkId.Text); } else diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx index 3d5a3fb2..126cb30c 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx @@ -55,7 +55,7 @@ EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="DesignBasisDataImportId" AllowColumnLocking="true" EnableColumnLines="true" DataIDField="DesignBasisDataImportId" AllowSorting="true" SortField="CreateDate" SortDirection="ASC" EnableMultiSelect="false" - IsDatabasePaging="false" PageSize="15" > + IsDatabasePaging="false" AllowPaging="true" PageSize="300" EnableBigDataRowTip="false" EnableBigData="true"> diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs index 79cac443..da78c97d 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs @@ -141,6 +141,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage private Model.ResponeData AddDatasetToSQL(DataTable pds, int Cols) { Model.ResponeData responeData = new Model.ResponeData(); + List result = new List(); int ic, ir; ic = pds.Columns.Count; @@ -167,27 +168,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage string unitworkId = string.Empty; unitworkId = Request.Params["UnitWorkId"]; string PipeArea=string.Empty;//管线划分 1工厂预制 2现场施工 - //if (dv[i]["主项编号"] != null && !string.IsNullOrEmpty(dv[i]["主项编号"].ToString())) - //{ - // var unitWork = from x in Funs.DB.WBS_UnitWork where x.ProjectId == CurrUser.LoginProjectId && x.UnitWorkCode == dv[i]["主项编号"].ToString() && x.ProjectType == "2" select x; - // if (unitWork.Count() > 0) - // { - // unitworkId = unitWork.First().UnitWorkId; - // } - // else - // { - // errorInfos += (i + 2) + "Line, [主项编号] 不存在
"; - // } - - //} - //else - //{ - // errorInfos += (i + 2) + "Line, [主项编号] 不能为空
"; - //} if (dv[i]["管线号"] != null && !string.IsNullOrEmpty(dv[i]["管线号"].ToString())) { - var pipeline = from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == unitworkId && x.PipelineCode == dv[i]["管线号"].ToString() select x; + var pipeline = from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == unitworkId && x.PipelineCode == dv[i]["管线号"].ToString().Trim() select x; if (pipeline.Count() > 0) { item.PipelineId = pipeline.First().PipelineId; @@ -195,13 +179,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - errorInfos += (i + 2) + "Line,"+ dv[i]["管线号"].ToString() + " [管线号] 不存在
"; + // errorInfos += (i + 2) + "Line,"+ dv[i]["管线号"].ToString() + " [管线号] 不存在
"; + result.Add("不存在此管线号-" + dv[i]["管线号"].ToString()); + + } } else { - errorInfos += (i + 2) + "Line, [管线号] 不能为空
"; + //errorInfos += (i + 2) + "Line, [管线号] 不能为空
"; + result.Add((i + 2) + "Line, [管线号] 不能为空
"); } //if (dv[i]["管线划分"] != null && !string.IsNullOrEmpty(dv[i]["管线划分"].ToString())) //{ @@ -240,13 +228,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - errorInfos += (i + 2) + "Line," + dv[i]["材料编码"].ToString() + " [材料编码] 不存在
"; + //errorInfos += (i + 2) + "Line," + dv[i]["材料编码"].ToString() + " [材料编码] 不存在
"; + result.Add("不存在此材料编码-" + dv[i]["材料编码"].ToString()); + } } else { - errorInfos += (i + 2) + "Line, [材料编码] 不能为空
"; + //errorInfos += (i + 2) + "Line, [材料编码] 不能为空
"; + result.Add((i + 2) + "Line, [材料编码] 不能为空
"); } if (dv[i]["数量"] != null && !string.IsNullOrEmpty(dv[i]["数量"].ToString())) @@ -258,13 +249,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage } catch (Exception) { - errorInfos += "第" + (i + 2).ToString() + "行," + "数量格式输入有误
"; + //errorInfos += "第" + (i + 2).ToString() + "行," + "数量格式输入有误
"; + result.Add("第" + (i + 2).ToString() + "行," + "数量格式输入有误
"); } } else { - errorInfos += (i + 2) + "Line, [数量] 不能为空
"; + //errorInfos += (i + 2) + "Line, [数量] 不能为空
"; + result.Add((i + 2) + "Line, [数量] 不能为空
"); } if (PipeArea=="1") @@ -276,7 +269,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - errorInfos += (i + 2) + "Line, [预制组件] 不能为空
"; + result.Add((i + 2) + "Line, [预制组件] 不能为空
"); } } var model = matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode == item.MaterialCode && x.PrefabricatedComponents == item.PrefabricatedComponents); @@ -320,12 +313,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage responeData.message = "没有数据"; } - - if (!string.IsNullOrEmpty(errorInfos)) - { + if (result.Count > 0) + { + // result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = string.Join("|", result.Distinct()); + //Alert alert = new Alert(); + //alert.Message = result; + //alert.Target = Target.Self; + //alert.Show(); responeData.code = 0; responeData.message = errorInfos; } + return responeData; } #endregion