コード例 #1
0
 /// <summary>
 /// Updates original file content with Eidss Case ID/Status columns and writes result to output stream in original format
 /// Stream must be created in calling method
 /// </summary>
 /// <param name="stream"></param>
 /// <returns>
 /// 0 - success
 /// 1 - error
 /// </returns>
 public int WriteResultToStream(Stream stream)
 {
     if (StoredData == null)
     {
         return(1);
     }
     using (var fileProcessor = new Upload506FileProcessor(this))
     {
         return(fileProcessor.WriteResultToStream(stream));
     }
 }
コード例 #2
0
 ///  <summary>
 /// Updates original file content with Eidss Case ID/Status columns and writes result to output file in original format
 ///  </summary>
 /// <param name="filePath"></param>
 /// <returns>
 ///  0 - success
 ///  1 - error
 ///  </returns>
 public int WriteResultToFile(string filePath)
 {
     try
     {
         using (var fileProcessor = new Upload506FileProcessor(this))
         {
             using (var stream = new FileStream(filePath, FileMode.Create, FileAccess.ReadWrite))
             {
                 var result = fileProcessor.WriteResultToStream(stream);
                 stream.Close();
                 return(result);
             }
         }
     }
     catch (Exception ex)
     {
         LogError.Log("ErrorLog", ex);
         return(1);
     }
 }