Files
mapo-core/MP.Prog/Components/ArchiveEdit.razor.cs
T
2024-10-21 12:05:23 +02:00

35 lines
815 B
C#

using Microsoft.AspNetCore.Components;
using MP.FileData.DatabaseModels;
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<bool> 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);
}
}
}