I have the following Flat Data Structure.
ParentAttributeId AttributeId List
----------------- ----------- ------
NULL 29 TestcaseCollection
29 30 EnclosureLeakageDielectricStrengthTest
30 31 DeviceID
30 32 ScannerOneLowChannel
30 33 ScannerTwoLowChannel
29 34 EnclosureLeakageLeakageCurrentTest
34 35 DeviceID
34 36 ScannerOneLowChannel
34 37 ScannerTwoLowChannel
29 38 PatientCircuitLeakageTest
38 39 DeviceID
38 40 ScannerOneLowChannel
38 41 ScannerTwoLowChannel
29 42 SIPSOPDielectricStrengthTest
42 44 ScannerOneHighChannel
42 45 ScannerOneLowChannel
42 46 ScannerTwoHighChannel
42 47 ScannerTwoLowChannel
29 48 SIPSOPLeakageCurrentTest
48 49 ScannerOneHighChannel
48 50 ScannerOneLowChannel
48 51 ScannerTwoHighChannel
48 52 ScannerTwoLowChannel
I need to convert above flat data structure into a hierarchy Object structure like below. So my Object looks like the "List" Column above. I am using SQL Stored Proc to get the above data. I am using C#.
Object hierarchy
29
|
30
| 31
| 32
| 33
|
34
| 35
| 36
|37
38
Any help would be greatly appreciated.
Regards Niju