@model Employe
@{
	string titre = "Création d'employés";
	ViewBag.Title = titre;
}

<h2>@titre</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.AllValidationMessagesTooltipFor( 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.AllValidationMessagesTooltipFor(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.AllValidationMessagesTooltipFor( 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.AllValidationMessagesTooltipFor( 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()



