Exemple #1
0
 public virtual Result GetResultDocument(string collectRequestID)
 {
     this.CheckCollectRequestID(collectRequestID);
     try
     {
         return(_modSicConnection.GetResultDocument(collectRequestID));
     }
     catch (Exception ex)
     {
         throw new ModSicCallingException(ex.Message);
     }
 }
Exemple #2
0
        private void SaveOvalDocuments(string ovalResults, string collectRequestId)
        {
            if (!String.IsNullOrEmpty(ovalResults))
            {
                SaveFile(resultsFilename, ovalResults);
                SaveStream(htmlFilename, ConvertResultsToHtml(ovalResults));

                view.ShowSaveOvalResultsMessage();

                var systemCharacteristics = GetSystemCharacteristicsFromOvalResults(ovalResults);
                if (!String.IsNullOrEmpty(systemCharacteristics))
                {
                    SaveFile(systemCharacteristicsFilename, systemCharacteristics);
                    view.ShowSaveSystemCharacteristicsMessage();
                }
                else
                {
                    view.ShowSaveSystemCharacteristicsErrorMessage(Resource.ImpossibleToGetSystemCharacteristics);
                }
            }
            else
            {
                view.ShowSaveOvalResultsErrorMessage(Resource.EmptyOVALResults);

                var result = modSicConnection.GetResultDocument(collectRequestId);
                if (result != null)
                {
                    var systemCharacteristics = result.SystemCharacteristics;
                    if (!String.IsNullOrEmpty(systemCharacteristics))
                    {
                        File.WriteAllText(systemCharacteristicsFilename, systemCharacteristics);
                        view.ShowSaveSystemCharacteristicsMessage();
                    }
                }
            }
        }