Exemplo n.º 1
0
        /// <summary>
        /// Copies the specified folder id.
        /// </summary>
        /// <param name="folderId">The folder id.</param>
        /// <param name="parentId">The parent id.</param>
        public static void CopyRecursive(int folderId, int parentId)
        {
            Folder srcFolder = new Folder(folderId);
            Folder newFolder = (Folder)srcFolder.Clone();

            newFolder.Save();
            Move(newFolder, parentId);

            parentId = (int)newFolder.PrimaryKeyId.Value;

            TreeNode[] nodes = TreeManager.GetChildNodes(GetAssignedMetaClass(), folderId);
            foreach (TreeNode node in nodes)
            {
                CopyRecursive(node.ObjectId, parentId);
            }

            FolderElement[] elements = FolderElement.List <FolderElement>(FolderElement.GetAssignedMetaClass(), new FilterElement[] { new FilterElement("ParentId", FilterElementType.Equal, folderId) });
            foreach (FolderElement element in elements)
            {
                FolderElement.Copy(element, parentId);
            }
        }
Exemplo n.º 2
0
 public FolderElement(CustomTableRow row)
     : base(FolderElement.GetAssignedMetaClass(), row)
 {
 }
Exemplo n.º 3
0
 public FolderElement(CustomTableRow row, MetaObjectOptions options)
     : base(FolderElement.GetAssignedMetaClass(), row, options)
 {
 }
Exemplo n.º 4
0
 public FolderElement(PrimaryKeyId primaryKeyId)
     : base(FolderElement.GetAssignedMetaClass(), primaryKeyId)
 {
 }
Exemplo n.º 5
0
 public FolderElement(PrimaryKeyId primaryKeyId, MetaObjectOptions options)
     : base(FolderElement.GetAssignedMetaClass(), primaryKeyId, options)
 {
 }
Exemplo n.º 6
0
 public FolderElement()
     : base(FolderElement.GetAssignedMetaClass())
 {
 }
Exemplo n.º 7
0
 public FolderElement(MetaObjectOptions options)
     : base(FolderElement.GetAssignedMetaClass(), options)
 {
 }
Exemplo n.º 8
0
 public static int GetTotalCount(params FilterElement[] filters)
 {
     return(MetaObject.GetTotalCount(FolderElement.GetAssignedMetaClass(), filters));
 }
Exemplo n.º 9
0
 public static FolderElement[] List(Mediachase.Ibn.Data.FilterElementCollection filters, Mediachase.Ibn.Data.SortingElementCollection sorting, int start, int count)
 {
     return(MetaObject.List <FolderElement>(FolderElement.GetAssignedMetaClass(), filters, sorting, start, count));
 }
Exemplo n.º 10
0
 public static FolderElement[] List(params Mediachase.Ibn.Data.SortingElement[] sorting)
 {
     return(MetaObject.List <FolderElement>(FolderElement.GetAssignedMetaClass(), sorting));
 }
Exemplo n.º 11
0
 public static FolderElement[] List(params Mediachase.Ibn.Data.FilterElement[] filters)
 {
     return(MetaObject.List <FolderElement>(FolderElement.GetAssignedMetaClass(), filters));
 }
Exemplo n.º 12
0
 public static FolderElement[] List()
 {
     return(MetaObject.List <FolderElement>(FolderElement.GetAssignedMetaClass()));
 }