LogikalComponent.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using InABox.Logikal;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Comal.Classes
  5. {
  6. public class LogikalComponent : LogikalBOMItem, ILogikalComponent
  7. {
  8. public double PackSize { get; set; }
  9. public override void ValidateQuery(string sql, List<string> errors)
  10. {
  11. base.ValidateQuery(sql, errors);
  12. ValidateField(sql, nameof(PackSize), errors);
  13. }
  14. public static String ElevationSQL =
  15. "select \n" +
  16. $" a.[ArticleCode_BaseNumber] as {nameof(Code)}, \n" +
  17. $" a.[description] as {nameof(Description)}, \n" +
  18. $" a.[PUSize] as {nameof(PackSize)}, \n" +
  19. $" a.[units] as {nameof(Quantity)}, \n" +
  20. $" a.[Price] as {nameof(Cost)} \n" +
  21. "from \n" +
  22. " articles a \n" +
  23. "where \n" +
  24. " 1=1";
  25. public static String BillOfMaterialsSQL =
  26. "select \n" +
  27. $" a.[ArticleCode_BaseNumber] as {nameof(Code)}, \n" +
  28. $" a.[description] as {nameof(Description)}, \n" +
  29. $" a.[PUSize] as {nameof(PackSize)}, \n" +
  30. $" a.[units] as {nameof(Quantity)}, \n" +
  31. $" a.[Price] as {nameof(Cost)} \n" +
  32. "from \n" +
  33. " allarticles a \n" +
  34. "where \n" +
  35. " 1=1";
  36. }
  37. }