Пример #1
0
        private void OpenShowTree(object sender, RoutedEventArgs e)
        {
            if (dgrid.SelectedItems.Count == 1)
            {
                ShowTree st = new ShowTree();

                var listaLudzi = new List <IGeneticTreeNode>()
                {
                };
                Person per = (Person)dgrid.SelectedItem;
                listaLudzi.Add(per);
                this.db.personService.GetSomeonesDescendants(listaLudzi, per);
                st.DataContext = listaLudzi;
                st.ShowDialog();
            }
            else
            {
                ShowTree st = new ShowTree();

                var listaLudzi = new List <IGeneticTreeNode>()
                {
                };

                listaLudzi.AddRange(this.db.personService.GetPeople());
                st.DataContext = listaLudzi;
                st.ShowDialog();
            }
        }
Пример #2
0
        private void OpenShowTree(object sender, RoutedEventArgs e)
        {


            if (dgrid.SelectedItems.Count == 1)
            {
                ShowTree st = new ShowTree();

                var listaLudzi = new List<IGeneticTreeNode>() { };
                Person per = (Person)dgrid.SelectedItem;
                listaLudzi.Add(per);
                this.db.personService.GetSomeonesDescendants(listaLudzi, per);
                st.DataContext = listaLudzi;
                st.ShowDialog();
            }
            else
            {
                ShowTree st = new ShowTree();

                var listaLudzi = new List<IGeneticTreeNode>() { };
                
                listaLudzi.AddRange( this.db.personService.GetPeople());
                st.DataContext = listaLudzi;
                st.ShowDialog();
            }




        }