@model FamilyBudget.Models.Bugdet

@{
    ViewData["Title"] = "Create Budget";
}
<link rel="stylesheet" href="~/css/budcss.css">
<h1>Creer un Budget</h1>

<h4>Bugdet</h4>
<hr />
<form asp-action="Create" method="post">
    @if (TempData["ErreurUtilisateur"] != null)
    {
        <p style="color: red;">@TempData["ErreurUtilisateur"]</p> 
    }
    else
    {
        <div class="form-group">
            <label asp-for="IdUtilisateur">Utilisateur</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 for="Categorie">Categorie</label>
        <input type="text" class="form-control" id="Categorie" name="Categorie" />
        <span asp-validation-for="Categorie" class="text-danger"></span>
    </div>
    <div class="form-group">
        <label for="MontantAlloue">Montant Alloue</label>
        <input type="number" class="form-control" id="MontantAlloue" name="MontantAlloue" />
        <span asp-validation-for="MontantAlloue" class="text-danger"></span>
    </div>
    <button type="submit" class="btn btn-primary">Creer</button>
</form>