private object GetDictItemList() { var itemdata = _dictItemService.GetList(); Dictionary <string, object> dictionaryItem = new Dictionary <string, object>(); foreach (var item in new DictService().GetList()) { var dataItemList = itemdata.FindAll(t => t.DictId.Equals(item.Id)); Dictionary <string, string> dictionaryItemList = new Dictionary <string, string>(); foreach (var itemList in dataItemList) { dictionaryItemList.Add(itemList.ItemCode, itemList.ItemName); } dictionaryItem.Add(item.EnCode, dictionaryItemList); } return(dictionaryItem); }
public ActionResult GetGridJson(long dictId, string keyword) { var data = dictItemService.GetList(dictId, keyword); return Content(data.ToJson()); }