private void ResetDistributionWhenIncompatible(YellowstonePathology.Business.Client.Model.PhysicianClientDistributionListItem physicianClientDistribution)
        {
            YellowstonePathology.Business.Client.Model.Client accessionClient = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientByClientId(this.m_AccessionOrder.ClientId);
            YellowstonePathology.Business.ReportDistribution.Model.IncompatibleDistributionTypeCollection incompatibleDistributionTypeCollection = new Business.ReportDistribution.Model.IncompatibleDistributionTypeCollection();
            bool distributionsAreIncompatible = incompatibleDistributionTypeCollection.TypesAreIncompatible(accessionClient.DistributionType, physicianClientDistribution.DistributionType);

            if (distributionsAreIncompatible == true)
            {
                YellowstonePathology.Business.Client.Model.Client distributionClient = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientByClientId(physicianClientDistribution.ClientId);
                physicianClientDistribution.DistributionType = distributionClient.AlternateDistributionType;
            }
        }
Esempio n. 2
0
        private bool AreDistributionTypesIncompatible(string existingDistributionType, string distributionTypeToAdd)
        {
            YellowstonePathology.Business.ReportDistribution.Model.IncompatibleDistributionTypeCollection incompatibleDistributionTypeCollection = new Business.ReportDistribution.Model.IncompatibleDistributionTypeCollection();
            bool result = incompatibleDistributionTypeCollection.TypesAreIncompatible(existingDistributionType, distributionTypeToAdd);

            return(result);
        }
Esempio n. 3
0
        private bool CanSave()
        {
            bool result = this.MaskNumberIsValid(this.MaskedTextBoxTelephone);

            if (result == true)
            {
                result = this.MaskNumberIsValid(this.MaskedTextBoxFax);
            }
            if (result == true && string.IsNullOrEmpty(this.m_Client.ClientName) == true)
            {
                result = false;
                MessageBox.Show("The Client name may not be blank.");
            }
            if (result == true)
            {
                if (string.IsNullOrEmpty(this.m_Client.DistributionType) == true)
                {
                    result = false;
                    MessageBox.Show("The Distribution Type may not be blank.");
                }
                else if (this.m_Client.DistributionType == YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC ||
                         this.m_Client.DistributionType == YellowstonePathology.Business.ReportDistribution.Model.DistributionType.ATHENA ||
                         this.m_Client.DistributionType == YellowstonePathology.Business.ReportDistribution.Model.DistributionType.MEDITECH ||
                         this.m_Client.DistributionType == YellowstonePathology.Business.ReportDistribution.Model.DistributionType.ECW)
                {
                    if (string.IsNullOrEmpty(this.m_Client.AlternateDistributionType) == true)
                    {
                        result = false;
                        MessageBox.Show("The Alternate Distribution Type must be set when the Distribution Type is " + this.m_Client.DistributionType + ".");
                    }
                }
            }

            if (result == true)
            {
                if (string.IsNullOrEmpty(this.m_Client.AlternateDistributionType) == false)
                {
                    YellowstonePathology.Business.ReportDistribution.Model.IncompatibleDistributionTypeCollection incompatibleDistributionTypeCollection = new Business.ReportDistribution.Model.IncompatibleDistributionTypeCollection();
                    if (incompatibleDistributionTypeCollection.TypesAreIncompatible(this.m_Client.DistributionType, this.m_Client.AlternateDistributionType) == true)
                    {
                        result = false;
                        MessageBox.Show("The Alternate Distribution Type may not be " + this.m_Client.AlternateDistributionType + " when the Distribution Type is " +
                                        this.m_Client.DistributionType + ".");
                    }
                }
            }
            return(result);
        }