Example #1
0
        public string GetFileCopySchema(int profileId)
        {
            var fileFolderSchema = new Services.Client.FileFolderCopySchema()
            {
                FilesAndFolders = new List <FileFolderCopy>()
            };
            var counter = 0;

            foreach (var profileFileFolder in ImageProfileFileFolder.SearchImageProfileFileFolders(profileId))
            {
                counter++;
                var fileFolder = BLL.FileFolder.GetFileFolder(profileFileFolder.FileFolderId);

                var clientFileFolder = new Services.Client.FileFolderCopy();
                clientFileFolder.SourcePath           = fileFolder.Path;
                clientFileFolder.DestinationFolder    = profileFileFolder.DestinationFolder;
                clientFileFolder.DestinationPartition = profileFileFolder.DestinationPartition;
                clientFileFolder.FolderCopyType       = profileFileFolder.FolderCopyType;

                fileFolderSchema.FilesAndFolders.Add(clientFileFolder);
            }
            fileFolderSchema.Count = counter.ToString();
            return(JsonConvert.SerializeObject(fileFolderSchema));
        }
Example #2
0
        public string GetFileCopySchema(int profileId)
        {
            var fileFolderSchema = new Services.Client.FileFolderCopySchema() {FilesAndFolders = new List<FileFolderCopy>()};
            var counter = 0;
            foreach (var profileFileFolder in ImageProfileFileFolder.SearchImageProfileFileFolders(profileId))
            {
                counter++;
                var fileFolder = BLL.FileFolder.GetFileFolder(profileFileFolder.FileFolderId);

                var clientFileFolder = new Services.Client.FileFolderCopy();
                clientFileFolder.SourcePath = fileFolder.Path;
                clientFileFolder.DestinationFolder = profileFileFolder.DestinationFolder;
                clientFileFolder.DestinationPartition = profileFileFolder.DestinationPartition;
                clientFileFolder.FolderCopyType = profileFileFolder.FolderCopyType;

                fileFolderSchema.FilesAndFolders.Add(clientFileFolder);
            }
            fileFolderSchema.Count = counter.ToString();
            return JsonConvert.SerializeObject(fileFolderSchema);
        }