Exemple #1
0
        private void btnRemoveRepresentative_Click(object sender, EventArgs e)
        {
            switch (_view.EffectiveContactDegree)
            {
            case PersonalContactDegree.Representative:
                _memberFriendsCommand.DeleteRepresentative(LoggedInUser.Id, ViewedMember.Id);
                break;

            case PersonalContactDegree.Representee:
                _memberFriendsCommand.DeleteRepresentative(ViewedMember.Id, LoggedInUser.Id);
                break;
            }

            NavigationManager.Redirect <ViewFriend>(FriendIdParameter, ViewedMember.Id.ToString());
        }
        private void btnRemoveRepresentative_Click(object sender, EventArgs e)
        {
            var representativeId = _memberContactsQuery.GetRepresentativeContact(LoggedInMember.Id);

            if (representativeId != null)
            {
                _memberFriendsCommand.DeleteRepresentative(LoggedInMember.Id, representativeId.Value);
            }
            phRepresentative.Visible = false;
        }