add user managment(edit/delete/logout) and session
This commit is contained in:
@ -1,45 +1,53 @@
|
||||
@model IEnumerable<WebApplication1.Models.user>
|
||||
@model WebApplication1.Models.user
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Index";
|
||||
ViewBag.Title = "Account managment";
|
||||
}
|
||||
<h2>Account managment</h2>
|
||||
<h4>View and Edit account details</h4>
|
||||
|
||||
<h2>Index</h2>
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<p>
|
||||
@Html.ActionLink("Create New", "Create")
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
<div>
|
||||
<h4>user</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.usename)
|
||||
</th>
|
||||
<th>
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.usename)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.password)
|
||||
</th>
|
||||
<th>
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.password)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.displayname)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</dt>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.usename)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.password)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.displayname)
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
|
||||
@Html.ActionLink("Details", "Details", new { id=item.ID }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { id=item.ID })
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.displayname)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
@Html.ActionLink("edit account details", "Edit", null, new { @class = "btn btn-outline-dark" })
|
||||
|
||||
@Html.ActionLink("Logout", "LogOut", null, new { @class = "btn btn-outline-dark" })
|
||||
</div>
|
||||
<br />
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
@Html.ActionLink("Delete Account", "Delete", null, new { @class = "btn btn-outline-dark" })
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user