Exemplo n.º 1
0
        public JsonResult DictInfoList(FormCollection form)
        {
            string colkey      = form["colkey"];
            string colsinfo    = form["colsinfo"];
            string strparentId = form["ParentID"];
            int    parentId    = 0;

            if (!string.IsNullOrEmpty(strparentId))
            {
                parentId = Convert.ToInt32(strparentId);
            }
            if (string.IsNullOrEmpty(colkey))
            {
                throw new ArgumentNullException("colkey", "主键表示没有传递,请在前台js中配置");
            }
            if (string.IsNullOrEmpty(colsinfo))
            {
                throw new ArgumentNullException("colsinfo", "列信息不能为空,请在前台js中配置");
            }
            List <DictInfo> list = sysManageService.QueryDictInfoList(parentId);
            var             data = JsonFlexiGridData.ConvertFromList(list, colkey, colsinfo.Split(','));

            return(Json(data));
        }