用户故事:
作为一个观众,我希望了解某一场比赛的比分,以便了解赛况。(满意条件:精确到每一局的结果比分)。
计划 |
30min |
估计要用多长时间 |
3d |
开发 |
5h |
需求分析 |
1h |
生成设计文档 |
1h |
设计复审 |
40min |
代码规范 |
20min |
具体设计 |
40min |
具体编码 |
2h |
代码复审 |
1h |
测试 |
50min |
测试报告 |
10min |
计算工作量 |
25min |
总结 |
40min |
private void GameLoad()
{
cmbA.Items.Clear();
string sql = "select game from paiqiu";
SqlDataReader reader = SqlHelper.ExecuteReader(sql);
if
(reader.HasRows)
{
while (reader.Read())
{
cmbName.Items.Add(reader[0]);
}
}
reader.Close();
}
private void Dgv()
{
string sql =
"select * from paiqiu";
dgvGame.DataSource = SqlHelper.ExecuteDataTable(sql);
}
private void Form2_Load(object
sender, EventArgs e)
{
GameLoad();
dgv();
}
private void select_Click(object sender, EventArgs e)//单个查询
{
StringBuilder sql = new StringBuilder("select * from paiqiu where
1=1");
if
(!string.IsNullOrEmpty(cmbName.Text))
{
sql.Append(" and game=‘" + cmbName.Text + "‘");
}
SqlDataReader reader= SqlHelper.ExecuteReader(sql.ToString());
if
(reader.HasRows)
{
dgvGame.DataSource = SqlHelper.ExecuteDataTable(sql.ToString());
}
else
{
MessageBox.Show("没有查询到比赛记录!");
}
}
private void lblWrite_LinkClicked(object sender, LinkLabelLinkClickedEventArgs
e)//跳转计分页面
{
this.Close();
writeHistory0 a = new writeHistory0();
a.Show();
}
private void linkLabel1_LinkClicked(object sender,
LinkLabelLinkClickedEventArgs e)
{
Application.Exit();
}