Example #1
0
        public static string DataTable2Json(DataTable dt)
        {
            string result;

            if (dt != null && dt.Rows.Count > 0)
            {
                result = JSONConverter.DataTable2Json(dt.Rows.Count, true, "", "", dt);
            }
            else
            {
                result = "{success:false}";
            }
            return(result);
        }
Example #2
0
 public static string DataTable2Json(int totalCount, DataTable dt)
 {
     return(JSONConverter.DataTable2Json(totalCount, true, "", "", dt));
 }