Exemplo n.º 1
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     BLL.groupu   bll    = new BLL.groupu();
     Model.groupu mgroup = new Model.groupu();
     if (this.txtgroupname.Text == "")
     {
         MessageBox.Show("群名称不能为空!");
         return;
     }
     foreach (UCGroup f in uc)
     {
         if (f.Id1 == this._user.userID && f.IsChouse == false)
         {
             f.IsChouse = true;
         }
         if (f.IsChouse == true)
         {
             mgroup.groupImage        = Convert.ToInt32(this.comboBox1.Text);
             mgroup.groupID           = groupID;
             mgroup.groupAnnouncement = this.textBox1.Text;
             mgroup.groupfriendID     = f.Id1;
             mgroup.groupName         = this.txtgroupname.Text;
             mgroup.groupuserID       = this._user.userID;
             bll.Add(mgroup);
         }
     }
     MessageBox.Show("创建成功!");
     this.Close();
     this._frm.getGroupList();
 }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     BLL.groupu   bll    = new BLL.groupu();
     Model.groupu mgroup = new Model.groupu();
     foreach (UCGroup f in uc)
     {
         if (f.Id1 == this._user.userID && f.IsChouse == false)
         {
             f.IsChouse = true;
         }
         if (f.IsChouse == true)
         {
             mgroup.groupImage        = groupfriend[0].groupImage;
             mgroup.groupID           = groupfriend[0].groupID;
             mgroup.groupAnnouncement = groupfriend[0].groupAnnouncement;
             mgroup.groupfriendID     = f.Id1;
             mgroup.groupName         = groupfriend[0].groupName;
             mgroup.groupuserID       = this._user.userID;
             bll.Add(mgroup);
         }
     }
     MessageBox.Show("添加成功!");
     this.Close();
     this._frm.getGroupList();
 }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            BLL.groupu          bll = new BLL.groupu();
            Model.groupu        m   = new Model.groupu();
            List <Model.groupu> m1  = bll.GetModelList("groupID=" + this._friendrequest.receiveID);

            m.groupID           = this._friendrequest.receiveID;
            m.groupfriendID     = this._friendrequest.senderID;
            m.groupAnnouncement = m1[0].groupAnnouncement;
            m.groupImage        = m1[0].groupImage;
            m.groupName         = m1[0].groupName;
            m.groupuserID       = m1[0].groupuserID;
            bll.Add(m);
            MessageBox.Show("添加成功!");
            this.Close();
        }