V6Glass.cs 1.6 KB

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