diff --git a/Test.UI/Components/Pages/EditJWD.razor b/Test.UI/Components/Pages/EditJWD.razor
index 48e4a75..4b6c9cb 100644
--- a/Test.UI/Components/Pages/EditJWD.razor
+++ b/Test.UI/Components/Pages/EditJWD.razor
@@ -10,6 +10,7 @@
EC_OnClose="CloseObj">
+
@if (!string.IsNullOrEmpty(outClose))
{
@@ -25,16 +26,3 @@ else if (!string.IsNullOrEmpty(outSave))
@currJwd
-
-@*
- IN_ColorMaterialList="@AvailColorMaterialList"
- IN_FamilyHardwareList="@AvailFamilyHardwareList"
- IN_GlassList="@AvailGlassList"
- IN_HardwareList="@AvailHardwareList"
- IN_MaterialList="@AvailMaterialList"
- LiveSVG="@currSvg"
- CurrJwd="@InitialJwd"
- IN_SelFamilyHardware="@SelFamilyHardware"
- IN_SelColorMaterial="@SelColorMaterial"
- IN_SelMaterial="@SelMaterial"
- IN_SelGlass="@SelGlass" *@
\ No newline at end of file
diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs
index c32518f..20a632a 100644
--- a/Test.UI/Components/Pages/EditJWD.razor.cs
+++ b/Test.UI/Components/Pages/EditJWD.razor.cs
@@ -14,9 +14,15 @@ namespace Test.UI.Components.Pages
{
public partial class EditJWD : IDisposable
{
- #region Public Properties
+
+ #region Public Fields
public string InitialJwd = "";
+
+ #endregion Public Fields
+
+ #region Public Properties
+
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
#endregion Public Properties
@@ -32,32 +38,36 @@ namespace Test.UI.Components.Pages
#region Protected Fields
+ ///
+ /// Predisposizione valori live SVG/JWD
+ ///
+ protected LivePayload CurrData = new LivePayload();
+
protected string currJwd = "...";
- protected string prevJwd = "";
protected Dictionary
m_CurrArgs = new Dictionary();
+ protected string prevJwd = "";
+ ///
+ /// Configurazione elenchi anagrafiche
+ ///
+ protected BaseListPayload SetupList = new BaseListPayload();
#endregion Protected Fields
#region Protected Properties
- protected List AvailTemplateList { get; set; } = new List();
- protected List AvailHardwareList { get; set; } = new List();
- protected List AvailFamilyHardwareList { get; set; } = new List()
- {
- new string("Arc"),
- new string("Profilo78")
- };
protected List AvailColorMaterialList { get; set; } = new List()
{
new string("White"),
new string("Black"),
new string("Blu")
};
- protected List AvailMaterialList { get; set; } = new List()
+
+ protected List AvailFamilyHardwareList { get; set; } = new List()
{
- new string("Pino"),
- new string("Abete")
+ new string("Arc"),
+ new string("Profilo78")
};
+
protected List AvailGlassList { get; set; } = new List()
{
new string("Vetro BE 2S 4/12/4"),
@@ -67,11 +77,15 @@ namespace Test.UI.Components.Pages
new string("Vetro BE 2S 4T/12/4T"),
new string("Vetro BE 2S 4T/16/4T")
};
- protected string SelFamilyHardware { get; set; } = "";
- protected string SelColorMaterial { get; set; } = "";
- protected string SelMaterial { get; set; } = "";
- protected string SelGlass { get; set; } = "";
+ protected List AvailHardwareList { get; set; } = new List();
+ protected List AvailMaterialList { get; set; } = new List()
+ {
+ new string("Pino"),
+ new string("Abete")
+ };
+
+ protected List AvailTemplateList { get; set; } = new List();
[Inject]
protected IConfiguration Config { get; set; } = null!;
@@ -86,6 +100,11 @@ namespace Test.UI.Components.Pages
get => (MarkupString)currJwd.Replace(Environment.NewLine, "
").Replace(" ", " ");
}
+ protected string SelColorMaterial { get; set; } = "";
+ protected string SelFamilyHardware { get; set; } = "";
+ protected string SelGlass { get; set; } = "";
+ protected string SelMaterial { get; set; } = "";
+
#endregion Protected Properties
#region Protected Methods
@@ -93,10 +112,6 @@ namespace Test.UI.Components.Pages
protected override async Task OnInitializedAsync()
{
ConfInit();
- //SelFamilyHardware = "Natura";
- //SelColorMaterial = "Black";
- //SelColorMaterial = "Pine";
- //SelGlass = "4T/16/4T";
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
currJwd = InitialJwd;
// rileggo altri dati
@@ -107,6 +122,8 @@ namespace Test.UI.Components.Pages
ColorMaterial = AvailColorMaterialList,
FamilyHardware = AvailFamilyHardwareList,
Glass = AvailGlassList,
+ //Hardware = new List(),
+ //Material = new List(),
Hardware = AvailHardwareList,
Material = AvailMaterialList,
TemplateDTO = null
@@ -119,16 +136,6 @@ namespace Test.UI.Components.Pages
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
}
-
- ///
- /// Configurazione elenchi anagrafiche
- ///
- protected BaseListPayload SetupList = new BaseListPayload();
- ///
- /// Predisposizione valori live SVG/JWD
- ///
- protected LivePayload CurrData = new LivePayload();
-
#endregion Protected Methods
#region Private Fields
@@ -136,14 +143,15 @@ namespace Test.UI.Components.Pages
private string apiUrl = "";
private string calcTag = "";
private string CalcUid = "CurrWindow";
- private string cFileTemplate = "Data/Setup.json";
private string cFileHardware = "Hardware/Setup.json";
+ private string cFileTemplate = "Data/Setup.json";
private TemplateSelectDTO? currSel = null;
private string currSvg = "";
- private string imgBasePath = "";
private string GenericBasePath = "";
-
+ private string imgBasePath = "";
+ private string outClose = "";
+ private string outSave = "";
private string subChannel = "";
private string windowUid = "CurrWindow";
@@ -169,6 +177,16 @@ namespace Test.UI.Components.Pages
await Task.Delay(1);
}
+ ///
+ /// Effettua chiusura oggetto con eventuale save
+ ///
+ ///
+ private void CloseObj(bool reqSave)
+ {
+ outClose = !reqSave ? "Richiesto chiusura!" : "";
+ outSave = reqSave ? "Richiesto salvataggio!" : "";
+ }
+
private void ConfInit()
{
apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? "";
@@ -252,18 +270,5 @@ namespace Test.UI.Components.Pages
}
#endregion Private Methods
-
- ///
- /// Effettua chiusura oggetto con eventuale save
- ///
- ///
- private void CloseObj(bool reqSave)
- {
- outClose = !reqSave ? "Richiesto chiusura!" : "";
- outSave = reqSave ? "Richiesto salvataggio!" : "";
- }
-
- private string outClose = "";
- private string outSave = "";
}
}
\ No newline at end of file
diff --git a/WebWindowComplex/DTO/BaseListPayload.cs b/WebWindowComplex/DTO/BaseListPayload.cs
index e0ba2bf..f9ece32 100644
--- a/WebWindowComplex/DTO/BaseListPayload.cs
+++ b/WebWindowComplex/DTO/BaseListPayload.cs
@@ -50,7 +50,6 @@ namespace WebWindowComplex.DTO
///
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;
}
+ ///
+ /// Verifica che Payload sia almeno parzialmente popolato
+ ///
+ ///
+ 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;
+ }
}
}
diff --git a/WebWindowComplex/TableComp.razor b/WebWindowComplex/TableComp.razor
index c9d5e7f..4015483 100644
--- a/WebWindowComplex/TableComp.razor
+++ b/WebWindowComplex/TableComp.razor
@@ -1,855 +1,881 @@