private bool TryPublish(YellowstonePathology.Business.Interface.ICaseDocument caseDocument, Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder) { bool result = true; //try //{ //YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum resultDocumentSource; //bool hasEnum = Enum.TryParse<YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum>(panelSetOrder.ResultDocumentSource, out resultDocumentSource); //if(hasEnum == true && resultDocumentSource != YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.PublishedDocument) //{ // caseDocument.Publish(); //} if (panelSetOrder.ResultDocumentSource == YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase.ToString()) { caseDocument.Render(); caseDocument.Publish(); } this.m_ReportDistributionLogEntryCollection.AddEntry("INFO", "Publish Next", null, panelSetOrder.ReportNo, panelSetOrder.MasterAccessionNo, null, null, "PanelSetOrder Published"); //} //catch (Exception publishException) //{ // this.m_ReportDistributionLogEntryCollection.AddEntry("ERROR", "Publish Next", null, panelSetOrder.ReportNo, panelSetOrder.MasterAccessionNo, null, null, publishException.Message); // this.DelayPublishAndDistribution(15, publishException.Message, panelSetOrder); // result = false; //} return(result); }
private void ContextMenuPublish_Click(object sender, RoutedEventArgs e) { if (this.m_CytologyUI.AccessionOrder != null) { YellowstonePathology.Business.Interface.ICaseDocument caseDocument = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(this.m_CytologyUI.AccessionOrder, this.m_CytologyUI.PanelSetOrderCytology, Business.Document.ReportSaveModeEnum.Normal); caseDocument.Render(); caseDocument.Publish(); MessageBox.Show("The document has been published"); } }
private void HyperLinkPublish_Click(object sender, RoutedEventArgs e) { if (this.DoesXPSDocumentExist() == true) { YellowstonePathology.Business.Interface.ICaseDocument caseDocument = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(this.m_AccessionOrder, this.m_PanelSetOrder, Business.Document.ReportSaveModeEnum.Normal); caseDocument.Render(); caseDocument.Publish(); MessageBox.Show("The case was successfully published."); } else { MessageBox.Show("Cannot publish this case until the XPS document is present."); } }
private bool TryPublish(YellowstonePathology.Business.Interface.ICaseDocument caseDocument, Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder) { bool result = true; //try //{ caseDocument.Render(); caseDocument.Publish(); this.m_ReportDistributionLogEntryCollection.AddEntry("INFO", "Publish Next", null, panelSetOrder.ReportNo, panelSetOrder.MasterAccessionNo, null, null, "PanelSetOrder Published"); //} /* * catch (Exception publishException) * { * this.m_ReportDistributionLogEntryCollection.AddEntry("ERROR", "Publish Next", null, panelSetOrder.ReportNo, panelSetOrder.MasterAccessionNo, * null, null, publishException.Message); * * System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("*****@*****.**", "*****@*****.**", System.Windows.Forms.SystemInformation.UserName, publishException.Message); * System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("10.1.2.111"); * * Uri uri = new Uri("http://tempuri.org/"); * System.Net.ICredentials credentials = System.Net.CredentialCache.DefaultCredentials; * System.Net.NetworkCredential credential = credentials.GetCredential(uri, "Basic"); * * client.Credentials = credential; * client.Send(message); * * this.DelayPublishAndDistribution(15, publishException.Message, panelSetOrder); * * result = false; * } */ return(result); }
private void HyperLinkPublish_Click(object sender, RoutedEventArgs e) { if (this.m_PanelSetOrder.Final == true) { YellowstonePathology.Business.Interface.ICaseDocument caseDocument = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(this.m_AccessionOrder, this.m_PanelSetOrder, Business.Document.ReportSaveModeEnum.Normal); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); YellowstonePathology.Business.Rules.MethodResult methodResult = caseDocument.DeleteCaseFiles(orderIdParser); if (methodResult.Success == true) { caseDocument.Render(); caseDocument.Publish(); MessageBox.Show("The document has been published."); } else { MessageBox.Show(methodResult.Message); } } else { MessageBox.Show("You cannot publish this case until it's final."); } }