没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
parents = list.Where(p => p.ParentId == 0 || p.ParentId == null).ToList();
childrens = list.Where(p => p.ParentId > 0).ToList();
foreach (var model in parents)
{
EquTypeTree pt = new EquTypeTree();
pt.title = model.EName;
pt.isLeaf = false;
pt.expanded = true;
pt.key = model.IId;
pt.ParentId = model.ParentId;
result.Add(pt);
AddMenu(childrens, pt, model.IId);
}
public BaseResultT<EquTypeCKTree> CKTree()
{
BaseResultT<EquTypeCKTree> fResult = new BaseResultT<EquTypeCKTree>();
fResult.DataContent = new List<EquTypeCKTree>();
List<EquTypeCKTree> result = new List<EquTypeCKTree>();
var list = db.Equ_Type.Where(p => p.Status == 1).ToList();
List<Equ_Type> parents = new List<Equ_Type>();
List<Equ_Type> childrens = new List<Equ_Type>();
parents = list.Where(p => p.ParentId == 0 || p.ParentId == null).ToList();
childrens = list.Where(p => p.ParentId > 0).ToList();
foreach (var model in parents)
{
EquTypeCKTree pt = new EquTypeCKTree();
pt.label = model.EName;
pt.Prefix = model.Prefix1;
childrens = list.Where(p => p.ParentId > 0).ToList();
foreach (var model in parents)
{
EquTypeTree pt = new EquTypeTree();
pt.title = model.EName;
pt.isLeaf = false;
pt.expanded = true;
pt.key = model.IId;
pt.ParentId = model.ParentId;
result.Add(pt);
AddMenu(childrens, pt, model.IId);
}
public BaseResultT<EquTypeCKTree> CKTree()
{
BaseResultT<EquTypeCKTree> fResult = new BaseResultT<EquTypeCKTree>();
fResult.DataContent = new List<EquTypeCKTree>();
List<EquTypeCKTree> result = new List<EquTypeCKTree>();
var list = db.Equ_Type.Where(p => p.Status == 1).ToList();
List<Equ_Type> parents = new List<Equ_Type>();
List<Equ_Type> childrens = new List<Equ_Type>();
parents = list.Where(p => p.ParentId == 0 || p.ParentId == null).ToList();
childrens = list.Where(p => p.ParentId > 0).ToList();
foreach (var model in parents)
{
EquTypeCKTree pt = new EquTypeCKTree();
pt.label = model.EName;
pt.Prefix = model.Prefix1;
资源评论
longbin891012
- 粉丝: 5
- 资源: 62
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功