@model FamilyBudget.Models.Depense
    <link rel="stylesheet" href="~/css/dep2.css" />
<h2>Modifier une Dépense</h2>
<form asp-action="Edit">
    <input type="hidden" asp-for="IdDepenses" />
    @if (TempData["ErreurUtilisateur"] != null)
    {
<p style="color: red;">@TempData["ErreurUtilisateur"]</p> }
else
{
<div class="form-group">
    <label asp-for="IdUtilisateur"></label>
    <select asp-for="IdUtilisateur" class="form-control" asp-items="ViewBag.IdUtilisateur"></select>
    <span asp-validation-for="IdUtilisateur" class="text-danger"></span>
</div>}

    <div class="form-group">
        <label asp-for="IdCompte"></label>
        <select asp-for="IdCompte" asp-items="ViewBag.IdCompte" class="form-control"></select>
        <span asp-validation-for="IdCompte" class="text-danger"></span>
    </div>

    <div class="form-group">
        <label asp-for="IdBudget"></label>
        <select asp-for="IdBudget" asp-items="ViewBag.IdBudget" class="form-control"></select>
        <span asp-validation-for="IdBudget" class="text-danger"></span>
    </div>

    <div class="form-group">
        <label asp-for="Montant"></label>
        <input asp-for="Montant" class="form-control" required />
        <span asp-validation-for="Montant" class="text-danger"></span>
    </div>

    <div class="form-group">
        <label asp-for="DateDepense"></label>
        <input asp-for="DateDepense" class="form-control" type="date" />
        <span asp-validation-for="DateDepense" class="text-danger"></span>
    </div>
    <button type="submit" class="btn btn-success">Enregistrer</button>
</form>

<br />
<br /><span class="text-danger">@ViewBag.Message</span>
