V6Elevation.cs 1022 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections.Generic;
  2. using InABox.Core;
  3. namespace Comal.Classes
  4. {
  5. public class V6Elevation : V6Object
  6. {
  7. [NullEditor]
  8. public int ID { get; set; }
  9. public string Description { get; set; }
  10. public int Quantity { get; set; }
  11. public override void ValidateQuery(string sql, List<string> errors)
  12. {
  13. ValidateField(sql, nameof(Description), errors);
  14. ValidateField(sql, nameof(Quantity), errors);
  15. }
  16. public static string SQL =
  17. "select \n" +
  18. $" qi.quote_item_id as {nameof(ID)}, \n" +
  19. $" qi.descr as {nameof(Description)}, \n" +
  20. $" qi.quantity as {nameof(Quantity)} \n" +
  21. "from \n" +
  22. " Quote_item qi \n" +
  23. "left outer join \n" +
  24. " quote q on qi.quote_id = q.quote_id and qi.quote_vers_start >= q.quote_vers and qi.quote_vers_stop <= q.quote_vers \n" +
  25. "where \n" +
  26. " 1=1";
  27. }
  28. }