Пример #1
0
        private void BtnEditEmployee_Click(object sender, RoutedEventArgs e)
        {
            var employee = lvEmployees.SelectedItems[0] as Employee;

            bool?result = new AddEmployee(employee)
            {
                Owner = this
            }.ShowDialog();
        }
Пример #2
0
        private void BtnAddEmployee_Click(object sender, RoutedEventArgs e)
        {
            var result = new AddEmployee()
            {
                Owner = this
            }.ShowDialog();

            if (result == false)
            {
                // Update ListView
                lvEmployees.ItemsSource = GetEmployeesFromRepository();
            }
        }