VirtualTask/Views/DatiAzienda/Index.cshtml

85 lines
3.3 KiB
Plaintext

@model IEnumerable<VirtualTask.Models.DatiAziendaTable>
@{
ViewData["Title"] = "Dati Azienda";
Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml";
}
<p>
<a asp-action="Create">Create New</a>
</p>
<div class="agy-project-wrapper agy-project-page-wrapper">
<div class="container">
<div class="row">
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.tecnico)
</th>
<th>
@Html.DisplayNameFor(model => model.ragsoc)
</th>
<th>
@Html.DisplayNameFor(model => model.logo)
</th>
<th>
@Html.DisplayNameFor(model => model.testo_buono)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.tecnico)
</td>
<td>
@Html.DisplayFor(modelItem => item.ragsoc)
</td>
<td>
@{
var base64 = Convert.ToBase64String(item.logo);
var imgSrc = String.Format("data:image/gif;base64,{0}", base64);
}
<img src="@imgSrc" height="80" />
</td>
<td>
@{
string testo = string.Empty;
testo = item.testo_buono;
}
@Html.Raw(@testo)
</td>
<td>
<a href="@Url.Action("Edit", "DatiAzienda", new { azienda=item.azienda,tecnico=item.tecnico })" title="Modifica" class="links">
<img alt="Modifica" src="@Url.Content("~/assets/images/icons8-modificare-64.png")" style="width:30px;height:30px;">
</a>
|
<a href="@Url.Action("Detail", "DatiAzienda", new { azienda=item.azienda,tecnico=item.tecnico })" title="Dettaglio" class="links">
<img alt="Dettaglio" src="@Url.Content("~/assets/images/icons8-visualizza-file-64.png")" style="width:30px;height:30px;">
</a>
|
<a href="@Url.Action("Delete", "DatiAzienda", new { azienda=item.azienda,tecnico=item.tecnico })" title="Elimina" class="links">
<img alt="Elimina" src="@Url.Content("~/assets/images/icons8-elimina-50.png")" style="width:30px;height:30px;">
</a>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
</div>