Fix edit nuovo doc in AD
This commit is contained in:
@@ -93,7 +93,7 @@ namespace SHERPA.AD.Components
|
||||
bool answ = false;
|
||||
if (CurrRecord != null)
|
||||
{
|
||||
answ = (CurrRecord.importo == 0 && string.IsNullOrEmpty(CurrRecord.id_ext));
|
||||
answ = (CurrRecord.importo == 0 && string.IsNullOrEmpty(CurrRecord.id_ext) && CurrDocRows?.Count == 0);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -161,6 +161,11 @@ namespace SHERPA.AD.Components
|
||||
{
|
||||
await Task.Delay(1);
|
||||
bool needReload = false;
|
||||
var oldRec = SelRecord;
|
||||
// verifico eventuali richieste di tenere record selezionato
|
||||
bool keepSel = CurrFilter.KeepSelected;
|
||||
//reset
|
||||
CurrFilter.KeepSelected = false;
|
||||
// verifica filtro
|
||||
if (!LastFilter.Equals(CurrFilter))
|
||||
{
|
||||
@@ -184,6 +189,10 @@ namespace SHERPA.AD.Components
|
||||
{
|
||||
SelRecord = null;
|
||||
await ReloadData(false);
|
||||
if (keepSel)
|
||||
{
|
||||
SelRecord = oldRec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace SHERPA.AD.Pages
|
||||
|
||||
private int numRecord { get; set; } = 10;
|
||||
|
||||
private bool dataReady { get; set;} = false;
|
||||
private bool dataReady { get; set; } = false;
|
||||
private vDocsExplModel? SelRecord { get; set; } = null;
|
||||
private int totalCount { get; set; } = 0;
|
||||
|
||||
@@ -94,8 +94,9 @@ namespace SHERPA.AD.Pages
|
||||
private async Task DocUpdated()
|
||||
{
|
||||
var currAnno = SelFilter.Anno;
|
||||
SelFilter.KeepSelected = true;
|
||||
SelFilter.Anno = -1;
|
||||
SelRecord = null;
|
||||
//SelRecord = null;
|
||||
await Task.Delay(1);
|
||||
SelFilter.Anno = currAnno;
|
||||
await Task.Delay(1);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.0.2309.0112</Version>
|
||||
<Version>2.0.2309.0115</Version>
|
||||
<Copyright>Egalware 2021+</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<UserSecretsId>60fcdaab-6c1e-4bec-9d88-f7727ef1c12c</UserSecretsId>
|
||||
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
|
||||
<Version>2.0.2309.0112</Version>
|
||||
<Version>2.0.2309.0115</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Copyright>Egalware 2021+</Copyright>
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
|
||||
public int Anno { get; set; } = 0;
|
||||
public int Aperta { get; set; } = 0;
|
||||
#if false
|
||||
public string CodTipo { get; set; } = "*";
|
||||
#endif
|
||||
public DateTime Fine { get; set; } = new DateTime(DateTime.Today.Year + 1, 1, 1);
|
||||
public int IdxCli { get; set; } = 0;
|
||||
public int IdxTipo { get; set; } = 0;
|
||||
@@ -17,6 +14,7 @@
|
||||
public bool OnlySync { get; set; } = false;
|
||||
public string RagSoc { get; set; } = "*";
|
||||
public string SearchVal { get; set; } = "";
|
||||
public bool KeepSelected { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -28,16 +26,14 @@
|
||||
{
|
||||
Anno = this.Anno,
|
||||
IdxCli = this.IdxCli,
|
||||
#if false
|
||||
CodTipo = this.CodTipo,
|
||||
#endif
|
||||
IdxTipo= this.IdxTipo,
|
||||
IdxTipo = this.IdxTipo,
|
||||
IdxGruppo = this.IdxGruppo,
|
||||
RagSoc = this.RagSoc,
|
||||
Inizio = this.Inizio,
|
||||
Fine = this.Fine,
|
||||
Aperta = this.Aperta,
|
||||
OnlySync = this.OnlySync,
|
||||
KeepSelected = this.KeepSelected,
|
||||
SearchVal = this.SearchVal
|
||||
};
|
||||
return clonedData;
|
||||
@@ -57,14 +53,9 @@
|
||||
if (IdxCli != item.IdxCli)
|
||||
return false;
|
||||
|
||||
if (IdxTipo!= item.IdxTipo)
|
||||
if (IdxTipo != item.IdxTipo)
|
||||
return false;
|
||||
|
||||
#if false
|
||||
if (CodTipo != item.CodTipo)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if (IdxGruppo != item.IdxGruppo)
|
||||
return false;
|
||||
|
||||
@@ -83,6 +74,9 @@
|
||||
if (OnlySync != item.OnlySync)
|
||||
return false;
|
||||
|
||||
if (KeepSelected != item.KeepSelected)
|
||||
return false;
|
||||
|
||||
if (SearchVal != item.SearchVal)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user