Beispiel #1
0
        public SecondWindow(MailingList store)
        {
            this.store = store;
            InitializeComponent();

            for (int i = 0; i < store.ids.Count; i++)
            {
                Customer     aCust            = store.find(store.ids[i]);
                string       preferredContact = aCust.getPreferredContact();
                TreeViewItem tv = new TreeViewItem();
                tv.Header = (aCust.ID.ToString() + " " + aCust.FirstName + " " + aCust.SurName);
                tv.Items.Add("Preferred contact: " + preferredContact);
                st.Children.Add(tv);
            }
        }