Пример #1
0
        private void MenuItem_AddPersonClick(object sender, RoutedEventArgs e)
        {
            AddEditDialog dlg = new AddEditDialog(this);

            if (dlg.ShowDialog() == true)
            {
                RefreshList();
                UpdateStatus("Added Person");
            }
        }
Пример #2
0
        private void lvPeople_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Person currPerson = lvPeople.SelectedItem as Person;

            if (currPerson == null)
            {
                return;
            }

            AddEditDialog dlg = new AddEditDialog(this, currPerson);

            if (dlg.ShowDialog() == true)
            {
                RefreshList();
                UpdateStatus("Person Updated");
            }
        }