public ActionResult GetTreeSelectJson() { var data = platformApp.GetList(); var treeList = new List <TreeSelectModel>(); foreach (PlatformEntity item in data) { TreeSelectModel treeModel = new TreeSelectModel(); treeModel.id = item.F_Id; treeModel.text = item.PlatformCnName; //treeModel.parentId = item.SupplierId; treeModel.data = item; treeList.Add(treeModel); } return(Content(treeList.TreeSelectJson())); }
private object GetPlatformList() { PlatformApp platformApp = new PlatformApp(); var data = platformApp.GetList(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (PlatformEntity item in data) { var fieldItem = new { encode = item.PlatformCode, fullname = item.PlatformEnName }; dictionary.Add(item.F_Id, fieldItem); } return(dictionary); }