private void PopulateTreeNodes(int p, RadTreeViewItem parent, NomenclaturesLogic logic)
        {
            var lstItems = logic.GetTreeNodes(false, p);

            foreach (var item in lstItems)
            {
                RadTreeViewItem it = new RadTreeViewItem();
                it.Tag    = item;
                it.Header = item.DepartmentName;
                parent.Items.Add(it);
                this.PopulateTreeNodes(item.id_department, it, logic);
            }
        }
 private void PopulateTreeRoot(RadTreeView Tree)
 {
     using (var logic = new NomenclaturesLogic())
     {
         var rootItems = logic.GetTreeNodes(true, 0);
         foreach (var item in rootItems)
         {
             RadTreeViewItem it = new RadTreeViewItem();
             it.Tag    = item;
             it.Header = item.DepartmentName;
             Tree.Items.Add(it);
             this.PopulateTreeNodes(item.id_department, it, logic);
         }
     }
 }