e4fd85c9cb
- import scheduler da STATS - ok compilazione (da completare con esecuzione REST call)
47 lines
1.0 KiB
C#
47 lines
1.0 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using MP.Data.DatabaseModels;
|
|
using MP.Data.Services;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MP.Land.Components
|
|
{
|
|
public partial class TaskEdit
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public TaskListModel? CurrRecord { get; set; } = null;
|
|
|
|
[Parameter]
|
|
public EventCallback<bool> EC_update { get; set; }
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected TaskService TService { get; set; }
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected async Task doCancel()
|
|
{
|
|
await EC_update.InvokeAsync(false);
|
|
}
|
|
|
|
protected async Task doSave()
|
|
{
|
|
bool fatto = false;
|
|
await Task.Delay(1);
|
|
if (CurrRecord != null)
|
|
{
|
|
fatto = await TService.TaskListUpsert(CurrRecord);
|
|
}
|
|
await EC_update.InvokeAsync(fatto);
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |