예제 #1
0
        private void OpenShowInheritorsForm(object sender, RoutedEventArgs e)
        {
            if (dgrid.SelectedItems.Count == 1)
            {
                ShowInheritorsForm sif = new ShowInheritorsForm();

                Person pp = (Person)dgrid.SelectedItem;
                sif.Title       = "Spadkobiercy - " + pp.Name;
                sif.DataContext = this.db.personService.GetInheritors(pp);
                sif.ShowDialog();
            }
        }
예제 #2
0
        private void OpenShowCiugewaAncestors(object sender, RoutedEventArgs e)
        {
            if (dgrid.SelectedItems.Count == 2)
            {
                ShowInheritorsForm sif  = new ShowInheritorsForm();
                Person             per1 = (Person)dgrid.SelectedItems[0];
                Person             per2 = (Person)dgrid.SelectedItems[1];

                sif.Title       = "Wspólni przodkowie";
                sif.DataContext = this.db.personService.GetCommonAncestors(per1, per2);

                sif.ShowDialog();
            }
        }
예제 #3
0
        private void OpenShowCiugewaAncestors(object sender, RoutedEventArgs e)
        {


            if (dgrid.SelectedItems.Count == 2)
            {
                ShowInheritorsForm sif = new ShowInheritorsForm();
                Person per1 = (Person)dgrid.SelectedItems[0];
                Person per2 = (Person)dgrid.SelectedItems[1];

                sif.Title = "Wspólni przodkowie";
                sif.DataContext = this.db.personService.GetCommonAncestors(per1, per2);

                sif.ShowDialog();
            }

        }
예제 #4
0
 private void OpenShowInheritorsForm(object sender, RoutedEventArgs e)
 {
     if (dgrid.SelectedItems.Count == 1)
     {
         ShowInheritorsForm sif = new ShowInheritorsForm();
         
         Person pp = (Person)dgrid.SelectedItem;
         sif.Title = "Spadkobiercy - "+pp.Name;
         sif.DataContext = this.db.personService.GetInheritors(pp);
         sif.ShowDialog();
     }
 }