首页 > 其他 > 详细

本周冲刺

时间:2017-01-07 00:47:01      阅读:228      评论:0      收藏:0      [点我收藏+]

计划

估算时间

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

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= "";
}
}
}

 

本周冲刺

原文:http://www.cnblogs.com/YXD123/p/6257860.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!