diff --git a/Controllers/Rapp_NewController.cs b/Controllers/Rapp_NewController.cs index 3585b0f..6a94f9d 100644 --- a/Controllers/Rapp_NewController.cs +++ b/Controllers/Rapp_NewController.cs @@ -82,7 +82,8 @@ namespace VirtualTask.Controllers public IActionResult Create() { - ViewBag.AllStockList = LoadStockitems(); + ViewBag.Tecnici = GetTecnici(); + ViewBag.Chiusure = GetCodChiusura(); return View(); } @@ -226,6 +227,7 @@ namespace VirtualTask.Controllers return RedirectToAction("Error"); } + return View(rapp); } @@ -306,12 +308,41 @@ namespace VirtualTask.Controllers #endregion DELETE //metodo per avere riempire combobox con la tabella delle chiusure - private List LoadStockitems() + private List GetTecnici() { SessionHelper helper = new SessionHelper(this); token = helper.GetStringValue("tok"); apiUrl = helper.GetStringValue("apiUrl"); - urlBase = apiUrl + "codici_chiusura"; + urlBase = apiUrl + "tecniciList"; + urlBase = urlBase + "?token=" + token; + Uri baseAddress = new Uri(urlBase); + client = new HttpClient(); + client.BaseAddress = baseAddress; + List selectItems = new List(); + List modelList = new List(); + HttpResponseMessage response = client.GetAsync(baseAddress).Result; + if (response.IsSuccessStatusCode) + { + string data = response.Content.ReadAsStringAsync().Result; + modelList = JsonConvert.DeserializeObject>(data); + foreach (var role in modelList) + { + SelectListItem listItem = new SelectListItem(); + listItem.Value = role.tccodice; + listItem.Text = role.tcdescri; + selectItems.Add(listItem); + } + } + + return selectItems; + } + + private List GetCodChiusura() + { + SessionHelper helper = new SessionHelper(this); + token = helper.GetStringValue("tok"); + apiUrl = helper.GetStringValue("apiUrl"); + urlBase = apiUrl + "chiusureVtList"; urlBase = urlBase + "?token=" + token; Uri baseAddress = new Uri(urlBase); client = new HttpClient(); diff --git a/Views/Chiamate/Index.cshtml b/Views/Chiamate/Index.cshtml index d23afc1..19bf5e3 100644 --- a/Views/Chiamate/Index.cshtml +++ b/Views/Chiamate/Index.cshtml @@ -15,20 +15,20 @@ @using (Html.BeginForm()) {

- Find by Impianto: @Html.TextBox("SearchString") - + Cerca per Impianto: @Html.TextBox("SearchString") +

} - - - - - - - + + + + + + + @@ -60,9 +60,9 @@ } @@ -76,8 +76,8 @@ PageClasses = new[]{ "page-link"}, LiElementClasses=new[] { "page-item" }, UlElementClasses = new[] { "pagination","justify-content-center", "mt-3" }, - LinkToNextPageFormat = "Next", - LinkToPreviousPageFormat = "Previous", + LinkToNextPageFormat = "Successiva", + LinkToPreviousPageFormat = "Precedente", MaximumPageNumbersToDisplay = 5, DisplayLinkToPreviousPage = PagedListDisplayMode.Always, DisplayLinkToNextPage = PagedListDisplayMode.Always diff --git a/Views/Chiusure/Index.cshtml b/Views/Chiusure/Index.cshtml index b2364de..f759057 100644 --- a/Views/Chiusure/Index.cshtml +++ b/Views/Chiusure/Index.cshtml @@ -26,19 +26,19 @@ diff --git a/Views/Impianti/Index.cshtml b/Views/Impianti/Index.cshtml index 8d32383..8e4d80c 100644 --- a/Views/Impianti/Index.cshtml +++ b/Views/Impianti/Index.cshtml @@ -57,15 +57,15 @@ diff --git a/Views/Rapp_New/Create.cshtml b/Views/Rapp_New/Create.cshtml index 701596d..4ed2977 100644 --- a/Views/Rapp_New/Create.cshtml +++ b/Views/Rapp_New/Create.cshtml @@ -13,10 +13,10 @@
- @**@ - @**@ - @Html.HiddenFor(x => x.seriale_rapportino) - @Html.DisplayFor(model => model.seriale_rapportino) + + + @*@Html.HiddenFor(x => x.seriale_rapportino)*@ + @*@Html.DisplayFor(model => model.seriale_rapportino)*@
@@ -45,130 +45,116 @@
- @**@ - @**@ - @Html.HiddenFor(x => x.seriale_chiamata) - @Html.DisplayFor(model => model.seriale_chiamata) + +
- @**@ - @**@ - @Html.HiddenFor(x => x.seriale_commessa) - @Html.DisplayFor(model => model.seriale_commessa) + +
- @**@ - @**@ - @Html.HiddenFor(x => x.data_rapportino) - @Html.DisplayFor(model => model.data_rapportino) + +
- @**@ - @**@ - @Html.HiddenFor(x => x.ora_ini_rapportino) - @Html.DisplayFor(model => model.ora_ini_rapportino) + +
- @**@ - @**@ - @Html.HiddenFor(x => x.min_ini_rapportino) - @Html.DisplayFor(model => model.min_ini_rapportino) + +
- @**@ - @**@ - @Html.HiddenFor(x => x.ora_fin_rapportino) - @Html.DisplayFor(model => model.ora_fin_rapportino) + +
- @**@ - @**@ - @Html.HiddenFor(x => x.min_fin_rapportino) - @Html.DisplayFor(model => model.min_fin_rapportino) + +
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_1,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_1) + + @Html.DropDownListFor(x => x.codice_chiusura_1,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_1)*@
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_2,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_2) + + @Html.DropDownListFor(x => x.codice_chiusura_2,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_2)*@
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_3,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_3) + + @Html.DropDownListFor(x => x.codice_chiusura_3,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_3)*@
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_4,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_4) + + @Html.DropDownListFor(x => x.codice_chiusura_4,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_4)*@
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_5,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_5) + + @Html.DropDownListFor(x => x.codice_chiusura_5,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_5)*@
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_6,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_6) + + @Html.DropDownListFor(x => x.codice_chiusura_6,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_6)*@
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_7,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_7) + + @Html.DropDownListFor(x => x.codice_chiusura_7,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_7)*@
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_8,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_8) + + @Html.DropDownListFor(x => x.codice_chiusura_8,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_8)*@
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_9,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_9) + + @Html.DropDownListFor(x => x.codice_chiusura_9,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_9)*@
- @**@ - @*@Html.DropDownListFor(x => x.codice_chiusura_10,(IEnumerable)ViewBag.AllStockList,new {@class = "form-control"})*@ - @Html.HiddenFor(x => x.codice_chiusura_10) + + @Html.DropDownListFor(x => x.codice_chiusura_10,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_10)*@
- @**@ - @**@ + + @Html.HiddenFor(x => x.descrizione_intervento) @Html.DisplayFor(model => model.descrizione_intervento)
- @**@ - @**@ + + @Html.HiddenFor(x => x.stato_finale) @Html.DisplayFor(model => model.stato_finale)
- @**@ + @** @**@ @Html.HiddenFor(x => x.generato) @Html.DisplayFor(model => model.generato) @@ -183,7 +169,8 @@
- + @**@ + @Html.DropDownListFor(x => x.codice_tecnico,(IEnumerable)ViewBag.Tecnici,new {@class = "form-control"})
diff --git a/Views/Rapp_New/Edit.cshtml b/Views/Rapp_New/Edit.cshtml index 3b7bab7..db15db0 100644 --- a/Views/Rapp_New/Edit.cshtml +++ b/Views/Rapp_New/Edit.cshtml @@ -58,108 +58,118 @@
- @**@ - @**@ - @Html.HiddenFor(x => x.data_rapportino) - @Html.DisplayFor(model => model.data_rapportino) + + + @*@Html.HiddenFor(x => x.data_rapportino)*@ + @*@Html.DisplayFor(model => model.data_rapportino)*@
- @**@ - @**@ - @Html.HiddenFor(x => x.ora_ini_rapportino) - @Html.DisplayFor(model => model.ora_ini_rapportino) + + + @*@Html.HiddenFor(x => x.ora_ini_rapportino)*@ + @*@Html.DisplayFor(model => model.ora_ini_rapportino)*@
- @**@ - @**@ - @Html.HiddenFor(x => x.min_ini_rapportino) - @Html.DisplayFor(model => model.min_ini_rapportino) + + + @*@Html.HiddenFor(x => x.min_ini_rapportino)*@ + @*@Html.DisplayFor(model => model.min_ini_rapportino)*@
- @**@ - @**@ - @Html.HiddenFor(x => x.ora_fin_rapportino) - @Html.DisplayFor(model => model.ora_fin_rapportino) + + + @*@Html.HiddenFor(x => x.ora_fin_rapportino)*@ + @*@Html.DisplayFor(model => model.ora_fin_rapportino)*@
- @**@ - @**@ - @Html.HiddenFor(x => x.min_fin_rapportino) - @Html.DisplayFor(model => model.min_fin_rapportino) + + + @*@Html.HiddenFor(x => x.min_fin_rapportino)*@ + @*@Html.DisplayFor(model => model.min_fin_rapportino)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_1) - @Html.DisplayFor(model => model.codice_chiusura_1) + @Html.DropDownListFor(x => x.codice_chiusura_1,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_1)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_1)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_2) - @Html.DisplayFor(model => model.codice_chiusura_2) + @Html.DropDownListFor(x => x.codice_chiusura_2,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_2)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_2)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_3) - @Html.DisplayFor(model => model.codice_chiusura_3) + @Html.DropDownListFor(x => x.codice_chiusura_3,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_3)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_3)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_4) - @Html.DisplayFor(model => model.codice_chiusura_4) + @Html.DropDownListFor(x => x.codice_chiusura_4,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_4)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_4)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_5) - @Html.DisplayFor(model => model.codice_chiusura_5) + @Html.DropDownListFor(x => x.codice_chiusura_5,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_5)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_5)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_6) - @Html.DisplayFor(model => model.codice_chiusura_6) + @Html.DropDownListFor(x => x.codice_chiusura_6,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_6)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_6)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_7) - @Html.DisplayFor(model => model.codice_chiusura_7) + @Html.DropDownListFor(x => x.codice_chiusura_7,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_7)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_7)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_8) - @Html.DisplayFor(model => model.codice_chiusura_8) + @Html.DropDownListFor(x => x.codice_chiusura_8,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_8)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_8)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_9) - @Html.DisplayFor(model => model.codice_chiusura_9) + @Html.DropDownListFor(x => x.codice_chiusura_9,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_9)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_9)*@
@**@ @**@ - @Html.HiddenFor(x => x.codice_chiusura_10) - @Html.DisplayFor(model => model.codice_chiusura_10) + @Html.DropDownListFor(x => x.codice_chiusura_10,(IEnumerable)ViewBag.Chiusure,new {@class = "form-control"}) + @*@Html.HiddenFor(x => x.codice_chiusura_10)*@ + @*@Html.DisplayFor(model => model.codice_chiusura_10)*@
diff --git a/Views/Rapp_New/Index.cshtml b/Views/Rapp_New/Index.cshtml index dbc9f3e..4174c65 100644 --- a/Views/Rapp_New/Index.cshtml +++ b/Views/Rapp_New/Index.cshtml @@ -29,247 +29,247 @@
- diff --git a/Views/Tecnici/Index.cshtml b/Views/Tecnici/Index.cshtml index 8821c27..4a0d7e6 100644 --- a/Views/Tecnici/Index.cshtml +++ b/Views/Tecnici/Index.cshtml @@ -33,39 +33,39 @@
SERIALEESERCIZIONUMERODATAIMPIANTOTECNICOSTATOSerialeEsercizioNumeroDataImpiantoTecnicoStato
- @Html.ActionLink("Edit", "Edit", new { id=item.chserial }) | - @Html.ActionLink("Details", "Details", new { id=item.chserial }) | - @Html.ActionLink("Delete", "Delete", new { id=item.chserial }) + @Html.ActionLink("Modifica", "Edit", new { id=item.chserial }) | + @Html.ActionLink("Dettaglio", "Details", new { id=item.chserial }) | + @Html.ActionLink("Elimina", "Delete", new { id=item.chserial })
@* @Html.DisplayNameFor(model => model.cccodazi) *@ - AZIENDA + Azienda @* @Html.DisplayNameFor(model => model.cccodice) *@ - CODICE + Codice @* @Html.DisplayNameFor(model => model.ccdescr) *@ - DESCRIZIONE + Descrizione @* @Html.DisplayNameFor(model => model.ccdessup) *@ - DESC. SUP. + Desc. Sup.
@* @Html.DisplayNameFor(model => model.seriale_rapportino) *@ - SERIALE RAPPORTINO + Seriale rapportino @* @Html.DisplayNameFor(model => model.tipo_rapportino) *@ - TIPO RAPPORTINI + Tipo rapportino @* @Html.DisplayNameFor(model => model.azienda_impianto) *@ - AZIENDA + Azienda @* @Html.DisplayNameFor(model => model.codice_impianto) *@ - CODICE IMPIANTO + Codice impianto @* @Html.DisplayNameFor(model => model.azienda_chiamata) *@ - AZ. CHIAMATA + Az. chiamata @* @Html.DisplayNameFor(model => model.seriale_chiamata) *@ - SERIALE CHIAMATA + Seriale chiamata @* @Html.DisplayNameFor(model => model.seriale_commessa) *@ - SERIALE COMMESSA + Seriale commessa @* @Html.DisplayNameFor(model => model.data_rapportino) *@ - DATA RAPPORTINO + Data rapportino +
@* @Html.DisplayNameFor(model => model.tccodice) *@ - CODICE + Codice @* @Html.DisplayNameFor(model => model.tcdescri) *@ - DESCRIZIONE + Descrizione @* @Html.DisplayNameFor(model => model.tctelef1) *@ - TEL. + Tel. @* @Html.DisplayNameFor(model => model.tcuser) *@ - UTENTE + Utente @* @Html.DisplayNameFor(model => model.tcpwd) *@ - PASSWORD + Password