diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs
index f8c3468ed..8dd9d2dfd 100644
--- a/BeWo/ServiceProxy/Generated.cs
+++ b/BeWo/ServiceProxy/Generated.cs
@@ -9408,6 +9408,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/UpdateGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/UpdateGkvAbrechnungResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/UpdateGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.GkvAbrechnungDC UpdateGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnungDC abrechnung);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/DeleteGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/DeleteGkvAbrechnungResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/DeleteGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void DeleteGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnungDC abrechnung);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -9628,6 +9632,11 @@ namespace BeWo.ServiceProxy
{
return base.Channel.UpdateGkvAbrechnung(abrechnung);
}
+
+ public void DeleteGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnungDC abrechnung)
+ {
+ base.Channel.DeleteGkvAbrechnung(abrechnung);
+ }
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
diff --git a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml
index daf536411..fa3747cc5 100644
--- a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml
+++ b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml
@@ -54,11 +54,11 @@
-
- -->
+ -->
+
diff --git a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs
index 7b7222d0b..da5d82e57 100644
--- a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs
+++ b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs
@@ -175,6 +175,17 @@ namespace BeWo.View.Detail.Accounting
BeWoWindowBuilder.GetGkvAbrechnungDetailWindow(vm).ShowDialog();
}
+ private void btn_delete_Click(object sender, RoutedEventArgs e)
+ {
+ var vm = datagrid_gkvAbrechnungen.GetCurrentValue();
+
+ if (MessageBox.Show("Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung löschen möchten?", "GKV-Abrechnung löschen", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
+ {
+ _Viewmodel.VMList.Remove(vm);
+
+ ServiceFacade.DoAccountingServiceAsync(s => s.DeleteGkvAbrechnung(vm.CommitToDataContract()));
+ }
+ }
private void NewButton_OnClick(object sender, RoutedEventArgs e)
{
GkvAbrechnungDC gkvAbrechnungDC = new GkvAbrechnungDC();
@@ -236,7 +247,9 @@ namespace BeWo.View.Detail.Accounting
private void SaveBezahltChange(GkvAbrechnungVM vm, bool b)
{
+ var dc = ServiceFacade.DoAccountingServiceSync(x => x.UpdateGkvAbrechnung(vm.CommitToDataContract()));
+ vm.Update(dc);
}
private void SaveNoticeChange(GkvAbrechnungVM vm, string notice)
diff --git a/Service/ServiceContracts/IAccountingService.cs b/Service/ServiceContracts/IAccountingService.cs
index d717640b7..458278eed 100644
--- a/Service/ServiceContracts/IAccountingService.cs
+++ b/Service/ServiceContracts/IAccountingService.cs
@@ -159,5 +159,9 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
GkvAbrechnungDC UpdateGkvAbrechnung(GkvAbrechnungDC abrechnung);
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ void DeleteGkvAbrechnung(GkvAbrechnungDC abrechnung);
}
}
\ No newline at end of file
diff --git a/Service/ServiceImplementations/AccountingServiceImp.cs b/Service/ServiceImplementations/AccountingServiceImp.cs
index b5ee3e86c..9052ff84f 100644
--- a/Service/ServiceImplementations/AccountingServiceImp.cs
+++ b/Service/ServiceImplementations/AccountingServiceImp.cs
@@ -835,6 +835,18 @@ namespace BeWo.Service.ServiceImplementations
}
}
+ public void DeleteGkvAbrechnung(GkvAbrechnungDC abrechnung)
+ {
+ try
+ {
+ ServiceLogic.SetActivationType(abrechnung.GkvAbrechnungOid.Value, abrechnung.GkvAbrechnungVersion.Value, ActivationTypeId.Deleted);
+ }
+ catch (Exception e)
+ {
+ throw Utils.CreateBeWoFaultException(e);
+ }
+ }
+
public List InsertNewGkvAbrechnungen(List dcList)
{