Fix validazione preliminare liste parametri

This commit is contained in:
2025-10-10 09:40:51 +02:00
parent 843f043c12
commit 6a35c5c871
7 changed files with 1017 additions and 1004 deletions
+13 -1
View File
@@ -50,7 +50,6 @@ namespace WebWindowComplex.DTO
/// <returns></returns>
public bool IsValid()
{
//bool templateOK = TemplateDTO != null && TemplateDTO.Count > 0;
bool famHwOK = FamilyHardware != null && FamilyHardware.Count > 0;
bool hwOK = Hardware != null && Hardware.Count > 0;
bool glassOK = Glass != null && Glass.Count > 0;
@@ -58,5 +57,18 @@ namespace WebWindowComplex.DTO
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
return famHwOK && glassOK && hwOK && colorOK && matOK;
}
/// <summary>
/// Verifica che Payload sia almeno parzialmente popolato
/// </summary>
/// <returns></returns>
public bool IsPopulated()
{
bool famHwOK = FamilyHardware != null && FamilyHardware.Count > 0;
bool hwOK = Hardware != null && Hardware.Count > 0;
bool glassOK = Glass != null && Glass.Count > 0;
bool matOK = Material != null && Material.Count > 0;
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
return famHwOK || glassOK || hwOK || colorOK || matOK;
}
}
}