impianti drop down clienti
This commit is contained in:
parent
e0e655f5a2
commit
c7128f9f2e
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using NuGet.Common;
|
using NuGet.Common;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using VirtualTask.Models;
|
using VirtualTask.Models;
|
||||||
@ -24,8 +25,21 @@ namespace VirtualTask.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
List<Anag> modelList = new List<Anag>();
|
||||||
|
Anag a=new Anag();
|
||||||
|
a.ancodice = "0001";
|
||||||
|
a.andescri = "Francesco Totti";
|
||||||
|
modelList.Add(a);
|
||||||
|
|
||||||
|
Anag b = new Anag();
|
||||||
|
b.ancodice = "0002";
|
||||||
|
b.andescri = "Alex Del Piero";
|
||||||
|
modelList.Add(b);
|
||||||
|
|
||||||
|
|
||||||
|
SelectList customers = new SelectList(modelList,"ancodice","andescri");
|
||||||
ViewBag.Token = token;
|
ViewBag.Token = token;
|
||||||
return View();
|
return View(customers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
128
Controllers/ImpiantiController.cs
Normal file
128
Controllers/ImpiantiController.cs
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.Drawing.Printing;
|
||||||
|
using System.Text;
|
||||||
|
using VirtualTask.Models;
|
||||||
|
using X.PagedList;
|
||||||
|
|
||||||
|
namespace VirtualTask.Controllers
|
||||||
|
{
|
||||||
|
public class ImpiantiController : Controller
|
||||||
|
{
|
||||||
|
string apiUrl = string.Empty;
|
||||||
|
string urlBase = string.Empty;
|
||||||
|
string token = string.Empty;
|
||||||
|
|
||||||
|
HttpClient client;
|
||||||
|
public ImpiantiController()
|
||||||
|
{
|
||||||
|
client = new HttpClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult Index(string searchString, int? page = 1)
|
||||||
|
{
|
||||||
|
SessionHelper helper = new SessionHelper(this);
|
||||||
|
token = helper.GetStringValue("tok");
|
||||||
|
if (string.IsNullOrEmpty(token))
|
||||||
|
return RedirectToAction("Index", "Login");
|
||||||
|
|
||||||
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
|
urlBase = apiUrl + "impiantiList";
|
||||||
|
urlBase = urlBase + "?token=" + token;
|
||||||
|
Uri baseAddress = new Uri(urlBase);
|
||||||
|
client.BaseAddress = baseAddress;
|
||||||
|
|
||||||
|
List<Impianto> modelList = new List<Impianto>();
|
||||||
|
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string data = response.Content.ReadAsStringAsync().Result;
|
||||||
|
modelList = JsonConvert.DeserializeObject<List<Impianto>>(data);
|
||||||
|
modelList = modelList.Where(s => !string.IsNullOrEmpty(s.imcodimp)).ToList();
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(searchString))
|
||||||
|
{
|
||||||
|
modelList = modelList.Where(s => s.indirizzo.ToUpper().Contains(searchString.ToUpper())).ToList();
|
||||||
|
ViewData["CurrentFilter"] = searchString;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ViewData["CurrentFilter"] = null;
|
||||||
|
|
||||||
|
if (page != null && page < 1)
|
||||||
|
{
|
||||||
|
page = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
var pageSize = 10;
|
||||||
|
|
||||||
|
var shortLinks = modelList
|
||||||
|
.OrderByDescending(s => s.imcodimp)
|
||||||
|
.ToPagedList(page ?? 1, pageSize);
|
||||||
|
|
||||||
|
return View(shortLinks);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult Create()
|
||||||
|
{
|
||||||
|
ViewBag.AllStockList = LoadStockitems();
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public IActionResult Create(Impianto model)
|
||||||
|
{
|
||||||
|
SessionHelper helper = new SessionHelper(this);
|
||||||
|
token = helper.GetStringValue("tok");
|
||||||
|
if (string.IsNullOrEmpty(token))
|
||||||
|
return RedirectToAction("Index", "Login");
|
||||||
|
|
||||||
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
|
urlBase = apiUrl + "impianti/add";
|
||||||
|
urlBase = urlBase + "?token=" + token;
|
||||||
|
Uri baseAddress = new Uri(urlBase);
|
||||||
|
client.BaseAddress = baseAddress;
|
||||||
|
|
||||||
|
string data = JsonConvert.SerializeObject(model);
|
||||||
|
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
||||||
|
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
}
|
||||||
|
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<SelectListItem> LoadStockitems()
|
||||||
|
{
|
||||||
|
SessionHelper helper = new SessionHelper(this);
|
||||||
|
token = helper.GetStringValue("tok");
|
||||||
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
|
urlBase = apiUrl + "anagraficheList";
|
||||||
|
urlBase = urlBase + "?token=" + token;
|
||||||
|
Uri baseAddress = new Uri(urlBase);
|
||||||
|
client = new HttpClient();
|
||||||
|
client.BaseAddress = baseAddress;
|
||||||
|
List<SelectListItem> selectItems = new List<SelectListItem>();
|
||||||
|
List<Anag> modelList = new List<Anag>();
|
||||||
|
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string data = response.Content.ReadAsStringAsync().Result;
|
||||||
|
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
|
||||||
|
foreach (var role in modelList)
|
||||||
|
{
|
||||||
|
SelectListItem listItem = new SelectListItem();
|
||||||
|
listItem.Value = role.ancodice;
|
||||||
|
listItem.Text = role.andescri;
|
||||||
|
selectItems.Add(listItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return selectItems;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
81
Models/Impianto.cs
Normal file
81
Models/Impianto.cs
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
|
namespace VirtualTask.Models
|
||||||
|
{
|
||||||
|
public class Impianto
|
||||||
|
{
|
||||||
|
[Display(Name = "Codice Impianto")]
|
||||||
|
/// <summary>Codice Impianto</summary>
|
||||||
|
public string? imcodimp { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "Azienda")]
|
||||||
|
/// <summary> Azienda </summary>
|
||||||
|
public string? imcodazi { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "Descrizione")]
|
||||||
|
/// <summary>Descrizione Impianto</summary>
|
||||||
|
public string? imdescri { get; set; }
|
||||||
|
|
||||||
|
/// <summary>Tipo indirizzo (Via, piazza..)</summary>
|
||||||
|
public string? imindiri1 { get; set; }
|
||||||
|
|
||||||
|
/// <summary> indirizzo </summary>
|
||||||
|
public string? imindiri2 { get; set; }
|
||||||
|
|
||||||
|
/// <summary> numero civico </summary>
|
||||||
|
public int? imindiri3 { get; set; }
|
||||||
|
|
||||||
|
/// <summary> sottonumero </summary>
|
||||||
|
public string? imindiri4 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>scala</summary>
|
||||||
|
public string? imindiri5 { get; set; }
|
||||||
|
|
||||||
|
/// <summary> localita </summary>
|
||||||
|
public string? imlocali { get; set; }
|
||||||
|
|
||||||
|
/// <summary> Cap </summary>
|
||||||
|
public string? imcodcap { get; set; }
|
||||||
|
|
||||||
|
/// <summary> Comune </summary>
|
||||||
|
public string? imcomune { get; set; }
|
||||||
|
|
||||||
|
/// <summary> Provincia </summary>
|
||||||
|
public string? improvin { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "Cliente")]
|
||||||
|
/// <summary> cliente associato </summary>
|
||||||
|
public string? imultcli { get; set; }
|
||||||
|
|
||||||
|
public string? indirizzo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string ind = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(imindiri1))
|
||||||
|
ind= imindiri1.Trim();
|
||||||
|
if (!string.IsNullOrEmpty(imindiri2))
|
||||||
|
ind = ind +" "+ imindiri2.Trim();
|
||||||
|
if(imindiri3!=null)
|
||||||
|
ind = ind + "," + Convert.ToString( imindiri3);
|
||||||
|
if (!string.IsNullOrEmpty(imindiri4) && imindiri4.Trim().Length>0)
|
||||||
|
ind = ind + " Scala " + imindiri4.Trim();
|
||||||
|
if (!string.IsNullOrEmpty(imindiri5) && imindiri5.Trim().Length > 0)
|
||||||
|
ind = ind + " Int " + imindiri5.Trim();
|
||||||
|
if (!string.IsNullOrEmpty(imlocali) && imlocali.Trim().Length > 0)
|
||||||
|
ind = ind + " " + imlocali.Trim();
|
||||||
|
if (!string.IsNullOrEmpty(imcodcap) && imcodcap.Trim().Length > 0)
|
||||||
|
ind = ind+" " + imcodcap.Trim();
|
||||||
|
if (!string.IsNullOrEmpty(imcomune) && imcomune.Trim().Length > 0)
|
||||||
|
ind = ind + " " + imcomune.Trim();
|
||||||
|
if (!string.IsNullOrEmpty(improvin) && improvin.Trim().Length > 0)
|
||||||
|
ind = ind + " " + improvin.Trim();
|
||||||
|
|
||||||
|
|
||||||
|
return ind;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,36 @@
|
|||||||
@{
|
@addTagHelper*, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
|
@model SelectList
|
||||||
|
@{
|
||||||
ViewData["Title"] = "Home Page";
|
ViewData["Title"] = "Home Page";
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h1 class="display-4">Welcome</h1>
|
<h1 class="display-4">Welcome</h1>
|
||||||
</div>
|
</div>
|
||||||
|
<select id="ddlCustomers" name="CustomerId" asp-items="Model">
|
||||||
|
<option value="0">--Select Customer--</option>
|
||||||
|
</select>
|
||||||
|
<form method="post" asp-controller="Home" asp-action="Index">
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<input type="submit" value="Submit" />
|
||||||
|
@if (ViewBag.Message != null)
|
||||||
|
{
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.onload = function () {
|
||||||
|
alert("@ViewBag.Message");
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
|
||||||
|
</form>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" />
|
||||||
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
$("#ddlCustomers").select2();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|||||||
118
Views/Impianti/Create.cshtml
Normal file
118
Views/Impianti/Create.cshtml
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
@model VirtualTask.Models.Impianto
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Create";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Create</h1>
|
||||||
|
|
||||||
|
<h4>Impianto</h4>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<form asp-action="Create">
|
||||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imcodimp" class="control-label"></label>
|
||||||
|
<input asp-for="imcodimp" class="form-control" />
|
||||||
|
<span asp-validation-for="imcodimp" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imcodazi" class="control-label"></label>
|
||||||
|
<input asp-for="imcodazi" class="form-control" />
|
||||||
|
<span asp-validation-for="imcodazi" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imdescri" class="control-label"></label>
|
||||||
|
<input asp-for="imdescri" class="form-control" />
|
||||||
|
<span asp-validation-for="imdescri" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imindiri1" class="control-label"></label>
|
||||||
|
<input asp-for="imindiri1" class="form-control" />
|
||||||
|
<span asp-validation-for="imindiri1" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imindiri2" class="control-label"></label>
|
||||||
|
<input asp-for="imindiri2" class="form-control" />
|
||||||
|
<span asp-validation-for="imindiri2" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imindiri3" class="control-label"></label>
|
||||||
|
<input asp-for="imindiri3" class="form-control" />
|
||||||
|
<span asp-validation-for="imindiri3" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imindiri4" class="control-label"></label>
|
||||||
|
<input asp-for="imindiri4" class="form-control" />
|
||||||
|
<span asp-validation-for="imindiri4" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imindiri5" class="control-label"></label>
|
||||||
|
<input asp-for="imindiri5" class="form-control" />
|
||||||
|
<span asp-validation-for="imindiri5" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imlocali" class="control-label"></label>
|
||||||
|
<input asp-for="imlocali" class="form-control" />
|
||||||
|
<span asp-validation-for="imlocali" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imcodcap" class="control-label"></label>
|
||||||
|
<input asp-for="imcodcap" class="form-control" />
|
||||||
|
<span asp-validation-for="imcodcap" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imcomune" class="control-label"></label>
|
||||||
|
<input asp-for="imcomune" class="form-control" />
|
||||||
|
<span asp-validation-for="imcomune" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="improvin" class="control-label"></label>
|
||||||
|
<input asp-for="improvin" class="form-control" />
|
||||||
|
<span asp-validation-for="improvin" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="imultcli" class="control-label"></label>
|
||||||
|
@Html.DropDownListFor(x =>x.imultcli,
|
||||||
|
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
|
||||||
|
|
||||||
|
|
||||||
|
<span asp-validation-for="imultcli" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
@Html.LabelFor(model => model.imultcli, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||||
|
<div class="row-fluid col-md-10">
|
||||||
|
@Html.DropDownListFor(c => c.imultcli, (IEnumerable<SelectListItem>)ViewBag.AllStockList, null, new { @class = "selectpicker", data_live_search = "true" })
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" value="Create" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" />
|
||||||
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"></script>
|
||||||
|
<!-- Latest compiled and minified CSS -->
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/css/bootstrap-select.min.css">
|
||||||
|
<!-- Latest compiled and minified JavaScript -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js"></script>
|
||||||
|
<!-- (Optional) Latest compiled and minified JavaScript translation files -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/i18n/defaults-*.min.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
$("#imultcli").select2();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div>
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section Scripts {
|
||||||
|
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||||
|
}
|
||||||
149
Views/Impianti/Index.cshtml
Normal file
149
Views/Impianti/Index.cshtml
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
@model IPagedList<VirtualTask.Models.Impianto>
|
||||||
|
@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"] = "Impianti";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Impianti</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a asp-action="Create">Create New</a>
|
||||||
|
</p>
|
||||||
|
@using (Html.BeginForm())
|
||||||
|
{
|
||||||
|
<p>
|
||||||
|
Find by indirizzo: @Html.TextBox("SearchString")
|
||||||
|
<input type="submit" value="Search" />
|
||||||
|
</p>
|
||||||
|
}
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Cod. Impianto
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Azienda
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Descrizione
|
||||||
|
</th>
|
||||||
|
<th>Indirizzo</th>
|
||||||
|
@* <th>
|
||||||
|
@Html.DisplayNameFor(model => model.imindiri1)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.imindiri2)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.imindiri3)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.imindiri4)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.imindiri5)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.imlocali)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.imcodcap)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.imcomune)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.improvin)
|
||||||
|
</th>*@
|
||||||
|
<th>
|
||||||
|
Cod. Cliente
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var item in Model) {
|
||||||
|
|
||||||
|
string message = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.imindiri1))
|
||||||
|
message = message + item.imindiri1;
|
||||||
|
if (!string.IsNullOrEmpty(item.imindiri2))
|
||||||
|
message = " "+message + item.imindiri2;
|
||||||
|
if (item.imindiri3!=null)
|
||||||
|
message = "," + message + Convert.ToString( item.imindiri3);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imcodimp)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imcodazi)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imdescri)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.indirizzo)
|
||||||
|
</td>
|
||||||
|
@* <td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imindiri1)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imindiri2)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imindiri3)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imindiri4)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imindiri5)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imlocali)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imcodcap)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imcomune)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.improvin)
|
||||||
|
</td>*@
|
||||||
|
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.imultcli)
|
||||||
|
</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>
|
||||||
|
<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 = "Next",
|
||||||
|
LinkToPreviousPageFormat = "Previous",
|
||||||
|
MaximumPageNumbersToDisplay = 5,
|
||||||
|
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
|
||||||
|
DisplayLinkToNextPage = PagedListDisplayMode.Always
|
||||||
|
|
||||||
|
})
|
||||||
|
</nav>
|
||||||
@ -19,9 +19,6 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
||||||
<ul class="navbar-nav flex-grow-1">
|
<ul class="navbar-nav flex-grow-1">
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Chiusure" asp-action="Index">COD. CHIUSURA</a>
|
<a class="nav-link text-dark" asp-area="" asp-controller="Chiusure" asp-action="Index">COD. CHIUSURA</a>
|
||||||
</li>
|
</li>
|
||||||
@ -31,6 +28,9 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Anag" asp-action="Index">ANAGRAFICHE</a>
|
<a class="nav-link text-dark" asp-area="" asp-controller="Anag" asp-action="Index">ANAGRAFICHE</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-dark" asp-area="" asp-controller="Impianti" asp-action="Index">IMPIANTI</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user