using Biskilog_Accounting.Shared.CustomModels; using Microsoft.AspNetCore.Components; namespace Biskilog_Accounting.Client.Pages.Product.Elements { public partial class ProductDialog { [Parameter] public ProductItem Product { get; set; } private bool m_editMode { get; set; } = false; private List m_reorderUnits { get; set; } = new List(); protected override void OnParametersSet() { var list = Product.Units.Select(c => c.UnitCode); m_reorderUnits = m_productRepo.GetUnitofmeasures().Where(t => t.UnitCode == Product.BaseUnit || list.Contains(t.UnitCode)) .Select(t => new ProductUnits { UnitCode = t.UnitCode, UnitName = t.Unitname, }).ToList(); base.OnParametersSet(); } } }