| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | using InABox.Core;using InABox.Logikal;using System;using System.Collections.Generic;namespace Comal.Classes{    public class LogikalProfile : LogikalBOMItem, ILogikalProfile    {        public double Length { get; set; }        public string? Finish { get; set; }        public override void ValidateQuery(string sql, List<string> errors)        {            base.ValidateQuery(sql, errors);            ValidateField(sql, nameof(Length), errors);            ValidateField(sql, nameof(Finish), errors);        }        public static String ElevationSQL =            "select \n" +            $"  p.[ArticleCode_BaseNumber] as {nameof(Code)}, \n" +            $"  p.[description] as {nameof(Description)}, \n" +            $"  p.[length_output] as {nameof(Length)}, \n" +            $"  c.[PowderID] as {nameof(Finish)}, \n" +            $"  p.[Amount] as {nameof(Quantity)}, \n" +            $"  p.[Cost] as {nameof(Cost)} \n" +            "from \n" +            "  profiles p \n" +            "left outer join \n" +            "  colors c on p.[lk_colorid] = c.[colorid] \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.[length_output] as {nameof(Length)}, \n" +            $"  c.[PowderID] as {nameof(Finish)}, \n" +            $"  a.[Amount] as {nameof(Quantity)}, \n" +            $"  a.[Price] as {nameof(Cost)} \n" +            "from \n" +            "  allprofiles a \n" +            "left outer join \n" +            "  colors c on a.[lk_colorid] = c.[colorid] \n" +            "where \n" +            "  1=1";    }}
 |