/// <summary> /// 添加社团人员信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddClubPeobutton_Click(object sender, EventArgs e) { string stunum = StuNumtextBox.Text.Trim(); string clubpost = ClubPosttextBox.Text.Trim(); if (ClubNamecomboBox.SelectedIndex == -1) { MessageBox.Show("未选择社团"); return; } if (stunum.Length != 13) { MessageBox.Show("学号位数不对"); return; } string clubnum = clubnamedataTable.Rows[ClubNamecomboBox.SelectedIndex][0].ToString(); if (clubBLL.Add_ClubPeo(clubnum, stunum, clubpost)) { if (MessageBox.Show("添加成功!") == DialogResult.OK) { this.Close(); } } else { MessageBox.Show("添加失败!"); } }