public List <WSUser> GetFriends() { if (Session["User"] == null) { return(null); } User user = (User)Session["User"]; return(UserListToWSUserList(BLL_Helper.UserListFromUsernameList(user.AcceptedFriends))); }
protected void Page_LoadComplete(object sender, EventArgs e) { UsernameLbl.Text = user.username; ProfilePicture.pictureName = user.picture; FriendRequests.DataSource = BLL_Helper.UserListFromUsernameList(user.UnopenedFriendRequests); FriendRequests.DataBind(); Friends.DataSource = BLL_Helper.UserListFromUsernameList(user.AcceptedFriends); Friends.DataBind(); GameInvites.DataSource = user.activeGameInvites; GameInvites.DataBind(); }
protected void Update() { room.UpdateRoom(); GameNameLbl.Text = room.gameName; if (room.status == GameStatus.AlreadyStarted) { Response.Redirect("~/Game.aspx"); } Players.DataSource = BLL_Helper.UserListFromUsernameList(room.users); Players.DataBind(); FriendsToInvite.DataSource = BLL_Helper.UserListFromUsernameList(user.AcceptedFriends); FriendsToInvite.DataBind(); }