diff --git a/Controllers/ChiusureController.cs b/Controllers/ChiusureController.cs index 2a73ac4..7f8a569 100644 --- a/Controllers/ChiusureController.cs +++ b/Controllers/ChiusureController.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; +using System.Net; using System.Text; using VirtualTask.Models; @@ -53,5 +54,46 @@ namespace VirtualTask.Controllers return View(); } + + + public ActionResult Details(string id) + { + Chiusure ele=new Chiusure(); + + if (id == null) + { + + } + else + { + + } + + return View(ele); + } + public ActionResult Edit(string id) + { + Chiusure ele = new Chiusure(); + + if (id == null) + { + + } + else + { + List modelList = new List(); + HttpResponseMessage response = client.GetAsync(baseAddress).Result; + if (response.IsSuccessStatusCode) + { + string data = response.Content.ReadAsStringAsync().Result; + modelList = JsonConvert.DeserializeObject>(data); + + var el =modelList.Where(t=>t.cccodice.Equals(id)).First(); + ele = el; + } + } + + return View(ele); + } } } diff --git a/Views/Chiusure/Details.cshtml b/Views/Chiusure/Details.cshtml new file mode 100644 index 0000000..666ead7 --- /dev/null +++ b/Views/Chiusure/Details.cshtml @@ -0,0 +1,138 @@ +@model VirtualTask.Models.Chiusure + +@{ + ViewData["Title"] = "Details"; +} + +

Details

+ +
+

Chiusure

+
+
+
+ @Html.DisplayNameFor(model => model.cccodazi) +
+
+ @Html.DisplayFor(model => model.cccodazi) +
+
+ @Html.DisplayNameFor(model => model.cccodice) +
+
+ @Html.DisplayFor(model => model.cccodice) +
+
+ @Html.DisplayNameFor(model => model.ccdescr) +
+
+ @Html.DisplayFor(model => model.ccdescr) +
+
+ @Html.DisplayNameFor(model => model.ccdessup) +
+
+ @Html.DisplayFor(model => model.ccdessup) +
+
+ @Html.DisplayNameFor(model => model.ccflfatt) +
+
+ @Html.DisplayFor(model => model.ccflfatt) +
+
+ @Html.DisplayNameFor(model => model.ccflrep) +
+
+ @Html.DisplayFor(model => model.ccflrep) +
+
+ @Html.DisplayNameFor(model => model.cctipcod) +
+
+ @Html.DisplayFor(model => model.cctipcod) +
+
+ @Html.DisplayNameFor(model => model.ccgruppo) +
+
+ @Html.DisplayFor(model => model.ccgruppo) +
+
+ @Html.DisplayNameFor(model => model.ccimpint) +
+
+ @Html.DisplayFor(model => model.ccimpint) +
+
+ @Html.DisplayNameFor(model => model.ccimpman) +
+
+ @Html.DisplayFor(model => model.ccimpman) +
+
+ @Html.DisplayNameFor(model => model.ccserint) +
+
+ @Html.DisplayFor(model => model.ccserint) +
+
+ @Html.DisplayNameFor(model => model.ccserman) +
+
+ @Html.DisplayFor(model => model.ccserman) +
+
+ @Html.DisplayNameFor(model => model.ccnumore) +
+
+ @Html.DisplayFor(model => model.ccnumore) +
+
+ @Html.DisplayNameFor(model => model.ccperman) +
+
+ @Html.DisplayFor(model => model.ccperman) +
+
+ @Html.DisplayNameFor(model => model.corecom) +
+
+ @Html.DisplayFor(model => model.corecom) +
+
+ @Html.DisplayNameFor(model => model.codtobso) +
+
+ @Html.DisplayFor(model => model.codtobso) +
+
+ @Html.DisplayNameFor(model => model.ccrapabi) +
+
+ @Html.DisplayFor(model => model.ccrapabi) +
+
+ @Html.DisplayNameFor(model => model.ccrapobb) +
+
+ @Html.DisplayFor(model => model.ccrapobb) +
+
+ @Html.DisplayNameFor(model => model.ccriapre) +
+
+ @Html.DisplayFor(model => model.ccriapre) +
+
+ @Html.DisplayNameFor(model => model.ccchiint) +
+
+ @Html.DisplayFor(model => model.ccchiint) +
+
+
+
+ @Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) | + Back to List +
diff --git a/Views/Chiusure/Edit.cshtml b/Views/Chiusure/Edit.cshtml new file mode 100644 index 0000000..f6f1bfd --- /dev/null +++ b/Views/Chiusure/Edit.cshtml @@ -0,0 +1,128 @@ +@model VirtualTask.Models.Chiusure + +@{ + ViewData["Title"] = "Edit"; +} + +

Edit

+ +

Chiusure

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ +
+ Back to List +
+ +@section Scripts { + @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} +} diff --git a/Views/Chiusure/Index.cshtml b/Views/Chiusure/Index.cshtml index 2fe268f..f55c917 100644 --- a/Views/Chiusure/Index.cshtml +++ b/Views/Chiusure/Index.cshtml @@ -49,8 +49,9 @@ - @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }) + @Html.ActionLink("Edit", "Edit", new { id=item.cccodice }) | + @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }) | + @Html.ActionLink("Details", "Details", new { id=item.cccodice }) }