sai1234ram
Programmer
Dear Team
I am doing customization using MAS90 Erp in Vb.net. I am trying to get datas from Sales Order Detail table into a Datagrid. Here I want to bring all the Rows which corresponds to the SalesOrderNo. But I can get only one row into the Datagrid (Say for an example an Order No contains 5 rows). Here I have written Looping for Row increment. But It doesnt work. See below the codings.
Dim intRow As Integer
Dim ItemCode As String = ""
Dim ItemCodeDesc As String = ""
Dim QuantityOrdered As Decimal = 0
For intRow = 0 To oSOOrder.oLines.nMoveLast()
retVAL = oSOOrder.oLines.nGetValue("ItemCode$", ItemCode)
retVAL = oSOOrder.oLines.nGetValue("ItemCodeDesc$", ItemCodeDesc)
retVAL = oSOOrder.oLines.nGetValue("QuantityOrdered", QuantityOrdered)
Next
Dim NewLine As DataRow = MyDataTable.NewRow
NewLine(0) = ItemCode
NewLine(1) = ItemCodeDesc
NewLine(2) = QuantityOrdered
MyDataTable.Rows.Add(NewLine)
Here i am trying to access all the rows from SalesOrderDetail Table for a particular Order No. But only one row is read and added to the Datagrid. Is there any Methods and properties to Count the rows from the table. Kindly help me to correct it.
Regards
Kaliprasanna
ramprasna@gmail.com
I am doing customization using MAS90 Erp in Vb.net. I am trying to get datas from Sales Order Detail table into a Datagrid. Here I want to bring all the Rows which corresponds to the SalesOrderNo. But I can get only one row into the Datagrid (Say for an example an Order No contains 5 rows). Here I have written Looping for Row increment. But It doesnt work. See below the codings.
Dim intRow As Integer
Dim ItemCode As String = ""
Dim ItemCodeDesc As String = ""
Dim QuantityOrdered As Decimal = 0
For intRow = 0 To oSOOrder.oLines.nMoveLast()
retVAL = oSOOrder.oLines.nGetValue("ItemCode$", ItemCode)
retVAL = oSOOrder.oLines.nGetValue("ItemCodeDesc$", ItemCodeDesc)
retVAL = oSOOrder.oLines.nGetValue("QuantityOrdered", QuantityOrdered)
Next
Dim NewLine As DataRow = MyDataTable.NewRow
NewLine(0) = ItemCode
NewLine(1) = ItemCodeDesc
NewLine(2) = QuantityOrdered
MyDataTable.Rows.Add(NewLine)
Here i am trying to access all the rows from SalesOrderDetail Table for a particular Order No. But only one row is read and added to the Datagrid. Is there any Methods and properties to Count the rows from the table. Kindly help me to correct it.
Regards
Kaliprasanna
ramprasna@gmail.com