1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- 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<string> 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" +
- $" 1.0 as {nameof(PackSize)}, \n" +
- $" a.[units] as {nameof(Quantity)}, \n" +
- $" 0.0 as {nameof(Cost)} \n" +
- "from \n" +
- " articles a \n" +
- "left outer join \n" +
- " insertions i on a.[insertionid] = i.[insertionid] \n" +
- "left outer join \n" +
- " elevations e on i.[elevationid] = e.[elevationid] \n" +
- "where \n" +
- " 1=1";
- public static String BillOfMaterialsSQL =
- "select \n" +
- $" a.[ArticleCode_BaseNumber] as {nameof(Code)}, \n" +
- $" a.[description] as {nameof(Description)}, \n" +
- $" 1.0 as {nameof(PackSize)}, \n" +
- $" a.[units] as {nameof(Quantity)}, \n" +
- $" 0.0 as {nameof(Cost)} \n" +
- "from \n" +
- " allarticles a \n" +
- "left outer join \n" +
- " insertions i on a.[insertionid] = i.[insertionid] \n" +
- "left outer join \n" +
- " elevations e on i.[elevationid] = e.[elevationid] \n" +
- "where \n" +
- " 1=1";
- }
- }
|