123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using InABox.Logikal;
- using System.Collections.Generic;
- namespace Comal.Classes
- {
- public class LogikalGlass : LogikalBOMItem, ILogikalGlass
- {
- public string Treatment { get; set; }
- public double Height { get; set; }
- public double Width { get; set; }
- public string Location { get; set; }
- public override void ValidateQuery(string sql, List<string> errors)
- {
- base.ValidateQuery(sql, errors);
- ValidateField(sql, nameof(Treatment), errors);
- ValidateField(sql, nameof(Height), errors);
- ValidateField(sql, nameof(Width), errors);
- ValidateField(sql, nameof(Location), errors);
- }
- public static string ElevationSQL =
- "select \n" +
- $" g.[Name] as {nameof(Code)}, \n" +
- $" g.[Description] as {nameof(Description)}, \n" +
- $" g.[width_output] as {nameof(Height)}, \n" +
- $" g.[height_output] as {nameof(Width)}, \n" +
- $" g.[Configuration] as {nameof(Treatment)}, \n" +
- $" '' as {nameof(Location)}, \n" +
- $" g.[Amount] as {nameof(Quantity)}, \n" +
- $" g.[Price] as {nameof(Cost)} \n" +
- "from \n" +
- " glass g \n" +
- "where \n" +
- " 1=1";
- public static string BillOfMaterialsSQL =
- "select \n" +
- $" g.[Name] as {nameof(Code)}, \n" +
- $" g.[Description] as {nameof(Description)}, \n" +
- $" g.[width_output] as {nameof(Height)}, \n" +
- $" g.[height_output] as {nameof(Width)}, \n" +
- $" g.[Configuration] as {nameof(Treatment)}, \n" +
- $" '' as {nameof(Location)}, \n" +
- $" g.[Amount] as {nameof(Quantity)}, \n" +
- $" g.[Price] as {nameof(Cost)} \n" +
- "from \n" +
- " glass g \n" +
- "left outer join \n" +
- " insertions i on g.[insertionid] = i.[insertionid] \n" +
- "left outer join \n" +
- " elevations e on i.[elevationid] = e.[elevationid] \n" +
- "where \n" +
- " 1=1";
- }
- }
|