コード例 #1
0
ファイル: UsScan.xaml.cs プロジェクト: Mirmillon/Obstetrics
 private void SetGrossesse()
 {
     _pregnancy                    = new Grossesse();
     _pregnancy.Ddg                = Convert.ToDateTime(textBoxDdg.Text);
     _pregnancy.PregnancyKind      = ((Reference)comboBoxPregnancyKind.SelectedItem).Cle;
     _pregnancy.NombreFoetus       = Convert.ToInt32(textBoxNumberFoetus.Text);
     _pregnancy.CleGrossesse       = new DataBase().SetPregnancy(_patient.ClePeople, _pregnancy.Ddr, _pregnancy.Ddr, _pregnancy.PregnancyKind);
     stackPanelHautSup.DataContext = _pregnancy;
 }
コード例 #2
0
ファイル: UsScan.xaml.cs プロジェクト: Mirmillon/Obstetrics
        public UsScan(int clePeople, int cleGrossesse) : this()
        {
            _patient           = new Patient();
            _patient.ClePeople = clePeople;
            _patient           = new DataBase().GetPeopleFemaleByKey(_patient.ClePeople);
            labelTitre.Content = _patient.FullName + " - " + _patient.AgeToday().ToString() + " Y.O";

            _pregnancy = new Grossesse();
            _pregnancy.CleGrossesse = cleGrossesse;
            _pregnancy = new DataBase().GetPregnancyByKey(_pregnancy.CleGrossesse);
            stackPanelHautSup.DataContext = _pregnancy;
            if (new Calcul().NbreSemParDdg(_pregnancy.Ddg) > 15)
            {
                comboBoxPregnancyUscKind.SelectedIndex = 1;
            }
            else
            {
                comboBoxPregnancyUscKind.SelectedIndex = 0;
            }
            //Met ComboBoxPregnancyKind invisivle beca&use kind pregnancy est connue
            switch (_pregnancy.PregnancyKind)
            {
            case 1:
                comboBoxPregnancyKind.Visibility = Visibility.Collapsed;
                labelPregnancyKind.Visibility    = Visibility.Collapsed;
                comboBoxTwin.Visibility          = Visibility.Collapsed;
                break;

            case 2:
                comboBoxPregnancyKind.Visibility = Visibility.Collapsed;
                labelPregnancyKind.Visibility    = Visibility.Collapsed;
                comboBoxTwin.Visibility          = Visibility.Visible;
                break;

            case 3:
                comboBoxPregnancyKind.Visibility = Visibility.Collapsed;
                labelPregnancyKind.Visibility    = Visibility.Collapsed;
                comboBoxTwin.Visibility          = Visibility.Collapsed;
                break;
            }

            SetFoetus(_pregnancy.NombreFoetus);
        }
コード例 #3
0
ファイル: PregnantWoman.cs プロジェクト: Mirmillon/Obstetrics
 public PregnantWoman() : base()
 {
     uneGrossesse = new Grossesse();
 }