public ActionResult GetTreeSelectJson() { var data = organizebll.GetModelList(""); var treeList = new List <TreeSelectModel>(); foreach (var item in data) { TreeSelectModel treeModel = new TreeSelectModel(); treeModel.id = item.F_Id; treeModel.text = item.F_FullName; treeModel.parentId = item.F_ParentId; treeModel.data = item; treeList.Add(treeModel); } return(Content(treeList.TreeSelectJson())); }
private object GetOrganizeList() { Sys_OrganizeBLL obll = new Sys_OrganizeBLL(); var data = obll.GetModelList(""); Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (var item in data) { var fieldItem = new { encode = item.F_EnCode, fullname = item.F_FullName }; dictionary.Add(item.F_Id, fieldItem); } return(dictionary); }