Esempio n. 1
0
        public YellowstonePathology.Business.Rules.MethodResult IsOkToSetResults()
        {
            YellowstonePathology.Business.Rules.MethodResult result = new YellowstonePathology.Business.Rules.MethodResult();
            YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisResultCollection cysticFibrosisResultCollection = CysticFibrosisResultCollection.GetAllResults();
            YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisResult           cysticFibrosisResult           = cysticFibrosisResultCollection.GetResult(this.m_ResultCode);

            YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisEthnicGroupCollection cysticFibrosisEthnicGroupCollection = new CysticFibrosisEthnicGroupCollection();
            YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisEthnicGroup           cysticFibrosisEthnicGroup           = cysticFibrosisEthnicGroupCollection.GetCysticFibrosisEthnicGroup(this.m_EthnicGroupId);

            if (this.Accepted == true)
            {
                result.Success = false;
                result.Message = "The results cannot be set because they have already been accepted";
            }
            else if (cysticFibrosisResult is YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisNullResult)
            {
                result.Success = false;
                result.Message = "The results cannot be set because the result has not been selected.";
            }
            else if (cysticFibrosisEthnicGroup is YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisEthnicGroupNull)
            {
                result.Success = false;
                result.Message = "The results cannot be set because the ethnic group has not been selected.";
            }
            else if (this.DoesResultReflectFindings() == false)
            {
                result.Success = false;
                result.Message = "The results cannot be accepted because the individual mutation results are not consistent with the selected result.";
            }

            return(result);
        }
Esempio n. 2
0
 private void HyperLinkSetResults_Click(object sender, RoutedEventArgs e)
 {
     YellowstonePathology.Business.Rules.MethodResult methodResult = this.m_PanelSetOrder.IsOkToSetResults();
     if (methodResult.Success == true)
     {
         YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisEthnicGroup cysticFibrosisEthnicGroup = new YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisEthnicGroupUnknown();
         if (this.ComboBoxEthnicGroup.SelectedItem != null)
         {
             cysticFibrosisEthnicGroup = (YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisEthnicGroup) this.ComboBoxEthnicGroup.SelectedItem;
         }
         YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisResult cysticFibrosisResult = (YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisResult) this.m_ResultCollection.GetResult(this.m_PanelSetOrder);
         cysticFibrosisResult.SetResults(this.m_PanelSetOrder, cysticFibrosisEthnicGroup);
     }
     else
     {
         MessageBox.Show(methodResult.Message);
     }
 }