Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. shirts = _
  2. From vc In db.VarCamisetas _
  3. Join m In modelos On vc.modelo_id Equals m.id _
  4. Join ca In db.Camisetas On vc.camiseta_id Equals ca.camiseta_id _
  5. Where _
  6. ( _
  7. ((vc.disponivel_dtg = 0 And vc.qtd_estoque > 0) And vc.Camiseta.disponivel_dtg = 0) _
  8. Or _
  9. ( _
  10. ((vc.disponivel_dtg = 0 And vc.qtd_estoque > 0) And vc.Camiseta.disponivel_dtg = 1) _
  11. Or _
  12. ((vc.disponivel_dtg = 1 And vc.qtd_estoque_canvas > 0) And vc.Camiseta.disponivel_dtg = 1) _
  13. ) _
  14. ) _
  15. And vc.ativo = 1 _
  16. And vc.Camiseta.ativo = 1 _
  17. And vc.Camiseta.ocultado_catalogo = 0 _
  18. And vc.preco > 0 _
  19. And IIf(genero = "i", vc.modelo_id = 3, vc.sexo = genero) _
  20. Select _
  21. id = vc.camiseta_id, _
  22. vid = vc.varcam_id, _
  23. r = vc.Camiseta.ranking_popularidade, _
  24. p = vc.preco - vc.desconto, _
  25. t = vc.tamanho.Replace("xxg", "ggg").Replace("xg", "gg"), _
  26. c = vc.cor_basica.ToLower(), _
  27. m = vc.modelo_id, _
  28. g = m.sexo, _
  29. d = vc.Camiseta.Design.DesignProducaoModelos.lancamento_id, _
  30. cm = m.value, _
  31. dl = ca.data_ultimo_lancamento _
  32. Order By dl Descending, id Descending
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement