private void ButtonNext_Click(object sender, RoutedEventArgs e)
 {
     YellowstonePathology.Business.Validation.DataValidator dataValidator = this.CreateDataValidator(this.m_PlacentaClientOrderDetail);
     dataValidator.UpdateValidBindingSources();
     YellowstonePathology.Business.Validation.ValidationResult validationResult = dataValidator.ValidateDataTypes();
     if (validationResult.IsValid == false)
     {
         MessageBox.Show("A Pathology Test Order must be selected.");
     }
     else
     {
         validationResult = dataValidator.ValidateDomain();
         if (validationResult.IsValid == false)
         {
             MessageBox.Show("A Pathology Test Order must be selected.");
         }
         else
         {
             if (this.m_PlacentaClientOrderDetail.DateSubmitted.HasValue == false)
             {
                 this.m_PlacentaClientOrderDetail.DateSubmitted = DateTime.Now;
                 this.m_PlacentaClientOrderDetail.SubmittedBy   = YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.DisplayName;
             }
             YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs args = new YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs(YellowstonePathology.YpiConnect.Client.PageNavigationDirectionEnum.Next, null);
             Return(this, args);
         }
     }
 }
Exemple #2
0
 private void ButtonBack_Click(object sender, RoutedEventArgs e)
 {
     YellowstonePathology.Business.Validation.DataValidator dataValidator = this.CreateDataValidator(this.m_ClientOrderDetailClone);
     dataValidator.UpdateValidBindingSources();
     YellowstonePathology.Business.Validation.ValidationResult validationResult = dataValidator.ValidateDataTypes();
     if (validationResult.IsValid == false)
     {
         MessageBox.Show(validationResult.Message);
     }
     else
     {
         YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs args = new YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs(YellowstonePathology.YpiConnect.Client.PageNavigationDirectionEnum.Back, null);
         Return(this, args);
     }
 }
        private void SetContainerIdValidity(bool showMessage)
        {
            bool result = true;

            if (this.ContainerExists() == true)
            {
                result = false;
                if (showMessage == true)
                {
                    MessageBox.Show("The container ID is a duplicate.");
                }
                this.TextBlockContainerId.Focus();
                this.TextBlockContainerId.Select(0, this.TextBlockContainerId.Text.Length);
            }
            else
            {
                YellowstonePathology.Business.Validation.DataValidator dataValidator = this.CreateDataValidator(this.m_ClientOrderDetailClone);
                dataValidator.UpdateValidBindingSources();
                YellowstonePathology.Business.Validation.ValidationResult validationResult = dataValidator.ValidateDataTypes();
                if (validationResult.IsValid == false)
                {
                    result = false;
                    if (showMessage == true)
                    {
                        MessageBox.Show(validationResult.Message);
                    }
                    this.TextBlockContainerId.Focus();
                    this.TextBlockContainerId.Select(0, this.TextBlockContainerId.Text.Length);
                }
                else
                {
                    validationResult = dataValidator.ValidateDomain();
                    if (validationResult.IsValid == false)
                    {
                        result = false;
                        if (showMessage == true)
                        {
                            MessageBox.Show(validationResult.Message);
                        }
                        this.TextBlockContainerId.Focus();
                        this.TextBlockContainerId.Select(0, this.TextBlockContainerId.Text.Length);
                    }
                }
            }
            this.ContainerIdValid = result;
        }
        private void ButtonBack_Click(object sender, RoutedEventArgs e)
        {
            if (this.ContainerExists() == true)
            {
                this.TextBlockContainerId.TextChanged -= this.TextBlockContainerId_TextChanged;
                this.TextBlockContainerId.Text         = this.m_ClientOrderDetailClone.ContainerId;
                this.TextBlockContainerId.TextChanged += this.TextBlockContainerId_TextChanged;
            }

            YellowstonePathology.Business.Validation.DataValidator dataValidator = this.CreateDataValidator(this.m_ClientOrderDetailClone);
            dataValidator.UpdateValidBindingSources();
            YellowstonePathology.Business.Validation.ValidationResult validationResult = dataValidator.ValidateDataTypes();
            if (validationResult.IsValid == false)
            {
                MessageBox.Show(validationResult.Message);
                this.TextBlockContainerId.Focus();
                this.TextBlockContainerId.Select(0, this.TextBlockContainerId.Text.Length);
            }
            else
            {
                YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs args = new YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs(YellowstonePathology.YpiConnect.Client.PageNavigationDirectionEnum.Back, null);
                Return(this, args);
            }
        }
Exemple #5
0
 public void UpdateBindingSources()
 {
     YellowstonePathology.Business.Validation.DataValidator dataValidator = this.CreateDataValidator(this.m_ClientOrderDetailClone);
     dataValidator.UpdateValidBindingSources();
 }