1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 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 SQL = $@"
- select
- g.[Name] as {nameof(Code)},
- g.[Description] as {nameof(Description)},
- g.[width_output] as {nameof(Height)},
- g.[height_output] as {nameof(Width)},
- g.[Configuration] as {nameof(Treatment)},
- '' as {nameof(Location)},
- g.[Amount] as {nameof(Quantity)},
- g.[Price] as {nameof(Cost)}
- from
- glass g
- join
- insertions i on g.[insertionid] = i.[insertionid]
- join
- elevations e on i.[elevationid] = e.[elevationid]";
- }
- }
|