68 lines
1.6 KiB
C#
68 lines
1.6 KiB
C#
using EgwCoreLib.Lux.Data.DbModel.Sales;
|
|
using EgwCoreLib.Lux.Data.Services;
|
|
using Microsoft.AspNetCore.Components;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Lux.UI.Components.Compo
|
|
{
|
|
public partial class OfferMan
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public OfferModel CurrRecord { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public EventCallback<bool> EC_Close { get; set; }
|
|
|
|
[Parameter]
|
|
public EventCallback<OfferModel> EC_Updated { get; set; }
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected DataLayerServices DLService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
ReloadData();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private List<CustomerModel> CustomersList = new List<CustomerModel>();
|
|
|
|
private List<DealerModel> DealersList = new List<DealerModel>();
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Methods
|
|
|
|
private async Task DoCancel()
|
|
{
|
|
await EC_Close.InvokeAsync(true);
|
|
}
|
|
|
|
private async Task DoSave()
|
|
{
|
|
// richiesta update con salvataggio record
|
|
await EC_Updated.InvokeAsync(CurrRecord);
|
|
}
|
|
|
|
private void ReloadData()
|
|
{
|
|
CustomersList = DLService.CustomersGetAll();
|
|
DealersList = DLService.DealersGetAll();
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |