Files
2024-09-09 17:37:31 +02:00

46 lines
1.1 KiB
C#

using GPW.CORE.Data.DbModels;
using GPW.CORE.Data.Services;
using Microsoft.AspNetCore.Components;
namespace GPW.CORE.ADM.Components.Compo
{
public partial class ClientiEdit
{
#region Public Properties
[Parameter]
public AnagClientiModel? CurrRecord { get; set; } = null;
[Parameter]
public EventCallback<bool> EC_update { get; set; }
#endregion Public Properties
#region Protected Properties
[Inject]
protected GpwDataService GDataServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected async Task DoSave()
{
bool fatto = false;
await Task.Delay(1);
if (CurrRecord != null)
{
fatto = await GDataServ.AnagClientiUpsert(CurrRecord);
}
await EC_update.InvokeAsync(fatto);
}
protected async Task DoCancel()
{
await EC_update.InvokeAsync(true);
}
#endregion Protected Methods
}
}