using Microsoft.AspNetCore.Components; using MP.FileData.DbModels; using MP.Prog.Data; using System.Threading.Tasks; namespace MP.Prog.Components { public partial class ArchiveEdit { [Parameter] public ArchMaccModel CurrRec { get; set; } [Parameter] public EventCallback EC_update { get; set; } [Inject] protected FileArchDataService FDService { get; set; } protected async Task DoSave() { bool fatto = false; if (CurrRec != null) { fatto = await FDService.ArchivioMaccUpsert(CurrRec); } await EC_update.InvokeAsync(fatto); } protected async Task DoCancel() { await EC_update.InvokeAsync(true); } } }