public void LoadChildren()
 {
     ChildTreeItems.Clear();
     if (MenuId == 0 ||
         (MenuId >= MenuIdControlAssign.MenuFileGroupIdMin &&
          MenuId <= MenuIdControlAssign.MenuFileGroupIdMax))
     {
         var f = ServerInstanceRelation.GetInstanceRelationsByfatherId(this.InstanceId, MenuId);
         foreach (var t in f)
         {
             if (t.Id >= MenuIdControlAssign.MenuIdMin && t.Id <= MenuIdControlAssign.MenuIdMax)
             {
                 // var eng = I36N.Services.I36N.ConvertByCoding(t.Id.ToString());//
                 string name = t.Name;
                 //if (!eng.Equals("Missing")) name = eng;
                 var tt = MenuComponentHolding.GetMenuItemById(t.Id);
                 if (tt == null)
                 {
                     continue;
                 }
                 ChildTreeItems.Add(new MenuTreeItemViewModel(this, this.InstanceId, t.Id)
                 {
                     Name = name
                 });
             }
             else
             {
                 ChildTreeItems.Add(new MenuTreeItemViewModel(this, this.InstanceId, t.Id)
                 {
                     Name = t.Name
                 });
             }
         }
     }
 }
        public void LoadChildren()
        {
            ChildTreeItems.Clear();

            if (_menuId <= MenuIdControlAssign.MenuIdMax && _menuId >= MenuIdControlAssign.MenuIdMin)
            {
                return;
            }
            else if (MenuId == 0 || (_menuId <= MenuIdControlAssign.MenuFileGroupIdMax &&
                                     _menuId >= MenuIdControlAssign.MenuFileGroupIdMin)) //file
            {
                var f = ServerInstanceRelation.GetInstanceRelationsByfatherId(this.InstanceId, MenuId);
                foreach (var t in f)
                {
                    if (t.Id <= MenuIdControlAssign.MenuIdMax && t.Id >= MenuIdControlAssign.MenuIdMin)
                    //menu id
                    {
                        var fff = MenuComponentHolding.GetMenuItemById(t.Id);
                        if (fff != null)
                        {
                            ChildTreeItems.Add(new ShortCutTreeItemViewModel(this, this.InstanceId, t.Id)
                            {
                                Name = t.Name
                            });
                        }
                    }
                    else
                    {
                        ChildTreeItems.Add(new ShortCutTreeItemViewModel(this, this.InstanceId, t.Id)
                        {
                            Name = t.Name
                        });
                    }
                }
            }
        }