Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Model.friendRequest mf = new Model.friendRequest();
            mf.senderID        = this._friendid;
            mf.receiveID       = this._groupid;
            mf.ValidationInfo  = this.textBox1.Text;
            mf.ValidationTime  = DateTime.Now;
            mf.NumOfSameFriend = 0;
            mf.Station         = 1;

            BLL.friendRequest bllfriend = new BLL.friendRequest();
            bllfriend.Add(mf);
            this.Close();
        }
Exemplo n.º 2
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            if (this.txtValidation.Visible == false)
            {
                Model.friendRequest mf = new Model.friendRequest();
                mf.senderID        = this._id;
                mf.receiveID       = this._userid;
                mf.ValidationInfo  = this.txtValidation.Text;
                mf.ValidationTime  = DateTime.Now;
                mf.NumOfSameFriend = this._samefriend;
                mf.Station         = 1;
                if (this.txtNickname.Text != "")
                {
                    mf.NickName = this.txtNickname.Text;
                }
                else
                {
                    mf.NickName = this._username;
                }

                BLL.friendRequest bllfriend = new BLL.friendRequest();
                bllfriend.Add(mf);
                this.lblNickName.Text    = "您的好友请求已经发送,正在等待对方请求确认!";
                this.txtNickname.Visible = false;
                this.btnNext.Visible     = false;
                this.btnClose.Visible    = false;
                this.btnOK.Visible       = true;
            }
            if (this.txtValidation.Visible == true)
            {
                this.lblValidation.Visible = false;
                this.txtValidation.Visible = false;
                this.lblNickName.Visible   = true;
                this.txtNickname.Visible   = true;
            }
        }