LogikalLabour.cs 926 B

123456789101112131415161718192021222324252627282930313233
  1. using InABox.Logikal;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Comal.Classes
  5. {
  6. public class LogikalLabour : LogikalBOMItem, ILogikalLabour
  7. {
  8. public override void ValidateQuery(string sql, List<string> errors)
  9. {
  10. base.ValidateQuery(sql, errors);
  11. }
  12. public static String SQL =
  13. "select \n" +
  14. $" t.[labourtimeid] as {nameof(Code)}, \n" +
  15. $" t.[name] as {nameof(Description)}, \n" +
  16. $" t.[totalminutes] as {nameof(Quantity)}, \n" +
  17. $" c.[price] as {nameof(Cost)} \n" +
  18. "from \n" +
  19. " labourtimes t \n" +
  20. "join \n" +
  21. " labourcosts c on t.[timetype] = c.[type] \n" +
  22. "left outer join \n" +
  23. " elevations e on t.[elevationid] = e.[elevationid] \n" +
  24. "where \n" +
  25. " t.[totalminutes] > 0";
  26. }
  27. }