Esempio n. 1
0
 public void MoveFromDocument(string libraryName, string documentName)
 {
     Dataphoria.CheckDocumentOverwrite(LibraryName, documentName);
     Dataphoria.ExecuteScript
     (
         String.Format
         (
             ".Frontend.MoveDocument('{0}', '{1}', '{2}', '{3}');",
             DAE.Schema.Object.EnsureRooted(libraryName),
             DAE.Schema.Object.EnsureRooted(documentName),
             DAE.Schema.Object.EnsureRooted(LibraryName),
             documentName
         )
     );
     ReconcileChildren();
 }
Esempio n. 2
0
        public void CopyFromFiles(Array fileList)
        {
            FileStream           stream;
            DocumentDesignBuffer buffer;

            foreach (string fileName in fileList)
            {
                buffer = new DocumentDesignBuffer(Dataphoria, LibraryName, Path.GetFileNameWithoutExtension(fileName));
                Dataphoria.CheckDocumentOverwrite(buffer.LibraryName, buffer.DocumentName);
                buffer.DocumentType = Program.DocumentTypeFromFileName(fileName);
                stream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
                try
                {
                    buffer.SaveBinaryData(stream);
                }
                finally
                {
                    stream.Close();
                }
            }
            ReconcileChildren();
        }