Ejemplo n.º 1
0
        public static string GetJSONData(string sql, params object[] values)
        {
            try
            {
                WebFramework web = new WebFramework();
                DataTable    dt  = web.DataTableGetir(sql, values);
                if (Config.debug == true)
                {
                    FrameworkHandler.DebugLogger("SQL Execute: " + sql + " \nCount: " + dt.Rows.Count);
                }

                return(Utils.GetJson(dt));
            }
            catch (Exception hata)
            {
                if (Config.debug == true)
                {
                    FrameworkHandler.DebugLogger(hata.ToString());
                }
                return("Error: " + hata.Message);
            }
        }