Fix dichiarazioni su tav 2

This commit is contained in:
Samuele Locatelli
2023-12-18 19:07:11 +01:00
parent 246f9b35cd
commit d4690c7a82
3 changed files with 25 additions and 2 deletions
+12
View File
@@ -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);
}
-2
View File
@@ -1,7 +1,5 @@
<MachSel RecMSE="RecMSE" E_MachSel="SetMacc"></MachSel>
<ShowProcessing Message="Caricamento" IsProcessing="@isProcessing"></ShowProcessing>
<div class="cardObj p-2 mt-2">
<div class="mb-1">
+13
View File
@@ -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);