add user managment(edit/delete/logout) and session

This commit is contained in:
2024-07-27 17:17:28 +03:30
parent 09f9d07f03
commit 08277427c7
12 changed files with 226 additions and 242 deletions

View File

@ -1,15 +1,15 @@
@model WebApplication1.Models.user
@{
ViewBag.Title = "Edit";
ViewBag.Title = "Account managment";
}
<h2>Edit</h2>
<h2>Account managment</h2>
<h4>View and Edit account details</h4>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<h4>user</h4>
<hr />
@ -19,7 +19,7 @@
<div class="form-group">
@Html.LabelFor(model => model.usename, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.usename, new { htmlAttributes = new { @class = "form-control" } })
@Html.EditorFor(model => model.usename, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
@Html.ValidationMessageFor(model => model.usename, "", new { @class = "text-danger" })
</div>
</div>
@ -39,15 +39,17 @@
@Html.ValidationMessageFor(model => model.displayname, "", new { @class = "text-danger" })
</div>
</div>
<br />
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />
@Html.ActionLink("back to account managment", "index", null, new { @class = "btn btn-outline-dark" })
<input type="submit" value="Save" class="btn btn-outline-dark" />
</div>
</div>
</div>
}
<div>
@Html.ActionLink("Back to List", "Index")
</div>