From bb25b9f7ff56bd6504b224468f3a1f08068a0d84 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 28 May 2018 15:02:55 +0200 Subject: [PATCH] cb --- BeWo/View/Detail/CustomerView.xaml.cs | 29 ++++++-- BeWo/View/Detail/OrganisationView.xaml | 55 +++++++++------ BeWo/ViewModel/OrganisationVM.cs | 70 ++++++++++++++++++- BeWo/ViewModel/ServiceRecordVM.cs | 57 ++++++++++----- BeWoPlanerMobil/Controllers/MainController.cs | 16 +++-- BeWoPlanerMobil/Models/MainModel.cs | 2 +- BeWoPlanerMobil/Views/Main/Main.cshtml | 6 +- Data/Entities/Organisation.cs | 20 ++++++ Data/Mappings/Organisation.hbm.xml | 1 + ReportImp/AlphaEv/AlphaEv.csproj | 2 + ReportImp/AlphaEv/CustomReportCreator.cs | 62 +++++++++++++++- .../Properties/licenses.licx | 1 + .../Properties/licenses.licx | 1 + .../FreundeskreisSuchthilfe.csproj | 40 +++++++++++ .../Reporting/FfReportCreator.cs | 10 +++ ReportImp/Hiba/Hiba.csproj | 24 +++++++ .../Hiba/ServicesOverviewReport.Designer.cs | 22 +++--- ReportImp/Hiba/ServicesOverviewReport.cs | 32 +++++++++ ReportImp/VKMAachen/VKMAachen.csproj | 14 ++++ Service/Core/SettingsLogic.cs | 7 +- .../CompactOrganisationDC_Organisation.cs | 3 +- .../OrganisationDC_Organisation.cs | 6 ++ Service/Plugins/PluginLoader.cs | 5 +- Service/Plugins/TranslationDictionary.cs | 2 + .../CustomerServiceImp.cs | 3 +- .../Compact/CompactOrganisationDC.cs | 6 ++ Shared/DataContracts/OrganisationDC.cs | 14 +++- 27 files changed, 431 insertions(+), 79 deletions(-) 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 @@ +