Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user            = userBal.GetPersonInformation(PersonId);
            Name.InnerText  = user.Name;
            Email.InnerText = user.Email;

            bool IsFollow = friendOperationBal.GetFriendOperationControl(user.Id, ((UserBO)Session["user"]).Id);

            if (IsFollow == true)
            {
                FollowButton.Text = "UnFollow";
            }
            else
            {
                FollowButton.Text = "Follow";
            }

            EventsListView.DataSource = eventBal.GetUserEvents(user.Id);
            EventsListView.DataBind();

            FollowerListView.DataSource = userBal.GetFollowers(user.Id);
            FollowerListView.DataBind();

            FollowingListView.DataSource = userBal.GetFollowing(user.Id);
            FollowingListView.DataBind();
        }
        protected void FollowingClick(object sender, CommandEventArgs e)
        {
            int id = int.Parse((string)e.CommandArgument);

            var response = friendOperationBal.FriendOperation(id, user.Id);

            if (response.IsSuccess == true)
            {
                FollowingListView.DataSource = userBal.GetFollowing(user.Id);
                FollowingListView.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            user            = (UserBO)Session["user"];
            Name.InnerText  = user.Name;
            Email.InnerText = user.Email;

            EventsListView.DataSource = eventBal.GetUserEvents(user.Id);
            EventsListView.DataBind();

            FollowerListView.DataSource = userBal.GetFollowers(user.Id);
            FollowerListView.DataBind();

            FollowingListView.DataSource = userBal.GetFollowing(user.Id);
            FollowingListView.DataBind();
        }