/// <summary>
        /// 加载初始化数据
        /// </summary>
        public void Init()
        {
            DishTypeMenu = new ObservableCollection <TreeNode>();
            var dishesMenus = _IDishService.LoadFatherType();

            Root = TreeNode.createRoot(0, "全部类型");
            DishTypeMenu.Add(Root);
            foreach (var menu in dishesMenus)
            {
                var child = Root.createChild(menu.DishTypeId, menu.Name);
                Root.Children.Add(child);
            }
            RaisePropertyChanged("DishWin");
        }
        public void LoadTreeNodeChildren(TreeNode selected)
        {
            if (null == selected)
            {
                return;
            }
            selectedLast = selected;
            if (selected.Parent != null)
            {
                _DishTypeIdLast = selected.Id;
            }
            DishService service     = new DishService();
            var         dishesMenus = service.LoadSubTypeById(selected.Id);

            selected.Children.Clear();
            foreach (var menu in dishesMenus)
            {
                var child = selected.createChild(menu.DishTypeId, menu.Name);
                selected.Children.Add(child);
            }
            //SelectedTreeNodeFalse(Root);
            //selected._Selected = true;
        }
 public void LoadTreeNodeChildren(TreeNode selected)
 {
     if( null==selected){
         return;
     }
     selectedLast = selected;
     if (selected.Parent != null)
     { 
         _DishTypeIdLast = selected.Id;
     }
     DishService service = new DishService();
     var dishesMenus = service.LoadSubTypeById(selected.Id);
     selected.Children.Clear();
     foreach (var menu in dishesMenus)
     {
         var child = selected.createChild(menu.DishTypeId, menu.Name);
         selected.Children.Add(child);
     }
     //SelectedTreeNodeFalse(Root);
     //selected._Selected = true;
 }
 /// <summary>
 /// 加载初始化数据
 /// </summary>
 public void Init()
 {
     DishTypeMenu = new ObservableCollection<TreeNode>();
     var dishesMenus = _IDishService.LoadFatherType();
     Root = TreeNode.createRoot(0, "全部类型");
     DishTypeMenu.Add(Root);
     foreach (var menu in dishesMenus)
     {
         var child = Root.createChild(menu.DishTypeId, menu.Name);
         Root.Children.Add(child);
     }
     RaisePropertyChanged("DishWin");
 }