示例#1
0
        public bool DeleteFolder(FolderVO folder)
        {
            DocumentsManager documentManager = new DocumentsManager();

            folder.Folders   = ((IFolderDAO)dataAccessObject).GetSubFoldersOfFolder(folder);
            folder.Documents = documentManager.GetDocumentsOfFolder(folder);

            foreach (DocumentVO d in folder.Documents)
            {
                if (!documentManager.Delete(d))
                {
                    return(false);
                }
            }

            foreach (FolderVO f in folder.Folders)
            {
                if (!DeleteFolder(f))
                {
                    return(false);
                }
            }
            return(Delete(folder));
        }