Beispiel #1
0
 public void ToggleEditEntry()
 {
     if (SelectedEntry != null)
     {
         EntryDetailsWindow entryDetailsWindow = new EntryDetailsWindow();
         entryDetailsWindow.Owner = System.Windows.Application.Current.MainWindow;
         entryDetailsWindow.ShowDialog();
         VMInteractionHandler.SetEntryToEdit(SelectedEntry);
     }
 }
 public void SaveEntry()
 {
     if (VMInteractionHandler.SelectedEntry == null)
     {
         Entry.CreatedDate    = DateTime.Now;
         Entry.LastEditedDate = DateTime.Now;
         DataBaseHandler.Insert(Entry);
         VMInteractionHandler.UpdateEntryList();
     }
     else
     {
         Entry.LastEditedDate = DateTime.Now;
         DataBaseHandler.Update(Entry);
         VMInteractionHandler.UpdateEntryList();
     }
 }