Small fixes
This commit is contained in:
@ -160,7 +160,7 @@ namespace Elwig.Helpers {
|
||||
}
|
||||
if (selectedId != null && source != null)
|
||||
dataGrid.SelectedItem = source.Cast<object>().FirstOrDefault(i => selectedId.Equals(getId(i)));
|
||||
if (dataGrid.SelectedItem != null)
|
||||
if (dataGrid.SelectedItem != null && column != null)
|
||||
dataGrid.CurrentCell = new(dataGrid.SelectedItem, column);
|
||||
}
|
||||
|
||||
|
@ -144,13 +144,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="Gemeinde:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||
<ComboBox x:Name="KgInput" ItemTemplate="{StaticResource KgTemplate}" TextSearch.TextPath="Name"
|
||||
<ComboBox x:Name="KgInput" ItemTemplate="{StaticResource KgNrTemplate}" TextSearch.TextPath="Name"
|
||||
Width="200" HorizontalAlignment="Left" SelectionChanged="KgInput_SelectionChanged"
|
||||
Margin="0,10,10,0" Grid.Column="1"/>
|
||||
|
||||
<Label Content="Ried:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||
<ComboBox x:Name="RdInput" ItemTemplate="{StaticResource KgTemplate}" TextSearch.TextPath="Name"
|
||||
Width="200" HorizontalAlignment="Left" SelectionChanged="ComboBox_SelectionChanged"
|
||||
<ComboBox x:Name="RdInput" DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
||||
Width="200" HorizontalAlignment="Left"
|
||||
Margin="0,40,0,0" Grid.Column="1"/>
|
||||
|
||||
<Label Content="Parzelle:" Margin="10,70,0,0" Grid.Column="0"/>
|
||||
@ -172,18 +172,18 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="Sorte:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||
<ComboBox x:Name="SortInput" ItemTemplate="{StaticResource KgTemplate}" TextSearch.TextPath="Name"
|
||||
Width="200" HorizontalAlignment="Left" SelectionChanged="ComboBox_SelectionChanged"
|
||||
<ComboBox x:Name="SortInput" ItemTemplate="{StaticResource WineVarietyTemplate}" TextSearch.TextPath="Name"
|
||||
Width="200" HorizontalAlignment="Left"
|
||||
Margin="0,10,10,0" Grid.Column="1"/>
|
||||
|
||||
<Label Content="Attribut:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||
<ComboBox x:Name="AttrInput" ItemTemplate="{StaticResource KgTemplate}" TextSearch.TextPath="Name"
|
||||
Width="200" HorizontalAlignment="Left" SelectionChanged="ComboBox_SelectionChanged"
|
||||
<ComboBox x:Name="AttrInput" DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
||||
Width="200" HorizontalAlignment="Left"
|
||||
Margin="0,40,10,0" Grid.Column="1"/>
|
||||
|
||||
<Label Content="Bewirt. Art:" Margin="10,70,0,0" Grid.Column="0"/>
|
||||
<ComboBox x:Name="CultInput" ItemTemplate="{StaticResource KgTemplate}" TextSearch.TextPath="Name"
|
||||
Width="200" HorizontalAlignment="Left" SelectionChanged="ComboBox_SelectionChanged"
|
||||
<ComboBox x:Name="CultInput" DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
||||
Width="200" HorizontalAlignment="Left"
|
||||
Margin="0,70,10,0" Grid.Column="1"/>
|
||||
|
||||
</Grid>
|
||||
|
@ -1,24 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Models;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
|
||||
namespace Elwig.Windows {
|
||||
public partial class AreaComAdminWindow : AdministrationWindow {
|
||||
private readonly Member member;
|
||||
private bool IsEditing = false;
|
||||
private bool IsCreating = false;
|
||||
private readonly Member Member;
|
||||
|
||||
public AreaComAdminWindow(Member member) {
|
||||
InitializeComponent();
|
||||
this.member = member;
|
||||
Title = $"Flächenbindungen - {member.AdministrativeName} - Elwig";
|
||||
Member = member;
|
||||
Title = $"Flächenbindungen - {Member.AdministrativeName} - Elwig";
|
||||
ExemptInputs = new Control[] {
|
||||
MgNrInput, ContractList, AreaCommitmentList, NewContractButton, DeleteContractButton,
|
||||
ContractSaveButton, ContractCancelButton, NewAreaCommitmentButton,
|
||||
|
Reference in New Issue
Block a user