Public Function rebuilddisplaycart(ByVal cart As DataSet) As DataSet ' ' need the definition for the display dataset ' Dim displaycart As DataSet = DisplayCartDefinition() Dim SystemMgr As New eRaceSystem.eRace Dim ProductInfo As DataSet Try For Each CartRow As DataRow In cart.Tables(0).Rows ProductInfo = SystemMgr.LookupProductByProductId(Integer.Parse(CartRow.Item("P"))) If ProductInfo.Tables(0).Rows.Count = 0 Then FormMessage.Text = "Product does not exist." Else ' ' appends to display dataset ' Dim dRow As DataRow = displaycart.Tables(0).NewRow With ProductInfo.Tables(0).Rows(0) dRow("I") = .Item("Description") dRow("P") = CartRow.Item("P") dRow("Q") = CartRow.Item("Q") dRow("PR") = CartRow.Item("Pr") End With displaycart.Tables(0).Rows.Add(dRow) End If Next Catch ex As Exception FormMessage.Text = ex.Message End Try Return displaycart End Function