diff --git a/Controllers/LoginController.cs b/Controllers/LoginController.cs index 4ce6f05..3a8edb9 100644 --- a/Controllers/LoginController.cs +++ b/Controllers/LoginController.cs @@ -28,6 +28,7 @@ namespace VirtualTask.Controllers return View(); } + [HttpPost] public IActionResult Login(Login model) { @@ -61,5 +62,45 @@ namespace VirtualTask.Controllers return View(); } } + + + public IActionResult Login2() + { + return View(); + } + [HttpPost] + public IActionResult Login2(Login model) + { + string url = apiUrl + "loginTechnicalVT"; + Uri baseAddress = new Uri(url); + client.BaseAddress = baseAddress; + ViewBag.Error = string.Empty; + + LoginOut loginOut = new LoginOut(); + string data = JsonConvert.SerializeObject(model); + StringContent content = new StringContent(data, Encoding.UTF8, "application/json"); + HttpResponseMessage response = client.PostAsync(baseAddress, content).Result; + if (response.IsSuccessStatusCode) + { + string risultato = response.Content.ReadAsStringAsync().Result; + loginOut = JsonConvert.DeserializeObject(risultato); + + helper.SetStringValue("tok", loginOut.Tok); + helper.SetStringValue("apiUrl", apiUrl); + helper.SetStringValue("tenant", model.Tenant); + helper.SetStringValue("tecnico", model.Username); + return RedirectToAction("Index", "Home"); + } + else + { + errMes = response.Content.ReadAsStringAsync().Result; + loginOut = JsonConvert.DeserializeObject(errMes); + + helper.SetStringValue("errMsg", loginOut.err_detail); + ViewBag.Error = loginOut.err_detail; + return View(); + } + } + } } diff --git a/Views/Chiusure/Create.cshtml b/Views/Chiusure/Create.cshtml index 4154273..62e4566 100644 --- a/Views/Chiusure/Create.cshtml +++ b/Views/Chiusure/Create.cshtml @@ -1,65 +1,73 @@ @model VirtualTask.Models.Chiusure @{ - ViewData["Title"] = "Create"; + ViewData["Title"] = "Nuovo"; + Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml"; } - -

Nuovo

- - -
-
-
-
-
+
+
+
+
+
+ +
-
- - - -
-
- - - -
- -
- - +
+ + + +
+
 
+
+ + + +
+
 
+
+ + +
+
 
+
+ +
+ @Html.HiddenFor(x => x.cccodazi) + @Html.HiddenFor(x => x.ccflfatt) + @Html.HiddenFor(x => x.ccflrep) + @Html.HiddenFor(x => x.cctipcod) + @Html.HiddenFor(x => x.ccgruppo) + @Html.HiddenFor(x => x.ccimpint) + @Html.HiddenFor(x => x.ccimpman) + @Html.HiddenFor(x => x.ccserint) + @Html.HiddenFor(x => x.ccserman) + @Html.HiddenFor(x => x.ccnumore) + @Html.HiddenFor(x => x.ccperman) + @Html.HiddenFor(x => x.corecom) + @Html.HiddenFor(x => x.codtobso) + @Html.HiddenFor(x => x.ccriapre) + @Html.HiddenFor(x => x.ccchiint) + @Html.HiddenFor(x => x.ccrapabi) + @Html.HiddenFor(x => x.ccrapobb) + + +
- @Html.HiddenFor(x => x.cccodazi) - @Html.HiddenFor(x => x.ccflfatt) - @Html.HiddenFor(x => x.ccflrep) - @Html.HiddenFor(x => x.cctipcod) - @Html.HiddenFor(x => x.ccgruppo) - @Html.HiddenFor(x => x.ccimpint) - @Html.HiddenFor(x => x.ccimpman) - @Html.HiddenFor(x => x.ccserint) - @Html.HiddenFor(x => x.ccserman) - @Html.HiddenFor(x => x.ccnumore) - @Html.HiddenFor(x => x.ccperman) - @Html.HiddenFor(x => x.corecom) - @Html.HiddenFor(x => x.codtobso) - @Html.HiddenFor(x => x.ccriapre) - @Html.HiddenFor(x => x.ccchiint) - @Html.HiddenFor(x => x.ccrapabi) - @Html.HiddenFor(x => x.ccrapobb) - - -
- + - + + @section Scripts { + @{ + await Html.RenderPartialAsync("_ValidationScriptsPartial"); + } + } +
- -@section Scripts { - @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} -} +
+ diff --git a/Views/Chiusure/Index.cshtml b/Views/Chiusure/Index.cshtml index f759057..d86ca95 100644 --- a/Views/Chiusure/Index.cshtml +++ b/Views/Chiusure/Index.cshtml @@ -6,85 +6,98 @@ @{ - ViewData["Title"] = "Index"; + ViewData["Title"] = "Tipi Intervento"; + Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml"; } -

Codici chiusura

+
+
+
-

- Crea nuovo -

-@using (Html.BeginForm()) -{ -

- Cerca per descrizione: @Html.TextBox("SearchString") - -

-} - - - - - - - +

+ Crea un nuovo elemento +

+ @using (Html.BeginForm()) + { - +
+
@Html.TextBox("SearchString", null, new { placeholder = "Cerca per descrizione", @class = "agy-form-field require" })
+
 
+
+ +
- + } +
- @* @Html.DisplayNameFor(model => model.cccodazi) *@ - Azienda - - @* @Html.DisplayNameFor(model => model.cccodice) *@ - Codice - - @* @Html.DisplayNameFor(model => model.ccdescr) *@ - Descrizione - - @* @Html.DisplayNameFor(model => model.ccdessup) *@ - Desc. Sup. -
+ + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + + } + +
AziendaCodiceDescrizioneDesc. Sup.
+ @Html.DisplayFor(modelItem => item.cccodazi) + + @Html.DisplayFor(modelItem => item.cccodice) + + @Html.DisplayFor(modelItem => item.ccdescr) + + @Html.DisplayFor(modelItem => item.ccdessup) + +@* *@ + + + Modifica + + | + + Dettaglio + + | + + Elimina + + +
+
+ + +
+
+
- - - - -@foreach (var item in Model) { - - - @Html.DisplayFor(modelItem => item.cccodazi) - - - @Html.DisplayFor(modelItem => item.cccodice) - - - @Html.DisplayFor(modelItem => item.ccdescr) - - - @Html.DisplayFor(modelItem => item.ccdessup) - - - @Html.ActionLink("Modifica", "Edit", new { id=item.cccodice }) | - @Html.ActionLink("Dettaglio", "Details", new { id=item.cccodice }) | - @Html.ActionLink("Elimina", "Delete", new { id=item.cccodice }) - - -} - - -
- diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index a023004..356e186 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -1,11 +1,15 @@ @addTagHelper*, Microsoft.AspNetCore.Mvc.TagHelpers @model SelectList @{ - ViewData["Title"] = "Home Page"; + ViewData["Title"] = "Area Riservata"; + Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml"; } - -
-

Welcome

+
+
+
+
+
+ diff --git a/Views/Login/Login.cshtml b/Views/Login/Login.cshtml index cee9718..340e581 100644 --- a/Views/Login/Login.cshtml +++ b/Views/Login/Login.cshtml @@ -5,6 +5,10 @@ Layout = "~/Views/Shared/_LayoutLogin.cshtml"; } + + + +

Login

diff --git a/Views/Login/Login2.cshtml b/Views/Login/Login2.cshtml new file mode 100644 index 0000000..5de8265 --- /dev/null +++ b/Views/Login/Login2.cshtml @@ -0,0 +1,39 @@ +@model VirtualTask.Models.Login +@{ + ViewData["Title"] = "Login"; + Layout = "~/Views/Shared/_Layout2.cshtml"; +} +
+
+

Login

+
+
+
+
+
+ + +
+
+
 
+
+
+ + +
+
+
 
+
+
+ + +
+
+
+ +
+
+
+
+
+
\ No newline at end of file diff --git a/Views/Portale/Index.cshtml b/Views/Portale/Index.cshtml index a1d9e88..94aaf36 100644 --- a/Views/Portale/Index.cshtml +++ b/Views/Portale/Index.cshtml @@ -126,7 +126,7 @@ Purchase:
@@ -138,8 +138,8 @@ Purchase: Home
  • About Us
  • -
  • Registrati
  • -
  • Area Riservata
  • +
  • Services
  • +
  • Blog
  • Contact Us
  • +
  • Area Riservata