public JsonResult GetTypeTreeTop() { var mainTypeTree = CommonHelper.GetMainTypeTopTree(); var easyuiTree = EasyUIHelper.GetTreeJson(mainTypeTree); return(Json(easyuiTree, false)); }
public JsonResult GetTree() { var departList = UnitOfWork.Get <MF_Department>().ToDicList().ToList(); string topId = CommonStr.MainTypeTreeRootID; string topName = ConfigurationManager.AppSettings["AppTitle"]; foreach (var depart in departList) { if (string.IsNullOrEmpty(depart.GetValue("ParentId"))) { depart.SetValue("ParentId", topId); } depart.SetValue("Text", depart.GetValue("Name")); } var topDic = (new MF_Department()).ToDictionary(); topDic.SetValue("Id", topId); topDic.SetValue("Text", topName); topDic.SetValue("ParentId", ""); departList.Insert(0, topDic); return(Json(EasyUIHelper.GetTreeJson(departList), false)); }
public JsonResult GetFuncTreeJson() { var res = UnitOfWork.Get <MF_Func>(); return(Json(EasyUIHelper.GetTreeJson(res))); }