You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
904 B
25 lines
904 B
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<ProductUnits> m_reorderUnits { get; set; } = new List<ProductUnits>();
|
|
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();
|
|
}
|
|
}
|
|
}
|
|
|