57c41c7a60
- fix naming DbModels
35 lines
809 B
C#
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);
|
|
}
|
|
}
|
|
} |