예제 #1
0
 public void SaveAttachments(string[] attachedFilesFullNames, TIS_ATTACHMENT_EXISTS_ACTION attachmentExistsAction)
 {
     foreach (string attachedFileName in attachedFilesFullNames)
     {
         SaveAttachment(attachedFileName, attachmentExistsAction);
     }
 }
예제 #2
0
 public void SaveAttachmentsEx(string filePath, string[] AttachedFileNames, TIS_ATTACHMENT_EXISTS_ACTION attachmentExistsAction)
 {
     foreach (string attachedFileName in AttachedFileNames)
     {
         SaveAttachment(System.IO.Path.Combine(filePath, attachedFileName), attachmentExistsAction);
     }
 }
예제 #3
0
        public void SaveAttachment(string attachment, TIS_ATTACHMENT_EXISTS_ACTION attachmentExistsAction)
        {
            string localFileName;

            if (Path.IsPathRooted(attachment))
            {
                localFileName = attachment;
                attachment    = AttachmentsUtil.GetAttachmentName(attachment);
            }
            else
            {
                localFileName = GetLocalFileName(attachment);
            }

            m_SourceStorage.WriteStorage(attachment, FileUtil.ReadAllBytes(localFileName));
        }
예제 #4
0
 public void SaveStringAsAttachment(string stringBuffer, string attachedFileName, TIS_ATTACHMENT_EXISTS_ACTION attachmentExistsAction)
 {
     SaveByteArrayAsAttachment(StringToBytes(stringBuffer), attachedFileName, attachmentExistsAction);
 }
예제 #5
0
 public void SaveByteArrayAsAttachment(byte[] buffer, string attachedFileName, TIS_ATTACHMENT_EXISTS_ACTION attachmentExistsAction)
 {
     m_SourceStorage.WriteStorage(attachedFileName, buffer);
 }
예제 #6
0
 public void SaveBLOBAsAttachment(MemoryStream binaryBuffer, string attachedFileName, TIS_ATTACHMENT_EXISTS_ACTION enAttachmentExistsAction)
 {
     // Save byte array
     SaveByteArrayAsAttachment(binaryBuffer.GetBuffer(), attachedFileName, enAttachmentExistsAction);
 }
예제 #7
0
 public void CopyAttachment(string sourceAttachedFileName, string targetAttachedFileName, TIS_ATTACHMENT_EXISTS_ACTION enAttachmentExistsAction)
 {
     // Copy attachment
     StaticStorageServices.Copy(
         m_SourceStorage,
         m_SourceStorage,
         sourceAttachedFileName,
         targetAttachedFileName);
 }
예제 #8
0
        public void SaveAttachment(string sourceAttachmentFile, string destinationAttachmentFile, TIS_ATTACHMENT_EXISTS_ACTION attachmentExistsAction)
        {
            string localFileName;

            if (Path.IsPathRooted(sourceAttachmentFile))
            {
                localFileName = sourceAttachmentFile;
            }
            else
            {
                localFileName = GetLocalFileName(sourceAttachmentFile);
            }

            m_SourceStorage.WriteStorage(destinationAttachmentFile, FileUtil.ReadAllBytes(localFileName));
        }