PaymentVariantsWindow: Never lock seasons
All checks were successful
Test / Run tests (push) Successful in 2m27s

This commit is contained in:
2026-02-19 16:12:54 +01:00
parent a47904cf0b
commit 7e22759c33
3 changed files with 4 additions and 11 deletions

View File

@@ -16,16 +16,14 @@ namespace Elwig.Windows {
public partial class PaymentAdjustmentWindow : ContextWindow {
public readonly int Year;
public readonly bool SeasonLocked;
public readonly bool SeasonLocked = false; // never locked
public Dictionary<int, PaymentCustom>? CustomPayments;
public PaymentAdjustmentWindow(int year) {
InitializeComponent();
Year = year;
using (var ctx = new AppDbContext()) {
SeasonLocked = ctx.Seasons.Find(Year + 1) != null;
}
// using (var ctx = new AppDbContext()) { SeasonLocked = ctx.Seasons.Find(Year + 1) != null; }
Title = $"Auszahlung anpassen - Lese {Year} - Elwig";
AutoAdjustBsButton.IsEnabled = !SeasonLocked;
UnAdjustBsButton.IsEnabled = !SeasonLocked;