@using CD67.FicheCollege.MVC.Models @model RestaurationParametreViewModel @{ ViewBag.Title = "Modification " + Model.Annee_Lib; Layout = "~/Views/Shared/_Layout.cshtml"; RestaurationParametre param = Model.Obj; List repasCBList = ViewBag.repasCBList; }
@if (Model.Acces == ModeAcces.Modification) {

Modification

} else {

Création

}
@using (Html.BeginForm()) { @Html.AntiForgeryToken()

Paramètres


@Html.ValidationSummary(true, "", new { @class = "text-danger" }) @if (Model.Acces == ModeAcces.Modification) { @Html.HiddenFor(model => param.Id) } @Html.HiddenFor(model => param.Annee_Id) @Html.HiddenFor(model => param.Campagne)
@Html.LabelFor(model => param.Prix_Mini, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => param.Prix_Mini, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => param.Prix_Mini, "", new { @class = "text-danger" })
@Html.LabelFor(model => param.Prix_ATC, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => param.Prix_ATC, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => param.Prix_ATC, "", new { @class = "text-danger" })
@Html.LabelFor(model => param.Prix_AgentC, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => param.Prix_AgentC, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => param.Prix_AgentC, "", new { @class = "text-danger" })
@Html.LabelFor(model => param.Prix_MiniAutres, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => param.Prix_MiniAutres, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => param.Prix_MiniAutres, "", new { @class = "text-danger" })
@Html.Label("Types de repas", htmlAttributes: new { @class = "control-label col-md-2" })
@for (int i = 0; i < repasCBList.Count; i++) { @Html.HiddenFor(x => repasCBList[i].ID) @Html.CheckBoxFor(x => repasCBList[i].IsChecked) @repasCBList[i].Display @Html.HiddenFor(x => repasCBList[i].Display)
}
} @section Scripts { }