Files
mapo-core/MP.Prog/Components/ArchiveEdit.razor.cs
T
Samuele E. Locatelli 57c41c7a60 MP-PROG
- fix naming DbModels
2025-03-08 10:48:56 +01:00

35 lines
809 B
C#

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<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);
}
}
}