I'm really lost right now, I can't figure out how to pass to values from a table back to the presentationTie r. I am searching by the value selected in the parent(carSize) using a comboBox and passing the selected value to the dataTier to select the childRows(manuf actuer and model). The child values will be set into a dataGrid. Here is my code, any advice would be greatly appreciated! Should I just return the dataSet instead of doing it this way and then setup everything in the presentation? Thank you
Code:
Public Function getCarSize(ByVal carSize_String As String) As String
Dim drCarSize As DataRow
Dim drVehicles As DataRow()
Dim manufacturerString As String
Dim manufModelStrings(10) As String
Dim modelString As String
Dim modelStrings(10) As String
Dim subInt As Integer
drCarSize = aCustomerDataSet.CarSize.FindBySizeCode(carSize_String)
drVehicles = drCarSize.GetChildRows("CarsToVehicleRelation")
For Each drVehicle As DataRow In drVehicles
manufacturerString = drVehicle.GetParentRow("CarsToVehicleRelation")!manuf_name.ToString
modelString = drVehicle.GetParentRow("CarsToVehicleRelation")!model.ToString
manufacturerStrings(subInt) = manufacturerString
modelStrings(subInt) = modelString
subInt += 1
Next
Return ' what?
End Function
Comment