示例#1
0
 protected void LinkButton1_Click(object sender, EventArgs e)
 {
     QQWeiBo bo = new QQWeiBo();
     try
     {
         if (bo.AddFriend(this.openid, this.openkey, base.Request.UserHostAddress, "iamsnowsnow", AppEnum.Apps.venus))
         {
             this.Page.ClientScript.RegisterStartupScript(base.GetType(), "listen", "alert('收听成功!');", true);
             this.nofriend1.Style["display"] = "none";
             this.nofriend2.Style["display"] = "none";
             this.isfriend1.Style["display"] = "";
             this.isfriend2.Style["display"] = "";
         }
     }
     catch (Exception)
     {
     }
 }
示例#2
0
 protected void LinkButton1_Click(object sender, EventArgs e)
 {
     QQWeiBo bo = new QQWeiBo();
     try
     {
         if ((this.oauth2token == "") ? bo.AddFriend(this.openid, this.openkey, base.Request.UserHostAddress, "iamsnowsnow", AppEnum.Apps.astrodice) : bo.AddFriend(this.openid, this.oauth2token, base.Request.UserHostAddress, "iamsnowsnow", AppEnum.Apps.astrodice, true))
         {
             ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.UpdatePanel1.GetType(), "listen", "alert('收听成功!');", true);
             this.nofriend1.Style["display"] = "none";
             this.isfriend1.Style["display"] = "";
         }
     }
     catch (Exception)
     {
     }
 }