diff --git a/Elwig/Windows/AreaComAdminWindow.xaml b/Elwig/Windows/AreaComAdminWindow.xaml
index 17462b0..df2c306 100644
--- a/Elwig/Windows/AreaComAdminWindow.xaml
+++ b/Elwig/Windows/AreaComAdminWindow.xaml
@@ -131,6 +131,10 @@
+
+
+
diff --git a/Elwig/Windows/AreaComAdminWindow.xaml.cs b/Elwig/Windows/AreaComAdminWindow.xaml.cs
index 84f917f..ade9d39 100644
--- a/Elwig/Windows/AreaComAdminWindow.xaml.cs
+++ b/Elwig/Windows/AreaComAdminWindow.xaml.cs
@@ -40,11 +40,8 @@ namespace Elwig.Windows {
private async Task RefreshAreaCommitmentListQuery() {
List areaComs = await Context.AreaCommitments.Where(a => a.MgNr == Member.MgNr).OrderBy(a => a.FbNr).ToListAsync();
-
- ControlUtils.RenewItemsSource(AreaCommitmentList, areaComs, i => (i as AreaCom)?.FbNr);
- if (areaComs.Count == 1)
- AreaCommitmentList.SelectedIndex = 0;
-
+ ControlUtils.RenewItemsSource(AreaCommitmentList, areaComs, i => (i as AreaCom)?.FbNr,
+ AreaCommitmentList_SelectionChanged, ControlUtils.RenewSourceDefault.None);
RefreshInputs();
}
@@ -82,6 +79,8 @@ namespace Elwig.Windows {
AreaComTypeInput.SelectedItem = a.AreaComType;
WineCultivationInput.SelectedItem = a.WineCult;
+ CommentInput.Text = a.Comment;
+
FinishInputFilling();
}
@@ -151,6 +150,7 @@ namespace Elwig.Windows {
a.Area = int.Parse(AreaInput.Text);
a.VtrgId = (AreaComTypeInput.SelectedItem as AreaComType)?.VtrgId;
a.CultId = (WineCultivationInput.SelectedItem as WineCult)?.CultId;
+ a.Comment = (CommentInput.Text == "") ? null : CommentInput.Text;
EntityEntry? tr = null;
try {