SoftwayWeb/Views/Giri/Create.cshtml

115 lines
5.6 KiB
Plaintext

@model List<SoftwayWeb.Models.GiriConsegnaDaCreare>
@{
ViewData["Title"] = "Create";
Layout = "~/Views/Shared/_LayoutAreaRis.cshtml";
List<GiriConsegnaDaCreare> lst = new List<GiriConsegnaDaCreare>();
lst = Model;
}
<div class="agy-project-wrapper agy-project-page-wrapper">
<div class="container">
<div class="row">
@* <div class="row">
<div class="col-md-8">
<form asp-action="Create">
<div class="form-group" style="width: 40%;">
<h5><label asp-for="CodAutista" class="agy-client-quote"></label></h5>
@Html.DropDownListFor(x => x.CodAutista, (IEnumerable<SelectListItem>)ViewBag.Autisti, new { @class = "agy-form-field require" })
<span asp-validation-for="CodAutista" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group" style="width: 40%;">
<h5><label asp-for="DataGiro" class="agy-client-quote"></label></h5>
@Html.TextBox("DataGiro", null, new { type = "date", @class = "agy-form-field require" })
<span asp-validation-for="DataGiro" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group" style="width: 40%;">
<h5><label asp-for="ImportoDaRecuperare" class="agy-client-quote"></label></h5>
<input asp-for="ImportoDaRecuperare" class="agy-form-field require" placeholder="Importo Da Recuperare" />
<span asp-validation-for="ImportoDaRecuperare" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group" style="width: 40%;">
<h5><label asp-for="BancaliCaricati" class="agy-client-quote"></label></h5>
<input asp-for="BancaliCaricati" class="agy-form-field require" placeholder="Bancali Caricati" />
<span asp-validation-for="BancaliCaricati" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group" style="width: 40%;">
<input type="submit" value="Salva" class="agy-btn submitForm" />
</div>
@Html.HiddenFor(x => x.SerialeGiro)
@Html.HiddenFor(x => x.Autista)
@Html.HiddenFor(x => x.BancaliRecuperati)
@Html.HiddenFor(x => x.ImportoRecuperato)
@Html.HiddenFor(x => x.DataChiusura)
</form>
</div>
</div>*@
<div class="row">
<div class="col-md-8">
<form asp-action="PostIndex">
<table class="table">
<thead>
<tr>
<th>&nbsp;</th>
<th>Data</th>
<th>Autista</th>
<th>Automezzo</th>
</tr>
</thead>
<tbody>
@for (var i = 0; i < lst.Count(); i++)
{
<tr>
<td>
@Html.CheckBoxFor(a=>lst[i].IsSelected)
</td>
<td>
@Html.DisplayFor(a=>lst[i].DataGiro)
@Html.HiddenFor(a=>lst[i].DataGiro)
</td>
<td>
@Html.DisplayFor(a=>lst[i].CodAutista)-@Html.DisplayFor(a=>lst[i].Autista)
@Html.HiddenFor(a=>lst[i].CodAutista)
</td>
<td>
@Html.DisplayFor(a=>lst[i].CodMezzo)-@Html.DisplayFor(a=>lst[i].Automezzo)
@Html.HiddenFor(a=>lst[i].CodMezzo)
</td>
@Html.HiddenFor(a=>lst[i].Automezzo)
@Html.HiddenFor(a=>lst[i].Autista)
</tr>
}
</tbody>
</table>
<input type="submit" />
</form>
@Html.ActionLink("Seleziona tutti", "Create", "Giri",new { sel = true }, null)
&nbsp;
@Html.ActionLink("Deleziona tutti", "Create", "Giri",new { sel = false }, null)
</div>
</div>
@section Scripts {
@{
await Html.RenderPartialAsync("_ValidationScriptsPartial");
}
}
</div>
</div>
</div>