コード例 #1
0
        private void DecidirFormulario()
        {
            try
            {
                if (gridControl.Children.Contains(frmRegistration))
                {
                    gridControl.Children.Clear();
                }

                frmRegistration = new IndividualRegistration();
                if (rbIndividual.IsChecked.Value)
                {
                    frmRegistration.gridIndividualData.Visibility = Visibility.Visible;
                    frmRegistration.gridCorporateData.Visibility  = Visibility.Hidden;
                }
                else
                {
                    frmRegistration.gridIndividualData.Visibility = Visibility.Hidden;
                    frmRegistration.gridCorporateData.Visibility  = Visibility.Visible;
                }

                gridControl.Children.Add(frmRegistration);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Erro", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
コード例 #2
0
        private void DecidirFormulario()
        {
            if (gridControl.Children.Contains(frmRegistration))
            {
                gridControl.Children.Clear();
            }

            frmRegistration = new IndividualRegistration();
            if (rbIndividual.IsChecked.Value)
            {
                frmRegistration.gridIndividualData.Visibility = Visibility.Visible;
                frmRegistration.gridCorporateData.Visibility  = Visibility.Hidden;
            }
            else
            {
                frmRegistration.gridIndividualData.Visibility = Visibility.Hidden;
                frmRegistration.gridCorporateData.Visibility  = Visibility.Visible;
            }

            gridControl.Children.Add(frmRegistration);
        }