private void HyperlinkFileDownload_Click(object sender, RoutedEventArgs e)
 {
     if (YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.EnableFileDownload == true &&
         string.IsNullOrEmpty(YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.LocalFileDownloadDirectory) == false)
     {
         FileDownloadPage fileDownloadPage = new FileDownloadPage();
         ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(fileDownloadPage);
     }
     else
     {
         FileDownloadSettingsPage fileDownloadSettingsPage = new FileDownloadSettingsPage();
         ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(fileDownloadSettingsPage);
     }
 }
Exemplo n.º 2
0
 private void HyperlinkDownload_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewSearchResults.SelectedItems.Count != 0)
     {
         if (YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.EnableFileDownload == true &&
             string.IsNullOrEmpty(YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.LocalFileDownloadDirectory) == false)
         {
             if (this.ListViewSearchResults.SelectedItems.Count != 0)
             {
                 Mouse.OverrideCursor = Cursors.Wait;
                 foreach (YellowstonePathology.YpiConnect.Contract.Search.SearchResult searchResult in this.ListViewSearchResults.SelectedItems)
                 {
                     YellowstonePathology.YpiConnect.Contract.CaseDocumentTypeEnum caseDocumentType = (YellowstonePathology.YpiConnect.Contract.CaseDocumentTypeEnum)Enum.Parse(typeof(YellowstonePathology.YpiConnect.Contract.CaseDocumentTypeEnum), YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.DownloadFileType);
                     CaseDocument caseDocument = new CaseDocument(searchResult.ReportNo, caseDocumentType);
                     YellowstonePathology.YpiConnect.Contract.MethodResult methodResult = caseDocument.Save();
                     if (methodResult.Success == false)
                     {
                         string message = "There was an error trying to download the file for " + searchResult.ReportNo +
                                          ".  A message about the error has been sent to YPII support. \n\nWould you like to continue with any other downloads?";
                         MessageBoxResult result = MessageBox.Show(message, "Download Error", MessageBoxButton.YesNo, MessageBoxImage.Question);
                         if (result == MessageBoxResult.No)
                         {
                             break;
                         }
                     }
                 }
                 Mouse.OverrideCursor = null;
                 MessageBox.Show("Download complete.");
             }
         }
         else
         {
             FileDownloadSettingsPage fileDownloadSettingsPage = new FileDownloadSettingsPage();
             ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(fileDownloadSettingsPage);
         }
     }
 }
Exemplo n.º 3
0
 private void HyperlinkFileDownload_Click(object sender, RoutedEventArgs e)
 {
     if (YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.EnableFileDownload == true &&
         string.IsNullOrEmpty(YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.LocalFileDownloadDirectory) == false)
     {
         FileDownloadPage fileDownloadPage = new FileDownloadPage();
         ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(fileDownloadPage);
     }
     else
     {
         FileDownloadSettingsPage fileDownloadSettingsPage = new FileDownloadSettingsPage();
         ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(fileDownloadSettingsPage);
     }
 }
Exemplo n.º 4
0
 private void HyperlinkFileDownload_Click(object sender, RoutedEventArgs e)
 {
     FileDownloadSettingsPage fileDownloadSettingsPage = new FileDownloadSettingsPage();
     ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(fileDownloadSettingsPage);
 }
Exemplo n.º 5
0
        private void HyperlinkFileDownload_Click(object sender, RoutedEventArgs e)
        {
            FileDownloadSettingsPage fileDownloadSettingsPage = new FileDownloadSettingsPage();

            ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(fileDownloadSettingsPage);
        }
 private void HyperlinkDownload_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewSearchResults.SelectedItems.Count != 0)
     {
         if (YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.EnableFileDownload == true &&
             string.IsNullOrEmpty(YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.LocalFileDownloadDirectory) == false)
         {
             if (this.ListViewSearchResults.SelectedItems.Count != 0)
             {
                 Mouse.OverrideCursor = Cursors.Wait;
                 foreach (YellowstonePathology.YpiConnect.Contract.Search.SearchResult searchResult in this.ListViewSearchResults.SelectedItems)
                 {
                     YellowstonePathology.YpiConnect.Contract.CaseDocumentTypeEnum caseDocumentType = (YellowstonePathology.YpiConnect.Contract.CaseDocumentTypeEnum)Enum.Parse(typeof(YellowstonePathology.YpiConnect.Contract.CaseDocumentTypeEnum), YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.DownloadFileType);
                     CaseDocument caseDocument = new CaseDocument(searchResult.ReportNo, caseDocumentType);
                     YellowstonePathology.YpiConnect.Contract.MethodResult methodResult = caseDocument.Save();
                     if (methodResult.Success == false)
                     {
                         string message = "There was an error trying to download the file for " + searchResult.ReportNo +
                             ".  A message about the error has been sent to YPII support. \n\nWould you like to continue with any other downloads?";
                         MessageBoxResult result = MessageBox.Show(message, "Download Error", MessageBoxButton.YesNo, MessageBoxImage.Question);
                         if (result == MessageBoxResult.No)
                         {
                             break;
                         }
                     }
                 }
                 Mouse.OverrideCursor = null;
                 MessageBox.Show("Download complete.");
             }
         }
         else
         {
             FileDownloadSettingsPage fileDownloadSettingsPage = new FileDownloadSettingsPage();
             ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(fileDownloadSettingsPage);
         }
     }
 }