Click here to Skip to main content
15,912,082 members

Comments by Sam Oryza Reyno (Top 24 by date)

Sam Oryza Reyno 20-Jun-13 0:46am View    
Like
TabelType

| ID | Type | ParentSubID |
| 1 | type 1 | 0 |
| 2 | type 2 | 0 |
| 3 | stype1 | 1 |
| 4 | system1| 2 |

and delete the tabelSubType and TabelSystem?
like this??
Sam Oryza Reyno 20-Jun-13 0:39am View    
i got some of the idea,,

what if some models did not have any SubType, but have System,,
it would be like
- Type
- Subtype
- Model

or maybe

- Type
- System
- Model

what should i do?
Sam Oryza Reyno 20-Jun-13 0:26am View    
ahh,, i'm sorry .. i was confused too whether its my bad english or i'm a really newb in C#.. >.<

this one i got some,,
im trying to figure it out, is it like this?
*little bit forgot how to do reader and command,, ill correct that in my codes
string command = "select * from TabelSubType where typeid = ";
SqlCommands com = new SqlCommands(command + var);
datareaders dr = new datareader (com, cn);
then iterate until the last row?

is that it?? sorry if im totally wrong..
Sam Oryza Reyno 20-Jun-13 0:14am View    
please look at my codes that i comment..
i try to use data relation too,, is it what u mean with running SQL that get the childs node?
Sam Oryza Reyno 20-Jun-13 0:05am View    
i add some protection too.. with

if (dat1["ID"].ToString() == dat2["CatID"].ToString())
{
tn1.Nodes.Add(tn2);
}