Advertisement
Sonic3R

Userinterface

Oct 21st, 2011
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1. public partial class UserInterfaceLayer : System.Web.UI.Page
  2.    {
  3.       protected void Page_Load( object sender, EventArgs e ) {
  4.          LoadTree( tree );
  5.          //TreeLoad( tree, @"D:\XML Project\XMLAppStabiplan\XMLAppStabiplan\example.xml" );
  6.       }
  7.       protected void LoadTree( TreeView tree ) {
  8.          tree.Nodes.Clear();
  9.          BusinessLayerArcht layer = new BusinessLayerArcht();
  10.          layer.Load();
  11.  
  12.          foreach ( CategoriesCtrlDto cto in layer.Categories ) {
  13.             TreeNode node_category = new TreeNode(cto.Name);
  14.             tree.Nodes.Add( node_category );
  15.  
  16.             foreach ( LinksCtrlDto lk in cto.Links ) {
  17.                TreeNode node_link = new TreeNode( lk.Name );
  18.                node_category.ChildNodes.Add( node_link );
  19.             }          
  20.          }
  21.       }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement