public ActionResult GetTreeSelectJson() { var data = ibll.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; treeList.Add(treeModel); } return(Content(treeList.TreeSelectJson())); }
private object GetDataItemList() { Sys_ItemsBLL ibll = new Sys_ItemsBLL(); Sys_ItemsDetailBLL idbll = new Sys_ItemsDetailBLL(); var itemdata = ibll.GetModelList(""); Dictionary <string, object> dictionaryItem = new Dictionary <string, object>(); foreach (var item in itemdata) { var dataItemList = idbll.GetModelList("F_ItemId='" + item.F_Id + "'"); Dictionary <string, string> dictionaryItemList = new Dictionary <string, string>(); foreach (var itemList in dataItemList) { dictionaryItemList.Add(itemList.F_ItemCode, itemList.F_ItemName); } dictionaryItem.Add(item.F_EnCode, dictionaryItemList); } return(dictionaryItem); }