/// <summary>
        /// 父节点

        public DishTypeTreeNode(string id, string name, DishTypeTreeNode parent, bool selected, List <DishTypeTreeNode> children)
        {
            this.Id        = id;
            this.Name      = name;
            this.Parent    = parent;
            this._Selected = selected;
            this.Children  = children ?? new List <DishTypeTreeNode>();
        }
        public void Init()
        {
            this.DishType = new ObservableCollection <DishTypeTreeNode>();
            DishTypeTreeNode root = DishTypeTreeNode.createRoot("0", "全部类型", false);

            root.Action = LoadDishesItemsAction;
            this.DishType.Add(root);
            //加载所有大类
            var disheTypes = _DishService.LoadFatherType();

            //MessageBox.Show("disheTypes===" + disheTypes.Count() + disheTypes[0].Name);
            foreach (var disheTyp in disheTypes)
            {
                var child = root.createChild(disheTyp.DishTypeId.ToString(), disheTyp.Name, false);
                child.Action = LoadDishesItemsAction;
                root.Children.Add(child);
            }
        }
        public void LoadDishesItemsAction(object parameter)
        {
            DishTypeTreeNode node = (DishTypeTreeNode)parameter;



            //MessageBox.Show("start");
            this.DisheTypeItem.Clear();
            List <DishType> dishTypeList;

            if (node.Id.Equals("0"))                       //根结点
            {
                dishTypeList = _DishService.LoadSubType(); //查询所有子类
            }
            else//非根结点
            {
                dishTypeList = _DishService.LoadSubTypeById(Convert.ToInt32(node.Id));//查询子类
            }
            foreach (DishType dishType in dishTypeList)
            {
                this.DisheTypeItem.Add(dishType);
            }
        }
        /// <summary>
        /// 父节点

        public DishTypeTreeNode(string id, string name, DishTypeTreeNode parent, bool selected, List<DishTypeTreeNode> children)
        {
            this.Id = id;
            this.Name = name;
            this.Parent = parent;
            this._Selected = selected;
            this.Children = children ?? new List<DishTypeTreeNode>();
        }