Пример #1
0
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            if (MainDatagrid.SelectedItem == null)
            {
                MessageBox.Show("Необходимо выбрать нужного пользователя");
                return;
            }

            Windows.AddOrEditEmployee window = new AddOrEditEmployee(MainDatagrid.SelectedItem as Worker);
            window.Show();
            this.Close();
        }
Пример #2
0
 private void AddButton_Click(object sender, RoutedEventArgs e)
 {
     Windows.AddOrEditEmployee window = new AddOrEditEmployee(new Worker());
     window.Show();
     this.Close();
 }