Startpunkten

This commit is contained in:
2026-03-05 15:43:26 +01:00
commit dd99fb7b01
95 changed files with 3262 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
@model List<Person>
@{
ViewData["Title"] = "Sökresultat";
}
<h2 class="text-center mt-3 mb-4">@ViewData["Title"]</h2>
<div class="container">
<div class="row">
<div class="col-md-8">
<a href="/Person/Create" class="btn btn-success mb-5">Skapa ny medlem</a>
</div>
<div class="col-md-4">
<form asp-action="Search" method="post">
<div class="form-group">
<label class="control-label">
<input name="search" id="search" class="form-control" tabindex="1" placeholder="Namn eller E-post" />
</label>
<input type="submit" value="Sök" class="btn btn-primary" />
</div>
</form>
</div>
</div>
</div>
<div class="container mb-5">
@if (Model.Count() >= 0) {
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Namn</th>
<th>Epost</th>
<th>Alder</th>
<th>Registrerad</th>
<th>Visningsbild</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var person in Model) {
<tr>
<td>@person.PersonId</td>
<td>@person.PersonNamn</td>
<td>@person.Epost</td>
<td>@person.Alder</td>
<td>@person.StartDatum</td>
<td><img src="~/images/userphoto/@person.Visningsbild" alt="@person.PersonNamn" class="visningsbild" /></td>
<td>
<a asp-action="Delete" asp-controller="Person" asp-route-Id="@person.PersonId">Ta bort</a> |
<a asp-action="Edit" asp-controller="Person" asp-route-Id="@person.PersonId">Editera</a>
</td>
</tr>
}
</tbody>
</table>
}
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}