Michele:: modifiche per paginazione destinazioni
This commit is contained in:
parent
35685d2874
commit
6a4cdc4c73
@ -42,6 +42,7 @@ namespace SoftwayWeb.Controllers
|
|||||||
string autista = string.Empty;
|
string autista = string.Empty;
|
||||||
string dataGi = string.Empty;
|
string dataGi = string.Empty;
|
||||||
string mezzo = string.Empty;
|
string mezzo = string.Empty;
|
||||||
|
string dataGiro2 = string.Empty;
|
||||||
|
|
||||||
ViewBag.CodAutista = codAutista;
|
ViewBag.CodAutista = codAutista;
|
||||||
ViewBag.Autista = nomeAutista;
|
ViewBag.Autista = nomeAutista;
|
||||||
@ -52,31 +53,42 @@ namespace SoftwayWeb.Controllers
|
|||||||
if (!string.IsNullOrEmpty(codAutista))
|
if (!string.IsNullOrEmpty(codAutista))
|
||||||
{
|
{
|
||||||
helper.SetStringValue("codAutista", codAutista.TrimEnd());
|
helper.SetStringValue("codAutista", codAutista.TrimEnd());
|
||||||
|
helper.SetStringValue("nomeAutista", nomeAutista.TrimEnd());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string aut = helper.GetStringValue("codAutista");
|
string codAut = helper.GetStringValue("codAutista");
|
||||||
codAutista = aut.TrimEnd();
|
codAutista = codAut.TrimEnd();
|
||||||
|
ViewBag.CodAutista = codAutista;
|
||||||
|
string nomeAut = helper.GetStringValue("nomeAutista");
|
||||||
|
ViewBag.Autista = nomeAut;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(codMezzo))
|
if (!string.IsNullOrEmpty(codMezzo))
|
||||||
{
|
{
|
||||||
helper.SetStringValue("codMezzo", codMezzo.TrimEnd());
|
helper.SetStringValue("codMezzo", codMezzo.TrimEnd());
|
||||||
|
helper.SetStringValue("desMezzo", desMezzo.TrimEnd());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string mez = helper.GetStringValue("codMezzo").TrimEnd();
|
string mez = helper.GetStringValue("codMezzo").TrimEnd();
|
||||||
codMezzo = mez;
|
codMezzo = mez;
|
||||||
|
ViewBag.CodMezzo = codMezzo;
|
||||||
|
string nomeMezzo = helper.GetStringValue("desMezzo");
|
||||||
|
ViewBag.Automezzo = nomeMezzo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataGiro.Date != DateTime.MinValue)
|
if (dataGiro.Date != DateTime.MinValue)
|
||||||
{
|
{
|
||||||
helper.SetStringValue("dataGiro", dataGiro.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'"));
|
helper.SetStringValue("dataGiro", dataGiro.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'"));
|
||||||
dataGi = dataGiro.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
dataGi = dataGiro.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
||||||
|
helper.SetStringValue("dataGiro2", dataGiro.ToString("dd/MM/yyyy"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dataGi = helper.GetStringValue("dataGiro");
|
dataGi = helper.GetStringValue("dataGiro");
|
||||||
|
string dataG = helper.GetStringValue("dataGiro2");
|
||||||
|
ViewBag.dataGiro = dataG;
|
||||||
}
|
}
|
||||||
|
|
||||||
urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzo";
|
urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzo";
|
||||||
|
|||||||
@ -48,134 +48,131 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in Model) {
|
@foreach (var item in Model) {
|
||||||
<tr>
|
<tr>
|
||||||
@if (item.ConsFatta != null)
|
@if (item.ConsFatta != null)
|
||||||
{
|
{
|
||||||
<td>
|
<td>
|
||||||
@Html.HiddenFor(modelItem => item.ConsFatta.consFattaFlagCons)
|
@Html.HiddenFor(modelItem => item.ConsFatta.consFattaFlagCons)
|
||||||
|
|
||||||
@if (item.ConsFatta.consFattaFlagCons.Contains("S"))
|
@if (item.ConsFatta.consFattaFlagCons.Contains("S"))
|
||||||
{
|
{
|
||||||
<img alt="cons" src="@Url.Content("~/images/Green.png")" style="width:24px;height:24px">
|
<img alt="cons" src="@Url.Content("~/images/Green.png")" style="width:24px;height:24px">
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<img alt="nocons" src="@Url.Content("~/images/Red.png")" style="width:24px;height:24px;">
|
|
||||||
}
|
|
||||||
</td>
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<td>
|
<img alt="nocons" src="@Url.Content("~/images/Red.png")" style="width:24px;height:24px;">
|
||||||
<img alt="notyet" src="@Url.Content("~/images/Yellow.png")" style="width:24px;height:24px;">
|
|
||||||
</td>
|
|
||||||
}
|
}
|
||||||
<td>
|
</td>
|
||||||
@Html.DisplayFor(modelItem => item.Seq)
|
}
|
||||||
</td>
|
else
|
||||||
|
{
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.CodCommittente) - @Html.DisplayFor(modelItem => item.Committente)
|
<img alt="notyet" src="@Url.Content("~/images/Yellow.png")" style="width:24px;height:24px;">
|
||||||
|
</td>
|
||||||
|
}
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Seq)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.CodCommittente) - @Html.DisplayFor(modelItem => item.Committente)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.CodSede) - @Html.DisplayFor(modelItem => item.Sede)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.IndirizzoSede)
|
||||||
|
</td>
|
||||||
|
@if (item.Casse != null && item.Casse>0)
|
||||||
|
{
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Casse)
|
||||||
|
</td>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<td> </td>
|
||||||
|
}
|
||||||
|
@if (item.Trasf != null && item.Trasf > 0)
|
||||||
|
{
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Trasf)
|
||||||
|
</td>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<td> </td>
|
||||||
|
}
|
||||||
|
@if (item.Colli != null && item.Colli > 0)
|
||||||
|
{
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Colli)
|
||||||
|
</td>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<td> </td>
|
||||||
|
}
|
||||||
|
@if (item.num_cons != null && item.num_cons > 0)
|
||||||
|
{
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.num_cons)
|
||||||
|
</td>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<td> </td>
|
||||||
|
}
|
||||||
|
@if (item.Uova != null && item.Uova > 0)
|
||||||
|
{
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Uova)
|
||||||
|
</td>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<td> </td>
|
||||||
|
}
|
||||||
|
@if (item.Cist != null && item.Cist > 0)
|
||||||
|
{
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Cist)
|
||||||
|
</td>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<td> </td>
|
||||||
|
}
|
||||||
|
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Note)
|
||||||
|
</td>
|
||||||
|
|
||||||
|
@if (item.ConsFatta == null)
|
||||||
|
{
|
||||||
|
<td>
|
||||||
|
@if (!string.IsNullOrEmpty(item.Prog))
|
||||||
|
{
|
||||||
|
<img alt="nocons" src="@Url.Content("~/images/warning.png")" style="width:24px;height:24px;">
|
||||||
|
}
|
||||||
|
|
||||||
|
<a href="@Url.ActionLink("EliminaDestinazione", "Destinazioni", new { serial=item.Brserial })" title="Elimina Destinazione" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-rimuovere-24.png")" style="width:24px;height:24px;"></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.CodSede) - @Html.DisplayFor(modelItem => item.Sede)
|
<a href="@Url.ActionLink("ModificaDestinazione", "Destinazioni", new { serial=item.Brserial })" title="Modifica Destinazione" class="links"><img alt="nocons" src="@Url.Content("~/images/system.png")" style="width:24px;height:24px;"></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
}
|
||||||
@Html.DisplayFor(modelItem => item.IndirizzoSede)
|
else
|
||||||
</td>
|
{
|
||||||
@if (item.Casse != null && item.Casse>0)
|
<td> </td>
|
||||||
{
|
<td> </td>
|
||||||
<td>
|
}
|
||||||
@Html.DisplayFor(modelItem => item.Casse)
|
</tr>
|
||||||
</td>
|
}
|
||||||
}
|
</tbody>
|
||||||
else
|
|
||||||
{
|
|
||||||
<td> </td>
|
|
||||||
}
|
|
||||||
@if (item.Trasf != null && item.Trasf > 0)
|
|
||||||
{
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Trasf)
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td> </td>
|
|
||||||
}
|
|
||||||
@if (item.Colli != null && item.Colli > 0)
|
|
||||||
{
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Colli)
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td> </td>
|
|
||||||
}
|
|
||||||
@if (item.num_cons != null && item.num_cons > 0)
|
|
||||||
{
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.num_cons)
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td> </td>
|
|
||||||
}
|
|
||||||
@if (item.Uova != null && item.Uova > 0)
|
|
||||||
{
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Uova)
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td> </td>
|
|
||||||
}
|
|
||||||
@if (item.Cist != null && item.Cist > 0)
|
|
||||||
{
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Cist)
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td> </td>
|
|
||||||
}
|
|
||||||
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Note)
|
|
||||||
</td>
|
|
||||||
|
|
||||||
@if (item.ConsFatta == null)
|
|
||||||
{
|
|
||||||
<td>
|
|
||||||
@if (!string.IsNullOrEmpty(item.Prog))
|
|
||||||
{
|
|
||||||
<img alt="nocons" src="@Url.Content("~/images/warning.png")" style="width:24px;height:24px;">
|
|
||||||
}
|
|
||||||
|
|
||||||
<a href="@Url.ActionLink("EliminaDestinazione", "Destinazioni", new { serial=item.Brserial })" title="Elimina Destinazione" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-rimuovere-24.png")" style="width:24px;height:24px;"></a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="@Url.ActionLink("ModificaDestinazione", "Destinazioni", new { serial=item.Brserial })" title="Modifica Destinazione" class="links"><img alt="nocons" src="@Url.Content("~/images/system.png")" style="width:24px;height:24px;"></a>
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
<nav>
|
<nav>
|
||||||
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, searchString = @ViewData["CurrentFilter"] }), new PagedListRenderOptions()
|
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, Model/* searchString = @ViewData["CurrentFilter"] */ }), new PagedListRenderOptions()
|
||||||
{
|
{
|
||||||
ActiveLiElementClass = "active",
|
ActiveLiElementClass = "active",
|
||||||
PageClasses = new[] { "page-link" },
|
PageClasses = new[] { "page-link" },
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user