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); }
// 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); }
//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); }
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); }
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; }
// 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); }
//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); }