|
|
|
|
|
|
72
|
|
72
|
|
|
73
|
DataTable dt = new DataTable();
|
73
|
DataTable dt = new DataTable();
|
|
74
|
dt = new BLL.T_Sys_Department ().GetList(" 1=1 and F_IsDept =1 and F_State = 0 and F_PartentId=155", "F_Sort ").Tables[0];
|
74
|
dt = new BLL.T_Sys_Department ().GetList(" 1=1 and F_IsDept =1 and F_State = 0 and F_PartentId=155", "F_Sort ").Tables[0];
|
|
75
|
- string sqltest = " with cte(F_DeptId ,F_DeptName ,F_PartentId ,F_Layer,F_State,F_IsDept) as (select F_DeptId, F_DeptName, F_PartentId, F_Layer, F_State, F_IsDept from T_Sys_Department where F_IsDept =1 and F_State = 0 and F_PartentId=155 UNION all select t.F_DeptId, t.F_DeptName,t.F_PartentId,t.F_Layer,t.F_State,t.F_IsDept from T_Sys_Department as t inner join cte as c on c.F_DeptId = t.F_PartentId )select * from cte ";
|
|
|
|
|
|
75
|
+ string sqltest = " with cte(F_DeptId ,F_DeptName ,F_PartentId ,F_Layer,F_State,F_IsDept) as (select F_DeptId, F_DeptName, F_PartentId, F_Layer, F_State, F_IsDept from T_Sys_Department where F_IsDept =1 and F_State = 0 and F_PartentId=155 UNION all select t.F_DeptId, t.F_DeptName,t.F_PartentId,t.F_Layer,t.F_State,t.F_IsDept from T_Sys_Department as t inner join cte as c on c.F_DeptId = t.F_PartentId )select * from cte ";
|
|
76
|
var tab2 = DbHelperSQL.Query(sqltest).Tables[0];
|
76
|
var tab2 = DbHelperSQL.Query(sqltest).Tables[0];
|
|
77
|
List<TreeModelNew> modelList = BindTreeNew(dt, "0", tab2);
|
77
|
List<TreeModelNew> modelList = BindTreeNew(dt, "0", tab2);
|
|
78
|
|
78
|
|