Exemple #1
0
        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);
            }
        }
Exemple #2
0
        //
        // 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);
            }
        }