eramgarden Posted June 28, 2005 Posted June 28, 2005 I've inherited this code and it has a function below. I've been readying about childrows but my light bulb is still not bright. Anyone can explain what that line is doing .. Public Function GetPricings() As Pricing() Return CType(Me.GetChildRows(Me.Table.ChildRelations("contract_line_item_pricing")),Pricing()) End Function Quote
Afraits Posted June 28, 2005 Posted June 28, 2005 I assume the Me in this case is relating to datarow or similar object. To my understanding it seems to be doing the following: Me.GetChildRows(Me.Table.ChildRelations("contract_line_item_pricing")) the GetChildRows returns an array of datarows based on the specified relation, the Me.Table.ChildRelations selects the relation between the table the datarow (Me) is from, and the table linked by the relationship. The relationship "contract_line_item_pricing" may be defined in your source data (XML/DB ?) or built when loading into a dataset. The Ctype call will then attempt to convert this array into an array of Pricing objects. Beyond that I couldn't say what it is meant to do or why that might be the case. Quote Afraits "The avalanche has started, it is too late for the pebbles to vote"
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.