Beispiel #1
0
        public string GetMenuFirst()
        {
            string res     = null;
            string sql     = @"select Module_ID,Module_Name from Module where Type='1' and Module_Level='1'";
            string tabjson = DbHelperSQL.DataTableConvertJson(sql, out int count);

            if (tabjson != null && tabjson != "")
            {
                res = "{\"code\":\"0\",\"msg\":\"成功\",\"count\":\"" + count + "\",\"data\":" + tabjson + "}";
            }
            else
            {
                res = "{\"code\":\"1\",\"msg\":\"失败\",\"data\":[]}";
            }
            return(res);
        }