Пример #1
0
        protected void btn_add_de_Click(object sender, EventArgs e)
        {
            _presenter = new ProfileDisplayPresenter();
            _presenter.Init(this);
            //moi
            _email.SendInvitations1(_usersession.CurrentUser,lblemail.Text, " Mời bạn: ");

            btn_ok.Visible = true;
            btn_add_de.Visible = false;
        }
Пример #2
0
 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);
 }
Пример #3
0
        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));
        }
Пример #4
0
 protected void lbInviteFriend_Click(object sender, EventArgs e)
 {
     _presenter = new ProfileDisplayPresenter();
     _presenter.Init(this);
 }
Пример #5
0
 protected void btn_de_Click(object sender, EventArgs e)
 {
     _presenter = new ProfileDisplayPresenter();
     _presenter.Init(this);
     _presenter.DeleteFriend(Convert.ToInt32(lblFriendID.Text));
 }
Пример #6
0
 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;
         }
     }
 }
Пример #7
0
 protected void lbInviteFriend_Click(object sender, EventArgs e)
 {
     _presenter = new ProfileDisplayPresenter();
     _presenter.Init(this);
     _presenter.SendFriendRequest(Convert.ToInt32(lblFriendID.Text));
 }