zoukankan      html  css  js  c++  java
  • 2011aspx新代码 枫

    **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**********************************************************

  • 相关阅读:
    NOIP201105铺地毯
    50148155HYF旅游
    连通性判断
    传递消息1
    找朋友
    5796: 最短Hamilton路径(状压dp)
    2283: A Mini Locomotive(01背包)
    2616: Cow Frisbee Team(01背包)
    2593: Secret Message(字典树)
    Stammering Aliens(二分+Hash 卡过)
  • 原文地址:https://www.cnblogs.com/mrray/p/1927561.html
Copyright © 2011-2022 走看看