/// <summary> /// Initialises new instance of <see cref="InviteFriendsController"></see> /// </summary> /// <param name="iFriendInvitationRepository">Friend Repository</param> /// <param name="mailer">Mailer</param> /// <param name="encDecryption">Encrypt and Decryptor</param> public InviteFriendsController(IFriendInvitationRepository iFriendInvitationRepository, IMailer mailer, IDataMorpher encDecryption, IUserSession userSession) { this.iFriendInvitationRepository = iFriendInvitationRepository; this.mailer = mailer; this.encDecryption = encDecryption; this.userSession = userSession; }
public BoxFriendPresenter() { _friendRepository = new SPKTCore.Core.DataAccess.Impl.FriendRepository(); _userSession = new SPKTCore.Core.Impl.UserSession(); _friendService = new FriendService(); _friendInvite = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); }
public void Init(IInviteFriends view) { _view = view; //_userSession = ObjectFactory.GetInstance<IUserSession>(); //_email = ObjectFactory.GetInstance<IEmail>(); //_friendInvitationRepository = ObjectFactory.GetInstance<IFriendInvitationRepository>(); //_accountRepository = ObjectFactory.GetInstance<IAccountRepository>(); //_webContext = ObjectFactory.GetInstance<IWebContext>(); _userSession = new SPKTCore.Core.Impl.UserSession(); _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _email = new SPKTCore.Core.Impl.Email(); _webContext = new SPKTCore.Core.Impl.WebContext(); if (_userSession.LoggedIn) { _account = _userSession.CurrentUser; _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository(); if (_account != null) { _view.DisplayToData(_account.UserName + " <" + _account.Email + ">"); if (_webContext.AccoundIdToInvite > 0) { _accountToInvite = _accountRepository.GetAccountByID(_webContext.AccoundIdToInvite); if (_accountToInvite != null) { SendInvitation(_accountToInvite.Email, _account.UserName + " " + _account.UserName + " "); _view.ShowMessage(_accountToInvite.UserName + " Đã được gửi đi!"); _view.TogglePnlInvite(false); } } } } }
public ConfirmFriendshipRequestPresenter() { _webContext = new SPKTCore.Core.Impl.WebContext(); _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository(); _redirector = new SPKTCore.Core.Impl.Redirector(); }
public FriendService() { _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository(); _webContext = new SPKTCore.Core.Impl.WebContext(); _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _friendRepository = new SPKTCore.Core.DataAccess.Impl.FriendRepository(); _userSession = new SPKTCore.Core.Impl.UserSession(); }
public FriendService() { dc = new SPKTDataContext(); _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository(); _webContext = new SPKTCore.Core.Impl.WebContext(); _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _friendRepository = new SPKTCore.Core.DataAccess.Impl.FriendRepository(); _userSession = new SPKTCore.Core.Impl.UserSession(); }
protected void Page_Load(object sender, EventArgs e) { _usersession = new SPKTCore.Core.Impl.UserSession(); _fi = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _f = new SPKTCore.Core.DataAccess.Impl.FriendRepository(); _ac = new SPKTCore.Core.DataAccess.Impl.AccountRepository(); _fs = new SPKTCore.Core.Impl.FriendService(); _account = new Account(); }
public ReceivedInvitationController(IFriendInvitationRepository friendInvitationRepository, UserManager <AppUser> userManager, ILogger <ReceivedInvitationController> logger, IEmailTemplateSender templateSender) { _friendInvitationRepository = friendInvitationRepository; _userManager = userManager; _logger = logger; _templateSender = templateSender; }
protected void Page_Load(object sender, EventArgs e) { _usersession = new SPKTCore.Core.Impl.UserSession(); _fi = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _f = new SPKTCore.Core.DataAccess.Impl.FriendRepository(); _email = new SPKTCore.Core.Impl.Email(); _presenter = new ProfileDisplayPresenter(); _ac = new AccountRepository(); _presenter.Init(this); }
public InvitedUserController(IInvitedUserRepository invitedUserRepository, IMeetingRepository meetingRepository, IEmailTemplateSender templateSender, ILogger <InvitedUserController> logger, UserManager <AppUser> userManager, IFriendInvitationRepository friendInvitationRepository) { _invitedUserRepository = invitedUserRepository; _meetingRepository = meetingRepository; _templateSender = templateSender; _logger = logger; _userManager = userManager; _friendInvitationRepository = friendInvitationRepository; }
// 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 RegisterPresenter() { _accountService = new AccountService(); _webContext = new WebContext(); _email = new Email(); _redirector = new Redirector(); _parameterIntService = new ParameterIntService(); _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _friendService = new SPKTCore.Core.Impl.FriendService(); _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository(); friendInvitation = new FriendInvitation(); }
public RegisterPresenter() { _accountService = new AccountService(); _webContext = new WebContext(); _email = new Email(); _redirector = new Redirector(); _parameterIntService = new ParameterIntService(); _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _friendService = new SPKTCore.Core.Impl.FriendService(); _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository(); //friendInvitation = new FriendInvitation(); }
protected void Page_Load(object sender, EventArgs e) { _rediret = new Redirector(); _usersession = new SPKTCore.Core.Impl.UserSession(); _fi = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _f = new SPKTCore.Core.DataAccess.Impl.FriendRepository(); _email = new SPKTCore.Core.Impl.Email(); _presenter = new ProfileDisplayPresenter(); _webContext = new WebContext(); _ac = new AccountRepository(); _presenter.Init(this); Image1.ImageUrl = "~/Image/ProfileAvatar.aspx?AccountID=" + Int32.Parse(Label1.Text); }
protected void Page_Load(object sender, EventArgs e) { _webcontext = new WebContext(); _usersession = new SPKTCore.Core.Impl.UserSession(); _fi = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _f = new SPKTCore.Core.DataAccess.Impl.FriendRepository(); _email = new SPKTCore.Core.Impl.Email(); _presenter = new ProfileDisplayPresenter(); _ac = new AccountRepository(); _presenter.Init(this); btn_de.Attributes.Add("onclick", "javascript:return confirm('Ban co muon xoa bạn?')"); if (_usersession.CurrentUser == null) { btn_add_de.Visible = false; btn_de.Visible = false; btn_ok.Visible = false; } else { if (_presenter.TestFriend(_account) == true || _presenter.TestFriend2(_account)) { btn_add_de.Visible = false; btn_de.Visible = true; btn_ok.Visible = false; if (_webcontext.SearchText == lblUsername.Text) { btn_de.Visible = true; btn_de.Text = "Chào bạn"; btn_de.BackColor = System.Drawing.Color.Gray; } } else { btn_add_de.Visible = true; btn_de.Visible = false; btn_ok.Visible = false; if (_webcontext.SearchText == lblUsername.Text) { btn_add_de.Visible = true; btn_add_de.Text = "Chào bạn"; btn_add_de.BackColor = System.Drawing.Color.Gray; } } imgAvatar.ImageUrl = "~/Image/ProfileAvatar.aspx?AccountID=" + Int32.Parse(lblFriendID.Text); } more1.setacid(Int32.Parse(lblFriendID.Text)); }
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); }
public InvitationBubbleTagHelper(IFriendInvitationRepository friendInvitationRepository) { _friendInvitationRepository = friendInvitationRepository; }
protected void Page_Load(object sender, EventArgs e) { _usersession = new SPKTCore.Core.Impl.UserSession(); _fi = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository(); _f = new SPKTCore.Core.DataAccess.Impl.FriendRepository(); _presenter = new ProfileDisplayPresenter(); _presenter.Init(this); btn_de.Attributes.Add("onclick", "javascript:return confirm('Ban co muon xoa bạn?')"); if (_usersession.CurrentUser == null) { btn_add_de.Visible = true; btn_de.Visible = false; } else { if (_presenter.TestFriend(_account) == true||_presenter.TestFriend2(_account)) { btn_add_de.Visible = false; btn_de.Visible = true; } else { btn_add_de.Visible = true; btn_de.Visible = false; } } }
public FriendInvitationController() { _objIFriendInvitationRepository = new FriendInvitationRepository(); }