ChartWindow: Automatically calculate variant when saved
This commit is contained in:
@ -101,7 +101,7 @@
|
|||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</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"
|
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="10,5,35,10" Grid.Column="0" Grid.Row="2"
|
||||||
Click="SaveButton_Click"/>
|
Click="SaveButton_Click"/>
|
||||||
|
|
||||||
|
@ -651,6 +651,12 @@ namespace Elwig.Windows {
|
|||||||
ctx.Update(PaymentVar);
|
ctx.Update(PaymentVar);
|
||||||
await ctx.SaveChangesAsync();
|
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;
|
LockContext = false;
|
||||||
App.HintContextChange();
|
App.HintContextChange();
|
||||||
} catch (Exception exc) {
|
} catch (Exception exc) {
|
||||||
|
Reference in New Issue
Block a user