예제 #1
0
        public void CreateFriendFromFriendInvitation(Guid InvitationKey, Account InvitationTo)
        {
            FriendInvitation friendInvitation = _friendInvitationRepository.GetFriendInvitationByGUID(InvitationKey);

            friendInvitation.BecameAccoutnID = InvitationTo.AccountID;
            _friendInvitationRepository.SaveFriendInvitation(friendInvitation);
            _friendInvitationRepository.CleanUpFriendInvitationsForThisEmail(friendInvitation);

            Friend friend = new Friend();

            friend.AccountID         = friendInvitation.AccountID;
            friend.MyFriendAccountID = InvitationTo.AccountID;
            _friendRepository.SaveFriend(friend);

            //_friendRepository.GetFriend(InvitationTo);
        }
예제 #2
0
파일: Email.cs 프로젝트: ngocpq/MHX2
        //
        public void Send_Invitations(Account sender, Account invite)
        {
            _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
            FriendInvitation friendInvitation = new FriendInvitation();

            friendInvitation.AccountID       = sender.AccountID;
            friendInvitation.Email           = invite.Email;
            friendInvitation.GUID            = Guid.NewGuid();
            friendInvitation.BecameAccoutnID = invite.AccountID;
            _friendInvitationRepository.SaveFriendInvitation(friendInvitation);
        }
예제 #3
0
파일: Email.cs 프로젝트: ngocpq/MHX2
        //moi
        public void SendInvitations1(Account sender, string ToEmailArray, string ms)
        {
            _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
            FriendInvitation friendInvitation = new FriendInvitation();

            friendInvitation.AccountID       = sender.AccountID;
            friendInvitation.Email           = ToEmailArray;
            friendInvitation.GUID            = Guid.NewGuid();
            friendInvitation.BecameAccoutnID = 0;
            _friendInvitationRepository.SaveFriendInvitation(friendInvitation);
            SendFriendInvitation(ToEmailArray, sender.UserName, friendInvitation.GUID.ToString(), ms);
        }
예제 #4
0
파일: Email.cs 프로젝트: ngocpq/MHX2
        public string SendInvitations(Account sender, string ToEmailArray, string Message)
        {
            string resultMessage = Message;

            foreach (string s in ToEmailArray.Split(new char[] { ',', ';' }))
            {
                _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
                FriendInvitation friendInvitation = new FriendInvitation();
                friendInvitation.AccountID       = sender.AccountID;
                friendInvitation.Email           = s;
                friendInvitation.GUID            = Guid.NewGuid();
                friendInvitation.BecameAccoutnID = 0;
                _friendInvitationRepository.SaveFriendInvitation(friendInvitation);

                SendFriendInvitation(s, sender.UserName, friendInvitation.GUID.ToString(), Message);
                resultMessage += " - " + s + "<BR>";
            }
            return(resultMessage);
        }
예제 #5
0
파일: Email.cs 프로젝트: SPKT/MangXaHoi
        public string SendInvitations(Account sender, string ToEmailArray, string Message)
        {
            string resultMessage = Message;
            foreach (string s in ToEmailArray.Split(new char[] { ',', ';' }))
            {
                _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
                FriendInvitation friendInvitation = new FriendInvitation();
                friendInvitation.AccountID = sender.AccountID;
                friendInvitation.Email = s;
                friendInvitation.GUID = Guid.NewGuid();
                friendInvitation.BecameAccoutnID = 0;
                _friendInvitationRepository.SaveFriendInvitation(friendInvitation);

                SendFriendInvitation(s, sender.UserName, friendInvitation.GUID.ToString(), Message);
                resultMessage += " - " + s + "<BR>";
            }
            return resultMessage;
        }
예제 #6
0
파일: Email.cs 프로젝트: SPKT/MHX2
 //
 public void Send_Invitations(Account sender,Account invite)
 {
     _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
         FriendInvitation friendInvitation = new FriendInvitation();
         friendInvitation.AccountID = sender.AccountID;
         friendInvitation.Email = invite.Email;
         friendInvitation.GUID = Guid.NewGuid();
         friendInvitation.BecameAccoutnID = invite.AccountID;
         _friendInvitationRepository.SaveFriendInvitation(friendInvitation);
 }
예제 #7
0
파일: Email.cs 프로젝트: SPKT/MHX2
 //moi
 public void SendInvitations1(Account sender, string ToEmailArray,string ms)
 {
     _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
         FriendInvitation friendInvitation = new FriendInvitation();
         friendInvitation.AccountID = sender.AccountID;
         friendInvitation.Email = ToEmailArray;
         friendInvitation.GUID = Guid.NewGuid();
         friendInvitation.BecameAccoutnID = 0;
         _friendInvitationRepository.SaveFriendInvitation(friendInvitation);
         SendFriendInvitation(ToEmailArray, sender.UserName, friendInvitation.GUID.ToString(), ms);
 }