Michele: nuova pagina modifica tutte destinazioni + metodo in GiriController + bottone in Giri Index

This commit is contained in:
michele 2024-07-18 11:20:04 +02:00
parent 6a4cdc4c73
commit 563d74b536
4 changed files with 239 additions and 2 deletions

View File

@ -253,6 +253,16 @@ namespace SoftwayWeb.Controllers
}
}
public IActionResult ModificaTutteDestinazioni(string? codAutista, string? nomeAutista, string? codMezzo, string? nomeMezzo)
{
ViewBag.CodAutista = codAutista;
ViewBag.Autista = nomeAutista;
ViewBag.CodMezzo = codMezzo;
ViewBag.Mezzo = nomeMezzo;
return View();
}
//[HttpPost]
//public IActionResult Create(GiriConsegnaView model)
//{

View File

@ -15,9 +15,9 @@
<p>
<b>Data giro: @ViewBag.dataGiro</b>
<br />
<b>@ViewBag.CodAutista - @ViewBag.Autista</b>
<b>Autista: @ViewBag.CodAutista - @ViewBag.Autista</b>
<br />
<b>@ViewBag.CodMezzo - @ViewBag.Automezzo</b>
<b>Automezzo: @ViewBag.CodMezzo - @ViewBag.Automezzo</b>
</p>
<a asp-action="Index" asp-controller="Giri" value="Torna alla lista" class="agy-btn submitForm">Torna alla lista</a>

View File

@ -108,6 +108,11 @@
desMezzo=item.Automezzo})" title="Destinazioni" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-oggetti-puntiforme-30.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Bancali", "Giri", new { id=item.SerialeGiro })" title="Bancali" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-bancale-24.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Chiudi", "GiriChiudi", new { id=item.SerialeGiro,nbanc=item.parzialeBanRec,imp=item.parzialeImpRec })" title="Chiudi" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-bandiera-a-scacchi-64.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("ModificaTutteDestinazioni", "Giri", new { codAutista = item.CodAutista,
nomeAutista = item.Autista,
codMezzo= item.CodMezzo,
nomeMezzo = item.Automezzo@* id=item.SerialeGiro,nbanc=item.parzialeBanRec,imp=item.parzialeImpRec *@ })" title="Modifica tutte le destinazioni" class="links"><img alt="nocons" src="@Url.Content("~/images/system.png")" style="width:24px;height:24px;"></a>
</td>
</tr>
}

View File

@ -0,0 +1,222 @@
@* @model IEnumerable<SoftwayWeb.Models.Destinazioni_Out> *@
@model IPagedList<SoftwayWeb.Models.Destinazioni_Out>
@using X.PagedList;
@using X.PagedList.Mvc.Core;
@using X.PagedList;
@{
ViewData["Title"] = "ModificaTutteDestinazioni";
}
<h1>Modifica Tutte Destinazioni</h1>
<div>
<p>Autista da sostituire: @ViewBag.CodAutista - @ViewBag.Autista</p>
<p>Automezzo da sostituire: @ViewBag.CodMezzo - @ViewBag.Mezzo</p>
</div>
@* <div>@Html.DropDownList("codAutista", ViewBag.Autisti, null, new { @class = "agy-form-field require" })</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<th><b>Automezzo:</b></th>
<div>@Html.DropDownList("codMezzo", ViewBag.CodMezzo, null, new { @class = "agy-form-field require" })</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div> *@
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>&nbsp;</th>
<th>Seq</th>
<th>Committente</th>
<th>Sede</th>
<th>Indirizzo sede</th>
<th>Casse</th>
<th>Trasf.</th>
<th>Colli</th>
<th>Nr.Cons.</th>
<th>Uova</th>
<th>Cist</th>
<th>Note</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
@* <tr>
<th>
@Html.DisplayNameFor(model => model.CodAutomezzo)
</th>
<th>
@Html.DisplayNameFor(model => model.DescAutomezzo)
</th>
<th>
@Html.DisplayNameFor(model => model.Brserial)
</th>
<th>
@Html.DisplayNameFor(model => model.DataCarico)
</th>
<th>
@Html.DisplayNameFor(model => model.CodCommittente)
</th>
<th>
@Html.DisplayNameFor(model => model.Committente)
</th>
<th>
@Html.DisplayNameFor(model => model.CodAutista)
</th>
<th>
@Html.DisplayNameFor(model => model.Autista)
</th>
<th>
@Html.DisplayNameFor(model => model.CodSede)
</th>
<th>
@Html.DisplayNameFor(model => model.Sede)
</th>
<th>
@Html.DisplayNameFor(model => model.IndirizzoSede)
</th>
<th>
@Html.DisplayNameFor(model => model.Cproword)
</th>
<th>
@Html.DisplayNameFor(model => model.Cprownum)
</th>
<th>
@Html.DisplayNameFor(model => model.Brmerce)
</th>
<th>
@Html.DisplayNameFor(model => model.Brnote)
</th>
<th>
@Html.DisplayNameFor(model => model.ImportoDaRitirare)
</th>
<th>
@Html.DisplayNameFor(model => model.ItemList)
</th>
<th>
@Html.DisplayNameFor(model => model.serialeGiro)
</th>
<th>
@Html.DisplayNameFor(model => model.Casse)
</th>
<th>
@Html.DisplayNameFor(model => model.Trasf)
</th>
<th>
@Html.DisplayNameFor(model => model.Colli)
</th>
<th>
@Html.DisplayNameFor(model => model.num_cons)
</th>
<th>
@Html.DisplayNameFor(model => model.Uova)
</th>
<th>
@Html.DisplayNameFor(model => model.Cist)
</th>
<th>
@Html.DisplayNameFor(model => model.Note)
</th>
<th>
@Html.DisplayNameFor(model => model.Seq)
</th>
<th>
@Html.DisplayNameFor(model => model.Prog)
</th>
<th></th> *@
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.CodAutomezzo)
</td>
<td>
@Html.DisplayFor(modelItem => item.DescAutomezzo)
</td>
<td>
@Html.DisplayFor(modelItem => item.Brserial)
</td>
<td>
@Html.DisplayFor(modelItem => item.DataCarico)
</td>
<td>
@Html.DisplayFor(modelItem => item.CodCommittente)
</td>
<td>
@Html.DisplayFor(modelItem => item.Committente)
</td>
<td>
@Html.DisplayFor(modelItem => item.CodAutista)
</td>
<td>
@Html.DisplayFor(modelItem => item.Autista)
</td>
<td>
@Html.DisplayFor(modelItem => item.CodSede)
</td>
<td>
@Html.DisplayFor(modelItem => item.Sede)
</td>
<td>
@Html.DisplayFor(modelItem => item.IndirizzoSede)
</td>
<td>
@Html.DisplayFor(modelItem => item.Cproword)
</td>
<td>
@Html.DisplayFor(modelItem => item.Cprownum)
</td>
<td>
@Html.DisplayFor(modelItem => item.Brmerce)
</td>
<td>
@Html.DisplayFor(modelItem => item.Brnote)
</td>
<td>
@Html.DisplayFor(modelItem => item.ImportoDaRitirare)
</td>
<td>
@Html.DisplayFor(modelItem => item.ItemList)
</td>
<td>
@Html.DisplayFor(modelItem => item.serialeGiro)
</td>
<td>
@Html.DisplayFor(modelItem => item.Casse)
</td>
<td>
@Html.DisplayFor(modelItem => item.Trasf)
</td>
<td>
@Html.DisplayFor(modelItem => item.Colli)
</td>
<td>
@Html.DisplayFor(modelItem => item.num_cons)
</td>
<td>
@Html.DisplayFor(modelItem => item.Uova)
</td>
<td>
@Html.DisplayFor(modelItem => item.Cist)
</td>
<td>
@Html.DisplayFor(modelItem => item.Note)
</td>
<td>
@Html.DisplayFor(modelItem => item.Seq)
</td>
<td>
@Html.DisplayFor(modelItem => item.Prog)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
</td>
</tr>
}
</tbody>
</table>