日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

十六周个人作业

發(fā)布時(shí)間:2025/3/15 编程问答 13 豆豆
生活随笔 收集整理的這篇文章主要介紹了 十六周个人作业 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
  • 計(jì)劃

??????? 估計(jì)此程序需要3-5天。

  • 開(kāi)發(fā)
  • 需求分析

????????? 用戶(hù)故事:作為一個(gè)觀(guān)眾,我希望了解某一場(chǎng)比賽的比分,以便了解賽況。(滿(mǎn)意條件:精確到每一局的結(jié)果比分)。

????????? 從分析用例故事可以知道完成此程序需要這兩項(xiàng)任務(wù):選擇隊(duì)伍和查詢(xún)比賽記錄。

????????? 以下為改程序的活動(dòng)圖:

  • ? 代碼規(guī)范:使用Vs2010和帕斯卡命名法和駱駝命名法

?

  • 具體設(shè)計(jì):

?????????????以下為程序的類(lèi)圖:

  • 具體編碼

???????????? 以下為部分代碼:

1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.Web.UI; 6 using System.Web.UI.WebControls; 7 using VolleyballBll; 8 using Moudel; 9 10 namespace VolleyballUI 11 { 12 public partial class Index : System.Web.UI.Page 13 { 14 private TeamBll teamBll = new TeamBll(); 15 16 protected void Page_Load(object sender, EventArgs e) 17 { 18 if (!IsPostBack) 19 { 20 BindDropDownList(); 21 } 22 } 23 24 protected void btnSaveName_Click(object sender, EventArgs e) 25 { 26 Team team = new Team(); 27 team.Name=TeamName.Text.Trim(); 28 if (teamBll.GetInsertTeamName(team)) 29 { 30 Response.Redirect("Index.aspx"); 31 } 32 else 33 { 34 Response.Write("<script>alert('添加失敗')</script>"); 35 } 36 } 37 38 public void BindDropDownList() 39 { 40 DropDownListA.DataSource = teamBll.GetSelectAllTeams(); 41 DropDownListA.DataTextField = "Name"; 42 DropDownListA.DataValueField = "ID"; 43 DropDownListA.DataBind(); 44 DropDownListB.DataSource = teamBll.GetSelectAllTeams(); 45 DropDownListB.DataTextField = "Name"; 46 DropDownListB.DataValueField = "ID"; 47 DropDownListB.DataBind(); 48 } 49 50 protected void btnSave_Click(object sender, EventArgs e) 51 { 52 if (DropDownListA.SelectedItem.Text == DropDownListB.SelectedItem.Text) 53 { 54 Response.Write("<script>alert('同一支隊(duì)伍之間不能比賽!')</script>"); 55 } 56 else 57 { 58 Response.Redirect("Main.aspx?TeamA=" + DropDownListA.SelectedItem.Text + "&TeamB=" + DropDownListB.SelectedItem.Text); 59 } 60 } 61 62 protected void btnSelect_Click(object sender, EventArgs e) 63 { 64 if (DropDownListA.SelectedItem.Text == DropDownListB.SelectedItem.Text) 65 { 66 Response.Write("<script>alert('同一支隊(duì)伍之間沒(méi)有比賽!')</script>"); 67 } 68 else 69 { 70 Response.Redirect("Select.aspx?TeamA=" + DropDownListA.SelectedItem.Text + "&TeamB=" + DropDownListB.SelectedItem.Text); 71 } 72 } 73 } 74 } 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.Web.UI; 6 using System.Web.UI.WebControls; 7 using Moudel; 8 using System.Data.SqlClient; 9 using VolleyballBll; 10 11 namespace VolleyballUI 12 { 13 public partial class Select : System.Web.UI.Page 14 { 15 private GameBll gameBll = new GameBll(); 16 protected void Page_Load(object sender, EventArgs e) 17 { 18 Game game = new Game(); 19 game.TeamA = Request.QueryString["TeamA"]; 20 game.TeamB = Request.QueryString["TeamB"]; 21 if (!IsPostBack) 22 { 23 SelectTable.DataSource= gameBll.GetSelectGame(game); 24 SelectTable.DataBind(); 25 } 26 } 27 } 28 }

?????????

???? 以下為選擇隊(duì)伍的界面:

???? ???? 以下為查詢(xún)后的界面:

?

關(guān)于代碼復(fù)審,測(cè)試和之后的報(bào)告,會(huì)在接下來(lái)的幾天時(shí)間內(nèi)完成并逐漸完善自己的程序。

轉(zhuǎn)載于:https://www.cnblogs.com/hutengqi/p/6216138.html

總結(jié)

以上是生活随笔為你收集整理的十六周个人作业的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。