private void HyperlinkViewDocument_Click(object sender, RoutedEventArgs e)
        {
            Hyperlink hyperLink = (Hyperlink)sender;

            YellowstonePathology.YpiConnect.Contract.RemoteFile remoteFile = (YellowstonePathology.YpiConnect.Contract.RemoteFile)hyperLink.Tag;

            if (remoteFile.IsDownloaded == false)
            {
                YellowstonePathology.YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
                fileTransferServiceProxy.Download(ref remoteFile, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
            }

            if (remoteFile.Extension == ".XPS")
            {
                XpsDocument       xpsDocument       = XpsDocumentHelper.FromMemoryStream(remoteFile.MemoryStream);
                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(xpsDocument);
                xpsDocumentViewer.ShowDialog();
            }

            if (remoteFile.Extension == ".TIF")
            {
                TifDocumentViewer tifDocumentViewer = new TifDocumentViewer();
                tifDocumentViewer.Load(remoteFile.MemoryStream);
                tifDocumentViewer.ShowDialog();
            }
        }
        private void HyperlinkPackingSlip_Click(object sender, RoutedEventArgs e)
        {
            this.Save();

            YellowstonePathology.YpiConnect.Proxy.ClientOrderServiceProxy proxy = new Proxy.ClientOrderServiceProxy();
            System.Xml.Linq.XElement packingSlipElement = proxy.PackingSlipReport(this.m_Shipment.ShipmentId);
            PackingSlipData          packingSlipData    = new PackingSlipData(packingSlipElement);
            PackingSlip packingSlip = new PackingSlip(packingSlipData);

            XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();

            xpsDocumentViewer.LoadDocument(packingSlip.FixedDocument);
            xpsDocumentViewer.ShowDialog();
        }
Beispiel #3
0
        private void HyperlinkPackingSlip_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewShipments.SelectedItem != null)
            {
                this.Save();
                YellowstonePathology.Business.ClientOrder.Model.ShipmentListItem shipmentListItem = (YellowstonePathology.Business.ClientOrder.Model.ShipmentListItem) this.ListViewShipments.SelectedItem;
                YellowstonePathology.YpiConnect.Proxy.ClientOrderServiceProxy    proxy            = new Proxy.ClientOrderServiceProxy();
                System.Xml.Linq.XElement packingSlipElement = proxy.PackingSlipReport(shipmentListItem.ShipmentId);
                PackingSlipData          packingSlipData    = new PackingSlipData(packingSlipElement);
                PackingSlip packingSlip = new PackingSlip(packingSlipData);

                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(packingSlip.FixedDocument);
                xpsDocumentViewer.ShowDialog();
            }
        }
Beispiel #4
0
        public void ViewDocument(YellowstonePathology.YpiConnect.Contract.Search.SearchResult searchResult)
        {
            CaseDocument caseDocument = new CaseDocument(searchResult.ReportNo, YellowstonePathology.YpiConnect.Contract.CaseDocumentTypeEnum.XPS);

            YellowstonePathology.YpiConnect.Contract.MethodResult methodResult = caseDocument.Download();
            if (methodResult.Success == true)
            {
                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(caseDocument.XpsDocument);
                xpsDocumentViewer.ShowDialog();
            }
            else
            {
                System.Windows.MessageBox.Show(methodResult.Message);
            }
        }
        private void HyperlinkViewDocument_Click(object sender, RoutedEventArgs e)
        {
            Hyperlink hyperLink = (Hyperlink)sender;
            YellowstonePathology.YpiConnect.Contract.RemoteFile remoteFile = (YellowstonePathology.YpiConnect.Contract.RemoteFile)hyperLink.Tag;

            if (remoteFile.IsDownloaded == false)
            {
                YellowstonePathology.YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
                fileTransferServiceProxy.Download(ref remoteFile, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
            }

            if (remoteFile.Extension == ".XPS")
            {
                XpsDocument xpsDocument = XpsDocumentHelper.FromMemoryStream(remoteFile.MemoryStream);
                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(xpsDocument);
                xpsDocumentViewer.ShowDialog();
            }

            if (remoteFile.Extension == ".TIF")
            {
                TifDocumentViewer tifDocumentViewer = new TifDocumentViewer();
                tifDocumentViewer.Load(remoteFile.MemoryStream);
                tifDocumentViewer.ShowDialog();
            }
        }
        private void HyperlinkPackingSlip_Click(object sender, RoutedEventArgs e)
        {
            this.Save();

            YellowstonePathology.YpiConnect.Proxy.ClientOrderServiceProxy proxy = new Proxy.ClientOrderServiceProxy();
            System.Xml.Linq.XElement packingSlipElement = proxy.PackingSlipReport(this.m_Shipment.ShipmentId);
            PackingSlipData packingSlipData = new PackingSlipData(packingSlipElement);
            PackingSlip packingSlip = new PackingSlip(packingSlipData);

            XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
            xpsDocumentViewer.LoadDocument(packingSlip.FixedDocument);
            xpsDocumentViewer.ShowDialog();
        }
        private void HyperlinkPackingSlip_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewShipments.SelectedItem != null)
            {
                this.Save();
                YellowstonePathology.Business.ClientOrder.Model.ShipmentListItem shipmentListItem = (YellowstonePathology.Business.ClientOrder.Model.ShipmentListItem)this.ListViewShipments.SelectedItem;
                YellowstonePathology.YpiConnect.Proxy.ClientOrderServiceProxy proxy = new Proxy.ClientOrderServiceProxy();
                System.Xml.Linq.XElement packingSlipElement = proxy.PackingSlipReport(shipmentListItem.ShipmentId);
                PackingSlipData packingSlipData = new PackingSlipData(packingSlipElement);
                PackingSlip packingSlip = new PackingSlip(packingSlipData);

                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(packingSlip.FixedDocument);
                xpsDocumentViewer.ShowDialog();
            }
        }