排球积分程序(六)——View的编码
2017-06-24 19:45
363 查看
Index视图
Count视图
CountScore视图
Search视图
TeamScore视图
@{ ViewBag.Title = "选择功能"; } <h2>选择功能</h2> <p> @Html.ActionLink("计分", "Count") @Html.ActionLink("查询", "Search") </p>
Count视图
@model MvcVolleyball.Models.Team @{ ViewBag.Title = "选择队伍"; } @using (Html.BeginForm("Count","Volleyball",FormMethod.Post)) { @Html.ValidationSummary(true) <div class="editor-label"> @Html.LabelFor(model => model.teamId, "选择主队") </div> <div class="editor-field"> @Html.DropDownList("teamId", String.Empty) @Html.ValidationMessageFor(model => model.teamId) </div> <div class="editor-label"> @Html.LabelFor(model => model.teamId, "选择客队") </div> <div class="editor-field"> @Html.DropDownList("teamId", String.Empty) @Html.ValidationMessageFor(model => model.teamId) </div> <p> <input type="submit" value="确定" /> </p> }
CountScore视图
@{ ViewBag.Title = "计分程序"; } <h2>计分</h2> <table><tr><td>主队:@ViewBag.hostteam</td> <td>客队:@ViewBag.guestteam</td></tr> <tr><td> 主队得分队员:@Html.DropDownList("hostMember" ) </td> <td>客队得分队员:@Html.DropDownList("guestMember" )</td> </tr> <tr><td>@Html.ActionLink("主队加分", "addScore", new {teamIds=ViewBag.teamId})</td> <td>@Html.ActionLink("客队加分", "addScore", new {teamIds=ViewBag.teamId})</td> </tr> <tr> <td> 主队得分: @ViewBag.hostteamscores </td> <td> 客队得分:@ViewBag.guestteamscores </td> </tr> </table>
Search视图
@model MvcVolleyball.Models.Team @{ ViewBag.Title = "选择查询队伍"; } <h2>SearchTeam</h2> @using (Html.BeginForm("Search","Volleyball",FormMethod.Post)) { @Html.ValidationSummary(true) <div class="editor-label"> @Html.LabelFor(model => model.teamId, "选择查询队伍") </div> <div class="editor-field"> @Html.DropDownList("teamId", String.Empty) @Html.ValidationMessageFor(model => model.teamId) </div> <p> <input type="submit" value="确定" /> </p> }
TeamScore视图
@model IEnumerable<MvcVolleyball.Models.HostTeamScore> @{ ViewBag.Title = "队伍得分"; } <h2>队伍得分</h2> <table> <tr> <th> 局数 </th> <th> 队名 </th> <th> 得分队员 </th> <th> 得分 </th> <th></th> </tr> @foreach (var item in Model) { <tr> <td> @Html.DisplayFor(modelItem => item.inningNum) </td> <td> @Html.DisplayFor(modelItem => item.team.teamName) </td> <td> @Html.DisplayFor(modelItem => item.memberId) </td> <td> @Html.DisplayFor(modelItem => item.hostTeamScore) </td> </tr> } </table>
相关文章推荐
- 排球积分程序(五)——Controller的编码
- 排球积分程序(四)——Controller和View设计
- 排球积分程序(一)——综述
- 排球积分程序(三)——模型类的设计
- 第十五周排球积分查询程序
- 排球计分程序(四)—— View设计与实现
- 排球积分程序(七)——软件运行截图
- 排球积分程序(二)——需求分析
- 排球记分员计分程序(六)————Views视图的编码与设计
- 排球积分程序---记分员
- 排球计分程序(八)——验证编辑方法(Edit method)和编辑视图(Edit view)
- 排球积分程序(八)——总结
- Java程序编码规范
- 程序编码应保持良好的规范(C#)
- Base64编码互换程序(Tk)
- winform程序中使用document-view模式的考虑
- C程序简单实现哈夫曼树的编码 (转)
- 样式表参数和扩展对象的 XsltArgumentList(利用程序编码添加脚本 != 在CDATA下添加)
- 关于将基于Doc/View结构的EXE程序封装成OCX的一些经验
- PowerBuilder程序编码规范