/// <summary> /// 获取用户权限列表树数据 /// </summary> /// <returns></returns> private List <FSTree> GetFunctionTreeFSTree() { var data = functionBLL.GetList(" StopFlag=0 ", " sortidx ASC,FunctionCode ASC "); List <FSTree> trees = new List <FSTree>(); if (data == null || data.Count <= 0) { return(trees); } foreach (var item in data) { FSTree tree = new FSTree(); tree.id = item.FunctionCode; tree.isParent = string.IsNullOrEmpty(item.ParentCode) ? "true" : "false"; tree.pId = item.ParentCode; tree.open = "true"; tree.name = item.FunctionChina; trees.Add(tree); } return(trees); }
/// <summary> /// 获取部门列表树数据 /// </summary> /// <returns></returns> private List <FSTree> GetDeptTreeFSTree() { var data = deptBLL.GetList(" StopFlag=0 "); List <FSTree> trees = new List <FSTree>(); if (data == null || data.Count <= 0) { return(trees); } foreach (var item in data) { FSTree tree = new FSTree(); tree.id = item.DeptCode; tree.isParent = string.IsNullOrEmpty(item.ParentCode) ? "true" : "false"; tree.pId = item.ParentCode; tree.open = "true"; tree.name = item.DeptName; trees.Add(tree); } return(trees); }