Beispiel #1
0
        private void generatePersons(int count)
        {
            for (int i = 0; i < count; i++)
            {
                var person = new Person();

                person.nachname = generatePersonNachname();

                person.gender = generatePersonGender();

                person.vorname = generatePersonVorname(person.gender);  

                person.dateofbirth = generateAge(16, 40);

                person.familyStatz = generateFamilyStatus();

                person.zipcode = generateZipCode();

                App._persons.Add(person);
            }
            lb_persons.ItemsSource = App._persons;
        }
Beispiel #2
0
 private void AppBarButton_add_OnClick(object sender, RoutedEventArgs e)
 {
     var p = new Person {vorname = "Please", nachname = "change"};
     App._persons.Add(p);
     lb_persons.SelectedIndex = App._persons.Count - 1;
 }