V6Glass.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System.Collections.Generic;
  2. using InABox.Integration.V6;
  3. namespace PRSDesktop.Integrations.V6
  4. {
  5. public class V6Glass : V6BOMItem, IV6Glass
  6. {
  7. public string Treatment { get; set; }
  8. public double Height { get; set; }
  9. public double Width { get; set; }
  10. public string Location { get; set; }
  11. public override void ValidateQuery(string sql, List<string> errors)
  12. {
  13. base.ValidateQuery(sql, errors);
  14. ValidateField(sql, nameof(Treatment), errors);
  15. ValidateField(sql, nameof(Height), errors);
  16. ValidateField(sql, nameof(Width), errors);
  17. ValidateField(sql, nameof(Location), errors);
  18. }
  19. public static string SQL = $@"select
  20. bf.location as {nameof(Location)},
  21. f.fill_code as {nameof(Code)},
  22. f.descr as {nameof(Description)},
  23. bf.fill_height as {nameof(Height)},
  24. bf.fill_width as {nameof(Width)},
  25. bf.fill_count as {nameof(Quantity)},
  26. bf.treatment as {nameof(Treatment)},
  27. bf.cost as {nameof(Cost)}
  28. from
  29. bom_fill bf
  30. left outer join
  31. fill f on bf.fill_lib_id = f.fill_lib_id and bf.fill_id = f.fill_id
  32. left outer join
  33. quote_item qi on qi.quote_item_id = bf.quote_item_id
  34. left outer join
  35. quote q on q.quote_id = qi.quote_id
  36. where
  37. 1=1";
  38. }
  39. }