ControlUtils: Cleanup SelectItem() method and use accordingly
This commit is contained in:
@ -25,7 +25,7 @@ namespace Elwig.Windows {
|
||||
.ToListAsync());
|
||||
_branches = _branchList.ToDictionary(b => b.ZwstId, b => (string?)b.ZwstId);
|
||||
_branchIds = _branchList.ToDictionary(b => b, b => b.ZwstId);
|
||||
ControlUtils.RenewItemsSource(BranchList, _branchList, b => (b as Branch)?.ZwstId);
|
||||
ControlUtils.RenewItemsSource(BranchList, _branchList);
|
||||
BranchList_SelectionChanged(null, null);
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Elwig.Windows {
|
||||
ControlUtils.RenewItemsSource(BranchList, await ctx.Branches
|
||||
.OrderBy(b => b.Name)
|
||||
.Include(b => b.PostalDest!.AtPlz)
|
||||
.ToListAsync(), b => (b as Branch)?.ZwstId);
|
||||
.ToListAsync());
|
||||
_branchList = null;
|
||||
_branches = null;
|
||||
_branchIds = null;
|
||||
@ -85,7 +85,7 @@ namespace Elwig.Windows {
|
||||
BranchIdInput.Text = branch.ZwstId;
|
||||
BranchNameInput.Text = branch.Name;
|
||||
BranchPlzInput.Text = branch.PostalDest?.AtPlz?.Plz.ToString() ?? "";
|
||||
ControlUtils.SelectComboBoxItem(BranchOrtInput, o => (o as AT_PlzDest)?.Okz, branch.PostalDest?.AtPlz?.Okz);
|
||||
ControlUtils.SelectItem(BranchOrtInput, branch.PostalDest?.AtPlz);
|
||||
BranchAddressInput.Text = branch.Address;
|
||||
BranchPhoneNrInput.Text = branch.PhoneNr;
|
||||
BranchFaxNrInput.Text = branch.FaxNr;
|
||||
|
Reference in New Issue
Block a user