コード例 #1
0
        private void addCase_Click(object sender, RoutedEventArgs e)
        {
            selectCitizen sc = new selectCitizen();
            if(sc.ShowDialog() ?? false)
            {
                ObservableCollection<Citizen> cns = (ObservableCollection<Citizen>)this.CaseRelatedPersonList.ItemsSource;

                if (cns == null)
                {
                    cns = new ObservableCollection<Citizen>();
                }

                Citizen c = (Citizen)sc.Addo;
                cns.Add(c);
                this.CaseRelatedPersonList.ItemsSource = cns;
            }
        }
コード例 #2
0
 private void changePerson_Click(object sender, RoutedEventArgs e)
 {
     selectCitizen sc = new selectCitizen();
     if (sc.ShowDialog() ?? false)
     {
         Citizen c = (Citizen)sc.Addo;
         themanager = c;
         this.CarOfPersonID.Text = c.PKID;
     }
 }