Views/Department/Index.cshtml
(完整代码) 890B@model IEnumerable<WebApplication1.Models.Entities.Department>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.DepartmentName)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.DepartmentName)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.DepartmentId }) |
@Html.ActionLink("Details", "Details", new { id=item.DepartmentId }) |
@Html.ActionLink("Delete", "Delete", new { id=item.DepartmentId })
</td>
</tr>
}
</table>
<form action="~/Department/Search" method="post">
部门名:<input type="text" name="key" />
<input type="submit" value="查询" />
</form>
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
