using System; using System.Collections.Generic; namespace Comal.Classes { public class V6Component : V6BOMItem { public double PackSize { get; set; } public override void ValidateQuery(string sql, List errors) { base.ValidateQuery(sql, errors); ValidateField(sql, nameof(PackSize), errors); } public static String SQL = "select \n" + $" bc.Part_Code as {nameof(Code)}, \n" + $" c.descr as {nameof(Description)}, \n" + $" 1.0 as {nameof(PackSize)}, \n" + $" bc.comp_qty as {nameof(Quantity)}, \n" + $" bc.cost as {nameof(Cost)} \n" + "from \n" + " bom_comp bc \n" + "left outer join \n" + " quote_item qi on qi.quote_item_id = bc.quote_item_id \n" + "left outer join \n" + " quote q on q.quote_id = qi.quote_id \n" + "left outer join \n" + " componentry c on c.comp_lib_id = bc.comp_lib_id and c.comp_id = bc.comp_id \n" + "where \n" + " 1=1"; } }