1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- 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.[ColorName] as {nameof(Finish)}, \n" +
- $" 1.0 as {nameof(Quantity)}, \n" +
- $" 0.0 as {nameof(Cost)} \n" +
- "from \n" +
- " profiles p \n" +
- "left outer join \n" +
- " insertions i on p.[insertionid] = i.[insertionid] \n" +
- "left outer join \n" +
- " elevations e on i.[elevationid] = e.[elevationid] \n" +
- "left outer join \n" +
- " colors c on p.[lk_colorid] = c.[colorid] \n" +
- "where \n" +
- " 1=1";
- public static String BillOfMaterialsSQL =
- "select \n" +
- $" b.[ArticleCode_BaseNumber] as {nameof(Code)}, \n" +
- $" b.[description] as {nameof(Description)}, \n" +
- $" b.[length_output] as {nameof(Length)}, \n" +
- $" c.[ColorName] as {nameof(Finish)}, \n" +
- $" 1.0 as {nameof(Quantity)}, \n" +
- $" 0.0 as {nameof(Cost)} \n" +
- "from \n" +
- " profilebars b \n" +
- "left outer join \n" +
- " insertions i on b.[insertionid] = i.[insertionid] \n" +
- "left outer join \n" +
- " elevations e on i.[elevationid] = e.[elevationid] \n" +
- "left outer join \n" +
- " colors c on b.[lk_colorid] = c.[colorid] \n" +
- "where \n" +
- " 1=1";
- }
- }
|