計劃 測試
·估計這我的任務須要1-2周編碼
開發spa
·需求分析設計
用戶故事:做爲一名現場記分員,我但願詳細記錄比賽現場比分增加狀況,以便觀衆及運動員、教練員及時掌握比賽情況。代碼規範
·生成設計文檔blog
在運行的界面中能夠看到中國隊與塞爾維亞對的比分,點擊加分和減分會在文本框中出現對應的數字。ip
·設計複審:對於這個需求目前作的還不算太完善,下週對下面的進行完善。開發
·代碼規範:使用VS2010對代碼進行規範。文檔
·具體設計it
·具體編碼:
protected void Button1_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina2hao.Text);
a = a + 1;
txtchina2hao.Text = a.ToString();
}
protected void Button18_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina2hao.Text);
if (a > 0)
{
a = a - 1;
}
else if(a==0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina2hao.Text = a.ToString();
}
protected void Button2_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina9hao.Text);
a = a + 1;
txtchina9hao.Text = a.ToString();
}
protected void Button7_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina9hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina9hao.Text = a.ToString();
}
protected void Button3_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina12hao.Text);
a = a + 1;
txtchina12hao.Text = a.ToString();
}
protected void Button8_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina12hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina12hao.Text = a.ToString();
}
protected void Button4_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina10hao.Text);
a = a + 1;
txtchina10hao.Text = a.ToString();
}
protected void Button9_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina10hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina10hao.Text = a.ToString();
}
protected void Button5_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina1hao.Text);
a = a + 1;
txtchina1hao.Text = a.ToString();
}
protected void Button10_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina1hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina1hao.Text = a.ToString();
}
protected void Button6_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina10hao.Text);
a = a + 1;
txtchina10hao.Text = a.ToString();
}
protected void Button11_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina17hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina17hao.Text = a.ToString();
}
protected void Button12_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina11hao.Text);
a = a + 1;
txtchina11hao.Text = a.ToString();
}
protected void Button13_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina11hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina11hao.Text = a.ToString();
}
protected void Button14_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina6hao.Text);
a = a + 1;
txtchina6hao.Text = a.ToString();
}
protected void Button15_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina6hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina6hao.Text = a.ToString();
}
protected void Button16_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina3hao.Text);
a = a + 1;
txtchina3hao.Text = a.ToString();
}
protected void Button17_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina3hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina3hao.Text = a.ToString();
}
protected void Button19_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina7hao.Text);
a = a + 1;
txtchina7hao.Text = a.ToString();
}
protected void Button20_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina7hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina7hao.Text = a.ToString();
}
protected void Button21_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina16hao.Text);
a = a + 1;
txtchina16hao.Text = a.ToString();
}
protected void Button22_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina16hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina16hao.Text = a.ToString();
}
protected void Button23_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina15hao.Text);
a = a + 1;
txtchina15hao.Text = a.ToString();
}
protected void Button24_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtchina15hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtchina15hao.Text = a.ToString();
}
protected void Button27_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy10hao.Text);
a = a + 1;
txtsewy10hao.Text = a.ToString();
}
protected void Button28_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy10hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy10hao.Text = a.ToString();
}
protected void Button29_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy19hao.Text);
a = a + 1;
txtsewy19hao.Text = a.ToString();
}
protected void Button30_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy19hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy19hao.Text = a.ToString();
}
protected void Button31_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy9hao.Text);
a = a + 1;
txtsewy9hao.Text = a.ToString();
}
protected void Button32_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy9hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy9hao.Text = a.ToString();
}
protected void Button35_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy5hao.Text);
a = a + 1;
txtsewy5hao.Text = a.ToString();
}
protected void Button36_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy5hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy5hao.Text = a.ToString();
}
protected void Button37_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy4hao.Text);
a = a + 1;
txtsewy4hao.Text = a.ToString();
}
protected void Button38_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy4hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy4hao.Text = a.ToString();
}
protected void Button39_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy6hao.Text);
a = a + 1;
txtsewy6hao.Text = a.ToString();
}
protected void Button40_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy6hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy6hao.Text = a.ToString();
}
protected void Button41_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy2hao.Text);
a = a + 1;
txtsewy2hao.Text = a.ToString();
}
protected void Button42_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy2hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy2hao.Text = a.ToString();
}
protected void Button43_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy16hao.Text);
a = a + 1;
txtsewy16hao.Text = a.ToString();
}
protected void Button44_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy16hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy16hao.Text = a.ToString();
}
protected void Button45_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy1hao.Text);
a = a + 1;
txtsewy1hao.Text = a.ToString();
}
protected void Button46_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy1hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy1hao.Text = a.ToString();
}
protected void Button47_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy15hao.Text);
a = a + 1;
txtsewy15hao.Text = a.ToString();
}
protected void Button48_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy15hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy15hao.Text = a.ToString();
}
protected void Button49_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy17hao.Text);
a = a + 1;
txtsewy17hao.Text = a.ToString();
}
protected void Button50_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy17hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy17hao.Text = a.ToString();
}
protected void Button51_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy8hao.Text);
a = a + 1;
txtsewy8hao.Text = a.ToString();
}
protected void Button52_Click(object sender, EventArgs e)
{
int a = Int32.Parse(txtsewy8hao.Text);
if (a > 0)
{
a = a - 1;
}
else if (a == 0)
{
Response.Write("<script>alert('該對分值爲零不能進行減分')</script>");
}
txtsewy8hao.Text = a.ToString();
}
·測試:接下來對代碼進行測試。