protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            var invitations = _memberFriendsQuery.GetFriendInvitations(_member.Id);

            _representativeInvitation = _memberFriendsQuery.GetRepresentativeInvitationByInviter(Member.Id);

            var contactIds = from i in invitations where i.InviteeId != null select i.InviteeId.Value;

            if (_representativeInvitation != null && _representativeInvitation.InviteeId != null)
            {
                contactIds = contactIds.Concat(new[] { _representativeInvitation.InviteeId.Value });
            }

            _views = _memberViewsQuery.GetPersonalViews(_member.Id, contactIds);

            rptSentInvitations.DataSource = invitations;
            rptSentInvitations.DataBind();

            if (invitations.Count == 0)
            {
                rptSentInvitations.Visible  = false;
                phNoSentInvitations.Visible = true;
                phSentInvitations.Visible   = false;
            }

            phSentRepresentativeInvitation.Visible = _representativeInvitation != null;
        }
Пример #2
0
 protected void AssertInvitation(Guid inviterId, Guid inviteeId, string message)
 {
     AssertInvitation(inviterId, inviteeId, message, _memberFriendsQuery.GetRepresentativeInvitation(inviterId, inviteeId));
     AssertInvitation(inviterId, inviteeId, message, _memberFriendsQuery.GetRepresentativeInvitationByInviter(inviterId));
 }