| 1234567891011121314151617181920212223242526272829303132333435 | using InABox.Core;namespace Comal.Classes{    public class SupplierProductLookup : EntityLookup<SupplierProduct>, ILookupDefinition<SupplierProduct, Product>    {        public Filter<SupplierProduct> DefineFilter(Product[] items)        {            var id = items != null && items.Length == 1 ? items[0].ID : CoreUtils.FullGuid;            return new Filter<SupplierProduct>(x => x.Product.ID).IsEqualTo(id);        }        Columns<Product> ILookupDefinition<SupplierProduct, Product>.DefineFilterColumns()            => new Columns<Product>(x => x.ID);        public override Columns<SupplierProduct> DefineColumns()        {            return new Columns<SupplierProduct>(                x => x.ID,                x => x.SupplierLink.Code,                x => x.SupplierLink.Name            );        }        public override Filter<SupplierProduct> DefineFilter()        {            return null;        }        public override SortOrder<SupplierProduct> DefineSortOrder()        {            return new SortOrder<SupplierProduct>(x => x.SupplierLink.Code);        }    }}
 |