update trigger eventi close/save

This commit is contained in:
Samuele Locatelli
2025-10-07 15:18:46 +02:00
parent 5086155657
commit b9e277e36e
5 changed files with 70 additions and 8 deletions
+16 -3
View File
@@ -7,10 +7,23 @@
<WebWindowComplex.TableComp ListPayload="SetupList"
LiveData="CurrData"
EC_OnUpdate="SaveJWD"
>
EC_OnClose="CloseObj">
</WebWindowComplex.TableComp>
@*
@if (!string.IsNullOrEmpty(outClose))
{
<div class="alert alert-danger fs-4">
@outClose
</div>
}
else if (!string.IsNullOrEmpty(outSave))
{
<div class="alert alert-success fs-4">
@outSave
</div>
}
@*
IN_ColorMaterialList="@AvailColorMaterialList"
IN_FamilyHardwareList="@AvailFamilyHardwareList"
IN_GlassList="@AvailGlassList"
+14
View File
@@ -217,6 +217,8 @@ namespace Test.UI.Components.Pages
private async Task SaveJWD(Dictionary<string, string> CurrArgs)
{
outClose = "";
outSave = "";
m_CurrArgs = CurrArgs;
// verifico se contiene JWD, lo aggiorno
if (CurrArgs.ContainsKey("Jwd"))
@@ -251,5 +253,17 @@ namespace Test.UI.Components.Pages
#endregion Private Methods
/// <summary>
/// Effettua chiusura oggetto con eventuale save
/// </summary>
/// <param name="reqSave"></param>
private void CloseObj(bool reqSave)
{
outClose = !reqSave ? "Richiesto chiusura!" : "";
outSave = reqSave ? "Richiesto salvataggio!" : "";
}
private string outClose = "";
private string outSave = "";
}
}