From anonymous, 9 Months ago, written in Plain Text.
Embed
  1. From 84f2a6920d9d01b2b5c59ecbcb9e97ddbed5c4b3 Mon Sep 17 00:00:00 2001
  2. From: Florian Bruhin <git@the-compiler.org>
  3. Date: Sun, 17 Dec 2017 11:42:28 -0800
  4. Subject: [PATCH] Attempted fix
  5.  
  6. ---
  7.  AutoReservation.Gui/ViewModels/AutoDetailViewModel.cs        | 2 ++
  8.  AutoReservation.Gui/ViewModels/AutoViewModel.cs              | 1 -
  9.  AutoReservation.Gui/ViewModels/KundeDetailViewModel.cs       | 2 ++
  10.  AutoReservation.Gui/ViewModels/KundeViewModel.cs             | 1 -
  11.  AutoReservation.Gui/ViewModels/ReservationDetailViewModel.cs | 2 ++
  12.  AutoReservation.Gui/ViewModels/ReservationViewModel.cs       | 1 -
  13.  6 files changed, 6 insertions(+), 3 deletions(-)
  14.  
  15. diff --git a/AutoReservation.Gui/ViewModels/AutoDetailViewModel.cs b/AutoReservation.Gui/ViewModels/AutoDetailViewModel.cs
  16. index 705bdfa..9de3c03 100644
  17. --- a/AutoReservation.Gui/ViewModels/AutoDetailViewModel.cs
  18. +++ b/AutoReservation.Gui/ViewModels/AutoDetailViewModel.cs
  19. @@ -93,6 +93,8 @@ namespace AutoReservation.Gui.ViewModels
  20.                      Service.UpdateAuto(SelectedAuto);
  21.                  }
  22.                  _navigation.NavigateBack();
  23. +                Autos.Add(SelectedAuto);
  24. +                Load();
  25.              }
  26.              catch (FaultException<DBConcurrencyFault> e)
  27.              {
  28. diff --git a/AutoReservation.Gui/ViewModels/AutoViewModel.cs b/AutoReservation.Gui/ViewModels/AutoViewModel.cs
  29. index 1ebc811..1101518 100644
  30. --- a/AutoReservation.Gui/ViewModels/AutoViewModel.cs
  31. +++ b/AutoReservation.Gui/ViewModels/AutoViewModel.cs
  32. @@ -83,7 +83,6 @@ namespace AutoReservation.Gui.ViewModels
  33.              try
  34.              {
  35.                  var auto = new AutoDto();
  36. -                Autos.Add(auto);
  37.                  SelectedAuto = auto;
  38.                  if (_detailFactory != null)
  39.                  {
  40. diff --git a/AutoReservation.Gui/ViewModels/KundeDetailViewModel.cs b/AutoReservation.Gui/ViewModels/KundeDetailViewModel.cs
  41. index a1fbbbd..229c753 100644
  42. --- a/AutoReservation.Gui/ViewModels/KundeDetailViewModel.cs
  43. +++ b/AutoReservation.Gui/ViewModels/KundeDetailViewModel.cs
  44. @@ -93,6 +93,8 @@ namespace AutoReservation.Gui.ViewModels
  45.                      Service.UpdateKunde(SelectedKunde);
  46.                  }
  47.                  _navigation.NavigateBack();
  48. +                Kunden.Add(SelectedKunde);
  49. +                Load();
  50.              }
  51.              catch (FaultException<DBConcurrencyFault> e)
  52.              {
  53. diff --git a/AutoReservation.Gui/ViewModels/KundeViewModel.cs b/AutoReservation.Gui/ViewModels/KundeViewModel.cs
  54. index 22e4fa8..1657286 100644
  55. --- a/AutoReservation.Gui/ViewModels/KundeViewModel.cs
  56. +++ b/AutoReservation.Gui/ViewModels/KundeViewModel.cs
  57. @@ -86,7 +86,6 @@ namespace AutoReservation.Gui.ViewModels
  58.                  {
  59.                      Geburtsdatum = DateTime.Today
  60.                  };
  61. -                Kunden.Add(kunde);
  62.                  SelectedKunde = kunde;
  63.                  var detailView = _detailFactory.CreateDetailViewModel(ServiceFactory, _navigation, DialogService);
  64.                  detailView.SelectedKunde = kunde;
  65. diff --git a/AutoReservation.Gui/ViewModels/ReservationDetailViewModel.cs b/AutoReservation.Gui/ViewModels/ReservationDetailViewModel.cs
  66. index 3d6a1e3..c63bfc1 100644
  67. --- a/AutoReservation.Gui/ViewModels/ReservationDetailViewModel.cs
  68. +++ b/AutoReservation.Gui/ViewModels/ReservationDetailViewModel.cs
  69. @@ -146,6 +146,8 @@ namespace AutoReservation.Gui.ViewModels
  70.                      Service.UpdateReservation(SelectedReservation);
  71.                  }
  72.                  _navigation.NavigateBack();
  73. +                Reservationen.Add(SelectedReservation);
  74. +                Load();
  75.              }
  76.              catch (FaultException<DateRangeFault> e)
  77.              {
  78. diff --git a/AutoReservation.Gui/ViewModels/ReservationViewModel.cs b/AutoReservation.Gui/ViewModels/ReservationViewModel.cs
  79. index 67074a5..12577c3 100644
  80. --- a/AutoReservation.Gui/ViewModels/ReservationViewModel.cs
  81. +++ b/AutoReservation.Gui/ViewModels/ReservationViewModel.cs
  82. @@ -181,7 +181,6 @@ namespace AutoReservation.Gui.ViewModels
  83.                      Von = DateTime.Today,
  84.                      Bis = DateTime.Today
  85.                  };
  86. -                Reservationen.Add(reservation);
  87.                  SelectedReservation = reservation;
  88.  
  89.                  var detailView = _detailFactory.CreateDetailViewModel(ServiceFactory, _navigation, DialogService);
  90. --
  91. 2.13.0.windows.1
  92.  
  93.