private void commandBindingCreateExpenseReport_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var dlg = new CreateExpenseReportDialogBox {
                Owner = this
            };

            dlg.ShowDialog();
        }
Exemple #2
0
        private void commandBindingCreateExpenseReport_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            (Application.Current as App).SelectedEmployee = EmployeesList.SelectedItem as Employee;
            var dlg = new CreateExpenseReportDialogBox {
                Owner = this
            };

            dlg.ShowDialog();
        }
 private void commandBindingCreateExpenseReport_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     if (EmployeesList.SelectedItem == null)
     {
         MessageBox.Show(
             "You have to choose an employee to generate an expense report!",
             "No employee selected!",
             MessageBoxButton.OK,
             MessageBoxImage.Error);
     }
     else
     {
         (Application.Current as App).SelectedEmployee = EmployeesList.SelectedItem as Employee;
         var dlg = new CreateExpenseReportDialogBox {
             Owner = this
         };
         dlg.ShowDialog();
     }
 }
Exemple #4
0
 private void commandBindingCreateExpenseReport_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     var dlg = new CreateExpenseReportDialogBox {Owner = this};
     dlg.ShowDialog();
 }