IDocumentStorage Type

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Post Reply
danny.little
Posts: 21
Joined: Fri May 14, 2010 10:18 am

IDocumentStorage Type

Post by danny.little »

the following code adds an attachment to an order, but does not take the type of file.
attachmentname = "Some description";
fileName = "full path to the file, e.g. D:\SoftProConversion\1234567\images\8764839.tif";

The type is not updated so when I click "Preview", it asks me how to the view the file, in windows.

Code: Select all

            attachmentName = attachmentName.Trim();
            SoftPro.OrderTracking.Client.IDocumentImage documentImage = order.DocumentImage.CreateNew();
            documentImage.Trustee = order.CurrentUser;
            documentImage.OriginalLocation = new Uri(fileName);
            int attachmentCount = 2;
            string tmp = attachmentName;
            while (attachmentExists(order, tmp))
            {
                tmp = string.Format("{0} - {1}", attachmentName, attachmentCount);
                attachmentCount++;
            }
            documentImage.Description = tmp;
            documentImage.DocumentImageTypeID = SoftPro.OrderTracking.Client.DocumentImageType.Attached;
Does the type depend on the description, or the Uri?
Thanks
Danny Little
Mark McKenna

Re: IDocumentStorage Type

Post by Mark McKenna »

Hi Danny,

Try setting the IDocumentImage.FileType property to "TIF".
danny.little
Posts: 21
Joined: Fri May 14, 2010 10:18 am

Re: IDocumentStorage Type

Post by danny.little »

That seems to simple Mark, I thought I looked for something like that. But could you make the answer seem a lot more complicated next time :lol:.

I really appreciate all the help.
Thanks
Danny Little
Post Reply