MICHELE controller
This commit is contained in:
commit
4572e13e7c
@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Mvc;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NuGet.Common;
|
using NuGet.Common;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.Intrinsics.Arm;
|
using System.Runtime.Intrinsics.Arm;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using VirtualTask.Models;
|
using VirtualTask.Models;
|
||||||
@ -15,15 +16,13 @@ namespace VirtualTask.Controllers
|
|||||||
string apiUrl = string.Empty;
|
string apiUrl = string.Empty;
|
||||||
string urlBase=string.Empty;
|
string urlBase=string.Empty;
|
||||||
string token=string.Empty;
|
string token=string.Empty;
|
||||||
|
string tenant = string.Empty;
|
||||||
string errMes = string.Empty;
|
string errMes = string.Empty;
|
||||||
|
|
||||||
//Uri baseAddress = new Uri("http://10.0.0.187:8000/api/Polo/anagraficheList?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
|
|
||||||
//Uri baseAddress = new Uri("http://10.0.0.187:8000/api/Polo/anagraficheList?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
|
|
||||||
HttpClient client;
|
HttpClient client;
|
||||||
|
|
||||||
public AnagController()
|
public AnagController()
|
||||||
{
|
{
|
||||||
|
client = new HttpClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region INDEX
|
#region INDEX
|
||||||
@ -39,7 +38,6 @@ namespace VirtualTask.Controllers
|
|||||||
urlBase = apiUrl+"anagraficheList";
|
urlBase = apiUrl+"anagraficheList";
|
||||||
urlBase = urlBase + "?token=" + token;
|
urlBase = urlBase + "?token=" + token;
|
||||||
Uri baseAddress = new Uri(urlBase);
|
Uri baseAddress = new Uri(urlBase);
|
||||||
client = new HttpClient();
|
|
||||||
client.BaseAddress = baseAddress;
|
client.BaseAddress = baseAddress;
|
||||||
|
|
||||||
List<Anag> modelList = new List<Anag>();
|
List<Anag> modelList = new List<Anag>();
|
||||||
@ -49,7 +47,6 @@ namespace VirtualTask.Controllers
|
|||||||
{
|
{
|
||||||
string data = response.Content.ReadAsStringAsync().Result;
|
string data = response.Content.ReadAsStringAsync().Result;
|
||||||
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
|
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(searchString))
|
if (!string.IsNullOrEmpty(searchString))
|
||||||
{
|
{
|
||||||
modelList = modelList.Where(s => s.andescri.ToUpper().Contains(searchString.ToUpper())).ToList();
|
modelList = modelList.Where(s => s.andescri.ToUpper().Contains(searchString.ToUpper())).ToList();
|
||||||
@ -80,6 +77,8 @@ namespace VirtualTask.Controllers
|
|||||||
helper.SetStringValue("errMsg", errMes);
|
helper.SetStringValue("errMsg", errMes);
|
||||||
return RedirectToAction("Error");
|
return RedirectToAction("Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion INDEX
|
#endregion INDEX
|
||||||
@ -97,7 +96,8 @@ namespace VirtualTask.Controllers
|
|||||||
SessionHelper helper = new SessionHelper(this);
|
SessionHelper helper = new SessionHelper(this);
|
||||||
|
|
||||||
token = helper.GetStringValue("tok");
|
token = helper.GetStringValue("tok");
|
||||||
|
tenant = helper.GetStringValue("tenant");
|
||||||
|
model.ancodazi=tenant;
|
||||||
apiUrl = helper.GetStringValue("apiUrl");
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
urlBase = apiUrl + "anagrafiche/add";
|
urlBase = apiUrl + "anagrafiche/add";
|
||||||
urlBase = urlBase + "?token=" + token;
|
urlBase = urlBase + "?token=" + token;
|
||||||
@ -108,7 +108,6 @@ namespace VirtualTask.Controllers
|
|||||||
string data = JsonConvert.SerializeObject(model);
|
string data = JsonConvert.SerializeObject(model);
|
||||||
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
||||||
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
|
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
|
||||||
|
|
||||||
if (response.IsSuccessStatusCode)
|
if (response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return RedirectToAction("Index");
|
return RedirectToAction("Index");
|
||||||
@ -120,7 +119,6 @@ namespace VirtualTask.Controllers
|
|||||||
return RedirectToAction("Error");
|
return RedirectToAction("Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
return View();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion CREATE
|
#endregion CREATE
|
||||||
@ -190,7 +188,7 @@ namespace VirtualTask.Controllers
|
|||||||
string data = response.Content.ReadAsStringAsync().Result;
|
string data = response.Content.ReadAsStringAsync().Result;
|
||||||
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
|
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
|
||||||
anag = modelList.Where(x => x.ancodice.Equals(id)).First();
|
anag = modelList.Where(x => x.ancodice.Equals(id)).First();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -208,7 +206,8 @@ namespace VirtualTask.Controllers
|
|||||||
SessionHelper helper = new SessionHelper(this);
|
SessionHelper helper = new SessionHelper(this);
|
||||||
|
|
||||||
token = helper.GetStringValue("tok");
|
token = helper.GetStringValue("tok");
|
||||||
|
tenant = helper.GetStringValue("tenant");
|
||||||
|
model.ancodazi = tenant;
|
||||||
apiUrl = helper.GetStringValue("apiUrl");
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
urlBase = apiUrl + "anagrafiche/mod";
|
urlBase = apiUrl + "anagrafiche/mod";
|
||||||
urlBase = urlBase + "?token=" + token;
|
urlBase = urlBase + "?token=" + token;
|
||||||
@ -226,8 +225,13 @@ namespace VirtualTask.Controllers
|
|||||||
{
|
{
|
||||||
return RedirectToAction("Index");
|
return RedirectToAction("Index");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errMes = response.Content.ReadAsStringAsync().Result;
|
||||||
|
helper.SetStringValue("errMsg", errMes);
|
||||||
|
return RedirectToAction("Error");
|
||||||
|
}
|
||||||
|
|
||||||
return View(model);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion EDIT
|
#endregion EDIT
|
||||||
@ -260,32 +264,28 @@ namespace VirtualTask.Controllers
|
|||||||
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
|
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
|
||||||
anag = modelList.Where(x => x.ancodice.Equals(id)).First();
|
anag = modelList.Where(x => x.ancodice.Equals(id)).First();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
errMes = response.Content.ReadAsStringAsync().Result;
|
|
||||||
helper.SetStringValue("errMsg", errMes);
|
|
||||||
return RedirectToAction("Error");
|
|
||||||
}
|
|
||||||
|
|
||||||
return View(anag);
|
return View(anag);
|
||||||
}
|
}
|
||||||
|
|
||||||
//DA MODIFICARE PERCHE' NON E' UNA DELETE MA UN UPDATE DELLA DATA OBSOLESCENZA
|
//DA MODIFICARE PERCHE' NON E' UNA DELETE MA UN UPDATE DELLA DATA OBSOLESCENZA
|
||||||
[HttpPost, ActionName("DeleteConfirmed")]
|
[HttpPost, ActionName("DeleteConfirmed")]
|
||||||
public IActionResult DeleteConfirmed(string id)
|
public IActionResult DeleteConfirmed(Anag model)
|
||||||
{
|
{
|
||||||
SessionHelper helper = new SessionHelper(this);
|
SessionHelper helper = new SessionHelper(this);
|
||||||
|
|
||||||
token = helper.GetStringValue("tok");
|
token = helper.GetStringValue("tok");
|
||||||
|
tenant = helper.GetStringValue("tenant");
|
||||||
|
model.ancodazi = tenant;
|
||||||
|
model.andtobso=DateTime.Now;
|
||||||
apiUrl = helper.GetStringValue("apiUrl");
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
urlBase = apiUrl + "anagrafiche/del?" + "codice=" + id + "&";
|
urlBase = apiUrl + "anagrafiche/del";
|
||||||
urlBase = urlBase + "token=" + token;
|
urlBase = urlBase + "?token=" + token;
|
||||||
Uri baseAddress = new Uri(urlBase);
|
Uri baseAddress = new Uri(urlBase);
|
||||||
client = new HttpClient();
|
client = new HttpClient();
|
||||||
client.BaseAddress = baseAddress;
|
client.BaseAddress = baseAddress;
|
||||||
|
|
||||||
string data = JsonConvert.SerializeObject(id);
|
string data = JsonConvert.SerializeObject(model);
|
||||||
|
|
||||||
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
@ -302,7 +302,6 @@ namespace VirtualTask.Controllers
|
|||||||
return RedirectToAction("Error");
|
return RedirectToAction("Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
return View();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion DELETE
|
#endregion DELETE
|
||||||
|
|||||||
@ -193,6 +193,7 @@ namespace VirtualTask.Controllers
|
|||||||
return RedirectToAction("Error");
|
return RedirectToAction("Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ViewBag.AllStockList = LoadStockitems();
|
||||||
return View(impianto);
|
return View(impianto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,14 +5,18 @@ namespace VirtualTask.Models
|
|||||||
{
|
{
|
||||||
public class Anag
|
public class Anag
|
||||||
{
|
{
|
||||||
[Display(Name = "TIPO"), Required(ErrorMessage = "Inserire tipo cliente")]
|
[Display(Name = "TIPO")]
|
||||||
/// <summary>tipo </summary>
|
/// <summary>tipo (chiave)</summary>
|
||||||
public string? antipcon { get; set; }
|
public string? antipcon { get; set; }
|
||||||
|
|
||||||
[Display(Name = "CODICE"), Required(ErrorMessage = "Inserire codice cliente")]
|
[Display(Name = "CODICE")]
|
||||||
/// <summary>codice</summary>
|
/// <summary>codice (chiave)</summary>
|
||||||
public string? ancodice { get; set; }
|
public string? ancodice { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "AZIENDA")]
|
||||||
|
/// <summary>aziewnda (chiave)</summary>
|
||||||
|
public string? ancodazi { get; set; }
|
||||||
|
|
||||||
[Display(Name = "EMAIL")]
|
[Display(Name = "EMAIL")]
|
||||||
/// <summary>email</summary>
|
/// <summary>email</summary>
|
||||||
public string? an_email { get; set; }
|
public string? an_email { get; set; }
|
||||||
@ -41,7 +45,7 @@ namespace VirtualTask.Models
|
|||||||
/// <summary>pec</summary>
|
/// <summary>pec</summary>
|
||||||
public string? an_empec { get; set; }
|
public string? an_empec { get; set; }
|
||||||
|
|
||||||
[Display(Name = "RAGIONE SOCIALE"), Required(ErrorMessage = "Inserire ragione sociale")]
|
[Display(Name = "RAGIONE SOCIALE")]
|
||||||
/// <summary>descrizione </summary>
|
/// <summary>descrizione </summary>
|
||||||
public string? andescri { get; set; }
|
public string? andescri { get; set; }
|
||||||
|
|
||||||
|
|||||||
@ -12,21 +12,21 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form asp-action="Create">
|
<form asp-action="Create">
|
||||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
<div class="form-group">
|
<input type="hidden" id="antipcon" value="C" name="antipcon" />
|
||||||
<label asp-for="antipcon" class="control-label"></label>
|
@Html.HiddenFor(x => x.andtobso)
|
||||||
<input asp-for="antipcon" class="form-control" />
|
@Html.HiddenFor(x => x.annumlis)
|
||||||
<span asp-validation-for="antipcon" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="ancodice" class="control-label"></label>
|
<label asp-for="ancodice" class="control-label"></label>
|
||||||
<input asp-for="ancodice" class="form-control" />
|
<input asp-for="ancodice" class="form-control" />
|
||||||
<span asp-validation-for="ancodice" class="text-danger"></span>
|
<span asp-validation-for="ancodice" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="an_email" class="control-label"></label>
|
<label asp-for="andescri" class="control-label"></label>
|
||||||
<input asp-for="an_email" class="form-control" />
|
<input asp-for="andescri" class="form-control" />
|
||||||
<span asp-validation-for="an_email" class="text-danger"></span>
|
<span asp-validation-for="andescri" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="ancodfis" class="control-label"></label>
|
<label asp-for="ancodfis" class="control-label"></label>
|
||||||
<input asp-for="ancodfis" class="form-control" />
|
<input asp-for="ancodfis" class="form-control" />
|
||||||
@ -52,26 +52,18 @@
|
|||||||
<input asp-for="annumcel" class="form-control" />
|
<input asp-for="annumcel" class="form-control" />
|
||||||
<span asp-validation-for="annumcel" class="text-danger"></span>
|
<span asp-validation-for="annumcel" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="an_email" class="control-label"></label>
|
||||||
|
<input asp-for="an_email" class="form-control" />
|
||||||
|
<span asp-validation-for="an_email" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="an_empec" class="control-label"></label>
|
<label asp-for="an_empec" class="control-label"></label>
|
||||||
<input asp-for="an_empec" class="form-control" />
|
<input asp-for="an_empec" class="form-control" />
|
||||||
<span asp-validation-for="an_empec" class="text-danger"></span>
|
<span asp-validation-for="an_empec" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="andescri" class="control-label"></label>
|
|
||||||
<input asp-for="andescri" class="form-control" />
|
|
||||||
<span asp-validation-for="andescri" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="annumlis" class="control-label"></label>
|
|
||||||
<input asp-for="annumlis" class="form-control" />
|
|
||||||
<span asp-validation-for="annumlis" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="andtobso" class="control-label"></label>
|
|
||||||
<input asp-for="andtobso" class="form-control" />
|
|
||||||
<span asp-validation-for="andtobso" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="submit" value="Create" class="btn btn-primary" />
|
<input type="submit" value="Create" class="btn btn-primary" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,51 +16,61 @@
|
|||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.antipcon)
|
@Html.DisplayFor(model => model.antipcon)
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.ancodice)
|
@Html.DisplayNameFor(model => model.ancodice)
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.ancodice)
|
@Html.DisplayFor(model => model.ancodice)
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.an_email)
|
@Html.DisplayNameFor(model => model.an_email)
|
||||||
|
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.an_email)
|
@Html.DisplayFor(model => model.an_email)
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.ancodfis)
|
@Html.DisplayNameFor(model => model.ancodfis)
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.ancodfis)
|
@Html.DisplayFor(model => model.ancodfis)
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.anpariva)
|
@Html.DisplayNameFor(model => model.anpariva)
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.anpariva)
|
@Html.DisplayFor(model => model.anpariva)
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.anindiri)
|
@Html.DisplayNameFor(model => model.anindiri)
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.anindiri)
|
@Html.DisplayFor(model => model.anindiri)
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.antelefo)
|
@Html.DisplayNameFor(model => model.antelefo)
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.antelefo)
|
@Html.DisplayFor(model => model.antelefo)
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.annumcel)
|
@Html.DisplayNameFor(model => model.annumcel)
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.annumcel)
|
@Html.DisplayFor(model => model.annumcel)
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.an_empec)
|
@Html.DisplayNameFor(model => model.an_empec)
|
||||||
|
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.an_empec)
|
@Html.DisplayFor(model => model.an_empec)
|
||||||
@ -70,24 +80,25 @@
|
|||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.andescri)
|
@Html.DisplayFor(model => model.andescri)
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
|
||||||
@Html.DisplayNameFor(model => model.annumlis)
|
|
||||||
</dt>
|
|
||||||
<dd class = "col-sm-10">
|
|
||||||
@Html.DisplayFor(model => model.annumlis)
|
|
||||||
</dd>
|
|
||||||
<dt class = "col-sm-2">
|
|
||||||
@Html.DisplayNameFor(model => model.andtobso)
|
|
||||||
</dt>
|
|
||||||
<dd class = "col-sm-10">
|
|
||||||
@Html.DisplayFor(model => model.andtobso)
|
|
||||||
</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<form asp-action="DeleteConfirmed">
|
<form asp-action="DeleteConfirmed">
|
||||||
|
@Html.HiddenFor(x => x.annumlis)
|
||||||
|
@Html.HiddenFor(x => x.andescri)
|
||||||
|
@Html.HiddenFor(x => x.an_empec)
|
||||||
|
@Html.HiddenFor(x => x.annumcel)
|
||||||
|
@Html.HiddenFor(x => x.antelefo)
|
||||||
|
@Html.HiddenFor(x => x.anindiri)
|
||||||
|
@Html.HiddenFor(x => x.anpariva)
|
||||||
|
@Html.HiddenFor(x => x.ancodfis)
|
||||||
|
@Html.HiddenFor(x => x.an_email)
|
||||||
|
@Html.HiddenFor(x => x.ancodice)
|
||||||
|
@Html.HiddenFor(x => x.antipcon)
|
||||||
<input type="submit" value="Delete" class="btn btn-danger" /> |
|
<input type="submit" value="Delete" class="btn btn-danger" /> |
|
||||||
<input type="hidden" id="id" value=@Html.DisplayFor(model => model.ancodice) name="id" />
|
|
||||||
<a asp-action="Index">Back to List</a>
|
<a asp-action="Index">Back to List</a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -10,24 +10,20 @@
|
|||||||
<h4>Anag</h4>
|
<h4>Anag</h4>
|
||||||
<hr />
|
<hr />
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class = "col-sm-2">
|
|
||||||
@Html.DisplayNameFor(model => model.antipcon)
|
|
||||||
</dt>
|
|
||||||
<dd class = "col-sm-10">
|
|
||||||
@Html.DisplayFor(model => model.antipcon)
|
|
||||||
</dd>
|
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.ancodice)
|
@Html.DisplayNameFor(model => model.ancodice)
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.ancodice)
|
@Html.DisplayFor(model => model.ancodice)
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.an_email)
|
@Html.DisplayNameFor(model => model.andescri)
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class="col-sm-10">
|
||||||
@Html.DisplayFor(model => model.an_email)
|
@Html.DisplayFor(model => model.andescri)
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.ancodfis)
|
@Html.DisplayNameFor(model => model.ancodfis)
|
||||||
</dt>
|
</dt>
|
||||||
@ -58,30 +54,20 @@
|
|||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.annumcel)
|
@Html.DisplayFor(model => model.annumcel)
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt class="col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.an_email)
|
||||||
|
</dt>
|
||||||
|
<dd class="col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.an_email)
|
||||||
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
<dt class = "col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.an_empec)
|
@Html.DisplayNameFor(model => model.an_empec)
|
||||||
</dt>
|
</dt>
|
||||||
<dd class = "col-sm-10">
|
<dd class = "col-sm-10">
|
||||||
@Html.DisplayFor(model => model.an_empec)
|
@Html.DisplayFor(model => model.an_empec)
|
||||||
</dd>
|
</dd>
|
||||||
<dt class = "col-sm-2">
|
|
||||||
@Html.DisplayNameFor(model => model.andescri)
|
|
||||||
</dt>
|
|
||||||
<dd class = "col-sm-10">
|
|
||||||
@Html.DisplayFor(model => model.andescri)
|
|
||||||
</dd>
|
|
||||||
<dt class = "col-sm-2">
|
|
||||||
@Html.DisplayNameFor(model => model.annumlis)
|
|
||||||
</dt>
|
|
||||||
<dd class = "col-sm-10">
|
|
||||||
@Html.DisplayFor(model => model.annumlis)
|
|
||||||
</dd>
|
|
||||||
<dt class = "col-sm-2">
|
|
||||||
@Html.DisplayNameFor(model => model.andtobso)
|
|
||||||
</dt>
|
|
||||||
<dd class = "col-sm-10">
|
|
||||||
@Html.DisplayFor(model => model.andtobso)
|
|
||||||
</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -12,21 +12,21 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form asp-action="Edit">
|
<form asp-action="Edit">
|
||||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="antipcon" class="control-label"></label>
|
@Html.HiddenFor(x => x.antipcon)
|
||||||
<input asp-for="antipcon" class="form-control" />
|
@Html.HiddenFor(x => x.andtobso)
|
||||||
<span asp-validation-for="antipcon" class="text-danger"></span>
|
@Html.HiddenFor(x => x.annumlis)
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="ancodice" class="control-label"></label>
|
<label asp-for="ancodice" class="control-label"></label>
|
||||||
<input asp-for="ancodice" class="form-control" />
|
<input asp-for="ancodice" class="form-control" />
|
||||||
<span asp-validation-for="ancodice" class="text-danger"></span>
|
<span asp-validation-for="ancodice" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="an_email" class="control-label"></label>
|
<label asp-for="andescri" class="control-label"></label>
|
||||||
<input asp-for="an_email" class="form-control" />
|
<input asp-for="andescri" class="form-control" />
|
||||||
<span asp-validation-for="an_email" class="text-danger"></span>
|
<span asp-validation-for="andescri" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="ancodfis" class="control-label"></label>
|
<label asp-for="ancodfis" class="control-label"></label>
|
||||||
<input asp-for="ancodfis" class="form-control" />
|
<input asp-for="ancodfis" class="form-control" />
|
||||||
@ -52,26 +52,19 @@
|
|||||||
<input asp-for="annumcel" class="form-control" />
|
<input asp-for="annumcel" class="form-control" />
|
||||||
<span asp-validation-for="annumcel" class="text-danger"></span>
|
<span asp-validation-for="annumcel" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="an_email" class="control-label"></label>
|
||||||
|
<input asp-for="an_email" class="form-control" />
|
||||||
|
<span asp-validation-for="an_email" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="an_empec" class="control-label"></label>
|
<label asp-for="an_empec" class="control-label"></label>
|
||||||
<input asp-for="an_empec" class="form-control" />
|
<input asp-for="an_empec" class="form-control" />
|
||||||
<span asp-validation-for="an_empec" class="text-danger"></span>
|
<span asp-validation-for="an_empec" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="andescri" class="control-label"></label>
|
|
||||||
<input asp-for="andescri" class="form-control" />
|
|
||||||
<span asp-validation-for="andescri" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="annumlis" class="control-label"></label>
|
|
||||||
<input asp-for="annumlis" class="form-control" />
|
|
||||||
<span asp-validation-for="annumlis" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="andtobso" class="control-label"></label>
|
|
||||||
<input asp-for="andtobso" class="form-control" />
|
|
||||||
<span asp-validation-for="andtobso" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="submit" value="Save" class="btn btn-primary" />
|
<input type="submit" value="Save" class="btn btn-primary" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -17,11 +17,7 @@
|
|||||||
<input asp-for="imcodimp" class="form-control" />
|
<input asp-for="imcodimp" class="form-control" />
|
||||||
<span asp-validation-for="imcodimp" class="text-danger"></span>
|
<span asp-validation-for="imcodimp" class="text-danger"></span>
|
||||||
</div>
|
</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>*@
|
|
||||||
@Html.HiddenFor(m => m.imcodazi)
|
@Html.HiddenFor(m => m.imcodazi)
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="imdescri" class="control-label"></label>
|
<label asp-for="imdescri" class="control-label"></label>
|
||||||
@ -87,15 +83,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|||||||
@ -17,11 +17,7 @@
|
|||||||
<input asp-for="imcodimp" class="form-control" />
|
<input asp-for="imcodimp" class="form-control" />
|
||||||
<span asp-validation-for="imcodimp" class="text-danger"></span>
|
<span asp-validation-for="imcodimp" class="text-danger"></span>
|
||||||
</div>
|
</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> *@
|
|
||||||
@Html.HiddenFor(x => x.imcodazi)
|
@Html.HiddenFor(x => x.imcodazi)
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="imdescri" class="control-label"></label>
|
<label asp-for="imdescri" class="control-label"></label>
|
||||||
@ -75,7 +71,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="imultcli" class="control-label"></label>
|
<label asp-for="imultcli" class="control-label"></label>
|
||||||
<input asp-for="imultcli" class="form-control" />
|
@Html.DropDownListFor(x =>x.imultcli,(IEnumerable<SelectListItem>)ViewBag.AllStockList,new {@class = "form-control"})
|
||||||
<span asp-validation-for="imultcli" class="text-danger"></span>
|
<span asp-validation-for="imultcli" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -94,6 +90,21 @@
|
|||||||
<a asp-action="Index">Back to List</a>
|
<a asp-action="Index">Back to List</a>
|
||||||
</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>
|
||||||
@section Scripts {
|
@section Scripts {
|
||||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,106 +22,27 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Cod. Impianto</th>
|
||||||
Cod. Impianto
|
<th>Azienda</th>
|
||||||
</th>
|
<th>Descrizione</th>
|
||||||
<th>
|
|
||||||
Azienda
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Descrizione
|
|
||||||
</th>
|
|
||||||
<th>Indirizzo</th>
|
<th>Indirizzo</th>
|
||||||
@* <th>
|
<th>Cod. Clienterr</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>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in Model) {
|
@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>
|
<tr>
|
||||||
<td>
|
<td>@Html.DisplayFor(modelItem => item.imcodimp)</td>
|
||||||
@Html.DisplayFor(modelItem => item.imcodimp)
|
<td>@Html.DisplayFor(modelItem => item.imcodazi)</td>
|
||||||
</td>
|
<td>@Html.DisplayFor(modelItem => item.imdescri)</td>
|
||||||
<td>
|
<td>@Html.DisplayFor(modelItem => item.indirizzo)</td>
|
||||||
@Html.DisplayFor(modelItem => item.imcodazi)
|
<td>@Html.DisplayFor(modelItem => item.imultcli)pppp</td>
|
||||||
</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>
|
<td>
|
||||||
@Html.ActionLink("Edit", "Edit", new { id=item.imcodimp }) |
|
@Html.ActionLink("Edit", "Edit", new { id=item.imcodimp }) |
|
||||||
@Html.ActionLink("Details", "Details", new { id=item.imcodimp }) |
|
@Html.ActionLink("Details", "Details", new { id=item.imcodimp }) |
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user