diff --git a/MP-TAB3/Components/DeclarEditor.razor.cs b/MP-TAB3/Components/DeclarEditor.razor.cs index cf5201fc..7cdf20b1 100644 --- a/MP-TAB3/Components/DeclarEditor.razor.cs +++ b/MP-TAB3/Components/DeclarEditor.razor.cs @@ -97,6 +97,18 @@ namespace MP_TAB3.Components { if (IsNewRec) { + // sistemo IdxMacchina SE fosse multi... + string IdxMaccSel = IdxMacc; + bool isMulti = SMServ.DictMacchMulti[IdxMacc] == 1; + if (isMulti) + { + var idxMSel = MServ.UserPrefGet(IdxMacc); + if (!string.IsNullOrEmpty(idxMSel)) + { + IdxMaccSel = idxMSel; + } + currRec.IdxMacchina = IdxMaccSel; + } // inserisco await TabServ.RegDichiarInsert(currRec); } diff --git a/MP-TAB3/Components/DeclarMan.razor b/MP-TAB3/Components/DeclarMan.razor index 53ff08ca..753b9c9e 100644 --- a/MP-TAB3/Components/DeclarMan.razor +++ b/MP-TAB3/Components/DeclarMan.razor @@ -1,7 +1,5 @@  - -
diff --git a/MP-TAB3/Components/DeclarMan.razor.cs b/MP-TAB3/Components/DeclarMan.razor.cs index c660eb88..cf4cdf4a 100644 --- a/MP-TAB3/Components/DeclarMan.razor.cs +++ b/MP-TAB3/Components/DeclarMan.razor.cs @@ -49,6 +49,8 @@ namespace MP_TAB3.Components CurrRec = selRec; } + [Inject] + protected SharedMemService SMServ { get; set; } = null!; [Inject] protected MessageService MServ { get; set; } = null!; @@ -65,6 +67,17 @@ namespace MP_TAB3.Components if (RecMSE != null) { IdxMaccSel = RecMSE.IdxMacchina; + bool isMulti = SMServ.DictMacchMulti[IdxMaccSel] == 1; + if (isMulti) + { + var idxMSel = MServ.UserPrefGet(IdxMaccSel); + if (!string.IsNullOrEmpty(idxMSel)) + { + IdxMaccSel = idxMSel; + } + } + + DateTime fine = DateTime.Today.AddDays(1); DateTime inizio = fine.AddDays(-8); CurrPeriodo = new Periodo(inizio, fine);