Read all rows of an order document before add

Lars Mx

Hi experts,



I want to read all lines of an order to check whether a specific item is in or not. I can not figure out, how do get the datasource of the document lines and how to check the itemcodes in a for-each-loop. Thanks for your help in advance.



Kind regards



Lars

Daniel Ruther

Hi Lars,



try it like this:





Matrix lszeilen = pVal.Form.Items["38"] as Matrix;



for(int row = 0;row < lszeilen.Rows.Count;row++)

{

if(string.IsNullOrEmpty(lszeilen.GetValue("1", row)))

continue;

if(lszeilen.GetValue("1", row).Equals("A10000")) // ---Hier Artikelnummer

{

MessageBox.Show("Artikel vorhanden","OK");

}

else

{

continue;

}

}

return true;





hth

Daniel

Lars Mx

Funktioniert. Vielen Dank!



Gruß Lars
0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post