zoukankan      html  css  js  c++  java
  • 本周冲刺

    计划

    估算时间

    估计这个任务需要多少时间

    8天

    开发

    1天

    需求分析

    1小时

    生成设计文档

    1小时

    设计复审

    40分钟

    代码规范

    4小时

    具体设计

    1小时

    具体编码

    5天

    代码复审

    2天

    测试

    50min

    测试报告

    30min

    计算工作量

    1小时

    事后总结并提出改进计划

    1小时

    需求分析

    作为一个排球比赛的现场工作人员,我需要统计每一名

    队员的得分及技术统计,以便颁发每场比赛的最有价值球员奖,

    以及确定赛会的最佳阵容。

    设计文档

    进入现场工作人员界面,记录每位运动员的得分情况。

    活动图

     

    设计复审

    和同学一起审核。

    代码规范

    Visual Studio 2012

    具体设计

    private void button2_Click(object sender, EventArgs e)
    {
    if (dbUpdate())
    {
    MessageBox.Show("更新成功");
    }
    }
    private Boolean dbUpdate()
    {
    string strOleDb = "select * from Allathlete";
    DataTable dtUpdate = new DataTable();
    dtUpdate = this.dbcon(strOleDb);
    dtUpdate.Rows.Clear();
    DataTable dtShow = new DataTable();
    dtShow = (DataTable)this.dataGridView1.DataSource;
    for (int i = 0; i < dtShow.Rows.Count; i++)//循环遍历
    {
    dtUpdate.ImportRow(dtShow.Rows[i]);

    }
    try
    {
    this.conn.Open();
    OleDbCommandBuilder cb = new OleDbCommandBuilder(this.adapter);
    this.adapter.Update(dtUpdate);
    this.conn.Close();
    }
    catch (Exception ex)
    {
    MessageBox.Show(ex.Message.ToString());
    return false;
    }
    dtUpdate.AcceptChanges();
    return true;
    }

    private void button3_Click(object sender, EventArgs e)
    {
    Form2 a = new Form2();
    a.Show();
    this.Hide();
    }

    private void button3_Click(object sender, EventArgs e)
    {
    string conn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Administrator\Desktop\统计表.mdb";
    OleDbConnection con = new OleDbConnection(conn);
    // string sql = "select qiuyuan from Allathletes order by faqiu desc";
    con.Open();
    string sql = "select qiuyuan from Allathlete order by faqiu desc";
    OleDbCommand cmd = new OleDbCommand(sql,con);
    OleDbDataReader reader = cmd.ExecuteReader();
    try
    {
    reader.Read();
    string faqiu = (string)reader[0].ToString();
    textBox1.Text = faqiu;
    reader.Close();
    con.Close();
    con.Open();
    string sqa = "select qiuyuan from Allathlete order by kouqiu desc";
    OleDbCommand cma = new OleDbCommand(sqa, con);
    OleDbDataReader readera = cma.ExecuteReader();
    readera.Read();
    string kouqiu = (string)readera[0].ToString();
    textBox2.Text = kouqiu;
    readera.Close();
    con.Close();
    con.Open();
    string sqb = "select qiuyuan from Allathlete order by lanwang desc";
    OleDbCommand cmb = new OleDbCommand(sqb, con);
    OleDbDataReader readerb = cmb.ExecuteReader();
    readerb.Read();
    string lanwang = (string)readerb[0].ToString();
    textBox3.Text = lanwang;
    readerb.Close();
    con.Close();
    con.Open();
    string sqc = "select qiuyuan from Allathlete order by yichuan desc";
    OleDbCommand cmc = new OleDbCommand(sqc, con);
    OleDbDataReader readerc = cmc.ExecuteReader();
    readerc.Read();
    string yichuan = (string)readerc[0].ToString();
    textBox4.Text = yichuan;
    readerc.Close();
    con.Close();
    con.Open();
    string sqd = "select qiuyuan from Allathlete order by erchuan desc";
    OleDbCommand cme = new OleDbCommand(sqd, con);
    OleDbDataReader readerd = cme.ExecuteReader();
    readerd.Read();
    string erchuan = (string)readerd[0].ToString();
    textBox5.Text = erchuan;
    readerd.Close();
    con.Close();
    con.Open();
    string sqf = "select qiuyuan from Allathlete order by ziyouren desc";
    OleDbCommand cmf = new OleDbCommand(sqf, con);
    OleDbDataReader readerf = cmf.ExecuteReader();
    readerf.Read();
    string ziyouren = (string)readerf[0].ToString();
    //textBox1.Text = faqiu;
    //textBox2.Text = kouqiu;
    // textBox3.Text = lanwang;
    // textBox4.Text = yichuan;
    // textBox5.Text = erchuan;
    textBox6.Text = ziyouren;
    reader.Close();
    }
    catch
    {
    MessageBox.Show("没有比赛数据!");
    }
    con.Close();
    }

    private void button1_Click(object sender, EventArgs e)
    {
    string conn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Administrator\Desktop\统计表.mdb";
    OleDbConnection con = new OleDbConnection(conn);
    string sql = "select qiuyuan from Allathlete order by score desc";
    con.Open();
    OleDbCommand cmd = new OleDbCommand(sql,con);
    OleDbDataReader reader = cmd.ExecuteReader();
    reader.Read();
    try
    {
    string mvp = (string)reader[0].ToString();
    text.Text = mvp;
    }
    catch
    {
    MessageBox.Show("没有比赛数据!");
    }
    reader.Close();
    con.Close();

    }

    private void label4_Click(object sender, EventArgs e)
    {

    }

    private void button2_Click(object sender, EventArgs e)
    {
    text.Text = "";
    textBox1.Text = "";
    textBox2.Text = "";
    textBox3.Text = "";
    textBox4.Text = "";
    textBox5.Text = "";
    textBox6.Text= "";
    }
    }
    }

  • 相关阅读:
    智慧城市开发模式研究
    区域经济、地理信息、互联网三者交叉之行业背景分析
    《矿产经济与管理》读书笔记
    郝寿义、安虎森《区域经济学》读书笔记
    京津冀区域货流预测与分析
    关于产业链招商的背景、内涵、特征和意义
    《政府与企业招商引资战略操作实务》读书笔记
    网站seo优化
    弹出窗口里有“确定”和“取消”两个按钮
    解决在网页里设置锚点后,链接不到相应位置
  • 原文地址:https://www.cnblogs.com/YXD123/p/6257860.html
Copyright © 2011-2022 走看看