AreaComAdminWindow: Add comment input
This commit is contained in:
@ -40,11 +40,8 @@ namespace Elwig.Windows {
|
||||
|
||||
private async Task RefreshAreaCommitmentListQuery() {
|
||||
List<AreaCom> 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<AreaCom>? tr = null;
|
||||
try {
|
||||
|
Reference in New Issue
Block a user