private void Speichern(object obj) { try { NotenSaveAble(); foreach (Leistung l in LstLeistungen) { l.LetzteÄnderung = DateTime.Now; DBZugriff.Current.Speichern(l, false); } DBZugriff.Current.Save(); try { CloseAfterSaveRequesting?.Invoke(this, new EventArgs()); } catch (Exception e) { Trace.WriteLine("[LeiEdit] InvokeFailed: " + e.ToString()); } } catch (Exception e) { MessageBoxRequest?.Invoke(this, new MessageBoxEventArgs(new Action <System.Windows.MessageBoxResult>((MessageBoxResult) => { }), "Fehler beim Speichern: " + e.Message, "Fehler", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error)); Trace.WriteLine("[LeiEdit] Speichern: " + e.ToString()); } }
private void Speichern(object obj) { try { CLeistung.LetzteÄnderung = DateTime.Now; CLeistung.Speichern(); try { CloseAfterSaveRequesting?.Invoke(this, new EventArgs()); } catch (Exception e) { Trace.WriteLine("[LeiEdit] InvokeFailed: " + e.ToString()); } } catch (Exception e) { Trace.WriteLine("[LeiEdit] Speichern: " + e.ToString()); } }