示例#1
0
    void DownloadSingleFile(string file, bool findLatest, DateTime?lastModifiedDTime, string locationCode, ref GINIX_EDMServices.EdmServicesForKit uploader)
    {
        int chunkCounter = 0;

        Byte[] fileData = new Byte[64000];
        do
        {
            try
            {
                fileData = uploader.FetchFileChunk(file, findLatest, lastModifiedDTime, locationCode, chunkCounter);
                if (fileData != null)
                {
                    SaveDocument(fileData, chunkCounter, file);
                    chunkCounter++;
                }
                else
                {
                    break;
                }
            }
            catch (Exception exp)
            {
                break;
            }
        }while (true);
    }
示例#2
0
    public void DownloadTheNewlyUploadedDocument(string srcPath, string tgtPath)
    {
        int chunkCounter = 0;

        Byte[] fileData = new Byte[64000];
        GINIX_EDMServices.EdmServicesForKit uploader = new GINIX_EDMServices.EdmServicesForKit();
        do
        {
            try
            {
                string locationCode = ConfigurationManager.AppSettings["print_server_location"];
                fileData = uploader.FetchFileChunk(srcPath, false, null, locationCode, chunkCounter);
                if (fileData != null)
                {
                    SaveDocument(fileData, chunkCounter, tgtPath);
                    chunkCounter++;
                }
                else
                {
                    LogWriter.WriteLog("counter:" + chunkCounter++);
                    break;
                }
            }
            catch (Exception exp)
            {
                break;
            }
        }while (true);
    }