From 67e072d1a7deed9ef25c887b80be1bdbfbcc2684 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 4 Oct 2023 11:58:19 +0200 Subject: [PATCH] ok pagina fermate --- MP-TAB-SERV/Components/ProdStopMan.razor | 13 ++++++++++--- MP-TAB-SERV/Components/ProdStopMan.razor.cs | 8 ++++++++ MP-TAB-SERV/Pages/ProdStop.razor | 7 +++++-- MP-TAB-SERV/Pages/ProdStop.razor.cs | 9 +++++++++ MP.Data/DatabaseModels/AnagEventiModel.cs | 4 +++- 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/MP-TAB-SERV/Components/ProdStopMan.razor b/MP-TAB-SERV/Components/ProdStopMan.razor index a8c71e1a..de17dfd4 100644 --- a/MP-TAB-SERV/Components/ProdStopMan.razor +++ b/MP-TAB-SERV/Components/ProdStopMan.razor @@ -1,3 +1,10 @@ -
- d -
\ No newline at end of file +
+
+
+ +
+ +
+
diff --git a/MP-TAB-SERV/Components/ProdStopMan.razor.cs b/MP-TAB-SERV/Components/ProdStopMan.razor.cs index abb20920..c4a43b13 100644 --- a/MP-TAB-SERV/Components/ProdStopMan.razor.cs +++ b/MP-TAB-SERV/Components/ProdStopMan.razor.cs @@ -1,6 +1,14 @@ +using Microsoft.AspNetCore.Components; + namespace MP_TAB_SERV.Components { public partial class ProdStopMan { + [Parameter] + public string objCss { get; set; } = ""; + [Parameter] + public string objIcon { get; set; } = ""; + [Parameter] + public string objTxt { get; set; } = ""; } } \ No newline at end of file diff --git a/MP-TAB-SERV/Pages/ProdStop.razor b/MP-TAB-SERV/Pages/ProdStop.razor index b8718a21..ebf4bd88 100644 --- a/MP-TAB-SERV/Pages/ProdStop.razor +++ b/MP-TAB-SERV/Pages/ProdStop.razor @@ -9,8 +9,11 @@ else
- @for (int x = 0; x > 20; x++) + +
+ @foreach(var item in events2show) { - + } +
} diff --git a/MP-TAB-SERV/Pages/ProdStop.razor.cs b/MP-TAB-SERV/Pages/ProdStop.razor.cs index 6a81bbd1..c8695340 100644 --- a/MP-TAB-SERV/Pages/ProdStop.razor.cs +++ b/MP-TAB-SERV/Pages/ProdStop.razor.cs @@ -10,9 +10,12 @@ namespace MP_TAB_SERV.Pages protected MappaStatoExpl? CurrMSE { get; set; } = null; protected string IdxMacc { get; set; } = ""; + protected List events2show { get; set; } = new List(); [Inject] protected MessageService MsgServ { get; set; } = null!; + [Inject] + protected TabDataService TabSrv { get; set; } = null!; #endregion Protected Properties @@ -38,6 +41,12 @@ namespace MP_TAB_SERV.Pages CurrMSE = await MsgServ.GetMachineMse(IdxMacc); } } + + var eventsAll = await TabSrv.AnagEventiGetAll(); + if(eventsAll != null) + { + events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x=>x.Nome).ToList(); + } } #endregion Private Methods diff --git a/MP.Data/DatabaseModels/AnagEventiModel.cs b/MP.Data/DatabaseModels/AnagEventiModel.cs index 25bcac89..99c04d3e 100644 --- a/MP.Data/DatabaseModels/AnagEventiModel.cs +++ b/MP.Data/DatabaseModels/AnagEventiModel.cs @@ -1,15 +1,17 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MP.Data.DatabaseModels { + [Table("AnagraficaEventi")] public class AnagEventiModel { - [Key] + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int IdxTipo { get; set; } = 0; public string Nome { get; set; } = ""; public string TabAzione { get; set; } = "";