990ea5e2af
- aggiunta e testata chiusura ODL - aggiunta gestione reload forzoso se sparisce chiamata
79 lines
2.1 KiB
C#
79 lines
2.1 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using MP.Data;
|
|
using MP.SPEC.Data;
|
|
|
|
namespace MP.SPEC.Pages
|
|
{
|
|
public partial class Test : IDisposable
|
|
{
|
|
#region Public Methods
|
|
|
|
public void Dispose()
|
|
{
|
|
}
|
|
|
|
#endregion Public Methods
|
|
|
|
#region Protected Fields
|
|
|
|
protected DateTime lastRec = DateTime.Now.AddMinutes(-1);
|
|
|
|
protected string messaggio = "0";
|
|
|
|
#endregion Protected Fields
|
|
|
|
#region Protected Properties
|
|
|
|
protected DisplayAction CurrAction { get; set; } = new DisplayAction();
|
|
|
|
[Inject]
|
|
protected MpDataService MMDataService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected async void clearMessage()
|
|
{
|
|
CurrAction.IsActive = false;
|
|
CurrAction.Topic = "Chiusura ODL";
|
|
CurrAction.Message = "Rilevato possibile fine operazioni, Vuoi chiudere la commessa?";
|
|
MMDataService.ActionSetReq(CurrAction);
|
|
}
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await Task.Delay(1);
|
|
var rawAction = await MMDataService.ActionGetReq();
|
|
if (rawAction != null)
|
|
{
|
|
CurrAction = rawAction;
|
|
}
|
|
else
|
|
{
|
|
CurrAction = new DisplayAction()
|
|
{
|
|
Topic = "Chiusura ODL",
|
|
Message = "Rilevato possibile fine operazioni, Vuoi chiudere la commessa?",
|
|
ShowCancel = true,
|
|
ShowClose = true,
|
|
ShowConfirm = true,
|
|
CancelAction = "DisableAction",
|
|
ConfirmAction = "CloseODL",
|
|
DtReq = DateTime.Now,
|
|
IsActive = true,
|
|
Parameter = "1"
|
|
};
|
|
}
|
|
}
|
|
|
|
protected void sendMessage()
|
|
{
|
|
CurrAction.DtReq = DateTime.Now;
|
|
CurrAction.IsActive = true;
|
|
MMDataService.ActionSetReq(CurrAction);
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |