private object GetDutyList()
        {
            DutyService _dutyService = new DutyService();
            var         data         = _dutyService.GetList();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            foreach (RoleBaseEntity item in data)
            {
                var fieldItem = new
                {
                    encode   = item.F_EnCode,
                    fullname = item.F_FullName
                };
                dictionary.Add(item.F_Id, fieldItem);
            }
            return(dictionary);
        }
Beispiel #2
0
        private object GetDutyList()
        {
            DutyService dutyService = new DutyService();
            var         data        = dutyService.GetList();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            foreach (DutyGridDto item in data)
            {
                var fieldItem = new
                {
                    encode   = item.EnCode,
                    fullname = item.FullName
                };
                dictionary.Add(item.Id, fieldItem);
            }
            return(dictionary);
        }
Beispiel #3
0
        public ActionResult GetGridJson(string keyword)
        {
            var data = _dutyService.GetList(keyword);

            return(Content(data.ToJson()));
        }
        public async Task <IActionResult> GetGridJson(string keyword)
        {
            var data = await dutyApp.GetList(keyword);

            return(Content(data.ToJson()));
        }