AreaComAdminWindow: Add - Keine Angabe - to wine cultivation list
This commit is contained in:
@ -156,7 +156,7 @@ namespace Elwig.Windows {
|
||||
AreaInput.Text = a.Area.ToString();
|
||||
|
||||
AreaComTypeInput.SelectedItem = a.AreaComType;
|
||||
WineCultivationInput.SelectedItem = a.WineCult;
|
||||
WineCultivationInput.SelectedItem = a.WineCult ?? WineCultivationInput.Items[0];
|
||||
|
||||
CommentInput.Text = a.Comment;
|
||||
|
||||
@ -179,7 +179,9 @@ namespace Elwig.Windows {
|
||||
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);
|
||||
var cultList = await Context.WineCultivations.OrderBy(c => c.Name).Cast<object>().ToListAsync();
|
||||
cultList.Insert(0, new NullItem());
|
||||
ControlUtils.RenewItemsSource(WineCultivationInput, cultList, i => (i as WineCult)?.CultId);
|
||||
await RefreshAreaCommitmentList();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user