コード例 #1
0
        public bool Download(string storageobjectfullname, GxFile localFile, GXBaseCollection <SdtMessages_Message> messages)
        {
            try
            {
                ValidProvider();
                string destFileName;

                if (Path.IsPathRooted(localFile.GetAbsoluteName()))
                {
                    destFileName = localFile.GetAbsoluteName();
                }
                else
                {
                    destFileName = Path.Combine(GxContext.StaticPhysicalPath(), localFile.Source);
                }
                provider.Download(storageobjectfullname, destFileName, GxFileType.Public);
                return(true);
            }
            catch (Exception ex)
            {
                StorageMessages(ex, messages);
                return(false);
            }
        }