Esempio n. 1
0
        public void SaveOrUpdateFolderTest()
        {
            SecurityContext.AuthenticateMe("*****@*****.**", "111111");

            var    commonDocumentsID = FolderDAO.GetFolderIDCommon(false);
            object folderID          = 0;

            DemoData.ListFolders[0].ParentFolderID = commonDocumentsID;
            DemoData.ListFolders[1].ParentFolderID = commonDocumentsID;

            folderID = FolderDAO.SaveFolder(DemoData.ListFolders[0]);
            folderID = FolderDAO.SaveFolder(DemoData.ListFolders[1]);

            DemoData.ListFolders[2].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[2]);

            DemoData.ListFolders[3].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[3]);

            DemoData.ListFolders[4].ParentFolderID = commonDocumentsID;
            folderID = FolderDAO.SaveFolder(DemoData.ListFolders[4]);

            DemoData.ListFolders[5].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[5]);
            DemoData.ListFolders[6].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[6]);

            DemoData.ListFolders[7].ParentFolderID = commonDocumentsID;
            folderID = FolderDAO.SaveFolder(DemoData.ListFolders[7]);

            DemoData.ListFolders[8].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[8]);
            DemoData.ListFolders[9].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[9]);

            DemoData.ListFolders[10].ParentFolderID = commonDocumentsID;
            folderID = FolderDAO.SaveFolder(DemoData.ListFolders[10]);

            DemoData.ListFolders[11].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[11]);

            DemoData.ListFolders[12].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[12]);
            DemoData.ListFolders[13].ParentFolderID = folderID;
            folderID = FolderDAO.SaveFolder(DemoData.ListFolders[13]);

            DemoData.ListFolders[14].ParentFolderID = folderID;
            folderID = FolderDAO.SaveFolder(DemoData.ListFolders[14]);

            DemoData.ListFolders[15].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[15]);

            DemoData.ListFolders[16].ParentFolderID = folderID;
            FolderDAO.SaveFolder(DemoData.ListFolders[16]);

            Console.WriteLine(folderID);
        }