diff --git a/MP-TAB-SERV/Components/LongStopList.razor b/MP-TAB-SERV/Components/LongStopList.razor index 8b6044fa..51a92899 100644 --- a/MP-TAB-SERV/Components/LongStopList.razor +++ b/MP-TAB-SERV/Components/LongStopList.razor @@ -1,5 +1,5 @@ 
-
+
@fnqName @@ -23,20 +23,4 @@ -@code { - [Parameter] - public string fnqName { get; set; } = ""; - [Parameter] - public string fnqArticle { get; set; } = ""; - - [Parameter] - public DateTime fnqDateTime { get; set; } = DateTime.Now; - - [Parameter] - public double fnqDurMin { get; set; } = 0; - - [Parameter] - public string fnqSemaforo { get; set; } = ""; - -} diff --git a/MP-TAB-SERV/Components/LongStopList.razor.cs b/MP-TAB-SERV/Components/LongStopList.razor.cs new file mode 100644 index 00000000..635f305e --- /dev/null +++ b/MP-TAB-SERV/Components/LongStopList.razor.cs @@ -0,0 +1,61 @@ +using global::System; +using global::System.Collections.Generic; +using global::System.Linq; +using global::System.Threading.Tasks; +using global::Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP_TAB_SERV; +using MP_TAB_SERV.Shared; +using MP_TAB_SERV.Components; +using MP.Data; +using MP.Data.DatabaseModels; +using MP.Data.DTO; +using MP.Data.Services; +using Newtonsoft.Json; +using NLog; +using System.Reflection.Metadata; + +namespace MP_TAB_SERV.Components +{ + public partial class LongStopList + { + + [Parameter] + public string fnqName { get; set; } = ""; + + [Parameter] + public string fnqArticle { get; set; } = ""; + + [Parameter] + public DateTime fnqDateTime { get; set; } = DateTime.Now; + + [Parameter] + public double fnqDurMin { get; set; } = 0; + + [Parameter] + public string fnqSemaforo { get; set; } = ""; + [Inject] + protected MessageService MsgServ { get; set; } = null!; + + /// + /// Rimanda alla pagina fermate selezionando periodo corretto... + /// + /// + protected async Task SelectFermo() + { + await Task.Delay(1); + // salva la data-ora evento richiesto... + await MsgServ.DtRifCommentoSet(fnqDateTime); + NavMan.NavigateTo("prod-stop"); + } + [Inject] + protected NavigationManager NavMan { get; set; } = null!; + } +} \ No newline at end of file diff --git a/MP.Data/Services/MessageService.cs b/MP.Data/Services/MessageService.cs index 2be64df9..a768eece 100644 --- a/MP.Data/Services/MessageService.cs +++ b/MP.Data/Services/MessageService.cs @@ -197,13 +197,37 @@ namespace MP.Data.Services } /// - /// Macchine attualmente selezionata + /// Imposta Macchina /// public async Task IdxMaccSet(string machSel) { await sessionStore.SetItemAsync("CurrMach", machSel); } + /// + /// Macchine attualmente selezionata + /// + public async Task DtRifCommentoSet(DateTime DtRif) + { + await sessionStore.SetItemAsync("DtRifComm", DtRif); + } + /// + /// DateTime riferimento evento x commento fermata + /// + /// + /// + public async Task DtRifCommentoGet(bool remAfter) + { + // recupero + var answ = await sessionStore.GetItemAsync("DtRifComm"); + // svuoto data registrata se richiesto + if (remAfter) + { + await sessionStore.RemoveItemAsync("DtRifComm"); + } + return answ; + } + #if false public bool IsActive {