예제 #1
0
        public string GetCars()
        {
            string    result = "\"[";
            string    json   = JsonConvert.SerializeObject(this);
            DataTable dt     = new DataTable();

            dt = GlobFuncs.getCarsApis();
            foreach (DataRow row in dt.Rows)
            {
                string res = GetApi.PostApi(json, row["ApiAddress"].ToString() + "CarsBLL");
                if (res.Length > 0)
                {
                    res    = res.Replace("}", ",\\\"Company\\\":" + row["CompanyId"] + "\\r\\n  }");
                    res    = res.Substring(2, res.Length - 4) + ",";
                    result = result + res;
                }
            }
            result = result.Substring(0, result.Length - 1);
            result = result + "]\"";
            return(result);
        }