SoftwayWeb/Views/Giri/ModificaTutteDestinazioni.cshtml
2025-01-14 16:38:45 +01:00

228 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.NomeAutista
</div>
<div class="mb-3">
<b>Automezzo da sostituire:</b> @ViewBag.CodMezzo - @ViewBag.nomeMezzo
</div>
@using (Html.BeginForm("ModificaTutteDestinazioniStep1", "Giri", FormMethod.Post))
{
<input type="hidden" name="DataGiroCons" id="DataGiroCons" value="@ViewBag.DataGiroCons" />
<input type="hidden" name="SerialeGiro" id="SerialeGiro" value="@ViewBag.SerialeGiro" />
<input type="hidden" name="NomeMezzo" id="NomeMezzo" value="@ViewBag.NomeMezzo" />
<input type="hidden" name="NomeAutista" id="NomeAutista" value="@ViewBag.NomeAutista" />
<input type="hidden" name="CodAutistaOld" id="CodAutistaOld" value="@ViewBag.CodAutista" />
<input type="hidden" name="CodMezzoOld" id="CodMezzoOld" value="@ViewBag.CodMezzo" />
<div class="mb-3">
<b>Seleziona il nuovo autista:</b> @Html.DropDownList("codAutista", ViewBag.Autisti, null, new { @class = "agy-form-field require" })
</div>
<div class="mb-3">
<b>Seleziona il nuovo Automezzo:</b> @Html.DropDownList("codMezzo", 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-id="@ViewBag.SerialeGiro"
asp-route-codAutista="@ViewBag.CodAutista"
asp-route-nomeAutista="@ViewBag.NomeAutista"
asp-route-codMezzo="@ViewBag.CodMezzo"
asp-route-nomeMezzo="@ViewBag.NomeMezzo"
asp-route-dataGiroCons="@ViewBag.DataGiroCons"
value="Torna alla lista"
class="btn btn-primary">Avanti2</a>
<a href="@Url.ActionLink("ModificaTutteDestinazioniStep1", "Giri",
new{serialeGiro = ViewBag.SerialeGiro,
codAutista=ViewBag.CodAutista,
nomeAutista=ViewBag.NomeAutista,
codMezzo=ViewBag.CodMezzo,
nomeMezzo=ViewBag.NomeMezzo,
dataGiroCons=ViewBag.DataGiroCons
})" title="Aggiungi nuova destinazione" class="btn btn-primary">Avanti3
</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>
}
</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> *@