ContextWindow: Change renew context event handling

This commit is contained in:
2023-09-18 21:46:14 +02:00
parent a6fef7fd9b
commit 3a73265a75
7 changed files with 44 additions and 32 deletions

View File

@ -95,8 +95,8 @@ namespace Elwig.Windows {
ValidateRequiredInputs();
}
protected override async Task RenewContext() {
await base.RenewContext();
protected override async Task OnRenewContext() {
await base.OnRenewContext();
ControlUtils.RenewItemsSource(KgInput, await Context.WbKgs.Select(k => k.AtKg).OrderBy(k => k.Name).ToListAsync(), i => (i as AT_Kg)?.KgNr);
ControlUtils.RenewItemsSource(AreaComTypeInput, await Context.AreaCommitmentTypes.OrderBy(v => v.VtrgId).ToListAsync(), i => (i as AreaComType)?.VtrgId);
ControlUtils.RenewItemsSource(WineCultivationInput, await Context.WineCultivations.OrderBy(c => c.Name).ToListAsync(), i => (i as WineCult)?.CultId);