Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Sort This
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01471946
Message ID:
01472025
Views:
38
>>I have a Project object. On it is a property called QueryItems. QueryItems is a List containing this class:
>>
>>
>>public class csQueryItem
>>{
>>    public DataSet QueryResults { get; set; }
>>    public string QueryString { get; set; }
>>    public int Quantity { get; set; }
>>    public bool IsProduct { get; set; }
>>}
>>
>>
>>The user will enter one or more query words such as:
>>
>>
>>A6825A
>>A6913A
>>A7025A
>>A9879A
>>A9881A
>>A9918A
>>C7497A
>>C7508AZ
>>
>>
>>For each item in this list I will run a query that returns a DS with one or more rows. If the DS has more than 1 row, it's a Product, if only one row, the it's not a product. The class above stores the DS, the query string, and the IsProduct bool.
>>
>>I then need to load a treeview with the results of all queries, starting with products, the parts (non products), sorted by the Query string.
>>
>>How do I do this?
>
>It's not clear how the TreeView would be constructed. Would I be right in assuming that each 'query word' would appear as a root node and if it was a product then a child node would be created for each row returned from that query?
>Also we'd need to know a bit more about the structure of csQueryItem.QueryResults......


Products can contain parts, but a part can be stand-alone. If a query returns a product, the the search word will be the root node, and all parts for the product will be child nodes listed under it.

if the query returns a stand alone part, the that query word will be it's own node.

In either case, QueryResults is a DataSet. It will either contain 1 row with IsProduct = 0 for a part, or multiple rows with IsProduct = 1 for a Product.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform