Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

TreeView to Database

$
0
0
I am trying to store the treeview structure to sql server ... I am working on some kind of BOM software ... I have a logical treevieew where I define the product tree with the quantities for example ...

System (1)
  |________ Computer (2)
                    |____________ Monitor (2)
                    |____________ Mouse (2)
                    |____________ Keyboard (2)

This tree is established with the part-numbers ... Since I established the tree with the part list it is easy to store the treeview in the database.
However I have to have the same treeview with the Serialnumbers ... As you can see with the serial number I have to have more two serial number node for the 2 computers and underneath each one of them i have to have 2 serial number nodes for monitor, keyboard, and the mouse ..  I would like to establish the

assemblyID | serialNumber | PartID  | parentID

table just iterating through the treeview above ... So my table would look like

1    123-3-3-3     System     NULL
2    12303030     Computer1  1
3    12123212      Computer2 1
4    12121212     Monitor1   2
5    1212133       Mouse      2
6    2342343       Keyboard   2
7    12151212     Monitor1   3
8    1214133       Mouse      3
9    2345343       Keyboard   3

So can anyone help me with this ... I am stuck ... I am developing this in C# .... Any help would be appreciated ...

Thanks

Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>