12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using InABox.Core;
- using InABox.Integration.Logikal;
- using System;
- using System.Collections.Generic;
- namespace PRSDesktop.Integrations.Logikal
- {
- 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 DesignSQL = $@"
- select
- p.[ArticleCode_BaseNumber] as {nameof(Code)},
- p.[description] as {nameof(Description)},
- p.[length_output] as {nameof(Length)},
- c.[PowderID] as {nameof(Finish)},
- p.[Amount] as {nameof(Quantity)},
- p.[Price] as {nameof(Cost)}
- from
- profiles p
- left outer join
- colors c on p.[lk_colorid] = c.[colorid]
- join
- insertions i on p.[insertionid] = i.[insertionid]
- join
- elevations e on i.[elevationid] = e.[elevationid]
- ";
- public static String BillOfMaterialsSQL = $@"
- select
- a.[ArticleCode_BaseNumber] as {nameof(Code)},
- a.[description] as {nameof(Description)},
- a.[length_output] as {nameof(Length)},
- c.[PowderID] as {nameof(Finish)},
- a.[Amount] as {nameof(Quantity)},
- a.[Price] as {nameof(Cost)}
- from
- allprofiles a
- left outer join
- colors c on a.[lk_colorid] = c.[colorid]
- ";
- }
- }
|