public ActionResult GetTreeSelectJson() { var data = organizeService.GetList(); var treeList = new List <TreeSelectModel>(); foreach (OrganizeGridDto item in data) { TreeSelectModel treeModel = new TreeSelectModel(); treeModel.id = item.Id; treeModel.text = item.FullName; treeModel.parentId = item.ParentId; treeModel.data = item; treeList.Add(treeModel); } return(Content(treeList.TreeSelectJson())); }
public async Task <ActionResult> GetTreeSelectJson() { var data = await organizeApp.GetList(this.TenantId); var treeList = new List <TreeSelectModel>(); foreach (OrganizeEntity item in data) { TreeSelectModel treeModel = new TreeSelectModel(); treeModel.id = item.Id; treeModel.text = item.FullName; treeModel.parentId = item.ParentId; treeModel.data = item; treeList.Add(treeModel); } return(Content(treeList.TreeSelectJson())); }
public ActionResult Index(int pageIndex, int pageSize, string keyWord) { var pageData = OrganizeService.GetList(pageIndex, pageSize, keyWord); var result = new LayPadding <Sys_Organize>() { Result = true, Msg = "success", List = pageData.Items, Count = pageData.TotalItems }; return(Content(result.ToJson())); }
public ActionResult GetListTreeSelect() { var data = OrganizeService.GetList(); var treeList = new List <TreeSelect>(); foreach (Sys_Organize item in data) { TreeSelect model = new TreeSelect(); model.id = item.Id; model.text = item.SOFullName; model.parentId = item.SOParentId; treeList.Add(model); } return(Content(treeList.ToTreeSelectJson())); }
private object GetOrganizeList() { var data = _organizeService.GetList(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (OrganizeGridDto item in data) { var fieldItem = new { encode = item.EnCode, fullname = item.FullName }; dictionary.Add(item.Id.ToString(), fieldItem); } return(dictionary); }
private object GetOrganizeList() { OrganizeService _organizeService = new OrganizeService(); var data = _organizeService.GetList(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (OrganizeBaseEntity item in data) { var fieldItem = new { encode = item.F_EnCode, fullname = item.F_FullName }; dictionary.Add(item.F_Id, fieldItem); } return(dictionary); }