on 02-28-2005 2:01 PM
hi, i need sample to display lines of an order...My code doesn't work:
for (i=1;i<oOrder.Lines.Count;i++)
{
try
{
Console.Out.WriteLine("ItemCode:"oOrder.Lines.ItemCode"LineNum:"+oOrder.Lines.LineNum
"DocEntry"oOrder.DocEntry"Quantity:"oOrder.Lines.Quantity);
}
catch(Exception e)
{
Console.Out.WriteLine(e);
}
When i do this i got always the same line with a lineNum=0;
I think im going in the wrong way, somebody has an exemple to show me??
Thank you...
You will need to call setcurrentline before doing anything, because the lines object is not exposed as a collection, and therefore has no direct indexer parameter.
or (i=1;i<oOrder.Lines.Count;i++)
{
try
{
// Set the current order line
oOrder.Lines.SetCurrentLine(i - 1);
Console.Out.WriteLine("ItemCode:"oOrder.Lines.ItemCode"LineNum:"+oOrder.Lines.LineNum
"DocEntry"oOrder.DocEntry"Quantity:"oOrder.Lines.Quantity);
}
catch(Exception e)
{
Console.Out.WriteLine(e);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
11 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.