V6Component.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. namespace Comal.Classes
  4. {
  5. public class V6Component : V6BOMItem
  6. {
  7. public double PackSize { get; set; }
  8. public override void ValidateQuery(string sql, List<string> errors)
  9. {
  10. base.ValidateQuery(sql, errors);
  11. ValidateField(sql, nameof(PackSize), errors);
  12. }
  13. public static String SQL =
  14. "select \n" +
  15. $" bc.Part_Code as {nameof(Code)}, \n" +
  16. $" c.descr as {nameof(Description)}, \n" +
  17. $" 1.0 as {nameof(PackSize)}, \n" +
  18. $" bc.comp_qty as {nameof(Quantity)}, \n" +
  19. $" bc.cost as {nameof(Cost)} \n" +
  20. "from \n" +
  21. " bom_comp bc \n" +
  22. "left outer join \n" +
  23. " quote_item qi on qi.quote_item_id = bc.quote_item_id \n" +
  24. "left outer join \n" +
  25. " quote q on q.quote_id = qi.quote_id \n" +
  26. "left outer join \n" +
  27. " componentry c on c.comp_lib_id = bc.comp_lib_id and c.comp_id = bc.comp_id \n" +
  28. "where \n" +
  29. " 1=1";
  30. }
  31. }