V6Component.cs 935 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. using InABox.Integration.V6;
  4. namespace PRSDesktop.Integrations.V6
  5. {
  6. public class V6Component : V6BOMItem, IV6Component
  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 SQL = $@"select
  15. bc.Part_Code as {nameof(Code)},
  16. c.descr as {nameof(Description)},
  17. 1.0 as {nameof(PackSize)},
  18. bc.comp_qty as {nameof(Quantity)},
  19. bc.cost as {nameof(Cost)}
  20. from
  21. bom_comp bc
  22. left outer join
  23. quote_item qi on qi.quote_item_id = bc.quote_item_id
  24. left outer join
  25. quote q on q.quote_id = qi.quote_id
  26. left outer join
  27. componentry c on c.comp_lib_id = bc.comp_lib_id and c.comp_id = bc.comp_id
  28. where
  29. 1=1";
  30. }
  31. }