using GPW.CORE.Data.DbModels; using GPW.CORE6.Smart.Data; using Microsoft.AspNetCore.Components; namespace GPW.CORE6.Smart.Components { public partial class ProjectsList : IDisposable { #region Public Properties [Parameter] public EventCallback ActionPaste { get; set; } [Parameter] public bool EnableAdmin { get; set; } = false; [Parameter] public bool EnableEdit { get; set; } = false; [Parameter] public EventCallback ItemCloned { get; set; } [Parameter] public EventCallback ItemDeleted { get; set; } [Parameter] public EventCallback ItemSelected { get; set; } [Parameter] public List? ListRA { get; set; } = null!; [Parameter] public EventCallback ReqUpdate { get; set; } #endregion Public Properties #region Public Methods public void Dispose() { ListRA = null; GC.Collect(); } #endregion Public Methods #region Protected Properties protected bool hasClonedRa { get => MService.clonedRA != null; } [Inject] protected MessageService MService { get; set; } = null!; #endregion Protected Properties #region Protected Methods /// /// Gestione evento cloning /// /// protected async void DoClone(RegAttivitaModel currRecord) { if (currRecord != null) { await ItemCloned.InvokeAsync(currRecord); } } /// /// Gestione evento incolla /// /// protected async void DoPaste(RegAttivitaModel currRecord) { if (currRecord != null) { await ActionPaste.InvokeAsync(currRecord); } } /// /// Gestione evento selezione x editing /// protected async void DoSel(RegAttivitaModel currRecord) { if (currRecord != null) { await ItemSelected.InvokeAsync(currRecord); } } #endregion Protected Methods } }