public ActionResult GetTreeSelectJson() { var data = c_moduleApp.GetList(); var treeList = new List <TreeSelectModel>(); foreach (C_ModulesEntity item in data) { TreeSelectModel treeModel = new TreeSelectModel(); treeModel.id = item.F_Id; treeModel.text = item.F_FullName; treeModel.parentId = item.F_ParentId; treeList.Add(treeModel); } return(Content(treeList.TreeSelectJson())); }
private object GetModulesList() { C_ModulesApp moduleApp = new C_ModulesApp(); var data = moduleApp.GetList(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (C_ModulesEntity item in data) { var fieldItem = new { encode = item.F_ActionName, fullname = item.F_FullName }; dictionary.Add(item.F_Id, fieldItem); } return(dictionary); }