**1**********************************************************
SqlCommand cmd1 = new SqlCommand("GetTestInfo", conn);
cmd1.CommandType = CommandType.StoredProcedure;
DataTable table1 = new DataTable();
table1.Load(cmd1.ExecuteReader());
if (table1.Rows.Count == 0) //无现有测试
{ button1.Enabled = false; }
else { comboBox1.DataSource = table1;
comboBox1.ValueMember = "ID";
comboBox1.DisplayMember = "Information";
}
**1**********************************************************
this.sqlDataAdapter1.Fill(this.dataSet11);
DataSet ds = new DataSet();
DataTable dt = null;
dt = this.dataSet11.Tables[0].Copy();
ds.Tables.Add(dt);
**1**********************************************************
SqlCommand cmd1 = new SqlCommand("GenTest", conn);
cmd1.CommandType = CommandType.StoredProcedure;
SqlParameter par1 = new SqlParameter("@name", SqlDbType.NVarChar, 50);
par1.Value = textBox1.Text;
cmd1.Parameters.Add(par1);
par1 = new SqlParameter("@sQuestions1", SqlDbType.Int);
par1.Value = (int)numericUpDown1.Value;
cmd1.Parameters.Add(par1);
par1 = new SqlParameter("@sQuestions2", SqlDbType.Int);
par1.Value = (int)numericUpDown2.Value;
cmd1.Parameters.Add(par1);
**1**********************************************************