81 lines
1.8 KiB
C#
81 lines
1.8 KiB
C#
using EgwCoreLib.Lux.Data.DbModel;
|
|
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 ClosePopup()
|
|
{
|
|
await EC_Close.InvokeAsync(true);
|
|
#if false
|
|
// Close the Popup
|
|
ShowPopup = false;
|
|
// Refresh Users
|
|
await GetUsers();
|
|
#endif
|
|
}
|
|
|
|
private async Task DoCancel()
|
|
{
|
|
await EC_Close.InvokeAsync(true);
|
|
}
|
|
|
|
private async Task DoSave()
|
|
{
|
|
// fixme todo !!!
|
|
// effettuare salvataggio record...
|
|
|
|
await EC_Updated.InvokeAsync(CurrRecord);
|
|
}
|
|
|
|
private void ReloadData()
|
|
{
|
|
CustomersList = DLService.CustomersGetAll();
|
|
DealersList = DLService.DealersGetAll();
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |