Beispiel #1
0
        public JsonResult RoleInfoList(FormCollection form)
        {
            string colkey      = form["colkey"];
            string colsinfo    = form["colsinfo"];
            string strparentId = form["ParentID"];
            int?   parentId    = null;

            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 <RoleInfo> list = sysManageService.QueryRoleList(parentId, base.UserId);
            var             data = JsonFlexiGridData.ConvertFromList(list, colkey, colsinfo.Split(','));

            return(Json(data));
        }