| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 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 \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.[Price] as {nameof(Cost)} \n" +
- "from \n" +
- " profiles p \n" +
- "left outer join \n" +
- " colors c on p.[lk_colorid] = c.[colorid] \n";
- 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";
- }
- }
|