Ejemplo n.º 1
0
        public JsonResult update(string data)
        {
            RegFunc   rg = new RegFunc();
            DataTable dt = rg.ToDataTable(data);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DBHelper.ExecuteNonQuery("update LR_Demo_CPA2 set F_QueryPwd2  = '" + dt.Rows[i]["F_QueryPwd2"] + "' where F_CPAId = '" + dt.Rows[i]["F_CPAId"] + "'");
            }

            return(Json(null, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            DataTable  dt         = DBHelper.ExecuteSelect("select * from LR_Demo_CPA2");
            HttpClient httpClient = new HttpClient();
            RegFunc    rg         = new RegFunc();
            //访问阿里巴巴登录页
            string content = httpClient.GetResponse("", "https://passport.alibaba.com/mini_login.htm?lang=zh_cn&appName=youmeng&appEntrance=default&styleType=auto&bizParams=&notLoadSsoView=true&notKeepLogin=false&isMobile=false&cssLink=https://passport.umeng.com/css/loginIframe.css&rnd=0.11412324061518286", "", "");

            string modulus  = rg.GetStr(content, "name=\"modulus\"  value=\"", "\"");
            string exponent = rg.GetStr(content, "name=\"exponent\"  value=\"", "\" type");

            ViewBag.Data     = dt;
            ViewBag.Datajson = rg.DataTableToJson(dt).ToString();
            ViewBag.modulus  = modulus;
            ViewBag.exponent = exponent;

            return(View());
        }