示例#1
0
        private static void showElementen()
        {
            List <Element> elementen = elementManager.getAllElementen();

            foreach (Element element in elementen)
            {
                Console.WriteLine("====================");
                Console.WriteLine(element.Naam + ": " + element.Id);

                if (element.GetType().Equals(typeof(Persoon)))
                {
                    Persoon persoon = (Persoon)element;
                    if (persoon.Organisatie != null)
                    {
                        Console.WriteLine("Organisatie: " + persoon.Organisatie.Naam);
                    }
                    else
                    {
                        Console.WriteLine("Persoon behoort nog niet tot een organisatie");
                    }
                }
                else if (element.GetType().Equals(typeof(Thema)))
                {
                    Console.WriteLine("Keywords: ");
                    Thema thema = (Thema)element;
                    if (thema.Keywords != null)
                    {
                        foreach (Keyword word in thema.Keywords)
                        {
                            if (word != null)
                            {
                                Console.WriteLine(word.KeywordNaam);
                            }
                        }
                    }
                }
            }
        }