Compare commits
No commits in common. "5a7e04ae1d9ec5c0bb6e82a0461c49a37d1ec3b4" and "41a32fbd46e5b3e7858e36ee4f539eef25bcca7e" have entirely different histories.
5a7e04ae1d
...
41a32fbd46
@ -6,7 +6,6 @@ using SoftwayWeb.Models;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
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 X.PagedList;
|
using X.PagedList;
|
||||||
@ -19,26 +18,16 @@ namespace SoftwayWeb.Controllers
|
|||||||
string urlBase = string.Empty;
|
string urlBase = string.Empty;
|
||||||
string token = string.Empty;
|
string token = string.Empty;
|
||||||
string errMes = string.Empty;
|
string errMes = string.Empty;
|
||||||
string messAcc = string.Empty;
|
|
||||||
string messNew = string.Empty;
|
|
||||||
private readonly IConfiguration _configuration;
|
private readonly IConfiguration _configuration;
|
||||||
private readonly IConfiguration _mess1;
|
|
||||||
private readonly IConfiguration _mess2;
|
|
||||||
HttpClient client;
|
HttpClient client;
|
||||||
SessionHelper helper;
|
SessionHelper helper;
|
||||||
|
|
||||||
public GiriController(IConfiguration configuration, IConfiguration mess1, IConfiguration mess2)
|
public GiriController(IConfiguration configuration)
|
||||||
{
|
{
|
||||||
_configuration = configuration;
|
_configuration = configuration;
|
||||||
_mess1 = mess1;
|
|
||||||
_mess2 = mess2;
|
|
||||||
client = new HttpClient();
|
client = new HttpClient();
|
||||||
var key = _configuration["ApplicationInsights:rootUrlApi"];
|
var key = _configuration["ApplicationInsights:rootUrlApi"];
|
||||||
var messA = _mess1["ApplicationInsights:messDestiAccodo"];
|
|
||||||
var messN = _mess2["ApplicationInsights:messDestiNew"];
|
|
||||||
apiUrl = key;
|
apiUrl = key;
|
||||||
messAcc = messA;
|
|
||||||
messNew = messN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult Index(string? codAutista, string? codMezzo, DateTime data, bool aperto = true, int? page = 1)
|
public IActionResult Index(string? codAutista, string? codMezzo, DateTime data, bool aperto = true, int? page = 1)
|
||||||
@ -334,74 +323,7 @@ namespace SoftwayWeb.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public IActionResult ModificaTutteDestinazioniStep1(List<Destinazioni_Out> modelList, string? autisti, string? nomeAutista, string? mezzi, string? nomeMezzo)
|
public IActionResult ModificaTutteDestinazioniPost(List<Destinazioni_Out> modelList, string? autisti, /*string? nomeAutista,*/ string? mezzi)
|
||||||
{
|
|
||||||
ViewBag.CodMezzo = mezzi;
|
|
||||||
ViewBag.CodAutista = autisti;
|
|
||||||
|
|
||||||
SessionHelper helper = new SessionHelper(this);
|
|
||||||
|
|
||||||
token = helper.GetStringValue("tok");
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(token))
|
|
||||||
{
|
|
||||||
return RedirectToAction("Login", "Login");
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var item in modelList)
|
|
||||||
{
|
|
||||||
string dataGi = string.Empty;
|
|
||||||
dataGi = item.DataCarico.Value.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
|
||||||
urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzoWeb";
|
|
||||||
//urlBase = urlBase + "?autista=" + item.CodAutista + "&dataGiro=" + dataGi + "&mezzo=" + item.CodAutomezzo;
|
|
||||||
urlBase = urlBase + "?autista=" + autisti + "&dataGiro=" + dataGi + "&mezzo=" + mezzi;
|
|
||||||
Uri baseAddress = new Uri(urlBase);
|
|
||||||
client = new HttpClient();
|
|
||||||
client.BaseAddress = baseAddress;
|
|
||||||
|
|
||||||
List<Destinazioni_Out> modelList2 = new List<Destinazioni_Out>();
|
|
||||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
|
||||||
if (response.IsSuccessStatusCode)
|
|
||||||
{
|
|
||||||
string dato = response.Content.ReadAsStringAsync().Result;
|
|
||||||
modelList2 = JsonConvert.DeserializeObject<List<Destinazioni_Out>>(dato);
|
|
||||||
var presenti = modelList2.OrderByDescending(t => t.Prog);
|
|
||||||
|
|
||||||
string mex = string.Empty;
|
|
||||||
//var nomeA = item.Autista;
|
|
||||||
//var nomeM = item.DescAutomezzo;
|
|
||||||
|
|
||||||
if (presenti != null && presenti.Count() > 0)
|
|
||||||
{
|
|
||||||
//giro già esistente.. accodo
|
|
||||||
mex = messAcc;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// giro non esistente.. ne creo uno nuovo
|
|
||||||
mex = messNew;
|
|
||||||
}
|
|
||||||
|
|
||||||
item.CodAutistaOld = item.CodAutista;
|
|
||||||
item.AutistaOld = item.Autista;
|
|
||||||
item.CodAutomezzoOld = item.CodAutomezzo;
|
|
||||||
item.DescAutomezzoOld = item.DescAutomezzoOld;
|
|
||||||
|
|
||||||
ViewBag.Messaggio = mex;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
errMes = response.Content.ReadAsStringAsync().Result;
|
|
||||||
helper.SetStringValue("errMsg", errMes);
|
|
||||||
return RedirectToAction("Error");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return View(modelList);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
public IActionResult ModificaTutteDestinazioniPost(List<Destinazioni_Out> modelList, string? CodAutista, string? CodMezzo/*, string? autisti,*/ /*string? nomeAutista,*/ /*string? mezzi*/)
|
|
||||||
{
|
{
|
||||||
SessionHelper helper = new SessionHelper(this);
|
SessionHelper helper = new SessionHelper(this);
|
||||||
|
|
||||||
@ -412,150 +334,51 @@ namespace SoftwayWeb.Controllers
|
|||||||
return RedirectToAction("Login", "Login");
|
return RedirectToAction("Login", "Login");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var model in modelList)
|
foreach (var destinazione in modelList)
|
||||||
{
|
{
|
||||||
string dataGi = string.Empty;
|
|
||||||
dataGi = model.DataCarico.Value.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
|
||||||
urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzoWeb";
|
|
||||||
urlBase = urlBase + "?autista=" + model.CodAutista + "&dataGiro=" + dataGi + "&mezzo=" + model.CodAutomezzo;
|
|
||||||
Uri baseAddress = new Uri(urlBase);
|
|
||||||
client = new HttpClient();
|
|
||||||
client.BaseAddress = baseAddress;
|
|
||||||
|
|
||||||
List<Destinazioni_Out> modelList2 = new List<Destinazioni_Out>();
|
|
||||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
|
||||||
|
|
||||||
Modgir mg = new Modgir();
|
Modgir mg = new Modgir();
|
||||||
|
|
||||||
mg.Piserial = model.Brserial;
|
mg.Piserial = destinazione.Brserial;
|
||||||
mg.Pidata = model.DataCarico;
|
mg.Pidata = destinazione.DataCarico;
|
||||||
mg.Picommit = model.CodCommittente;
|
mg.Picommit = destinazione.CodCommittente;
|
||||||
mg.Pidesdiv = model.CodSede;
|
mg.Pidesdiv = destinazione.CodSede;
|
||||||
mg.Pitarga = CodAutista;
|
mg.Pitarga = mezzi.TrimEnd();
|
||||||
mg.Piautist = CodMezzo;
|
mg.Piautist = autisti.TrimEnd();
|
||||||
|
mg.Pitiprec = "M";
|
||||||
if (response.IsSuccessStatusCode)
|
mg.Pisergir = destinazione.serialeGiro;
|
||||||
{
|
|
||||||
string dato = response.Content.ReadAsStringAsync().Result;
|
|
||||||
modelList = JsonConvert.DeserializeObject<List<Destinazioni_Out>>(dato);
|
|
||||||
var presenti = modelList.OrderByDescending(t => t.Prog);
|
|
||||||
|
|
||||||
if (presenti != null && presenti.Count() > 0)
|
|
||||||
{
|
|
||||||
//giro già esistente.. accodo
|
|
||||||
mg.Pitiprec = "M";
|
|
||||||
mg.Pisergirold = model.serialeGiro;
|
|
||||||
foreach (Destinazioni_Out d in presenti)
|
|
||||||
{
|
|
||||||
mg.Pisergir = d.serialeGiro;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// giro non esistente.. ne creo uno nuovo
|
|
||||||
mg.Pitiprec = "N";
|
|
||||||
mg.Pisergir = model.serialeGiro;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
errMes = response.Content.ReadAsStringAsync().Result;
|
|
||||||
helper.SetStringValue("errMsg", errMes);
|
|
||||||
return RedirectToAction("Error");
|
|
||||||
}
|
|
||||||
|
|
||||||
apiUrl = helper.GetStringValue("apiUrl");
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
|
|
||||||
urlBase = apiUrl + "ModificaGiro/addModgir";
|
urlBase = apiUrl + "ModificaGiro/addModgir";
|
||||||
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(mg);
|
string data = JsonConvert.SerializeObject(mg);
|
||||||
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
HttpResponseMessage response2 = client.PostAsync(baseAddress, content).Result;
|
HttpResponseMessage response2 = client.PostAsync(baseAddress, content).Result;
|
||||||
|
|
||||||
if (response2.IsSuccessStatusCode)
|
//if (response2.IsSuccessStatusCode)
|
||||||
{
|
//{
|
||||||
return RedirectToAction("IndexValidate", "Destinazioni", new
|
// //Destinazioni_Out destMod = new Destinazioni_Out();
|
||||||
{
|
// //destMod.serialeGiro = destinazione.Brserial;
|
||||||
id = model.serialeGiro,
|
// //destMod.CodAutista = destinazione.CodAutista;
|
||||||
codAutista = model.CodAutistaOld,
|
// //destMod.CodAutomezzo = destinazione.CodAutomezzo;
|
||||||
nomeAutista = model.AutistaOld,
|
// //new
|
||||||
dataGiro = model.DataCarico,
|
// //{
|
||||||
codMezzo = model.CodAutomezzoOld,
|
// // id = destinazione.serialeGiro,
|
||||||
desMezzo = model.DescAutomezzoOld
|
// // codAutista = destinazione.CodAutista,
|
||||||
});
|
// // dataGiro = destinazione.DataCarico,
|
||||||
}
|
// // codMezzo = destinazione.CodAutomezzo
|
||||||
else
|
// //},;
|
||||||
{
|
//}
|
||||||
errMes = response2.Content.ReadAsStringAsync().Result;
|
|
||||||
helper.SetStringValue("errMsg", errMes);
|
|
||||||
return RedirectToAction("Error");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return RedirectToAction("Index", "Giri");
|
return RedirectToAction("Index", "Giri");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//[HttpPost]
|
|
||||||
//public IActionResult ModificaTutteDestinazioniPost(List<Destinazioni_Out> modelList, string? autisti, /*string? nomeAutista,*/ string? mezzi)
|
|
||||||
//{
|
|
||||||
// SessionHelper helper = new SessionHelper(this);
|
|
||||||
|
|
||||||
// token = helper.GetStringValue("tok");
|
|
||||||
|
|
||||||
// if (string.IsNullOrEmpty(token))
|
|
||||||
// {
|
|
||||||
// return RedirectToAction("Login", "Login");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// foreach (var destinazione in modelList)
|
|
||||||
// {
|
|
||||||
// Modgir mg = new Modgir();
|
|
||||||
|
|
||||||
// mg.Piserial = destinazione.Brserial;
|
|
||||||
// mg.Pidata = destinazione.DataCarico;
|
|
||||||
// mg.Picommit = destinazione.CodCommittente;
|
|
||||||
// mg.Pidesdiv = destinazione.CodSede;
|
|
||||||
// mg.Pitarga = mezzi.TrimEnd();
|
|
||||||
// mg.Piautist = autisti.TrimEnd();
|
|
||||||
// mg.Pitiprec = "M";
|
|
||||||
// mg.Pisergir = destinazione.serialeGiro;
|
|
||||||
|
|
||||||
// apiUrl = helper.GetStringValue("apiUrl");
|
|
||||||
|
|
||||||
// urlBase = apiUrl + "ModificaGiro/addModgir";
|
|
||||||
|
|
||||||
// Uri baseAddress = new Uri(urlBase);
|
|
||||||
// client = new HttpClient();
|
|
||||||
// client.BaseAddress = baseAddress;
|
|
||||||
|
|
||||||
// string data = JsonConvert.SerializeObject(mg);
|
|
||||||
// StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
|
||||||
|
|
||||||
// HttpResponseMessage response2 = client.PostAsync(baseAddress, content).Result;
|
|
||||||
|
|
||||||
// //if (response2.IsSuccessStatusCode)
|
|
||||||
// //{
|
|
||||||
// // //Destinazioni_Out destMod = new Destinazioni_Out();
|
|
||||||
// // //destMod.serialeGiro = destinazione.Brserial;
|
|
||||||
// // //destMod.CodAutista = destinazione.CodAutista;
|
|
||||||
// // //destMod.CodAutomezzo = destinazione.CodAutomezzo;
|
|
||||||
// // //new
|
|
||||||
// // //{
|
|
||||||
// // // id = destinazione.serialeGiro,
|
|
||||||
// // // codAutista = destinazione.CodAutista,
|
|
||||||
// // // dataGiro = destinazione.DataCarico,
|
|
||||||
// // // codMezzo = destinazione.CodAutomezzo
|
|
||||||
// // //},;
|
|
||||||
// //}
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return RedirectToAction("Index", "Giri");
|
|
||||||
//}
|
|
||||||
|
|
||||||
//[HttpPost]
|
//[HttpPost]
|
||||||
//public IActionResult Create(GiriConsegnaView model)
|
//public IActionResult Create(GiriConsegnaView model)
|
||||||
//{
|
//{
|
||||||
|
|||||||
@ -23,53 +23,81 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<b>Automezzo da sostituire:</b> @ViewBag.CodMezzo - @ViewBag.Mezzo
|
<b>Automezzo da sostituire:</b> @ViewBag.CodMezzo - @ViewBag.Mezzo
|
||||||
</div>
|
</div>
|
||||||
@using (Html.BeginForm(@* "ModificaTutteDestinazioniPost" *@"ModificaTutteDestinazioniStep1", "Giri", FormMethod.Post))
|
@using (Html.BeginForm("ModificaTutteDestinazioniPost", "Giri", FormMethod.Post))
|
||||||
{
|
{
|
||||||
|
<div class="mb-3">
|
||||||
|
<b>Seleziona il nuovo autista:</b> @Html.DropDownList("autisti", ViewBag.Autisti, null, new { @class = "agy-form-field require" })
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<b>Seleziona il nuovo Automezzo:</b> @Html.DropDownList("mezzi", ViewBag.Mezzi, null, new { @class = "agy-form-field require" })
|
||||||
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<b>Seleziona il nuovo autista:</b> @Html.DropDownList("autisti", ViewBag.Autisti, null, new { @class = "agy-form-field require" })
|
<input type="submit" value="Salva modifiche" class="btn btn-primary" />
|
||||||
</div>
|
<a asp-action="Index" asp-controller="Giri" value="Torna alla lista" class="btn btn-primary">Torna alla lista</a>
|
||||||
<div class="mb-3">
|
</div>
|
||||||
<b>Seleziona il nuovo Automezzo:</b> @Html.DropDownList("mezzi", ViewBag.Mezzi, null, new { @class = "agy-form-field require" })
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
@* <input type="submit" value="Salva modifiche" class="btn btn-primary" /> *@
|
|
||||||
<input type="submit" value="Avanti" class="btn btn-primary" />
|
|
||||||
|
|
||||||
@* <a asp-action="ModificaTutteDestinazioniStep1" asp-controller="Giri" asp-route-modelList="@modelList" class="btn btn-primary">avanti</a> *@
|
|
||||||
|
|
||||||
<a asp-action="Index" asp-controller="Giri" asp-route-oldAuti="@ViewBag.Autista" asp-route-oldMezzo="@ViewBag.Mezzo" value="Torna alla lista" class="btn btn-primary">Torna alla lista</a>
|
|
||||||
</div>
|
|
||||||
@for (var i = 0; i < modelList.Count(); i++)
|
@for (var i = 0; i < modelList.Count(); i++)
|
||||||
{
|
{
|
||||||
@Html.HiddenFor(modelItem => modelList[i].CodAutomezzo);
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].DescAutomezzo)
|
@Html.HiddenFor(modelItem => modelList[i].CodAutomezzo);
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Brserial)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].DataCarico)
|
@Html.HiddenFor(modelItem => modelList[i].DescAutomezzo)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].CodCommittente)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Committente)
|
@Html.HiddenFor(modelItem => modelList[i].Brserial)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].CodAutista)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Autista)
|
@Html.HiddenFor(modelItem => modelList[i].DataCarico)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].CodSede)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Sede)
|
@Html.HiddenFor(modelItem => modelList[i].CodCommittente)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].IndirizzoSede)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Cproword)
|
@Html.HiddenFor(modelItem => modelList[i].Committente)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Cprownum)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Brmerce)
|
@Html.HiddenFor(modelItem => modelList[i].CodAutista)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Brnote)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].ImportoDaRitirare)
|
@Html.HiddenFor(modelItem => modelList[i].Autista)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].ItemList)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].serialeGiro)
|
@Html.HiddenFor(modelItem => modelList[i].CodSede)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Casse)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Trasf)
|
@Html.HiddenFor(modelItem => modelList[i].Sede)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Colli)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].num_cons)
|
@Html.HiddenFor(modelItem => modelList[i].IndirizzoSede)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Uova)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Cist)
|
@Html.HiddenFor(modelItem => modelList[i].Cproword)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Note)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Seq)
|
@Html.HiddenFor(modelItem => modelList[i].Cprownum)
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Prog)
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Brmerce)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Brnote)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].ImportoDaRitirare)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].ItemList)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].serialeGiro)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Casse)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Trasf)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Colli)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].num_cons)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Uova)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Cist)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Note)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Seq)
|
||||||
|
|
||||||
|
@Html.HiddenFor(modelItem => modelList[i].Prog)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,186 +0,0 @@
|
|||||||
@model List<SoftwayWeb.Models.Destinazioni_Out>
|
|
||||||
|
|
||||||
@{
|
|
||||||
ViewData["Title"] = "ModificaTutteDestinazioniStep1";
|
|
||||||
Layout = "~/Views/Shared/_LayoutAreaRis.cshtml";
|
|
||||||
List<Destinazioni_Out> modelList = new List<Destinazioni_Out>();
|
|
||||||
modelList = Model;
|
|
||||||
string messaggio = string.Empty;
|
|
||||||
messaggio = ViewBag.Messaggio;
|
|
||||||
}
|
|
||||||
|
|
||||||
<h1 style="color:red">@* messaggio di uscita: *@ N.B: @messaggio</h1>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xl">
|
|
||||||
<div class="card mb-4">
|
|
||||||
<div class="card-header d-flex justify-content-between align-items-center">
|
|
||||||
<h5 class="mb-0">Modifica Tutte Destinazioni</h5> <small class="text-muted float-end"></small>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
@* <div class="mb-3">
|
|
||||||
<b>Autista da sostituire:</b> @ViewBag.CodAutista - @ViewBag.Autista
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<b>Automezzo da sostituire:</b> @ViewBag.CodMezzo - @ViewBag.Mezzo
|
|
||||||
</div> *@
|
|
||||||
@using (Html.BeginForm("ModificaTutteDestinazioniPost", "Giri", FormMethod.Post))
|
|
||||||
{
|
|
||||||
<div class="mb-3">
|
|
||||||
<b>Nuovo autista:</b> @ViewBag.CodAutista - @ViewBag.Autista @* @Html.DropDownList("autisti", ViewBag.Autisti, null, new { @class = "agy-form-field require" }) *@
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<b>Nuovo automezzo:</b> @ViewBag.CodMezzo - @ViewBag.Mezzo @* @Html.DropDownList("mezzi", ViewBag.Mezzi, null, new { @class = "agy-form-field require" }) *@
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<input type="submit" value="Salva" class="btn btn-primary" />
|
|
||||||
|
|
||||||
<a asp-action="ModificaTutteDestinazioni" asp-controller="Giri" value="Torna alla lista" class="btn btn-primary">Torna alla lista</a>
|
|
||||||
</div>
|
|
||||||
@for (var i = 0; i < modelList.Count(); i++)
|
|
||||||
{
|
|
||||||
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].CodAutomezzo)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].DescAutomezzo)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Brserial)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].DataCarico)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].CodCommittente)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Committente)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].CodAutista)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Autista)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].CodSede)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Sede)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].IndirizzoSede)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Cproword)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Cprownum)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Brmerce)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Brnote)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].ImportoDaRitirare)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].ItemList)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].serialeGiro)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Casse)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Trasf)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Colli)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].num_cons)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Uova)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Cist)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Note)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Seq)
|
|
||||||
@Html.HiddenFor(modelItem => modelList[i].Prog)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xl">
|
|
||||||
<div class="card mb-4">
|
|
||||||
<div class="card-header d-flex justify-content-between align-items-center">
|
|
||||||
<h5 class="mb-0">Elenco Destinazioni</h5> <small class="text-muted float-end"></small>
|
|
||||||
</div>
|
|
||||||
<div class="table-responsive text-nowrap">
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>S.</th>
|
|
||||||
<th>Committente</th>
|
|
||||||
<th>Sede</th>
|
|
||||||
<th>Indirizzo sede</th>
|
|
||||||
<th>Ca.</th>
|
|
||||||
<th>Tr.</th>
|
|
||||||
<th>Co.</th>
|
|
||||||
<th>Nr.Co.</th>
|
|
||||||
<th>Uo</th>
|
|
||||||
<th>Ci.</th>
|
|
||||||
<th>Note</th>
|
|
||||||
<th> </th>
|
|
||||||
<th> </th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="table-border-bottom-0">
|
|
||||||
@for (var i = 0; i < modelList.Count(); i++)
|
|
||||||
{
|
|
||||||
<tr>
|
|
||||||
<td style="font-size:12px; border-right-width:2px"><i class="bx bxl-angular bx-sm text-danger me-3"></i>@Html.DisplayFor(modelItem => modelList[i].Seq)</td>
|
|
||||||
<td style="border-right-width:2px">@Html.DisplayFor(modelItem => modelList[i].Committente)</td>
|
|
||||||
<td style="border-right-width:2px">@Html.DisplayFor(modelItem => modelList[i].Sede)</td>
|
|
||||||
<td style="border-right-width:2px">@Html.DisplayFor(modelItem => modelList[i].IndirizzoSede)</td>
|
|
||||||
@if (modelList[i].Casse != null && modelList[i].Casse > 0)
|
|
||||||
{
|
|
||||||
int icasse = 0;
|
|
||||||
icasse = Convert.ToInt32(modelList[i].Casse);
|
|
||||||
<td style="font-size:12px; border-right-width:2px">
|
|
||||||
@icasse
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td style="border-right-width:2px"> </td>
|
|
||||||
}
|
|
||||||
@if (modelList[i].Trasf != null && modelList[i].Trasf > 0)
|
|
||||||
{
|
|
||||||
<td style="font-size:12px; border-right-width:2px">
|
|
||||||
@Html.DisplayFor(modelItem => modelList[i].Trasf)
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td style="border-right-width:2px"> </td>
|
|
||||||
}
|
|
||||||
@if (modelList[i].Colli != null && modelList[i].Colli > 0)
|
|
||||||
{
|
|
||||||
int icolli = 0;
|
|
||||||
icolli = Convert.ToInt32(modelList[i].Colli);
|
|
||||||
<td style="font-size:12px; border-right-width:2px">
|
|
||||||
@icolli
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td style="border-right-width:2px"> </td>
|
|
||||||
}
|
|
||||||
@if (modelList[i].num_cons != null && modelList[i].num_cons > 0)
|
|
||||||
{
|
|
||||||
<td style="font-size:12px; border-right-width:2px">
|
|
||||||
@Html.DisplayFor(modelItem => modelList[i].num_cons)
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td style="border-right-width:2px"> </td>
|
|
||||||
}
|
|
||||||
@if (modelList[i].Uova != null && modelList[i].Uova > 0)
|
|
||||||
{
|
|
||||||
<td style="font-size:12px; border-right-width:2px">
|
|
||||||
@Html.DisplayFor(modelItem => modelList[i].Uova)
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td style="border-right-width:2px"> </td>
|
|
||||||
}
|
|
||||||
@if (modelList[i].Cist != null && modelList[i].Cist > 0)
|
|
||||||
{
|
|
||||||
<td style="font-size:12px; border-right-width:2px">
|
|
||||||
@Html.DisplayFor(modelItem => modelList[i].Cist)
|
|
||||||
</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td style="border-right-width:2px"> </td>
|
|
||||||
}
|
|
||||||
|
|
||||||
<td style="font-size:12px; border-right-width:2px">
|
|
||||||
@Html.DisplayFor(modelItem => modelList[i].Note)
|
|
||||||
</td>
|
|
||||||
<td style="border-right-width:2px"> </td>
|
|
||||||
<td style="border-right-width:2px"> </td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -9,9 +9,7 @@
|
|||||||
"rootUrlApi": "https://api.poloinformatico.it:8000/api/",
|
"rootUrlApi": "https://api.poloinformatico.it:8000/api/",
|
||||||
//"rootUrlApi": "https://localhost:7126/api/"
|
//"rootUrlApi": "https://localhost:7126/api/"
|
||||||
"messDestAccodo": "La seguente destinazione verrà aggiunta ad un giro esistente",
|
"messDestAccodo": "La seguente destinazione verrà aggiunta ad un giro esistente",
|
||||||
"messDestNew": "Verrà creato un nuovo giro per la seguente destinazione",
|
"messDestNew": "Verrà creato un nuovo giro per la seguente destinazione"
|
||||||
"messDestiAccodo": "Le seguenti destinazioni verranno aggiunte ad un giro esistente",
|
|
||||||
"messDestiNew": "Verrà creato un nuovo giro per le seguenti destinazioni"
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user