private void saveButton_Click(object sender, RoutedEventArgs e) { try { switch (EmployerUC_State) { case State.createNew: BE.Employer addEmployer = new BE.Employer(); Globals.CopyObject(UIEmployer, addEmployer); BL_Object.addEmployer(addEmployer); break; case State.modify: BL_Object.updateEmployer(UIEmployer); Employer_DS_Change_Event?.Invoke(); break; default: throw new Exception("EmployerUC State not set"); } Employer_DS_Change_Event?.Invoke(); restoreButtonVisib(); } catch (Exception ex) { Globals.exceptionHandler(ex); } }
private void deleteButton_Click(object sender, RoutedEventArgs e) { try { BL_Object.deleteEmployer(UIEmployer); Employer_DS_Change_Event?.Invoke(); restoreButtonVisib(); } catch (Exception ex) { Globals.exceptionHandler(ex); } }