//获取管理员所管理的类型列表 public void GETXXFBCHILDRENMANAGE(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo) { List <SZHL_XXFBType> allTypeList = new SZHL_XXFBTypeB().GetEntities(d => d.ComId == UserInfo.User.ComId && d.IsDel == 0).ToList(); if (allTypeList.Count > 0) { string pIds = allTypeList.Select(d => d.PTypeID.Value).Distinct().ToList().ListTOString(','); string strSql = string.Format("SELECT * from SZHL_XXFBType where ','+TypeManager+',' like '%,{0},%'and Id not in ({1}) and ComId={2} and isDel=0 order by PTypeID", UserInfo.User.UserName, pIds, UserInfo.User.ComId); DataTable dtType = new SZHL_XXFBTypeB().GetDTByCommand(strSql); foreach (DataRow row in dtType.Rows) { string parentTypeName = allTypeList.Where(d => row["TypePath"].ToString().Split('-').Contains(d.ID.ToString())).OrderBy(d => d.ID).Select(d => d.TypeName).ToList <string>().ListTOString('-'); row["TypeName"] = parentTypeName + "-" + row["TypeName"]; } msg.Result = dtType; } }