示例#1
0
 public List <TreeView> GetTree()
 {
     using (DBEntities entity = new DBEntities())
     {
         return(InitializeTree.InstanceTree(entity, false));
     }
 }
示例#2
0
        static public List <TreeView> InstanceTree(DBEntities entity, bool update)
        {
            if (_init == null)
            {
                lock (_lockObj)
                {
                    if (_init == null)
                    {
                        _init = new InitializeTree(entity);
                    }
                }
            }
            if (update)
            {
                lock (_lockObj)
                {
                    _init = new InitializeTree(entity);
                }
            }

            return(_tree);
        }