Ejemplo n.º 1
0
 private void SetDistribution()
 {
     if (this.m_PanelSetOrder.Distribute == true)
     {
         YellowstonePathology.Business.Client.PhysicianClientDistributionCollection physicianClientDistributionCollection = YellowstonePathology.Business.Gateway.ReportDistributionGateway.GetPhysicianClientDistributionCollection(this.m_AccessionOrder.PhysicianId, this.m_AccessionOrder.ClientId);
         physicianClientDistributionCollection.SetDistribution(this.m_PanelSetOrder, this.m_AccessionOrder);
         this.NotifyPropertyChanged("");
     }
 }
Ejemplo n.º 2
0
 public virtual void HandlDistribution()
 {
     if (this.m_AccessionOrder.ClientId != 0 && this.m_AccessionOrder.PhysicianId != 0)
     {
         if (this.m_PanelSet.NeverDistribute == false)
         {
             if (this.m_PanelSetOrder.Distribute == true)
             {
                 YellowstonePathology.Business.Client.PhysicianClientDistributionCollection physicianClientDistributionCollection = YellowstonePathology.Business.Gateway.ReportDistributionGateway.GetPhysicianClientDistributionCollection(this.m_AccessionOrder.PhysicianId, this.m_AccessionOrder.ClientId);
                 physicianClientDistributionCollection.SetDistribution(this.m_PanelSetOrder, this.m_AccessionOrder);
             }
         }
     }
 }
Ejemplo n.º 3
0
        private void HandleUnsetDistribution()
        {
            List <YellowstonePathology.Business.MasterAccessionNo> caseList = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetCasesWithUnsetDistributions();

            foreach (YellowstonePathology.Business.MasterAccessionNo masterAccessionNo in caseList)
            {
                YellowstonePathology.Business.Test.AccessionOrder accessionOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(masterAccessionNo.Value, this);
                foreach (YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder in accessionOrder.PanelSetOrderCollection)
                {
                    if (panelSetOrder.Final == true && panelSetOrder.Distribute == true)
                    {
                        if (panelSetOrder.TestOrderReportDistributionCollection.Count == 0)
                        {
                            YellowstonePathology.Business.Client.PhysicianClientDistributionCollection physicianClientDistributionCollection = YellowstonePathology.Business.Gateway.ReportDistributionGateway.GetPhysicianClientDistributionCollection(accessionOrder.PhysicianId, accessionOrder.ClientId);

                            if (physicianClientDistributionCollection.Count != 0)
                            {
                                physicianClientDistributionCollection.SetDistribution(panelSetOrder, accessionOrder);
                                this.m_ReportDistributionLogEntryCollection.AddEntry("INFO", "Handle Unset Distribution", null, panelSetOrder.ReportNo, panelSetOrder.MasterAccessionNo,
                                                                                     accessionOrder.PhysicianName, accessionOrder.ClientName, "Distribution Set");
                            }
                            else
                            {
                                this.m_ReportDistributionLogEntryCollection.AddEntry("ERROR", "Handle Unset Distribution", null, panelSetOrder.ReportNo, panelSetOrder.MasterAccessionNo,
                                                                                     accessionOrder.PhysicianName, accessionOrder.ClientName, "No Distribution Defined");

                                System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("*****@*****.**", "*****@*****.**", System.Windows.Forms.SystemInformation.UserName, "No Distribution Defined: " + panelSetOrder.ReportNo);
                                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);
                            }
                        }
                    }
                }
            }

            YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(this);
        }