Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 7846

inserting data in ORDR and RDR1 using DI API VB .net

$
0
0

Hi everyone,

 

Im trying to insert data in ordr and rdr1 using DI API in VB .NET,
My problem is i have multiple Linenums in one DocNum..

 

example in my LIST VIEW:

CardCode     PO     itemcode     qty

C0001          1          001               2

C0001          1          002               3

C0001          1          002               4


my code is:

For x As Integer = 0 To lvSO.Items.Count - 1

PO = lvSO.Items(x).SubItems(3).Text

 

 

            For y As Integer = 0 To lvSO.Items.Count - 1

                If PO = lvSO.Items(y).SubItems(3).Text Then

                    ctr += 1

                    'get all of Totals here

                End If

            Next

 

 

            PoORDR = Execute("SELECT COUNT(""NumAtCard"") FROM =" & Database & ".ORDR WHERE ""NumAtCard"" ='" & PO & "' ")

            If PoORDR(0)(0).ToString = 0 Or PoORDR(0)(0).ToString = "" Then

                'insert First PO in ORDR and rdr1

            ElseIf PoORDR(0)(0).ToString > 1 Then

                'insert rdr1

            End If

Next

 

Does every loop will change the doc Entry when inserting?

 

Thanks.


Viewing all articles
Browse latest Browse all 7846

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>