SoftwayWeb/Views/Giri/Create.cshtml

158 lines
7.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">
@* <table class="table">
<thead>
<tr>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>Data</th>
<th>Autista</th>
<th>Automezzo</th>
</tr>
</thead>
<tbody>
@foreach (var person in ViewBag.NuoviGiri)
{
<tr>
<td>&nbsp;</td>
<td>@person.DataGiro.ToString("dd/MM/yyyy")</td>
<td>@person.CodAutista - @person.Autista</td>
<td>@person.CodAutomezzo - @person.Automezzo</td>
</tr>
}
</tbody>
</table>*@
@* @using (Html.BeginForm("PostIndex", "Giri", FormMethod.Post))
{*@
<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].CodAutomezzo)-@Html.DisplayFor(a=>lst[i].Automezzo)
@Html.HiddenFor(a=>lst[i].CodAutomezzo)
</td>
@Html.HiddenFor(a=>lst[i].Automezzo)
@Html.HiddenFor(a=>lst[i].Autista)
</tr>
}
@* @for (var i = 0; i < lst.Count(); i++)
{
string a = lst[i].CodAutista;
string d = lst[i].DataGiro.Value.ToString("dd/MM/yyyy");
string m = lst[i].CodAutomezzo;
<tr>
<td>
@Html.CheckBoxFor(m => [i].Selected);
</td>
<td>
@d
</td>
<td>
@a
</td>
<td>
@m
</td>
</tr>
}*@
</tbody>
</table>
<input type="submit" />
</form>
</div>
</div>
@section Scripts {
@{
await Html.RenderPartialAsync("_ValidationScriptsPartial");
}
}
</div>
</div>
</div>