//添加字段名到comboBox控件的下拉框中: private void ShowComboBox() { #region 添加字段名到comboBox控件中: GetTableColumnBLL objGetTableColumnBLL = new GetTableColumnBLL(); string[] StuNum = objGetTableColumnBLL.GetStuNum(); cbxStuNum.Items.AddRange(StuNum); string[] StuName = objGetTableColumnBLL.GetStuName(); cmbStuName.Items.AddRange(StuName); string[] GetCourseId = objGetTableColumnBLL.GetCourseNum(); cbxCourseNum.Items.AddRange(GetCourseId); string[] CourseName = objGetTableColumnBLL.GetCourseName(); cbxCourseName.Items.AddRange(CourseName); string[] Score = objGetTableColumnBLL.GetScore(); cbxScore.Items.AddRange(Score); #endregion }
private void GetStuNum() { GetTableColumnBLL objGetTableColumnBLL = new GetTableColumnBLL(); string[] StuNum = objGetTableColumnBLL.GetStuNum(); cmbStuSearchValue.Items.AddRange(StuNum); }