Extract ControlUtils from Utils

This commit is contained in:
2023-07-21 18:31:57 +02:00
parent 5cee928978
commit fd7a15bc5a
7 changed files with 272 additions and 263 deletions

View File

@ -89,7 +89,7 @@ namespace Elwig.Windows {
.ToList();
}
Utils.RenewItemsSource(MemberList, members, i => (i as Member)?.MgNr, MemberList_SelectionChanged, Utils.RenewSourceDefault.IfOnly, !updateSort);
ControlUtils.RenewItemsSource(MemberList, members, i => (i as Member)?.MgNr, MemberList_SelectionChanged, ControlUtils.RenewSourceDefault.IfOnly, !updateSort);
}
private void RefreshInputs(bool validate = false) {
@ -124,8 +124,8 @@ namespace Elwig.Windows {
protected override async Task RenewContext() {
await base.RenewContext();
Utils.RenewItemsSource(BranchInput, await Context.Branches.OrderBy(b => b.Name).ToListAsync(), i => (i as Branch)?.ZwstId);
Utils.RenewItemsSource(DefaultKgInput, await Context.WbKgs.Select(k => k.AtKg).OrderBy(k => k.Name).ToListAsync(), i => (i as AT_Kg)?.KgNr);
ControlUtils.RenewItemsSource(BranchInput, await Context.Branches.OrderBy(b => b.Name).ToListAsync(), i => (i as Branch)?.ZwstId);
ControlUtils.RenewItemsSource(DefaultKgInput, await Context.WbKgs.Select(k => k.AtKg).OrderBy(k => k.Name).ToListAsync(), i => (i as AT_Kg)?.KgNr);
await RefreshMemberList();
}