Exemplo n.º 1
0
        private void ExecuteAddEmployeeCommand()
        {
            var dc = new AddEmployeeViewModel(SelectedItem.Employees.ToList());

            new AddEmployeeWindow()
            {
                DataContext = dc, Owner = Application.Current.MainWindow
            }.ShowDialog();
            if (dc.DialogResult == true)
            {
                SelectedItem.AddEmployee(dc.Employee);
            }
        }