Fix conferma x doppia tavola (se ferma)

This commit is contained in:
Samuele Locatelli
2023-12-15 09:10:41 +01:00
parent 782dc7a67d
commit 95f9b03c3e
7 changed files with 39 additions and 19 deletions
+4 -4
View File
@@ -42,7 +42,7 @@ namespace MP_TAB_SERV.Components
protected Dictionary<string, string>? ListMacchine { get; set; } = null;
[Inject]
protected SharedMemService MServ { get; set; } = null!;
protected SharedMemService SMServ { get; set; } = null!;
#endregion Protected Properties
@@ -67,16 +67,16 @@ namespace MP_TAB_SERV.Components
if (RecMSE != null)
{
// verifico se la macchina sia configurata tra le MSFD...
if (MServ.DictMacchMulti.ContainsKey(RecMSE?.IdxMacchina))
if (SMServ.DictMacchMulti.ContainsKey(RecMSE.IdxMacchina))
{
isMulti = MServ.DictMacchMulti[RecMSE?.IdxMacchina] == 1;
isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1;
}
if (isMulti)
{
var listMulti = await TDataService.VMSFDGetAll();
ListMacchine = listMulti
.Where(x => x.IdxMacchina.Contains($"{RecMSE?.IdxMacchina}#"))
.Where(x => x.IdxMacchina.Contains($"{RecMSE.IdxMacchina}#"))
.ToDictionary(x => x.IdxMacchina, x => x.CodMaccArticolo);
if (ListMacchine.Count > 0 && string.IsNullOrEmpty(idxMaccSel))
+30 -11
View File
@@ -82,7 +82,7 @@ namespace MP_TAB_SERV.Components
protected StatusData MDataService { get; set; } = null!;
[Inject]
protected MessageService MServ { get; set; } = null!;
protected MessageService MsgServ { get; set; } = null!;
protected int numPz2Rec { get; set; } = 0;
@@ -151,18 +151,37 @@ namespace MP_TAB_SERV.Components
await Task.Delay(1);
}
protected override async Task OnInitializedAsync()
protected override void OnInitialized()
{
enablePzProdLasciati = SMServ.GetConfBool("enablePzProdLasciati");
chkPzBuoniNeg = SMServ.GetConfBool("TAB_ChkConfPz");
confRett = SMServ.GetConfBool("confRett");
enableMagPrint = SMServ.GetConfBool("enableMagPrint");
modoConfProd = SMServ.GetConfInt("modoConfProd");
}
protected override async Task OnParametersSetAsync()
{
lblOut = "";
numPzLasciati = 0;
if (RecMSE != null)
if (RecMSE != null && string.IsNullOrEmpty(IdxMaccSel))
{
// verifico SE fosse doppia...
bool isMulti = false;
// verifico se la macchina sia configurata tra le MSFD...
if (SMServ.DictMacchMulti.ContainsKey(RecMSE.IdxMacchina))
{
isMulti = SMServ.DictMacchMulti[RecMSE?.IdxMacchina] == 1;
}
IdxMaccSel = RecMSE.IdxMacchina;
enablePzProdLasciati = SMServ.GetConfBool("enablePzProdLasciati");
chkPzBuoniNeg = SMServ.GetConfBool("TAB_ChkConfPz");
confRett = SMServ.GetConfBool("confRett");
enableMagPrint = SMServ.GetConfBool("enableMagPrint");
modoConfProd = SMServ.GetConfInt("modoConfProd");
if (isMulti)
{
var idxMSel = MsgServ.UserPrefGet(IdxMaccSel);
if (!string.IsNullOrEmpty(idxMSel))
{
IdxMaccSel = idxMSel;
}
}
await DoUpdate();
}
}
@@ -180,7 +199,7 @@ namespace MP_TAB_SERV.Components
if (ListMSE != null)
{
// salvo in LocalStorage...
await MServ.SaveMse(ListMSE);
await MsgServ.SaveMse(ListMSE);
// aggiorno MSE attuale
RecMSE = ListMSE.Find(x => x.IdxMacchina == IdxMaccSel);
}
@@ -248,7 +267,7 @@ namespace MP_TAB_SERV.Components
private int MatrOpr
{
get => MServ.MatrOpr;
get => MsgServ.MatrOpr;
}
private int numPzLasc { get; set; } = 0;
@@ -283,7 +302,7 @@ namespace MP_TAB_SERV.Components
private async Task RefreshData()
{
List<MappaStatoExpl> ListMSE = await MDataService.MseGetAll(true);
await MServ.SaveMse(ListMSE);
await MsgServ.SaveMse(ListMSE);
await E_Updated.InvokeAsync(ListMSE);
}
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2312.1419</Version>
<Version>6.16.2312.1509</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB_SERV</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2312.1419</h4>
<h4>Versione: 6.16.2312.1509</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2312.1419
6.16.2312.1509
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2312.1419</version>
<version>6.16.2312.1509</version>
<url>https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1
View File
@@ -852,6 +852,7 @@ namespace MP.Data.Services
await FlushCache("PODL");
await FlushCache("VSODL");
await FlushCache("StatoMacc");
await FlushCache("MSFD");
}
/// <summary>