[WIP] Use compiled queries
All checks were successful
Test / Run tests (push) Successful in 3m0s

This commit is contained in:
2026-04-04 15:28:30 +02:00
parent bd1e579674
commit c3cf239cba
35 changed files with 332 additions and 302 deletions

View File

@@ -52,7 +52,7 @@ namespace Elwig.Windows {
.ThenBy(m => m.GivenName)
.ThenBy(m => m.MgNr)
.ToListAsync();
var season = (await ctx.Seasons.FindAsync(Year))!;
var season = await ctx.FetchSeasons(Year).SingleAsync();
var contracts = await ctx.AreaCommitmentTypes.ToDictionaryAsync(t => t.VtrgId, t => t);
var tbl1 = await OverUnderDeliveryData.ForSeason(ctx.OverUnderDeliveryRows, Year);
@@ -145,11 +145,7 @@ namespace Elwig.Windows {
TotalModifiers.Text = $"{list.Count(r => r.Total != 0)} Mg. / {list.Sum(r => r.Total):N2} {sym}";
NonDeliveries.Text = $"{list.Count(r => r.Weight == 0):N0}";
ControlUtils.RenewItemsSource(MemberInput, await ctx.Members
.OrderBy(m => m.Name)
.ThenBy(m => m.GivenName)
.ThenBy(m => m.MgNr)
.ToListAsync());
ControlUtils.RenewItemsSource(MemberInput, await ctx.FetchMembers(true).ToListAsync());
CustomAmountInput.Unit = sym;
}
@@ -170,7 +166,7 @@ namespace Elwig.Windows {
await Task.Run(async () => {
await App.Client.UpdateValues();
var b = new Billing(Year);
var b = await Billing.Create(Year);
await b.AutoAdjustBusinessShares(new DateOnly(Year, 11, 30), kg ?? default, bs ?? default, kgPerBs ?? default, percent / 100.0 ?? default, minBs ?? default);
});
App.HintContextChange();
@@ -186,7 +182,7 @@ namespace Elwig.Windows {
Mouse.OverrideCursor = Cursors.Wait;
try {
await Task.Run(async () => {
var b = new Billing(Year);
var b = await Billing.Create(Year);
await b.UnAdjustBusinessShares();
});
App.HintContextChange();