| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using InABox.Integration.Logikal;
- using System.Collections.Generic;
- namespace PRSDesktop.Integrations.Logikal
- {
- 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 DesignSQL =
- "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";
- 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";
- }
- }
|