Exemplo n.º 1
0
        private void AddEditEmployee(object obj)
        {
            var addEditEmployeeWindow = new AddEditEmployeeView(obj as Employee);

            addEditEmployeeWindow.Closed += addEditEmployeeWindow_Closed;
            addEditEmployeeWindow.ShowDialog();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Method for executing add Command, opens view for adding new employee
 /// </summary>
 private void AddNewEmployeeExecute()
 {
     try
     {
         AddEditEmployeeView addEmployee = new AddEditEmployeeView();
         addEmployee.ShowDialog();
         if ((addEmployee.DataContext as AddEditEmployeeViewModel).IsUpdatedEmployee == true)
         {
             EmployeeList = service.GetAllEmployees().ToList();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }