migliorato svuotamento cache ma NON 100% ok...

This commit is contained in:
Samuele E. Locatelli
2025-03-07 19:22:39 +01:00
parent 5fc45f056a
commit c800484a5f
2 changed files with 11 additions and 3 deletions
+2 -1
View File
@@ -448,7 +448,7 @@ namespace MP_TAB3.Components
protected void setGaugeVals()
{
// se è una doppio pallet uso dati MSE
if (string.IsNullOrEmpty(IdxMacchSub) && isMulti)
{
if (CRecMSE != null)
@@ -473,6 +473,7 @@ namespace MP_TAB3.Components
}
}
}
// altrimenti da dati produzione
else
{
if (datiProdAct != null)
+9 -2
View File
@@ -274,12 +274,14 @@ namespace MP_TAB3.Components
protected async Task SalvaConfPz()
{
int delay = 5;
isProcessing = true;
// effettua conferma con conf da DB del tipo (giorni / turni / periodo
bool fatto = effettuaConfermaProd();
await TabDServ.FlushCache("StatoProd");
await Task.Delay(delay);
// refresh tabella dati tablet...
await TabDServ.RicalcMse(IdxMaccSel, 0);
await Task.Delay(delay);
// rileggo e salvo..
var ListMSE = await SDService.MseGetAll(true);
if (ListMSE != null)
@@ -289,17 +291,22 @@ namespace MP_TAB3.Components
// aggiorno MSE attuale
RecMSE = ListMSE.Find(x => x.IdxMacchina == IdxMaccSel);
}
await Task.Delay(delay);
// mostro output
lblOut = $"Confermata produzione {numPzConfermati - numPzLasciati} pezzi (+{numPzLasciati} pz lasciati, +{numPzScarto2Rec} pz scarto) |{dtReqUpdate:HH:mm:ss} | {dtReqUpdate:ddd yyyy.MM.dd}";
// cambio button conferma...
confProdActive = false;
numPzLasciati = 0;
await Task.Delay(delay);
dtReqUpdate = DateTime.Now;
// azzero cache pezzi conf
SDService.MachNumPzSet(IdxMaccSel, -1);
await DoUpdate();
await Task.Delay(1);
await Task.Delay(delay);
await RefreshData();
await Task.Delay(delay);
await TabDServ.FlushCache("StatoProd");
await Task.Delay(delay);
TabDServ.NotifyDataInvalidated(IdxMaccSel);
isProcessing = false;
}