diff --git a/Controllers/AnagController.cs b/Controllers/AnagController.cs index 2de8904..ad94047 100644 --- a/Controllers/AnagController.cs +++ b/Controllers/AnagController.cs @@ -193,6 +193,7 @@ namespace VirtualTask.Controllers anagCommImp.comm.ladeslav = "COMM_GEN_" + model.ancodice; anagCommImp.comm.lacodcli = model.ancodice; anagCommImp.comm.lacodimp = anagCommImp.imp.imcodimp; + anagCommImp.comm.lacomgen = "S"; string data = JsonConvert.SerializeObject(anagCommImp); StringContent content = new StringContent(data, Encoding.UTF8, "application/json"); diff --git a/Models/CommesseVT.cs b/Models/CommesseVT.cs index f02b546..6f1dd47 100644 --- a/Models/CommesseVT.cs +++ b/Models/CommesseVT.cs @@ -1,4 +1,6 @@ -namespace VirtualTask.Models +using System.ComponentModel.DataAnnotations; + +namespace VirtualTask.Models { //CLASSE PER LA LISTA public class CommesseVT @@ -37,5 +39,7 @@ public string? imcodcap { get; set; } /// provincia public string? improvin { get; set; } + /// flag commessa generica cliente + public string? lacomgen { get; set; } } } diff --git a/Models/CommesseVT_Table.cs b/Models/CommesseVT_Table.cs index 0a3c6c4..de91d39 100644 --- a/Models/CommesseVT_Table.cs +++ b/Models/CommesseVT_Table.cs @@ -32,6 +32,10 @@ namespace VirtualTask.Models [Required] [Display(Name = "Cod. Impianto")] public string? lacodimp { get; set; } - + + [Display(Name = "Commessa cliente generica")] + [StringLength(1)] + public string? lacomgen { get; set; } + } } diff --git a/Models/Rapp_New.cs b/Models/Rapp_New.cs index d3274d9..e21e2e3 100644 --- a/Models/Rapp_New.cs +++ b/Models/Rapp_New.cs @@ -31,6 +31,7 @@ namespace VirtualTask.Models public string? seriale_commessa { get; set; } [Display(Name = "DATA RAPPORTINO")] + [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}")] public DateTime data_rapportino { get; set; } [Display(Name = "ORA INIZIO")] diff --git a/Views/CommesseVT/Details.cshtml b/Views/CommesseVT/Details.cshtml index a67f818..e654332 100644 --- a/Views/CommesseVT/Details.cshtml +++ b/Views/CommesseVT/Details.cshtml @@ -45,6 +45,9 @@
@Html.DisplayNameFor(model => model.lacodimp) @Html.DisplayFor(model => model.lacodimp)
+
+ @Html.DisplayNameFor(model => model.lacomgen) @Html.DisplayFor(model => model.lacomgen) +
Torna alla lista diff --git a/Views/CommesseVT/Index.cshtml b/Views/CommesseVT/Index.cshtml index 78036f9..b3dafe3 100644 --- a/Views/CommesseVT/Index.cshtml +++ b/Views/CommesseVT/Index.cshtml @@ -109,14 +109,22 @@ Modifica - | + Dettaglio - | - - Elimina - + @{ + string _url_del = @Url.Action("Delete", "CommesseVT", new { id = item.laserial }); + string flagComGen = string.Empty; + flagComGen = string.IsNullOrEmpty(item.lacomgen) ? "N" : item.lacomgen; + + if (!flagComGen.Equals("S")) + { + + Elimina + + } + } } diff --git a/appsettings.json b/appsettings.json index 731e025..479c6ab 100644 --- a/appsettings.json +++ b/appsettings.json @@ -7,14 +7,14 @@ }, "ApplicationInsights": { //PRODUZIONE - "rootUrlApi": "https://api.poloinformatico.it:9000/api/Polo/", - "rootWebLoghi": "C:\\ZAPIPOLO\\api_polo\\wwwroot\\VIRTU\\", - "rootUrlApi2": "https://api.poloinformatico.it:9000/VIRTU/", + //"rootUrlApi": "https://api.poloinformatico.it:9000/api/Polo/", + //"rootWebLoghi": "C:\\ZAPIPOLO\\api_polo\\wwwroot\\VIRTU\\", + //"rootUrlApi2": "https://api.poloinformatico.it:9000/VIRTU/", //TEST - //"rootUrlApi": "http://testapi.poloinformatico.it:9001/api/Polo/", - //"rootWebLoghi": "C:\\SORGENTI\\ApiPolo\\ApiPolo\\wwwroot\\VIRTU\\", - //"rootUrlApi2": "http://testapi.poloinformatico.it:9001/VIRTU/", + "rootUrlApi": "http://testapi.poloinformatico.it:9001/api/Polo/", + "rootWebLoghi": "C:\\SORGENTI\\ApiPolo\\ApiPolo\\wwwroot\\VIRTU\\", + "rootUrlApi2": "http://testapi.poloinformatico.it:9001/VIRTU/", "mittenteMail": "info@virtualtask.it", "nomeMail": "Supporto Virtual Task",