diff --git a/Controllers/AddDestinazioneController.cs b/Controllers/AddDestinazioneController.cs index 30aaefe..0e1d89b 100644 --- a/Controllers/AddDestinazioneController.cs +++ b/Controllers/AddDestinazioneController.cs @@ -29,6 +29,7 @@ namespace SoftwayWeb.Controllers public IActionResult AddDestinazione(string serialeGiro) { + SessionHelper helper = new SessionHelper(this); token = helper.GetStringValue("tok"); @@ -72,6 +73,13 @@ namespace SoftwayWeb.Controllers mg.Pitiprec = "A"; mg.Pirigele = string.Empty; mg.Pisergir = id; + mg.Picasse = modgir.Picasse; + mg.Pitrasf = modgir.Pitrasf; + mg.Picolli = modgir.Picolli; + mg.Pinumcons = modgir.Pinumcons; + mg.Piuova = modgir.Piuova; + mg.Picist = modgir.Picist; + mg.Piseq = modgir.Piseq; apiUrl = helper.GetStringValue("apiUrl"); @@ -83,6 +91,7 @@ namespace SoftwayWeb.Controllers string data = JsonConvert.SerializeObject(mg); StringContent content = new StringContent(data, Encoding.UTF8, "application/json"); HttpResponseMessage response = client.PostAsync(baseAddress, content).Result; + if (response.IsSuccessStatusCode) { return RedirectToAction("Index","Giri"); diff --git a/Models/Modgir.cs b/Models/Modgir.cs index 891088c..e681f0a 100644 --- a/Models/Modgir.cs +++ b/Models/Modgir.cs @@ -23,5 +23,19 @@ namespace SoftwayWeb.Models public string? Pirigele { get; set; } [Display(Name = "Seriale Giro")] public string? Pisergir { get; set; } + [Display(Name = "Casse")] + public decimal? Picasse { get; set; } + [Display(Name = "Trasf.")] + public decimal? Pitrasf { get; set; } + [Display(Name = "Colli")] + public decimal? Picolli { get; set; } + [Display(Name = "Num. Consegna")] + public int? Pinumcons { get; set; } + [Display(Name = "Uova")] + public decimal? Piuova { get; set; } + [Display(Name = "Cist.")] + public decimal? Picist { get; set; } + [Display(Name = "Sequenza")] + public int? Piseq { get; set; } } } diff --git a/Views/AddDestinazione/AddDestinazione.cshtml b/Views/AddDestinazione/AddDestinazione.cshtml index 4f72832..ebdfbec 100644 --- a/Views/AddDestinazione/AddDestinazione.cshtml +++ b/Views/AddDestinazione/AddDestinazione.cshtml @@ -41,10 +41,10 @@ @Html.DropDownListFor(x => x.Picommit, (IEnumerable)ViewBag.Commit, new { @id = "ddlCommittenti", @class = "agy-form-field require" }) -
+
-
- @Html.DropDownListFor(x => x.Pidesdiv, new List(), "- Seleziona sede2", new { @id = "ddlSediCons", @class = "agy-form-field require" }) +
+ @Html.DropDownListFor(x => x.Pidesdiv, new List(), "- Seleziona sede", new { @id = "ddlSediCons", @class = "agy-form-field require" })
@@ -78,6 +78,41 @@ @Html.DropDownList("mezzo",ViewBag.Mezzi, null, new { @class = "agy-form-field require" })
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + +
@*
@@ -136,7 +171,7 @@ success: function (states) { alert('aaa'); var district = "