@model Employe
@{
	string titre = "Creation Empoyes";
    ViewBag.Title = "Index";
}

<h2>Index</h2>

@using(Html.BeginForm(null, null, FormMethod.Post, new { @class="form-horizontal", role="form" })) {
	@Html.AntiForgeryToken()
	<div class="form-group">
		<label class="col-sm-3 control-label" for="ID">
			@Html.NameFor(m => m.ID)
			@Html.AllValidationMessagesFor(m => m.ID, new { @class = "exposant", title = "Erreurs sur ID :" })
		</label>
		<div class="col-sm-9">
			@Html.TextBoxFor(m => m.ID, new { @class = "form-control" })
		</div>
	</div>

	<div class="form-group">
		<label class="col-sm-3 control-label" for="Nom">
			@Html.NameFor(m => m.Nom)
			@Html.AllValidationMessagesFor(m => m.Nom, new { @class = "exposant", title = "Erreurs sur le nom :" })
		</label>
		<div class="col-sm-9">
			@Html.EditorFor(m => m.Nom, new { htmlAttributes = new { @class = "form-control" } }) @* La convention pour passer des htmlAttributes à un EditorFor : Lourdingue.... *@
		</div>
	</div>

	<div class="form-group">
		<label class="col-sm-3 control-label" for="Poste">
			@Html.NameFor(m => m.Poste)
			@Html.AllValidationMessagesFor(m => m.Poste, new { @class = "exposant", title = "Erreurs sur le poste :" })
		</label>
		<div class="col-sm-9">
			@Html.EnumDropDownListFor(m => m.Poste, ". . . Choisir un poste . . .", new { @class = "form-control" })
		</div>
	</div>

	<div class="form-group">
		<label class="col-sm-3 control-label" for="Salaire">
			@Html.NameFor(m => m.Salaire)
			@Html.AllValidationMessagesFor(m => m.Salaire, new { @class = "exposant", title = "Erreurs sur le salaire :" })
		</label>
		<div class="col-sm-9">
			@Html.TextBoxFor(m => m.Salaire, new { @class = "form-control" })
		</div>
	</div>

	<div class="form-group">
		<div class="col-sm-offset-3 col-sm-9">
			<input type="submit" value="Créer l'employé" class="btn btn-primary" />
		</div>
	</div>
}
<hr />
@Html.ValidationSummary()
