コード例 #1
0
        protected void btnPass_Onclick(object sender, EventArgs e)
        {
            oDs.ReadXml(HttpContext.Current.Request.PhysicalApplicationPath + @"\cint\responses.xml");

            RepeaterItem itemRepeater = (sender as Button).NamingContainer as RepeaterItem;
            string       SurveyId     = (itemRepeater.FindControl("SurveyId") as System.Web.UI.HtmlControls.HtmlGenericControl).InnerText;
            string       PanelistId   = (itemRepeater.FindControl("PanelistId") as System.Web.UI.HtmlControls.HtmlGenericControl).InnerText;



            double ParticipantAmount = 2.00;
            string MemberId          = "108195917";
            string Wallet            = "GCUFKDT2NOEOFCKJGYYJZ5W2IVNUQXS3KLMVQX24JJC4KU5RF33H3L4W";


            foreach (DataRow item in oDs.Tables[0].Rows)
            {
                if (item["ReferenceNumber"].ToString() == SurveyId && item["memberId"].ToString() == PanelistId)
                {
                    item["Pending"]   = "false";
                    item["Approved"]  = "true";
                    ParticipantAmount = Convert.ToDouble(item["Amount"]);
                    MemberId          = item["memberId"].ToString();
                }
            }

            oDs.WriteXml(HttpContext.Current.Request.PhysicalApplicationPath + @"\cint\responses.xml");



            if (MemberId == "1") // 108186073 - Memberid 1 - Miguel
            {
                Wallet = "GAVFAFSFV47TN7RLXBD3QBGYJM2PZCJUFOSYP3X6XG76BWR6H7IXVA3J";
            }
            else if (MemberId == "2") //108195917,   "member_id":"2", john
            {
                Wallet = "GCUFKDT2NOEOFCKJGYYJZ5W2IVNUQXS3KLMVQX24JJC4KU5RF33H3L4W";
            }
            else if (MemberId == "3") // // 108195918    ,"member_id":"3","first_name":"Jennifer","last_name":"Lopez",
            {
                Wallet = "GAPJJGKUAKHHFNRICNNINMJMW7TY25WMJC6CHLEXC7TWEBQPZUIOF4W7";
            }


            blockchainPqt cBlochchain = new blockchainPqt();

            System.Threading.Tasks.Task taskGetCoins = cBlochchain.SendPQTPayment("SB3T5X6LDL2VR3L57HY5CT5DNUY2NJT3QTLTIJZSQPA2P5AATJBLG7X7", Wallet, ParticipantAmount);
            taskGetCoins.Wait();


            QualityScore(MemberId, 1);

            Response.Redirect("validation.aspx");
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Validation"] != null)
            {
                if (Session["Validation"].ToString() == "false")
                {
                    double ParticipantAmount = 2.00;
                    string PanelistId        = "108195917";
                    string Wallet            = "GCUFKDT2NOEOFCKJGYYJZ5W2IVNUQXS3KLMVQX24JJC4KU5RF33H3L4W";

                    if (Session["ParticipantAmount"] != null)
                    {
                        ParticipantAmount = Convert.ToDouble(Session["ParticipantAmount"]);
                    }

                    if (Request["PanelistId"] != null)
                    {
                        PanelistId = Request["PanelistId"];
                    }


                    if (PanelistId == "108186073") // 108186073 - Memberid 1 - Miguel
                    {
                        Wallet = "GAVFAFSFV47TN7RLXBD3QBGYJM2PZCJUFOSYP3X6XG76BWR6H7IXVA3J";
                    }
                    else if (PanelistId == "108195917") //108195917,   "member_id":"2", john
                    {
                        Wallet = "GCUFKDT2NOEOFCKJGYYJZ5W2IVNUQXS3KLMVQX24JJC4KU5RF33H3L4W";
                    }
                    else if (PanelistId == "108195918") // // 108195918    ,"member_id":"3","first_name":"Jennifer","last_name":"Lopez",
                    {
                        Wallet = "GAPJJGKUAKHHFNRICNNINMJMW7TY25WMJC6CHLEXC7TWEBQPZUIOF4W7";
                    }


                    blockchainPqt cBlochchain = new blockchainPqt();
                    System.Threading.Tasks.Task taskGetCoins = cBlochchain.SendPQTPayment("SB3T5X6LDL2VR3L57HY5CT5DNUY2NJT3QTLTIJZSQPA2P5AATJBLG7X7", Wallet, ParticipantAmount);
                    taskGetCoins.Wait();


                    QualityScore(PanelistId, 1);
                }
            }
        }