Files
webwindowconfigurator/WebWindowComplex/Compo/SashBottomRail.razor.cs
T

47 lines
1.3 KiB
C#

using Microsoft.AspNetCore.Components;
using WebWindowComplex.Models;
namespace WebWindowComplex.Compo
{
public partial class SashBottomRail
{
#region Public Properties
/// <summary>
/// Sash corrente rispetto alla lista Sash
/// </summary>
[CascadingParameter(Name = "CurrSashGroup")]
public Sash SashGroup { get; set; } = null!;
[Parameter]
public EventCallback<DataUpdateProfile> EC_UpdateSash { get; set; }
#endregion Public Properties
#region Private Properties
/// <summary>
/// Aggiornamento element
/// </summary>
/// <param name="updRec"></param>
/// <returns></returns>
private async Task UpdateElement(ElementDimension updRec)
{
// cerco il record
var currRec = SashGroup.BottomRailElemDimList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex);
// lo aggiorno
if (updRec != null)
{
currRec = updRec;
DataUpdateProfile ans = new DataUpdateProfile
{
sash = SashGroup,
reqProfile = false
};
await EC_UpdateSash.InvokeAsync(ans);
}
}
#endregion Private Properties
}
}