diff --git a/BeWo/View/Detail/CustomerView.xaml.cs b/BeWo/View/Detail/CustomerView.xaml.cs index 716e58b61..57f4fc78a 100644 --- a/BeWo/View/Detail/CustomerView.xaml.cs +++ b/BeWo/View/Detail/CustomerView.xaml.cs @@ -333,22 +333,37 @@ namespace BeWo.View.Detail internal override bool DoSaveCheck() { - if(IsDirty) + if (IsDirty) { - var cdc = ViewModel.CommitToDataContract(); - var message = ServiceFacade.DoCustomerServiceSync(s => s.AllowSavingCustomer(cdc)); - if(!string.IsNullOrEmpty(message)) + MessageBoxResult lResult = this.ShowSaveQuestion(); + if (lResult == MessageBoxResult.Cancel) { - MessageBox.Show(message, "Änderungen speichern", MessageBoxButton.OK, MessageBoxImage.Exclamation); + this.Focus(); return false; } + + if (lResult == MessageBoxResult.Yes) + { + var cdc = ViewModel.CommitToDataContract(); + var message = ServiceFacade.DoCustomerServiceSync(s => s.AllowSavingCustomer(cdc)); + + if (!string.IsNullOrEmpty(message)) + { + MessageBox.Show(message, "Änderungen speichern", MessageBoxButton.OK, + MessageBoxImage.Exclamation); + return false; + } + + this.SaveData(); + } } - return base.DoSaveCheck(); + return true; + } - + protected override void Save() { if (!_saveInProgress) diff --git a/BeWo/View/Detail/OrganisationView.xaml b/BeWo/View/Detail/OrganisationView.xaml index f285d3fc2..ff18576a5 100644 --- a/BeWo/View/Detail/OrganisationView.xaml +++ b/BeWo/View/Detail/OrganisationView.xaml @@ -100,25 +100,30 @@ +