Example #1
0
        public static int innn(string sqlbefore, string db, params SqlParameter[] pars)
        {
            string   info     = "innn";
            string   sql      = ToBase64String(doit(sqlbefore, "12345678876543211234567887654abc"));
            String   url      = "http://" + MyGlobal.ip + ":82/UserHandler.ashx?sql=" + sql + "&type=desktop&info=" + info + "&db=" + db + "&version=1";
            httputil httputil = new httputil();
            string   s        = httputil.getrrreturndata(url);

            return(int.Parse(s));
        }
Example #2
0
        public static object ExecuteScalar(string sqlbefore, string db, params SqlParameter[] pars)
        {
            string info = "ExecuteScalar";
            string sql  = ToBase64String(doit(sqlbefore, "12345678876543211234567887654abc"));
            String url  = "http://" + MyGlobal.ip + ":82/UserHandler.ashx?sql=" + sql + "&type=desktop&info=" + info + "&db=" + db + "&version=1";
            //String url = "http://localhost/WebApplication1/UserHandler.ashx?sql=" + sql + "&type=desktop&info=" + info + "&db=" + db;
            httputil httputil = new httputil();
            string   s        = httputil.getrrreturndata(url);

            return(s);
        }
Example #3
0
        public static DataTable getdata(string sqlbefore, string db, params SqlParameter[] pars)
        {
            string info = "getdata";
            string sql  = ToBase64String(doit(sqlbefore, "12345678876543211234567887654abc"));
            String url  = "http://" + MyGlobal.ip + ":82/UserHandler.ashx?sql=" + sql + "&type=desktop&info=" + info + "&db=" + db + "&version=1";
            //String url = "http://localhost/WebApplication1/UserHandler.ashx?sql=" + sql + "&type=desktop&info=" + info + "&db=" + db + "&version=1";
            httputil     httputil = new httputil();
            string       s        = httputil.getrrreturndata(url);
            StringReader sr       = new StringReader(s);
            DataSet      ds       = new DataSet();

            ds.ReadXml(sr);
            DataTable dt = new DataTable();

            if (ds.Tables.Count == 0)
            {
            }
            else
            {
                dt = ds.Tables[0];
            }

            return(dt);
        }