2023-04-07-001
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="450px" Title="管线列表" OnNodeCommand="tvControlItem_NodeCommand"
|
||||
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
|
||||
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
|
||||
AutoLeafIdentification="true" EnableTextSelection="true" Expanded="true">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
@@ -68,7 +69,6 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
ViewState["SelectedList"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 未被选择项列表
|
||||
/// </summary>
|
||||
@@ -83,6 +83,9 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
ViewState["NoSelectedList"] = value;
|
||||
}
|
||||
}
|
||||
public int pageSize = 20;
|
||||
|
||||
public List<TreeNode> TreeNodes=new List<TreeNode>();
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
@@ -129,29 +132,62 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
{
|
||||
iso = iso.Where(e => e.PipelineCode.Contains(this.txtIsono.Text.Trim()));
|
||||
}
|
||||
|
||||
iso = iso.OrderBy(x => x.PipelineCode);
|
||||
if (iso.Count() > 0)
|
||||
var q = (from x in iso
|
||||
select new
|
||||
{
|
||||
x.PipelineId,
|
||||
x.PipelineCode,
|
||||
jointcount = (from y in Funs.DB.HJGL_WeldJoint where y.PipelineId == x.PipelineId && y.IsHotProess == true select y).Count(),
|
||||
Trustcount = (from z in Funs.DB.HJGL_HotProess_TrustItem join m in Funs.DB.HJGL_WeldJoint on z.WeldJointId equals m.WeldJointId where m.PipelineId == x.PipelineId select z).Count(),
|
||||
}).ToList().Where(x=>x.jointcount>x.Trustcount).OrderBy(x=>x.PipelineCode);
|
||||
if (q.Count()>0)
|
||||
{
|
||||
foreach (var q in iso)
|
||||
foreach (var item in q)
|
||||
{
|
||||
var jots = from x in Funs.DB.HJGL_WeldJoint
|
||||
where x.PipelineId == q.PipelineId && x.IsHotProess == true
|
||||
select x;
|
||||
var hotItem = from x in Funs.DB.HJGL_HotProess_TrustItem
|
||||
join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||
where y.PipelineId == q.PipelineId
|
||||
select x;
|
||||
if (jots.Count() > hotItem.Count())
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.NodeID = q.PipelineId;
|
||||
newNode.Text = q.PipelineCode;
|
||||
newNode.EnableClickEvent = true;
|
||||
rootNode.Nodes.Add(newNode);
|
||||
}
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.Text = item.PipelineCode;
|
||||
newNode.EnableClickEvent = true;
|
||||
rootNode.Nodes.Add(newNode);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// iso = iso.OrderBy(x => x.PipelineCode);
|
||||
//if (iso.Count() > 0)
|
||||
//{
|
||||
// foreach (var q in iso)
|
||||
// {
|
||||
// var jots = (from x in Funs.DB.HJGL_WeldJoint
|
||||
// where x.PipelineId == q.PipelineId && x.IsHotProess == true
|
||||
// select x).Count();
|
||||
// var hotItem = (from x in Funs.DB.HJGL_HotProess_TrustItem
|
||||
// join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||
// where y.PipelineId == q.PipelineId
|
||||
// select x).Count();
|
||||
// if (jots> hotItem)
|
||||
// {
|
||||
// TreeNode newNode = new TreeNode();
|
||||
// newNode.NodeID = q.PipelineId;
|
||||
// newNode.Text = q.PipelineCode;
|
||||
// newNode.EnableClickEvent = true;
|
||||
// TreeNodes.Add(newNode);
|
||||
// //rootNode.Nodes.Add(newNode);
|
||||
// }
|
||||
// }
|
||||
// if (TreeNodes.Count>0)
|
||||
// {
|
||||
// rootNode.CommandName = 1 + "|" + Funs.GetEndPageNumber(TreeNodes.Count, pageSize);
|
||||
// rootNode.EnableClickEvent = true;
|
||||
// rootNode.EnableExpandEvent = true;
|
||||
// // BindNodes(tn1);
|
||||
// TreeNode newNode = new TreeNode();
|
||||
// newNode.Text = "加载管线...";
|
||||
// newNode.NodeID = "加载管线...";
|
||||
// rootNode.Nodes.Add(newNode);
|
||||
|
||||
// }
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -182,7 +218,10 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
SelectedList.Add(id);
|
||||
}
|
||||
this.BindGrid();
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 数据绑定
|
||||
|
||||
Reference in New Issue
Block a user