api.feederAPI.order

Bsram

New member
Joined
Apr 28, 2014
Messages
2
Programming Experience
3-5
Hello,

I try to get order details from web services called feederapi using soap and api.

------------------------------
Dim list As feederAPI.Order()

list = feeder.OrderSearch(cred, "#8/10/2013#", "#8/13/2015#", "", "", "", "", "", feederAPI.eOrderFilterShipping.None, feederAPI.eOrderFilterPayment.None, "", "", "", "", "", "", "", "", "", "", False, True, True)

list = feeder.OrderSearchFromPoint(cred, 1, False, True, True)
-----------------------------

I am getting result as tree view in watchwindow for list.

I need to expand (against collapse) by code then need to import to csv file or table.

Can you please any one help me...?


Thanks,
Ram...
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,717
Location
Sydney, Australia
Programming Experience
10+
Are you saying that you need to affect the Watch window from code? That doesn't really make sense because, once you deploy, the Watch window doesn't exist. I think what you actually mean - or should mean at least - is that you want loop through the Order array that you populated and write out each element to a CSV file. To do that, you would start by opening a StreamWriter on the file, then use a For Each loop to visit each element in the array. You would call WriteLine on the StreamWriter to write the property values of the object to the file.
 

Bsram

New member
Joined
Apr 28, 2014
Messages
2
Programming Experience
3-5
soap api

Thanks cihinney, I tried initially assign the list to array like Dim arr As Array = list.ToArray
then
For i As Int32 = arr.GetLowerBound(0) To arr.GetUpperBound(0)
For j As Int32 = arr.GetLowerBound(1) To arr.GetUpperBound(1)
----
Next
Next
But arr.Getlowerbound(1) meant it is two dimenstional array. i got error as i am using single dimensional list. Even i could get result as 0,1,2,....36 with using just arr.GetLowerBound(0).
I dont want copy from watch window then write.
My watchwindow result look like.
Here i need all expanded values to file...


- list {Length=37} api.feederAPI.Order()
- (0) {api.feederAPI.Order} api.feederAPI.Order
Abandoned False Boolean
abandonedField False Boolean
AbandonReason "" String
abandonReasonField "" String
- Account {api.feederAPI.Account} api.feederAPI.Account
Availablecredit 0.0 Double
availablecreditField 0.0 Double
AvailableNet 50000.0 Double
availableNetField 50000.0 Double


(property continues)


totalShippingField 0.0 Double
TotalUnsettled 0.0 Double
totalUnsettledField 0.0 Double
TrackingNumbers "" String
trackingNumbersField "" String
+ (1) {api.feederAPI.Order} api.feederAPI.Order
+ (2) {api.feederAPI.Order} api.feederAPI.Order
+ (3) {api.feederAPI.Order} api.feederAPI.Order
+ (4) {api.feederAPI.Order} api.feederAPI.Order
+ (5) {api.feederAPI.Order} api.feederAPI.Order
+ (6) {api.feederAPI.Order} api.feederAPI.Order
+ (7) {api.feederAPI.Order} api.feederAPI.Order
+ (8) {api.feederAPI.Order} api.feederAPI.Order
+ (9) {api.feederAPI.Order} api.feederAPI.Order
+ (10) {api.feederAPI.Order} api.feederAPI.Order




Are you saying that you need to affect the Watch window from code? That doesn't really make sense because, once you deploy, the Watch window doesn't exist. I think what you actually mean - or should mean at least - is that you want loop through the Order array that you populated and write out each element to a CSV file. To do that, you would start by opening a StreamWriter on the file, then use a For Each loop to visit each element in the array. You would call WriteLine on the StreamWriter to write the property values of the object to the file.
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,717
Location
Sydney, Australia
Programming Experience
10+
I didn't say anywhere to use two nested For loops. Let's read what I said:
use a For Each loop to visit each element in the array
So, one loop, not two, and a For Each loop, not a For loop. Then:
You would call WriteLine on the StreamWriter to write the property values of the object to the file.
So, no second loop. Just a single call to WriteLine that writes all the property values from the current element. E.g.
VB.NET:
For Each thing In myArray
    myStreamWriter.WriteLine("{0}, {1}, {2}", thing.SomeProperty, thing.SomeOtherProperty, thing.YetAnotherProperty)
Next
 
Top Bottom