This commit is contained in:
zaccaria.majid
2022-10-10 17:14:39 +02:00
7 changed files with 116 additions and 1 deletions
+19
View File
@@ -2,6 +2,7 @@
using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.SPEC.Data;
using MP.SPEC.Services;
namespace MP.SPEC.Components
{
@@ -47,6 +48,9 @@ namespace MP.SPEC.Components
[Inject]
protected MpDataService MDService { get; set; } = null!;
[Inject]
protected IOApiService MpIoApiCall { get; set; }
[Inject]
protected MessageService MsgService { get; set; } = null!;
@@ -91,6 +95,7 @@ namespace MP.SPEC.Components
return;
await Task.Delay(1);
var done = await MDService.PODLDeleteRecord(selRec);
await callSyncDb(selRec);
currRecord = null;
await reloadData();
await Task.Delay(1);
@@ -152,6 +157,7 @@ namespace MP.SPEC.Components
private List<PODLModel>? ListRecords;
private List<ListValues>? ListStati;
private List<PODLModel>? SearchRecords;
#endregion Private Fields
@@ -189,6 +195,19 @@ namespace MP.SPEC.Components
#region Private Methods
/// <summary>
/// Chiama metodo x chiedere sync DB
/// </summary>
/// <param name="selRec"></param>
/// <returns></returns>
private async Task callSyncDb(PODLModel selRec)
{
// chiamo aggiunta task SyncDb...
string idxMacc = selRec.IdxMacchina;
string restUrl = $"IOB/addTask2Exe/{idxMacc}?taskName=syncDbData&taskVal=";
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
}
private async void MessageService_EA_PageUpdated()
{
await reloadData();