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 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(); }
protected void Follow_Click(object sender, CommandEventArgs e) { int personId = user.Id; int meId = ((UserBO)Session["user"]).Id; friendOperationBal.FriendOperation(personId, meId); bool IsFollow = friendOperationBal.GetFriendOperationControl(user.Id, ((UserBO)Session["user"]).Id); if (IsFollow == true) { FollowButton.Text = "UnFollow"; } else { FollowButton.Text = "Follow"; } FollowerListView.DataSource = userBal.GetFollowers(user.Id); FollowerListView.DataBind(); }