protected void atiFollow_Click(object sender, EventArgs e)
        {
            try
            {
                Affine.WebService.StreamService ss = new WebService.StreamService();
                if (base.Following) // this is an unfollow then
                {
                    ss.UnFollowUser(this.UserId, this.PortalId, this.ProfileSettings.UserKey);
                    litStatus.Text = "You are <em>No longer following " + this.ProfileSettings.UserName + "</em>";
                    base.Following = false;
                }
                else  // we want to follow this user
                {
                    ss.FollowUser(this.UserId, this.PortalId, this.ProfileSettings.UserKey);
                    litStatus.Text = "You are now <em>following " + this.ProfileSettings.UserName + "</em>";
                    base.Following = true;
                }
                atiFollow.Text = base.Following ? "Unfollow " : "Follow " + ProfileSettings.UserName;

            }
            catch (Exception)
            {
                litStatus.Text = "There was an <em>Error</em> with the operation.  Please contact support.";
            }
        }
예제 #2
0
        private void SetupPageFollowMode()
        {
            WebService.StreamService streamService = new WebService.StreamService();
            if (Request["c"] != null)
            {
                streamService.FollowUser(this.UserSettings.Id, Convert.ToInt64(Request["c"]));
            }
            UserSettings settings = ProfileSettings != null ? ProfileSettings : UserSettings;

            if (!(settings is Group))
            {
                string json = streamService.getFriendListData(settings.UserKey, this.PortalId, Affine.Utils.ConstsUtil.FriendListModes.FOLLOWING, 0, 25);
                ScriptManager.RegisterStartupScript(this, Page.GetType(), "FollowingList", "$(function(){ Aqufit.Page.atiFollowingList.generateStreamDom('" + json + "'); });", true);

                json = streamService.getFriendListData(settings.UserKey, this.PortalId, Affine.Utils.ConstsUtil.FriendListModes.FOLLOWERS, 0, 25);
                ScriptManager.RegisterStartupScript(this, Page.GetType(), "FollowerList", "$(function(){ Aqufit.Page.atiFollowerList.generateStreamDom('" + json + "'); });", true);
            }
        }
예제 #3
0
 protected void atiFollow_Click(object sender, EventArgs e)
 {
     try
     {
         Affine.WebService.StreamService ss = new WebService.StreamService();
         if (base.Following) // this is an unfollow then
         {
             ss.UnFollowUser(this.UserId, this.PortalId, this.ProfileSettings.UserKey);
             litStatus.Text = "You are <em>No longer following " + this.ProfileSettings.UserName + "</em>";
             base.Following = false;
         }
         else  // we want to follow this user
         {
             ss.FollowUser(this.UserId, this.PortalId, this.ProfileSettings.UserKey);
             litStatus.Text = "You are now <em>following " + this.ProfileSettings.UserName + "</em>";
             base.Following = true;
         }
         atiFollow.Text = base.Following ? "Unfollow " : "Follow " + ProfileSettings.UserName;
     }
     catch (Exception)
     {
         litStatus.Text = "There was an <em>Error</em> with the operation.  Please contact support.";
     }
 }
예제 #4
0
        private void SetupPageFollowMode()
        {
            WebService.StreamService streamService = new WebService.StreamService();
            if (Request["c"] != null)
            {
                streamService.FollowUser(this.UserSettings.Id, Convert.ToInt64(Request["c"]));
            }
            UserSettings settings = ProfileSettings != null ? ProfileSettings : UserSettings;
            if (!(settings is Group))
            {
                string json = streamService.getFriendListData(settings.UserKey, this.PortalId, Affine.Utils.ConstsUtil.FriendListModes.FOLLOWING, 0, 25);
                ScriptManager.RegisterStartupScript(this, Page.GetType(), "FollowingList", "$(function(){ Aqufit.Page.atiFollowingList.generateStreamDom('" + json + "'); });", true);

                json = streamService.getFriendListData(settings.UserKey, this.PortalId, Affine.Utils.ConstsUtil.FriendListModes.FOLLOWERS, 0, 25);
                ScriptManager.RegisterStartupScript(this, Page.GetType(), "FollowerList", "$(function(){ Aqufit.Page.atiFollowerList.generateStreamDom('" + json + "'); });", true);
            }
        }