private void btnOK_Click(object sender, EventArgs e) { if (rbok.Checked == true) { BLL.friendRequest bll = new BLL.friendRequest(); Model.friendRequest mf = new Model.friendRequest(); mf.ID = this._frmr.ID; mf.NickName = this._frmr.NickName; mf.NumOfSameFriend = this._frmr.NumOfSameFriend; mf.receiveID = this._frmr.receiveID; mf.senderID = this._frmr.senderID; mf.ValidationInfo = this._frmr.ValidationInfo; mf.ValidationTime = this._frmr.ValidationTime; mf.Station = 2; bll.Update(mf); BLL.friendInfo bff = new BLL.friendInfo(); Model.friendInfo m = new Model.friendInfo(); m.friendID = this._frmr.senderID; m.userID = this._frmr.receiveID; m.friendName = this._user.userName; bff.Add(m); m.friendID = this._frmr.receiveID; m.userID = this._frmr.senderID; m.friendName = this._frmr.NickName; bff.Add(m); this.Close(); } if (rbno.Checked == true) { BLL.friendRequest bll = new BLL.friendRequest(); Model.friendRequest mf = new Model.friendRequest(); mf.ID = this._frmr.ID; mf.NickName = this._frmr.NickName; mf.NumOfSameFriend = this._frmr.NumOfSameFriend; mf.receiveID = this._frmr.receiveID; mf.senderID = this._frmr.senderID; mf.ValidationInfo = this._frmr.ValidationInfo; mf.ValidationTime = this._frmr.ValidationTime; mf.Station = 3; bll.Update(mf); this.Close(); } if (rbhulue.Checked == true) { BLL.friendRequest bll = new BLL.friendRequest(); Model.friendRequest mf = new Model.friendRequest(); mf.ID = this._frmr.ID; mf.NickName = this._frmr.NickName; mf.NumOfSameFriend = this._frmr.NumOfSameFriend; mf.receiveID = this._frmr.receiveID; mf.senderID = this._frmr.senderID; mf.ValidationInfo = this._frmr.ValidationInfo; mf.ValidationTime = this._frmr.ValidationTime; mf.Station = 4; bll.Update(mf); this.Close(); } }
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(); }
private void btnIgnore_Click(object sender, EventArgs e) { BLL.friendRequest bll = new BLL.friendRequest(); Model.friendRequest mf = new Model.friendRequest(); mf.ID = this._frmr.ID; mf.NickName = this._frmr.NickName; mf.NumOfSameFriend = this._frmr.NumOfSameFriend; mf.receiveID = this._frmr.receiveID; mf.senderID = this._frmr.senderID; mf.ValidationInfo = this._frmr.ValidationInfo; mf.ValidationTime = this._frmr.ValidationTime; mf.Station = 4; bll.Update(mf); this.Close(); }
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; } }
private void timeSystemn_Tick(object sender, EventArgs e) { BLL.messsageInfo bmess = new BLL.messsageInfo(); List <Model.messsageInfo> mmess = bmess.GetModelList("receiverID= '" + this._user.userID + "'and messageState=20 "); foreach (Model.messsageInfo m in mmess) { BLL.messsageInfo BllMsgInfo = new BLL.messsageInfo(); Model.messsageInfo msg = new Model.messsageInfo(); msg.messageContent = m.messageContent; msg.senderID = m.senderID; msg.receiverID = m.receiverID; msg.messageState = 21; msg.sendTime = m.sendTime; msg.messageID = m.messageID; BllMsgInfo.Update(msg); BLL.userInfo bll2 = new BLL.userInfo(); Model.userInfo mfriend2 = bll2.GetModel(m.senderID); FrmimmediatelyMsg frm = new FrmimmediatelyMsg(tbFriendTalkInfo, this, this._user, mfriend2, mfriend2.userName); frm.Show(); } BLL.friendRequest bl = new BLL.friendRequest(); List <Model.friendRequest> mfrien = bl.GetModelList("senderID= '" + this._user.userID + "'and Station=2 "); foreach (Model.friendRequest m in mfrien) { FrmOkWarn sw = new FrmOkWarn(m, this); sw.Show(); Model.friendRequest mf = new Model.friendRequest(); mf.ID = m.ID; mf.NickName = m.NickName; mf.NumOfSameFriend = m.NumOfSameFriend; mf.receiveID = m.receiveID; mf.senderID = m.senderID; mf.ValidationInfo = m.ValidationInfo; mf.ValidationTime = m.ValidationTime; mf.Station = 5; bl.Update(mf); } BLL.friendRequest bll = new BLL.friendRequest(); List <Model.friendRequest> mfriend = bll.GetModelList("receiveID= '" + this._user.userID + "'and Station=1 "); foreach (Model.friendRequest m in mfriend) { SystemWarn sw = new SystemWarn(m, this); sw.Show(); Model.friendRequest mf = new Model.friendRequest(); mf.ID = m.ID; mf.NickName = m.NickName; mf.NumOfSameFriend = m.NumOfSameFriend; mf.receiveID = m.receiveID; mf.senderID = m.senderID; mf.ValidationInfo = m.ValidationInfo; mf.ValidationTime = m.ValidationTime; mf.Station = 5; bll.Update(mf); } BLL.groupu bllgroup = new BLL.groupu(); List <Model.groupu> mgroup = bllgroup.GetModelList("groupuserID=" + this._user.userID); if (mgroup.Count != 0) { int receiverID = mgroup[0].groupID; List <Model.friendRequest> mfriend2 = bll.GetModelList("receiveID= '" + receiverID + "'and Station=1 "); foreach (Model.friendRequest m in mfriend2) { FrmGroupWarn sw = new FrmGroupWarn(m, this); sw.Show(); Model.friendRequest mf = new Model.friendRequest(); mf.ID = m.ID; mf.NumOfSameFriend = m.NumOfSameFriend; mf.receiveID = m.receiveID; mf.senderID = m.senderID; mf.ValidationInfo = m.ValidationInfo; mf.ValidationTime = m.ValidationTime; mf.Station = 5; bll.Update(mf); } } }