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