24. März 2011 19:38
Dim ns As New VSDynamicsNAV.NAVServiceProduct.Product_Service
ns.UseDefaultCredentials = True
ns.Url = My.Application.NAVWebserviceServer & ":" & My.Application.NAVWebservicePort & "/DynamicsNAV/WS/" & Uri.EscapeDataString(My.Application.NAVCompany) & "/Page/Product"
Dim filter1 As New VSDynamicsNAV.NAVServiceProduct.Product_Filter()
filter1.Field = VSDynamicsNAV.NAVServiceProduct.Product_Fields.Blocked
filter1.Criteria = False
Dim filters() As VSDynamicsNAV.NAVServiceProduct.Product_Filter = New VSDynamicsNAV.NAVServiceProduct.Product_Filter(0) {filter1}
Dim products() As VSDynamicsNAV.NAVServiceProduct.Product = ns.ReadMultiple(filters, Nothing, 0)
Dim row As DataRow
For Each product As VSDynamicsNAV.NAVServiceProduct.Product In products
row = dt.NewRow
row("No") = product.No
row("Description") = product.Description 'Beschreibung
row("Matchcode") = product.Search_Description 'Suchbegriff
row("ItemCategory") = product.Item_Category_Code 'ArtikelKategorie
row("ProductGroup") = product.Product_Group_Code 'Produktgruppe
row("UnitPrice") = product.Unit_Price 'Vk-Preis
row("ProductPostingGroup") = product.Gen_Prod_Posting_Group 'Produktbuchungsgruppe
row("VATPostingGroup") = product.VAT_Prod_Posting_Group 'MWSt-Buchungsgruppe
row("PriceIncludingTax") = product.Price_Includes_VAT 'Bruttopreis
dt.Rows.Add(row)
Next
25. März 2011 08:54
25. März 2011 10:03
25. März 2011 10:08