Пример #1
0
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            Person     personToEdit = (Person)MainGrid.SelectedItem;
            EditPerson editModal    = new EditPerson(personToEdit);

            editModal.ShowDialog();
            MainGrid.SelectedIndex = -1;
        }
Пример #2
0
 private void AddButton_Click(object sender, RoutedEventArgs e)
 {
     EditPerson editModal = new EditPerson(new Person() { Id = Guid.NewGuid() });
     if (editModal.ShowDialog().Value)
     {
         People.Add(editModal.Person);
         MainGrid.Items.Refresh();
     }
 }
Пример #3
0
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            EditPerson editModal = new EditPerson(new Person()
            {
                Id = Guid.NewGuid()
            });

            if (editModal.ShowDialog().Value)
            {
                People.Add(editModal.Person);
                MainGrid.Items.Refresh();
            }
        }
Пример #4
0
 private void EditButton_Click(object sender, RoutedEventArgs e)
 {
     Person personToEdit = (Person)MainGrid.SelectedItem;
     EditPerson editModal = new EditPerson(personToEdit);
     editModal.ShowDialog();
     MainGrid.SelectedIndex = -1;
 }