SoftwayWeb/Views/GiriDaValidare/Index.cshtml

99 lines
4.3 KiB
Plaintext

@model List<SoftwayWeb.Models.GiriConsegnaDaCreare>
@{
Layout = "~/Views/Shared/_LayoutAreaRis.cshtml";
List<GiriConsegnaDaCreare> lst = new List<GiriConsegnaDaCreare>();
lst = Model;
string lbl = string.Empty;
string filt = ViewBag.Filtro;
if(string.IsNullOrEmpty(filt))
{
lbl = "Nessun filtro impostato";
}
else
{
lbl = "Filtro:" +filt;
}
}
@using (Html.BeginForm())
{
<div class="card">
<h5 class="card-header">Ricerca</h5>
<div class="table-responsive text-nowrap">
<table class="table table-striped">
<thead>
<tr>
<th style="width:15%">Data giro</th>
<th style="width:15%">&nbsp;</th>
<th style="width:20%">&nbsp;</th>
<th style="width:50%">&nbsp;</th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
<tr>
<td><i class="bx bxl-angular bx-sm text-danger me-3"></i> <span class="fw-medium">@Html.TextBox("data", null, new { type = "date", @class = "agy-form-field require" })</span></td>
<td>@lbl</td>
<td>
<input type="submit" value="Cerca" class="btn btn-primary" />&nbsp;
@Html.ActionLink("Annulla filtro", "Index", "GiriDaValidare",new { clear = true }, new { @class = "btn btn-primary" })
</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</div>
}
<br />
<br />
<div class="card">
<h5 class="card-header">Giri da validare</h5>
<div class="table-responsive text-nowrap">
<form asp-action="PostIndex">
<table class="table table-striped">
<thead>
<tr>
<th>&nbsp;</th>
<th>Data</th>
<th>Autista</th>
<th>Automezzo</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
@for (var i = 0; i < lst.Count(); i++)
{
<tr>
<td style="border-right-width:2px">
@Html.CheckBoxFor(a=>lst[i].IsSelected)
</td>
<td Style="border-right-width:2px">
@Html.DisplayFor(a=>lst[i].DataGiro)
@Html.HiddenFor(a=>lst[i].DataGiro)
</td>
<td style="border-right-width:2px">
@Html.DisplayFor(a=>lst[i].CodAutista)-@Html.DisplayFor(a=>lst[i].Autista)
@Html.HiddenFor(a=>lst[i].CodAutista)
</td>
<td style="border-right-width:2px">
@Html.DisplayFor(a=>lst[i].CodMezzo)-@Html.DisplayFor(a=>lst[i].Automezzo)
@Html.HiddenFor(a=>lst[i].CodMezzo)
</td>
<td style="border-right-width:2px">
<a href="@Url.ActionLink("Index", "Destinazioni", new { id="", codAutista=lst[i].CodAutista, nomeAutista=lst[i].Autista, dataGiro=lst[i].DataGiro, codMezzo=lst[i].CodMezzo, desMezzo=lst[i].Automezzo})" title="Destinazioni" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-oggetti-puntiforme-30.png")" style="width:24px;height:24px;"></a>
</td>
</tr>
}
</tbody>
</table>
<button type="submit" class="btn btn-primary">Valida</button>
@Html.ActionLink("Seleziona tutti", "Index", "GiriDaValidare",new { sel = true }, new { @class = "btn btn-primary" })
@Html.ActionLink("Deleziona tutti", "Index", "GiriDaValidare",new { sel = false },new { @class = "btn btn-primary" })
@Html.ActionLink("Torna alla lista", "Index", "Giri",null,new { @class = "btn btn-primary" })
</form>
</div>
</div>
<!--/ Striped Rows -->