2023-02-16 焊接修改
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>焊口信息</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.customlabel span {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -67,7 +73,9 @@
|
||||
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="txtMaterialCode_TextChanged"
|
||||
Width="240px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Label ID="lbSinglePreRate" runat="server" Text="图纸预制率" Hidden="true"></f:Label>
|
||||
<f:Label ID="lbSinglePreRate" CssClass="customlabel" runat="server" Label="图纸预制率"></f:Label>
|
||||
<f:Label ID="lbShopSize" CssClass="customlabel" runat="server" Label="预制口达因"></f:Label>
|
||||
<f:Label ID="lbFiledSize" CssClass="customlabel" runat="server" Label="安装口达因"></f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<%--<f:Button ID="btnSelectColumn" Text="选择显示列" Icon="ShapesManySelect"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Apache.NMS.ActiveMQ.Threads;
|
||||
using BLL;
|
||||
using FineUIPro.Web.ProjectData;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -15,8 +16,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class WeldJointList : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
public static List<Model.HJGL_WeldJoint> WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
/// <summary>
|
||||
/// 预制口总达因
|
||||
/// </summary>
|
||||
public static string ShopSumSize = "0";
|
||||
/// <summary>
|
||||
/// 安装口总达因
|
||||
/// </summary>
|
||||
public static string FieldSumSize = "0";
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -107,8 +116,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
tn1.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn1.CommandName = "单位工程";
|
||||
tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn1.EnableExpandEvent = true;
|
||||
tn1.EnableClickEvent = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -124,18 +134,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
{
|
||||
tn2.Expanded = true;
|
||||
}
|
||||
//if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
//{
|
||||
// tn2.Expanded = true;
|
||||
//}
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent= true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -150,65 +163,46 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 暂不有
|
||||
#region
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
//List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
|
||||
//var pipelines = from x in Funs.DB.HJGL_Pipeline select x;
|
||||
//pipeline = (from x in pipelines
|
||||
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
// && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
// orderby x.PipelineCode
|
||||
// select x).ToList();
|
||||
//foreach (var item in pipeline)
|
||||
//{
|
||||
// var jotCount = (from x in Funs.DB.HJGL_WeldJoint 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 = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
// }
|
||||
// newNode.ToolTip = "管线号【焊口数】";
|
||||
// newNode.NodeID = item.PipelineId;
|
||||
// newNode.EnableClickEvent = true;
|
||||
// node.Nodes.Add(newNode);
|
||||
//}
|
||||
BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), this.CurrUser.LoginProjectId,pageSize);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
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 Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
|
||||
// var WeldJointlist = (from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == e.Node.NodeID && x.IsTwoJoint == null select x).ToList();
|
||||
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
//var jotCount = WeldJointlist.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
var jotCount = hJGL_WeldJoints.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
}
|
||||
|
||||
e.Node.Nodes.Clear();
|
||||
BindNodes(e.Node);
|
||||
}
|
||||
|
||||
//e.Node.Nodes.Clear();
|
||||
|
||||
//if (e.Node.CommandName == "单位工程")
|
||||
//{
|
||||
// var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
// orderby x.PipelineCode
|
||||
// select x).ToList();
|
||||
// var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
|
||||
// // var WeldJointlist = (from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == e.Node.NodeID && x.IsTwoJoint == null select x).ToList();
|
||||
|
||||
// foreach (var item in pipeline)
|
||||
// {
|
||||
// //var jotCount = WeldJointlist.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
// var jotCount = hJGL_WeldJoints.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
// TreeNode newNode = new TreeNode();
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
// newNode.NodeID = item.PipelineId;
|
||||
// newNode.EnableClickEvent = true;
|
||||
// e.Node.Nodes.Add(newNode);
|
||||
|
||||
// }
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
@@ -220,23 +214,40 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
if (e.CommandName == "加载")
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid3(this.tvControlItem.SelectedNodeID);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
}
|
||||
|
||||
string CommandName = e.Node.ParentNode.CommandName;
|
||||
e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]);
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
BindNodes(e.Node.ParentNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid3(this.tvControlItem.SelectedNodeID);
|
||||
this.lbSinglePreRate.Text = GetRateByPipelineid(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
this.lbSinglePreRate.Text = GetRateByUnitWork(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
}
|
||||
this.lbShopSize.Text = ShopSumSize;
|
||||
this.lbFiledSize.Text = FieldSumSize;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -379,11 +390,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 预制率计算
|
||||
private string GetRateByUnitWork(string unitworkid)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q=from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x ;
|
||||
string rate = "";
|
||||
ShopSumSize = "0";
|
||||
FieldSumSize = "0";
|
||||
if (q!=null&&q.Count()>0)
|
||||
{
|
||||
var proSum = (from x in q
|
||||
@@ -393,32 +408,78 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
|
||||
var FieldSum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
group x by x.UnitWorkId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
var AllSum = (from x in q
|
||||
group x by x.UnitWorkId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
var a = (decimal)100 * proSum / AllSum;
|
||||
var rate = Math.Round((decimal)a, 1);
|
||||
return rate.ToString()+"%";
|
||||
proSum = (proSum != null) ? proSum : 0;
|
||||
FieldSum = (FieldSum != null) ? FieldSum : 0;
|
||||
ShopSumSize = proSum.ToString() ;
|
||||
FieldSumSize = FieldSum.ToString() ;
|
||||
if (AllSum>0)
|
||||
{
|
||||
var a = (decimal)100 * proSum / AllSum;
|
||||
rate = Math.Round((decimal)a, 1).ToString()+"%";
|
||||
}
|
||||
|
||||
return rate;
|
||||
}
|
||||
return "";
|
||||
return "0%";
|
||||
}
|
||||
void GetRateByPipelineid(string pipelineid)
|
||||
private string GetRateByPipelineid(string pipelineid)
|
||||
{
|
||||
string rate = "";
|
||||
ShopSumSize = "0";
|
||||
FieldSumSize = "0";
|
||||
var db = Funs.DB;
|
||||
var q = (from x in db.View_HJGL_WeldJoint
|
||||
group x by x.PipelineId into g
|
||||
where g.Key == pipelineid
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
|
||||
var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x;
|
||||
if (q != null && q.Count() > 0)
|
||||
{
|
||||
var proSum = (from x in q
|
||||
where x.JointAttribute == "预制口"
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
var FieldSum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
var AllSum = (from x in q
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
proSum = (proSum != null) ? proSum : 0;
|
||||
FieldSum = (FieldSum != null) ? FieldSum : 0;
|
||||
ShopSumSize = proSum.ToString();
|
||||
FieldSumSize = FieldSum.ToString();
|
||||
if (AllSum > 0)
|
||||
{
|
||||
var a = (decimal)100 * proSum / AllSum;
|
||||
rate = Math.Round((decimal)a, 1).ToString() + "%";
|
||||
}
|
||||
|
||||
return rate;
|
||||
}
|
||||
return "0%";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 焊口信息 维护事件
|
||||
/// <summary>
|
||||
/// Grid双击事件
|
||||
|
||||
@@ -149,6 +149,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbSinglePreRate;
|
||||
|
||||
/// <summary>
|
||||
/// lbShopSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbShopSize;
|
||||
|
||||
/// <summary>
|
||||
/// lbFiledSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbFiledSize;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -105,6 +105,10 @@
|
||||
DataField="Dia" SortField="Dia" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="公称直径" ColumnID="DNDia"
|
||||
DataField="DNDia" SortField="DNDia" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="壁厚" ColumnID="Thickness"
|
||||
DataField="Thickness" SortField="Thickness" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
|
||||
@@ -9,6 +9,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class WeldingConDate : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
@@ -77,8 +79,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
tn1.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn1.CommandName = "单位工程";
|
||||
tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn1.EnableExpandEvent = true;
|
||||
tn1.EnableClickEvent = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -94,18 +97,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
{
|
||||
tn2.Expanded = true;
|
||||
}
|
||||
//if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
//{
|
||||
// tn2.Expanded = true;
|
||||
//}
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent = true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -121,40 +126,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
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 Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
|
||||
&& x.PipelineCode.Contains(txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in 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();
|
||||
|
||||
//if (jotCount > weldJotCount)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
//}
|
||||
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
}
|
||||
e.Node.Nodes.Clear();
|
||||
BindNodes(e.Node);
|
||||
}
|
||||
|
||||
}
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
BLL.PipelineService.BindTreeNodes(node, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void btnTreeFind_Click(object sender, EventArgs e)
|
||||
@@ -170,16 +152,28 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
if (e.CommandName == "加载")
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
string CommandName = e.Node.ParentNode.CommandName;
|
||||
e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]);
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
BindNodes(e.Node.ParentNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid();
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -188,7 +182,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
string strSql = @"SELECT WeldJointId,WeldJointCode,PipelineId,PipelineCode,JointAttribute,
|
||||
IsWelding,IsHotProessStr,Material1Code,Material2Code,WeldTypeCode,
|
||||
Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
|
||||
Specification,HeartNo1,HeartNo2,Size,Dia,DNDia,Thickness,GrooveTypeCode,
|
||||
WeldingMethodCode,WeldingWireCode,WeldingRodCode,WeldingDate,WeldingDailyCode,
|
||||
BackingWelderCode,CoverWelderCode,MediumCode ,PreTemperature,JointArea,WPQCode,Remark
|
||||
FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL ";
|
||||
|
||||
Reference in New Issue
Block a user