private void deleteButton_Click(object sender, RoutedEventArgs e) { try { Bl_Object.deleteEmployee(UIEmployee); Employee_DS_Change_Event?.Invoke(); restoreRegButtonVisib(); } catch (Exception ex) { Globals.exceptionHandler(ex); } }
private void saveButton_Click(object sender, RoutedEventArgs e) { try { switch (EmployeeUC_State) { case State.createNew: BE.Employee addEmploye = new BE.Employee(); Globals.CopyObject(UIEmployee, addEmploye); Bl_Object.addEmployee(addEmploye); Employee_DS_Change_Event?.Invoke(); break; case State.modify: Bl_Object.updateEmployee(UIEmployee); Employee_DS_Change_Event?.Invoke(); break; } restoreRegButtonVisib(); EmployeeUC_State = State.view; } catch (Exception ex) { Globals.exceptionHandler(ex); } }