示例#1
0
 protected void Btn_AddCId_Click(object sender, EventArgs e)
 {
     if (TaoBaoAPI.AddCID(HttpUtility.UrlDecode(Request.Cookies["nick"].Value), Request.Cookies["nicksession"].Value))
     {
         Page.RegisterStartupScript("恭喜", "<script>alert('添加成功!');</script>");
     }
     else
     {
         Page.RegisterStartupScript("抱歉", "<script>alert('添加失败!');</script>");
     }
 }
示例#2
0
    protected void Btn_AddCa_Click(object sender, EventArgs e)
    {
        string       nick = HttpUtility.UrlDecode(Request.Cookies["nick"].Value);
        TeteShopInfo info = new TeteShopService().GetShopInfo(Encrypt(nick));

        if (info == null)
        {
            Page.RegisterStartupScript("抱歉", "<script>alert('您还未购买!');</script>");
            return;
        }

        if (TaoBaoAPI.AddCID(nick, Request.Cookies["nicksession"].Value, info.Appkey, info.Appsecret, "http://iphone.7fshop.com/apkimg/" + nick + "_s.jpg"))
        {
            Page.RegisterStartupScript("恭喜", "<script>alert('添加成功!');</script>");

            Lbl_Over.Visible = true;
        }
        else
        {
            Page.RegisterStartupScript("抱歉", "<script>alert('添加失败!');</script>");
        }
    }