public void GetDataByiddata(string id, string data, string callback) { var dal = new iDataDAL(); var product = dal.insertUser(id, data); var userdata = JsonConvert.SerializeObject(product); if (string.IsNullOrEmpty(callback)) { Response.Write(userdata); } else { var result = callback + "(" + userdata + ")"; Response.Write(result); } }
// // GET: /iData/ public void GetIDataAll(string callback) { var dal = new iDataDAL(); var products = dal.getall(); var userdata = JsonConvert.SerializeObject(products); if (string.IsNullOrEmpty(callback)) { Response.Write(userdata); } else { var result = callback + "(" + userdata + ")"; Response.Write(result); } }