Improved DeliveryAdminWindow

This commit is contained in:
2023-05-24 22:30:16 +02:00
parent 5b9aedd1a4
commit 27abf559e8
2 changed files with 11 additions and 10 deletions

View File

@ -26,6 +26,7 @@ namespace Elwig.Windows {
};
ExemptInputs = new Control[] {
MgNrInput, MemberInput,
LsNrInput, DateInput, TimeInput, BranchInput,
MemberAddressField
};
@ -38,7 +39,7 @@ namespace Elwig.Windows {
private void Window_Loaded(object sender, RoutedEventArgs evt) {
MemberInput.ItemsSource = Context.Members.OrderBy(m => m.FamilyName).ThenBy(m => m.GivenName).ToList();
BranchInput.ItemsSource = Context.Branches.OrderBy(b => b.Name).ToList();
BranchInput.SelectedItem = BranchInput.ItemsSource.Cast<Branch>().Where(b => b.ZwstId == App.ZwstId).First();
BranchInput.SelectedItem = BranchInput.ItemsSource.Cast<Branch>().First(b => b.ZwstId == App.ZwstId);
WineVarietyInput.ItemsSource = Context.WineVarieties.OrderBy(v => v.Name).ToList();
AttributesInput.ItemsSource = Context.WineAttributes.OrderBy(a => a.Name).ToList();
WineQualityLevelInput.ItemsSource = Context.WineQualityLevels.ToList();