zoukankan      html  css  js  c++  java
  • 个人作业

     个人Psp

    计划:需要一星期

    需求分析:作为一个观众需要知道每一场的比赛得分情况,分数详细,列出局分以便了解比赛的战况。

    生成设计文档:需要一个查询队伍界面,和比赛的具体得分.

     

    设计复审:自己.没有组员参加.

    代码规范:c#语言.Winfrom窗体.

    具体设计:1,选择观众界面.

     

    2,查询 场分,局分,胜负.

     

    具体代码:(还没完成全部编写)

      private void DataGridView( string sql="select * from biao")

            {

                SqlConnection conn = new SqlConnection("server=.;database=biao;uid=sa;pwd=123456");

                SqlDataAdapter adapter = new SqlDataAdapter(sql, conn);

                DataSet ds = new DataSet();

     

                adapter.Fill(ds);

     

                dataGridView1.DataSource = ds.Tables[0];

            }

     

            private void ComboBox1()

            {

                comboBox1.Items.Clear();

                comboBox1.Items.Add("");

                comboBox1.SelectedIndex=0;

                SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=biao;Integrated Security=True");

                string str = "select distinct Name from biao";

               SqlCommand comm = new SqlCommand(str, conn);

                conn.Open();

                SqlDataReader reader = comm.ExecuteReader();

                if (reader.HasRows)

                {

                    while (reader.Read())

                    {

                        comboBox1.Items.Add(reader[0]);

                    }

                }

                reader.Close();

                conn.Close();

            }

     

            private void button1_Click(object sender, EventArgs e)

            {

                string Name = comboBox1.Text.Trim();

                StringBuilder sql = new StringBuilder("select * from biao where 1=1");

                if (!String.IsNullOrEmpty(Name))

                {

                    sql.Append("and Name like '%" + Name + "%'");

                }

     

                DataGridView(sql.ToString());

            }

     

            private void chaxunToolStripButton_Click(object sender, EventArgs e)

            {

                try

                {

                    this.biaoTableAdapter.chaxun(this.biaoDataSet.biao);

                }

                catch (System.Exception ex)

                {

                    System.Windows.Forms.MessageBox.Show(ex.Message);

                }

     

            }

     

            private void fillByToolStripButton_Click(object sender, EventArgs e)

            {

                try

                {

                    this.biaoTableAdapter.FillBy(this.biaoDataSet.biao);

                }

                catch (System.Exception ex)

                {

                    System.Windows.Forms.MessageBox.Show(ex.Message);

                }

     

            }

     

    测试:无.未完成.

    测试报告:无

    计算工作量:未统计

    事后总结:还未完成,等完成在做具体总结

  • 相关阅读:
    poj2186强连通分量
    poj1459SAP最大流模板题
    poj2391Floyd+二分+最大流
    curl上传下载入门
    Mysql存储过程
    小球旋转
    钟表单摆
    java小记 摘抄
    servlet的一些收集总结
    Javascript基础小结
  • 原文地址:https://www.cnblogs.com/wuhao123/p/6218403.html
Copyright © 2011-2022 走看看