Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shirts = _
- From vc In db.VarCamisetas _
- Join m In modelos On vc.modelo_id Equals m.id _
- Join ca In db.Camisetas On vc.camiseta_id Equals ca.camiseta_id _
- Where _
- ( _
- ((vc.disponivel_dtg = 0 And vc.qtd_estoque > 0) And vc.Camiseta.disponivel_dtg = 0) _
- Or _
- ( _
- ((vc.disponivel_dtg = 0 And vc.qtd_estoque > 0) And vc.Camiseta.disponivel_dtg = 1) _
- Or _
- ((vc.disponivel_dtg = 1 And vc.qtd_estoque_canvas > 0) And vc.Camiseta.disponivel_dtg = 1) _
- ) _
- ) _
- And vc.ativo = 1 _
- And vc.Camiseta.ativo = 1 _
- And vc.Camiseta.ocultado_catalogo = 0 _
- And vc.preco > 0 _
- And IIf(genero = "i", vc.modelo_id = 3, vc.sexo = genero) _
- Select _
- id = vc.camiseta_id, _
- vid = vc.varcam_id, _
- r = vc.Camiseta.ranking_popularidade, _
- p = vc.preco - vc.desconto, _
- t = vc.tamanho.Replace("xxg", "ggg").Replace("xg", "gg"), _
- c = vc.cor_basica.ToLower(), _
- m = vc.modelo_id, _
- g = m.sexo, _
- d = vc.Camiseta.Design.DesignProducaoModelos.lancamento_id, _
- cm = m.value, _
- dl = ca.data_ultimo_lancamento _
- Order By dl Descending, id Descending
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement