Hi,
Do you have access to the source code of the class? Is the function ReturnNewStockodes public in the class? What should the ReturnNewStockodes return i.e. a single clsStockcode or a list of them?
Stockcodes = mag.ReturnNewStockodes("admin", "password")
Would imply a list of clsStockcodes where if you only expected a single one you would do something like this:
Stockcodes.Add(mag.ReturnNewStockodes("admin", "password"))
Also while I was typing I noticed you had used ReturnNewStockodes not ReturnNewStockCodes - just in case there is a typo...
G_Waddell
Practically a Master Poster
621 posts since Nov 2009
Reputation Points: 107
Solved Threads: 93
Skill Endorsements: 5
Hi,
If it returns a list, you should be able to navigate through it:
Dim Stockcodes As New List(Of magento.clsStockcode)
dim Stockcode as magento.clsStockcode
dim code as string
'Get your stockcodes
If Stockcodes.items.count > 0 then 'I think it's items.count, could just be .count
For each Stockcode in StockCodes
'work with the stockcode e.g.
code = Stockcode._StockCode
next
end if
G_Waddell
Practically a Master Poster
621 posts since Nov 2009
Reputation Points: 107
Solved Threads: 93
Skill Endorsements: 5
Hi,
Does this not work?
Dim mag As New Magento.ecommerce
Dim Stockcodes As New List(Of magento.clsStockcode)
Stockcodes = mag.ReturnNewStockodes("admin", "password")
If not, try replacing magento.clsStockcode with mag.clsStockcode
G_Waddell
Practically a Master Poster
621 posts since Nov 2009
Reputation Points: 107
Solved Threads: 93
Skill Endorsements: 5
Question Answered as of 3 Months Ago by
G_Waddell