ChartWindow: Automatically calculate variant when saved
This commit is contained in:
@ -101,7 +101,7 @@
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Button x:Name="SaveButton" Content="Speichern" IsEnabled="False"
|
||||
<Button x:Name="SaveButton" Content="Speichern & Berechnen" IsEnabled="False"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="10,5,35,10" Grid.Column="0" Grid.Row="2"
|
||||
Click="SaveButton_Click"/>
|
||||
|
||||
|
@ -651,6 +651,12 @@ namespace Elwig.Windows {
|
||||
ctx.Update(PaymentVar);
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
try {
|
||||
var b = new BillingVariant(PaymentVar.Year, PaymentVar.AvNr);
|
||||
await b.Calculate();
|
||||
} catch (Exception exc) {
|
||||
MessageBox.Show(exc.Message, "Berechnungsfehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
LockContext = false;
|
||||
App.HintContextChange();
|
||||
} catch (Exception exc) {
|
||||
|
Reference in New Issue
Block a user