VirtualTask/Views/Timbrature/Index.cshtml

213 lines
8.1 KiB
Plaintext

@model IPagedList<VirtualTask.Models.Timbratura>
@using X.PagedList;
@using X.PagedList.Mvc.Core;
@using X.PagedList.Web.Common;
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
ViewData["Title"] = "Timbrature";
Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml";
}
<div class="agy-project-wrapper agy-project-page-wrapper">
<div class="container">
<div class="row">
@using (Html.BeginForm())
{
<div>
<div class="row">
<div style="float:left;width:40%;padding:0 10px;">
@Html.TextBox("id", null, new { placeholder = "Cerca per id", @class = "agy-form-field require" })
</div>
</div>
<div style="float:left;width:2%;">&nbsp;</div>
<div style="float:left;width:57%;"><input type="submit" value="Cerca" class="agy-btn submitForm" /></div>
</div>
<div style="float:left;width:2%;">&nbsp;</div>
<div style="float:left;width:2%;">&nbsp;</div>
<div style="float:left;width:2%;">&nbsp;</div>
}
<br>
<br>
<br>
@using (Html.BeginForm("ExportExcel", "Timbrature"))
{
<div style="float:left;width:40%;padding:0 5px;">
<input type="submit" value="Esporta excel" name="Esporta excel" class="agy-btn submitForm" />
@* <div style="float:left;width:57%;"><input type="submit" value="Esporta excel" class="agy-btn submitForm" /></div> *@
</div>
}
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Data timbratura</th>
<th>Ora inizio</th>
<th>Minuti inizio</th>
<th>Ora fine</th>
<th>Minuti fine</th>
<th>Commessa</th>
<th>Ore viaggio</th>
<th>Totale ore</th>
<th>Giorno sett.</th>
<th>Tecnico</th>
<th hidden>Azienda</th>
<th hidden>Note</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>@Html.DisplayFor(modelItem => item.id)</td>
<td>@Html.DisplayFor(modelItem => item.data_timbratura)</td>
<td>@Html.DisplayFor(modelItem => item.ora_ini)</td>
<td>@Html.DisplayFor(modelItem => item.min_ini)</td>
<td>@Html.DisplayFor(modelItem => item.ora_fin)</td>
<td>@Html.DisplayFor(modelItem => item.min_fin)</td>
<td>@Html.DisplayFor(modelItem => item.commessa)</td>
<td>@Html.DisplayFor(modelItem => item.ore_viaggio)</td>
<td>@Html.DisplayFor(modelItem => item.tot_ore)</td>
<td>@Html.DisplayFor(modelItem => item.giorno)</td>
<td>@Html.DisplayFor(modelItem => item.tecnico)</td>
<td>@Html.HiddenFor(modelItem => item.azienda)</td>
<td>@Html.HiddenFor(modelItem => item.cpccchk)</td>
<td>@Html.HiddenFor(modelItem => item.note)</td>
<td>
<a href="@Url.Action("Details", "Timbrature", new { id=item.id })" title="Dettaglio" class="links">
<img alt="Dettaglio" src="@Url.Content("~/assets/images/icons8-visualizza-file-64.png")" style="width:30px;height:30px;">
</a>
</td>
</tr>
}
</tbody>
</table>
<br />
<nav>
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, 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>
</div>
</div>
</div>
@* <table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.id)
</th>
<th>
@Html.DisplayNameFor(model => model.data_timbratura)
</th>
<th>
@Html.DisplayNameFor(model => model.ora_ini)
</th>
<th>
@Html.DisplayNameFor(model => model.min_ini)
</th>
<th>
@Html.DisplayNameFor(model => model.ora_fin)
</th>
<th>
@Html.DisplayNameFor(model => model.min_fin)
</th>
<th>
@Html.DisplayNameFor(model => model.commessa)
</th>
<th>
@Html.DisplayNameFor(model => model.ore_viaggio)
</th>
<th>
@Html.DisplayNameFor(model => model.tot_ore)
</th>
<th>
@Html.DisplayNameFor(model => model.giorno)
</th>
<th>
@Html.DisplayNameFor(model => model.azienda)
</th>
<th>
@Html.DisplayNameFor(model => model.tecnico)
</th>
<th>
@Html.DisplayNameFor(model => model.cpccchk)
</th>
<th>
@Html.DisplayNameFor(model => model.note)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.id)
</td>
<td>
@Html.DisplayFor(modelItem => item.data_timbratura)
</td>
<td>
@Html.DisplayFor(modelItem => item.ora_ini)
</td>
<td>
@Html.DisplayFor(modelItem => item.min_ini)
</td>
<td>
@Html.DisplayFor(modelItem => item.ora_fin)
</td>
<td>
@Html.DisplayFor(modelItem => item.min_fin)
</td>
<td>
@Html.DisplayFor(modelItem => item.commessa)
</td>
<td>
@Html.DisplayFor(modelItem => item.ore_viaggio)
</td>
<td>
@Html.DisplayFor(modelItem => item.tot_ore)
</td>
<td>
@Html.DisplayFor(modelItem => item.giorno)
</td>
<td>
@Html.DisplayFor(modelItem => item.azienda)
</td>
<td>
@Html.DisplayFor(modelItem => item.tecnico)
</td>
<td>
@Html.DisplayFor(modelItem => item.cpccchk)
</td>
<td>
@Html.DisplayFor(modelItem => item.note)
</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>