Compare commits

..

5 Commits

Author SHA1 Message Date
181199039e [#61] Windows: Use red and green color to indicate type of WineVariety
All checks were successful
Test / Run tests (push) Successful in 1m41s
2025-07-08 10:57:07 +02:00
53b1dedcf2 Windows: Small fixes 2025-07-08 10:57:03 +02:00
4790f8e304 DeliveryService: Fix spacing in tooltip 2025-07-08 10:23:12 +02:00
8ff576257b [#57] MailWindow: Use Task.Run()
All checks were successful
Test / Run tests (push) Successful in 2m0s
2025-07-08 00:19:00 +02:00
6eaa928147 [#57] PaymentAdjustmentWindow: Use Task.Run() 2025-07-07 23:59:41 +02:00

View File

@@ -287,17 +287,17 @@ namespace Elwig.Windows {
if (MemberInput.SelectedItem is not Member m) return;
Mouse.OverrideCursor = Cursors.Wait;
try {
var modAbs = decimal.TryParse(CustomModAbsInput.Text, out var n1) ? (decimal?)n1 : null;
var modRel = decimal.TryParse(CustomModRelInput.Text, out var n2) ? (decimal?)n2 / 100 : null;
var amount = decimal.TryParse(CustomAmountInput.Text, out var n3) ? (decimal?)n3 : null;
var modText = CustomModCommentInput.Text.Trim();
var text = CustomCommentInput.Text.Trim();
await Task.Run(async () => {
using var ctx = new AppDbContext();
if (CustomPayments?.TryGetValue(m.MgNr, out var p) == true) {
ctx.Remove(p);
}
if (sender == SaveCustomButton) {
var modAbs = decimal.TryParse(CustomModAbsInput.Text, out var n1) ? (decimal?)n1 : null;
var modRel = decimal.TryParse(CustomModRelInput.Text, out var n2) ? (decimal?)n2 / 100 : null;
var amount = decimal.TryParse(CustomAmountInput.Text, out var n3) ? (decimal?)n3 : null;
var modText = CustomModCommentInput.Text.Trim();
var text = CustomCommentInput.Text.Trim();
ctx.Add(new PaymentCustom {
MgNr = m.MgNr,
Year = Year,