1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
Public Class LstCustFromSoc
Property IdCust As Integer
Property RefClt As String
Property IdArticle As Integer
Property LibArticle As String
Property LibDim As String
Property LibCouleur As String
Property PathCouleur As String
Property LongArtCust As Integer?
Property ProfArtCust As Integer?
Property HautArtCust As Integer?
End Class
Public Shared Function GetCustoms(ByVal soc As Societe, ByVal LesDatas As CatalogueMobilierEntities) As List(Of LstCustFromSoc)
Try
'Return (From AffCusts In LesDatas.CustomAffectations _
'Join ArtElem In LesDatas.ArticleElements On ArtElem.IdArt Equals AffCusts.Custom.IdArt _
'Join ElemCompo In LesDatas.ComposantElements On ElemCompo.IdElem Equals ArtElem.IdElem _
'Join CustArt In LesDatas.CustomArticles On CustArt.IdElem Equals ArtElem.IdElem And CustArt.IdCustom Equals AffCusts.IdCustom And CustArt.IdCompoGros Equals ElemCompo.IdCompoGros _
'Order By AffCusts.Custom.Article.Libelle, AffCusts.Custom.Article.Longueur, CustArt.ComposantCouleur.Couleur.Libelle _
'Where (AffCusts.IdSoc = soc.IdSoc And ArtElem.DefiniCouleur And ElemCompo.DefiniCouleur)
'Select New LstCustFromSoc With {.IdCust = AffCusts.IdCustom, .RefClt = AffCusts.RefClient, .IdArticle = AffCusts.Custom.IdArt, .LibArticle = AffCusts.Custom.Article.Libelle, _
' .LibDim = "", _
' .LibCouleur = CustArt.ComposantCouleur.Couleur.Libelle, .PathCouleur = PATH_IMG_GROSSISTES & CustArt.ComposantGrossiste.IdGros & FOLDER_COULEUR & CustArt.ComposantCouleur.Couleur.ImgCouleur, _
' .LongArtCust = AffCusts.Custom.Article.Longueur, .ProfArtCust = AffCusts.Custom.Article.Profondeur, .HautArtCust = AffCusts.Custom.Article.Hauteur}).ToList
Dim Query = (From AffCusts In LesDatas.CustomAffectations _
Join ArtElem In LesDatas.ArticleElements On ArtElem.IdArt Equals AffCusts.Custom.IdArt _
Join ElemCompo In LesDatas.ComposantElements On ElemCompo.IdElem Equals ArtElem.IdElem _
Join CustArt In LesDatas.CustomArticles On CustArt.IdElem Equals ArtElem.IdElem And CustArt.IdCustom Equals AffCusts.IdCustom And CustArt.IdCompoGros Equals ElemCompo.IdCompoGros _
Where AffCusts.IdSoc = soc.IdSoc And ArtElem.DefiniCouleur And ElemCompo.DefiniCouleur _
Select AffCusts, CustArt)
Return (From Ret In Query.ToList Order By Ret.AffCusts.Custom.Article.Libelle, Ret.AffCusts.Custom.Article.Longueur, Ret.CustArt.ComposantCouleur.Couleur.Libelle _
Select New LstCustFromSoc With {.IdCust = Ret.AffCusts.IdCustom, .RefClt = Ret.AffCusts.RefClient, .IdArticle = Ret.AffCusts.Custom.IdArt, .LibArticle = Ret.AffCusts.Custom.Article.Libelle, _
.LibDim = Helper.GetStrDimension(Ret.AffCusts.Custom.Article.Longueur, Ret.AffCusts.Custom.Article.Profondeur, Ret.AffCusts.Custom.Article.Hauteur), _
.LibCouleur = Ret.CustArt.ComposantCouleur.Couleur.Libelle, .PathCouleur = PATH_IMG_GROSSISTES & Ret.CustArt.ComposantGrossiste.IdGros & FOLDER_COULEUR & Ret.CustArt.ComposantCouleur.Couleur.ImgCouleur, _
.LongArtCust = Ret.AffCusts.Custom.Article.Longueur, .ProfArtCust = Ret.AffCusts.Custom.Article.Profondeur, .HautArtCust = Ret.AffCusts.Custom.Article.Hauteur}).ToList
Catch ex As Exception
Return Nothing
End Try
End Function |
Partager