SoftwayWeb/Views/Giri/ModificaTutteDestinazioni.cshtml

225 lines
12 KiB
Plaintext

@model List<SoftwayWeb.Models.Destinazioni_Out>
@{
ViewData["Title"] = "ModificaTutteDestinazioni";
Layout = "~/Views/Shared/_LayoutAreaRis.cshtml";
List<Destinazioni_Out> modelList = new List<Destinazioni_Out>();
modelList = Model;
}
<h1>Modifica Tutte Destinazioni</h1>
<!-- Basic Layout -->
<div class="row">
<div class="col-xl">
<div class="card mb-4">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Modifica Tutte Destinazioni</h5> <small class="text-muted float-end"></small>
</div>
<div class="card-body">
<div class="mb-3">
<b>Autista da sostituire:</b> @ViewBag.CodAutista - @ViewBag.Autista
</div>
<div class="mb-3">
<b>Automezzo da sostituire:</b> @ViewBag.CodMezzo - @ViewBag.Mezzo
</div>
@using (Html.BeginForm(@* "ModificaTutteDestinazioniPost" *@"ModificaTutteDestinazioniStep1", "Giri", FormMethod.Post))
{
<div class="mb-3">
<b>Seleziona il nuovo autista:</b> @Html.DropDownList("autisti", ViewBag.Autisti, null, new { @class = "agy-form-field require" })
</div>
<div class="mb-3">
<b>Seleziona il nuovo Automezzo:</b> @Html.DropDownList("mezzi", ViewBag.Mezzi, null, new { @class = "agy-form-field require" })
</div>
<div class="mb-3">
@* <input type="submit" value="Salva modifiche" class="btn btn-primary" /> *@
<input type="submit" value="Avanti" class="btn btn-primary" />
@* <a asp-action="ModificaTutteDestinazioniStep1" asp-controller="Giri" asp-route-modelList="@modelList" class="btn btn-primary">avanti</a> *@
<a asp-action="Index" asp-controller="Giri" asp-route-oldAuti="@ViewBag.Autista" asp-route-oldMezzo="@ViewBag.Mezzo" value="Torna alla lista" class="btn btn-primary">Torna alla lista</a>
</div>
@for (var i = 0; i < modelList.Count(); i++)
{
@Html.HiddenFor(modelItem => modelList[i].CodAutomezzo);
@Html.HiddenFor(modelItem => modelList[i].DescAutomezzo)
@Html.HiddenFor(modelItem => modelList[i].Brserial)
@Html.HiddenFor(modelItem => modelList[i].DataCarico)
@Html.HiddenFor(modelItem => modelList[i].CodCommittente)
@Html.HiddenFor(modelItem => modelList[i].Committente)
@Html.HiddenFor(modelItem => modelList[i].CodAutista)
@Html.HiddenFor(modelItem => modelList[i].Autista)
@Html.HiddenFor(modelItem => modelList[i].CodSede)
@Html.HiddenFor(modelItem => modelList[i].Sede)
@Html.HiddenFor(modelItem => modelList[i].IndirizzoSede)
@Html.HiddenFor(modelItem => modelList[i].Cproword)
@Html.HiddenFor(modelItem => modelList[i].Cprownum)
@Html.HiddenFor(modelItem => modelList[i].Brmerce)
@Html.HiddenFor(modelItem => modelList[i].Brnote)
@Html.HiddenFor(modelItem => modelList[i].ImportoDaRitirare)
@Html.HiddenFor(modelItem => modelList[i].ItemList)
@Html.HiddenFor(modelItem => modelList[i].serialeGiro)
@Html.HiddenFor(modelItem => modelList[i].Casse)
@Html.HiddenFor(modelItem => modelList[i].Trasf)
@Html.HiddenFor(modelItem => modelList[i].Colli)
@Html.HiddenFor(modelItem => modelList[i].num_cons)
@Html.HiddenFor(modelItem => modelList[i].Uova)
@Html.HiddenFor(modelItem => modelList[i].Cist)
@Html.HiddenFor(modelItem => modelList[i].Note)
@Html.HiddenFor(modelItem => modelList[i].Seq)
@Html.HiddenFor(modelItem => modelList[i].Prog)
}
}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xl">
<div class="card mb-4">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Elenco Destinazioni</h5> <small class="text-muted float-end"></small>
</div>
<div class="table-responsive text-nowrap">
<table class="table table-striped">
<thead>
<tr>
@*<th>&nbsp;</th>*@
<th>S.</th>
<th>Committente</th>
<th>Sede</th>
<th>Indirizzo sede</th>
<th>Ca.</th>
<th>Tr.</th>
<th>Co.</th>
<th>Nr.Co.</th>
<th>Uo</th>
<th>Ci.</th>
<th>Note</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
@for (var i = 0; i < modelList.Count(); i++)
{
<tr>
<td style="font-size:12px; border-right-width:2px"><i class="bx bxl-angular bx-sm text-danger me-3"></i>@Html.DisplayFor(modelItem => modelList[i].Seq)</td>
<td style="border-right-width:2px">@Html.DisplayFor(modelItem => modelList[i].Committente)</td>
<td style="border-right-width:2px">@Html.DisplayFor(modelItem => modelList[i].Sede)</td>
<td style="border-right-width:2px">@Html.DisplayFor(modelItem => modelList[i].IndirizzoSede)</td>
@if (modelList[i].Casse != null && modelList[i].Casse > 0)
{
int icasse = 0;
icasse = Convert.ToInt32(modelList[i].Casse);
<td style="font-size:12px; border-right-width:2px">
@icasse
</td>
}
else
{
<td style="border-right-width:2px">&nbsp;</td>
}
@if (modelList[i].Trasf != null && modelList[i].Trasf > 0)
{
<td style="font-size:12px; border-right-width:2px">
@Html.DisplayFor(modelItem => modelList[i].Trasf)
</td>
}
else
{
<td style="border-right-width:2px">&nbsp;</td>
}
@if (modelList[i].Colli != null && modelList[i].Colli > 0)
{
int icolli = 0;
icolli = Convert.ToInt32(modelList[i].Colli);
<td style="font-size:12px; border-right-width:2px">
@icolli
</td>
}
else
{
<td style="border-right-width:2px">&nbsp;</td>
}
@if (modelList[i].num_cons != null && modelList[i].num_cons > 0)
{
<td style="font-size:12px; border-right-width:2px">
@Html.DisplayFor(modelItem => modelList[i].num_cons)
</td>
}
else
{
<td style="border-right-width:2px">&nbsp;</td>
}
@if (modelList[i].Uova != null && modelList[i].Uova > 0)
{
<td style="font-size:12px; border-right-width:2px">
@Html.DisplayFor(modelItem => modelList[i].Uova)
</td>
}
else
{
<td style="border-right-width:2px">&nbsp;</td>
}
@if (modelList[i].Cist != null && modelList[i].Cist > 0)
{
<td style="font-size:12px; border-right-width:2px">
@Html.DisplayFor(modelItem => modelList[i].Cist)
</td>
}
else
{
<td style="border-right-width:2px">&nbsp;</td>
}
<td style="font-size:12px; border-right-width:2px">
@Html.DisplayFor(modelItem => modelList[i].Note)
</td>
<td style="border-right-width:2px">&nbsp;</td>
<td style="border-right-width:2px">&nbsp;</td>
@* @if (modelList[i].ConsFatta == null)
{
<td>
@if (!string.IsNullOrEmpty(modelList[i].Prog))
{
<img alt="nocons" src="@Url.Content("~/images/warning.png")" style="width:16px;height:16px;">
}
<a href="@Url.ActionLink("EliminaDestinazione", "Destinazioni", new { serial=modelList[i].Brserial })" title="Elimina Destinazione" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-rimuovere-24.png")" style="width:16px;height:16px;"></a>
</td>
<td>
<a href="@Url.ActionLink("ModificaDestinazione", "Destinazioni", new { serial=modelList[i].Brserial })" title="Modifica Destinazione" class="links"><img alt="nocons" src="@Url.Content("~/images/system.png")" style="width:16px;height:16px;"></a>
</td>
}
else
{
<td>&nbsp;</td>
<td>&nbsp;</td>
} *@
</tr>
}
</tbody>
</table>
</div>
</div>
</div>
</div>
@* <br />
<nav>
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, Model/* searchString = @ViewData["CurrentFilter"] */ }), new PagedListRenderOptions()
{
ActiveLiElementClass = "active",
PageClasses = new[] { "page-link" },
LiElementClasses = new[] { "page-item" },
UlElementClasses = new[] { "pagination", "justify-content-center", "mt-3" },
LinkToNextPageFormat = "Successiva",
LinkToPreviousPageFormat = "Precedente",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav> *@