using InABox.Logikal; using System; using System.Collections.Generic; namespace Comal.Classes { public class LogikalComponent : LogikalBOMItem, ILogikalComponent { 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 ElevationSQL = "select \n" + $" a.[ArticleCode_BaseNumber] as {nameof(Code)}, \n" + $" a.[description] as {nameof(Description)}, \n" + $" a.[PUSize] as {nameof(PackSize)}, \n" + $" a.[units] as {nameof(Quantity)}, \n" + $" a.[Price] as {nameof(Cost)} \n" + "from \n" + " articles a \n" + "where \n" + " 1=1"; public static String BillOfMaterialsSQL = "select \n" + $" a.[ArticleCode_BaseNumber] as {nameof(Code)}, \n" + $" a.[description] as {nameof(Description)}, \n" + $" a.[PUSize] as {nameof(PackSize)}, \n" + $" a.[units] as {nameof(Quantity)}, \n" + $" a.[Price] as {nameof(Cost)} \n" + "from \n" + " allarticles a \n" + "where \n" + " 1=1"; } }