Compare commits

..

No commits in common. "41a32fbd46e5b3e7858e36ee4f539eef25bcca7e" and "3935e3dd6187be818a2c5791b6da78b0855adda3" have entirely different histories.

3 changed files with 248 additions and 133 deletions

View File

@ -16,26 +16,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 DestinazioniController(IConfiguration configuration, IConfiguration mess1, IConfiguration mess2) public DestinazioniController(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:messDestAccodo"];
var messN = _mess2["ApplicationInsights:messDestNew"];
apiUrl = key; apiUrl = key;
messAcc = messA;
messNew = messN;
} }
public IActionResult Index(string id, string? codAutista, string? nomeAutista, DateTime dataGiro, string? codMezzo, string? desMezzo, int? page = 1) public IActionResult Index(string id, string? codAutista, string? nomeAutista, DateTime dataGiro, string? codMezzo, string? desMezzo, int? page = 1)
@ -377,6 +367,9 @@ namespace SoftwayWeb.Controllers
List<Destinazioni_Out> modelList = new List<Destinazioni_Out>(); List<Destinazioni_Out> modelList = new List<Destinazioni_Out>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result; HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode) if (response.IsSuccessStatusCode)
{ {
string dato = response.Content.ReadAsStringAsync().Result; string dato = response.Content.ReadAsStringAsync().Result;
@ -387,12 +380,12 @@ namespace SoftwayWeb.Controllers
if (presenti != null && presenti.Count() > 0) if (presenti != null && presenti.Count() > 0)
{ {
//giro già esistente.. accodo //giro già esistente.. accodo
mex = messAcc; mex = "Accodo";
} }
else else
{ {
// giro non esistente.. ne creo uno nuovo // giro non esistente.. ne creo uno nuovo
mex = messNew; mex = "Creo nuovo";
} }
ViewBag.Messaggio = mex; ViewBag.Messaggio = mex;
} }
@ -404,8 +397,11 @@ namespace SoftwayWeb.Controllers
} }
return View(model); return View(model);
//apiUrl = helper.GetStringValue("apiUrl"); //apiUrl = helper.GetStringValue("apiUrl");
} }
[HttpPost] [HttpPost]

View File

@ -7,40 +7,207 @@
messaggio = ViewBag.Messaggio; messaggio = ViewBag.Messaggio;
} }
<h1 style="color:red">@* messaggio di uscita: *@ N.B: @messaggio</h1> <h1>messaggio di uscita: @messaggio</h1>
<div class="row"> <div>
<div class="col-xl"> <h4>Destinazioni_Out</h4>
<div class="card mb-4"> <hr />
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Destinazione</h5> <small class="text-muted float-end"></small>
</div>
<div class="card-body">
<form asp-action="ModificaDestinazionePost"> <form asp-action="ModificaDestinazionePost">
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.DataCarico)</b> </label> <dl class="row">
<div class="form-text">@Html.DisplayFor(model => model.DataCarico)</div> <dt class = "col-sm-2">
</div> @Html.DisplayNameFor(model => model.CodAutomezzo)
<div class="mb-3"> </dt>
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Committente)</b> </label> <dd class = "col-sm-10">
<div class="form-text">@Html.DisplayFor(model => model.CodCommittente) - @Html.DisplayFor(model => model.Committente)</div> @Html.DisplayFor(model => model.CodAutomezzo)
</div> </dd>
<div class="mb-3"> <dt class = "col-sm-2">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Sede)</b> </label> @Html.DisplayNameFor(model => model.DescAutomezzo)
<div class="form-text">@Html.DisplayFor(model => model.CodSede) - @Html.DisplayFor(model => model.Sede)</div> </dt>
</div> <dd class = "col-sm-10">
<div class="mb-3"> @Html.DisplayFor(model => model.DescAutomezzo)
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.IndirizzoSede)</b> </label> </dd>
<div class="form-text">@Html.DisplayFor(model => model.IndirizzoSede)</div> <dt class = "col-sm-2">
</div> @Html.DisplayNameFor(model => model.Brserial)
<div class="mb-3"> </dt>
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.DescAutomezzo)</b> </label> <dd class = "col-sm-10">
<div class="form-text">@Html.DisplayFor(model => model.CodAutomezzo) - @Html.DisplayFor(model => model.DescAutomezzo)</div> @Html.DisplayFor(model => model.Brserial)
</div> </dd>
<div class="mb-3"> <dt class = "col-sm-2">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Autista)</b> </label> @Html.DisplayNameFor(model => model.DataCarico)
<div class="form-text">@Html.DisplayFor(model => model.CodAutista) - @Html.DisplayFor(model => model.Autista)</div> </dt>
</div> <dd class = "col-sm-10">
@Html.DisplayFor(model => model.DataCarico)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.CodCommittente)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.CodCommittente)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Committente)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Committente)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.CodAutista)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.CodAutista)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Autista)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Autista)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.CodSede)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.CodSede)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Sede)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Sede)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.IndirizzoSede)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.IndirizzoSede)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Cproword)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Cproword)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Cprownum)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Cprownum)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Brmerce)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Brmerce)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Brnote)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Brnote)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ImportoDaRitirare)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ImportoDaRitirare)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ItemList)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ItemList)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.serialeGiro)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.serialeGiro)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Casse)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Casse)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Trasf)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Trasf)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Colli)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Colli)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.num_cons)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.num_cons)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Uova)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Uova)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Cist)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Cist)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Note)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Note)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Seq)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Seq)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Prog)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Prog)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Pisergir)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Pisergir)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.CodAutomezzoOld)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.CodAutomezzoOld)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.CodAutistaOld)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.CodAutistaOld)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.AutistaOld)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.AutistaOld)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.DescAutomezzoOld)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.DescAutomezzoOld)
</dd>
</dl>
@Html.HiddenFor(model => model.DescAutomezzo) @Html.HiddenFor(model => model.DescAutomezzo)
@Html.HiddenFor(model => model.Brserial) @Html.HiddenFor(model => model.Brserial)
@ -74,55 +241,9 @@
@Html.HiddenFor(model => model.AutistaOld) @Html.HiddenFor(model => model.AutistaOld)
@Html.HiddenFor(model => model.DescAutomezzoOld) @Html.HiddenFor(model => model.DescAutomezzoOld)
@Html.HiddenFor(model => model.CodAutista)
@Html.HiddenFor(model => model.CodAutomezzo)
<button type="submit" class="btn btn-primary">Salva</button> <button type="submit" class="btn btn-primary">Salva</button>
</form> </form>
</div>
</div>
</div>
<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">Dettaglio trasporto</h5> <small class="text-muted float-end"></small>
</div>
<div class="card-body">
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Casse)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Casse)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Trasf)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Trasf)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Colli)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Colli)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.num_cons)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.num_cons)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Uova)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Uova)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Cist)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Cist)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Seq)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Seq)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Prog)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Prog)</div>
</div>
</div>
</div>
</div>
</div>
<div>
<a asp-action="ModificaDestinazione" asp-controller="Destinazioni" asp-route-serial="@Model.Brserial" class="btn btn-primary">Torna indietro</a>
</div> </div>

View File

@ -6,10 +6,8 @@
} }
}, },
"ApplicationInsights": { "ApplicationInsights": {
"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",
"messDestNew": "Verrà creato un nuovo giro per la seguente destinazione"
}, },