40 lines
720 B
C#
40 lines
720 B
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace Duempelkas.App.Components.Dialogs;
|
|
|
|
public partial class EditCarryoverDialog
|
|
{
|
|
#region Parameters
|
|
|
|
[Parameter]
|
|
public decimal CurrentAmount { get; set; }
|
|
|
|
[Parameter]
|
|
public EventCallback<decimal> OnSave { get; set; }
|
|
|
|
[Parameter]
|
|
public EventCallback OnCancel { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region Fields
|
|
|
|
private decimal amount;
|
|
|
|
#endregion
|
|
|
|
#region Lifecycle
|
|
|
|
protected override void OnParametersSet() => amount = CurrentAmount;
|
|
|
|
#endregion
|
|
|
|
#region Actions
|
|
|
|
private async Task Save() => await OnSave.InvokeAsync(amount);
|
|
|
|
private async Task Cancel() => await OnCancel.InvokeAsync();
|
|
|
|
#endregion
|
|
}
|