Example #1
0
        public void AddAutodeskFileTreeNode(AutodeskFileTreeNode treeNode, BXCModelEntities context = null)
        {
            try
            {

            context = context ?? new BXCModelEntities();
                var fileNodeRepo = new AutodeskFileTreeNodeRepository(context);
                fileNodeRepo.InsertNode(treeNode);
            }

            catch (Exception ex)
            {
                Log.Error("CreateNode Failed", ex);

            }
        }
Example #2
0
        public bool RemoveNodes(IEnumerable<AutodeskFileTreeNode> Nodes, BXCModelEntities context = null)
        {
            context = context ?? new BXCModelEntities();

                var fileNodeRepo = new AutodeskFileTreeNodeRepository(context);

                foreach (var node in Nodes)
                {
                    fileNodeRepo.DeleteNode(node);
                }
                fileNodeRepo.SaveGroupChanges();
                return true;
        }
Example #3
0
 public bool RemoveAllAutodeskFileTreeNodesForLibrary(string library, string owner, BXCModelEntities context = null)
 {
     context = context ?? new BXCModelEntities();
         var fileNodeRepo = new AutodeskFileTreeNodeRepository(context);
         var aftreenodes = fileNodeRepo.GetAllByLibrary(library, owner);
         foreach (var aftreenode in aftreenodes)
         {
             fileNodeRepo.DeleteNode(aftreenode);
         }
         fileNodeRepo.SaveGroupChanges();
         return true;
 }
Example #4
0
 public void RemoveAutodeskFileTreeNode(AutodeskFileTreeNode treeNode, BXCModelEntities context = null)
 {
     context = context ?? new BXCModelEntities();
         var fileNodeRepo = new AutodeskFileTreeNodeRepository(context);
         fileNodeRepo.DeleteNode(treeNode);
 }
Example #5
0
 public IEnumerable<AutodeskFileTreeNode> GetAllTreeNodesForLibrary(string libraryName, string ownerId, BXCModelEntities context = null)
 {
     context = context ?? new BXCModelEntities();
         var fileNodeRepo = new AutodeskFileTreeNodeRepository(context);
         return fileNodeRepo.GetAllByLibrary(libraryName, ownerId);
 }