@model IEnumerable<FamilyBudget.Models.Depense>
<link rel="stylesheet" href="~/css/dep1.css"/>
<h2>Liste des Dépenses</h2>
<p><a id="dep" asp-action="Create">✚ Créer une nouvelle dépense</a></p>
<table class="table">
    <thead>
        <tr>
            <th>Date</th>
            <th>Budget</th>
            <th>Montant</th>
            <th>Utilisateur</th>
            <th>Actions</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
        <tr>
            @*<td>@item.Nom</td>
            @*<td>@item.Type</td>*@
            <td>@item.DateDepense.ToShortDateString()</td>
            <td>@item.IdBudgetNavigation?.Categorie</td>
            <td>@item.Montant</td>
            @*<td>@item.IdFactureNavigation?.CategorieFacture</td>*@
            <td>@item.IdUtilisateurNavigation?.Nom</td>
            <td>
                <a class="btn btn-info btn-sm" asp-action="Edit" asp-route-id="@item.IdDepenses">Modifier</a> |
                <a class="btn btn-warning btn-sm" asp-action="Details" asp-route-id="@item.IdDepenses">Détails</a> |
                <a class="btn btn-danger btn-sm" asp-action="Delete" asp-route-id="@item.IdDepenses">Supprimer</a>
            </td>
        </tr>}
    </tbody>
</table>