Beispiel #1
0
        public JsonResult PrivilegeList(FormCollection form)
        {
            string parentCode = form["parentCode"];
            string colkey     = form["colkey"];
            string colsinfo   = form["colsinfo"];

            if (string.IsNullOrEmpty(colkey))
            {
                throw new ArgumentNullException("colkey", "主键表示没有传递,请在前台js中配置");
            }
            if (string.IsNullOrEmpty(colsinfo))
            {
                throw new ArgumentNullException("colsinfo", "列信息不能为空,请在前台js中配置");
            }
            if (parentCode == "-1")
            {
                parentCode = null;
            }
            List <Privilege> list = sysManageService.QueryPrivilegeListByParentCode(parentCode);
            var data = JsonFlexiGridData.ConvertFromList(list, colkey, colsinfo.Split(','));

            return(Json(data));
        }