Exemplo n.º 1
0
        public ActionResult GetGridJson(string keyword)
        {
            var data = dutyApp.GetList();

            if (keyword != null && keyword != "")
            {
                data = data.Where(c => c.F_FullName.Contains(keyword)).ToList();
            }
            return(Content(data.ToJson()));
        }
Exemplo n.º 2
0
        private object GetDutyList()
        {
            Sys_DutyBLL dutyApp = new Sys_DutyBLL();
            var         data    = dutyApp.GetList();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            foreach (Sys_Role item in data)
            {
                var fieldItem = new
                {
                    encode   = item.F_EnCode,
                    fullname = item.F_FullName
                };
                dictionary.Add(item.F_Id, fieldItem);
            }
            return(dictionary);
        }