This commit is contained in:
@@ -552,7 +552,8 @@
|
||||
|
||||
<Label Content="Mitgliederbewegungen:" Margin="10,40,10,10"/>
|
||||
<CheckBox x:Name="ParameterBusinessShareHistoryInput" Content="Mit Elwig erfassen" Margin="160,45,10,15"
|
||||
HorizontalAlignment="Left"/>
|
||||
HorizontalAlignment="Left"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox x:Name="ParameterAreaComGroup" Header="Berechnung Flächenbindungen (aktuelle Saison)" Margin="10,10,10,0" VerticalAlignment="Top">
|
||||
|
||||
@@ -619,22 +619,26 @@
|
||||
Margin="0,40,10,0" Width="78" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
TextChanged="DateInput_TextChanged" LostFocus="DateInput_LostFocus"/>
|
||||
|
||||
<Label Content="Geschäftsanteile:" Margin="10,65,0,0" Grid.Column="0"/>
|
||||
<Label x:Name="BusinessSharesLabel" Content="(rot/weiß/ruhend)" Margin="10,78,0,0" Grid.Column="0" FontSize="10"/>
|
||||
<Label Content="BH-Konto:" Margin="10,70,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="AccountingNrInput" Text="{Binding AccountingNr, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="0,70,10,0" Width="63" Grid.Column="1" HorizontalAlignment="Left"
|
||||
TextChanged="TextBox_TextChanged"/>
|
||||
|
||||
<Label Content="Geschäftsanteile:" Margin="10,95,0,0" Grid.Column="0"/>
|
||||
<Label x:Name="BusinessSharesLabel" Content="(rot/weiß/ruhend)" Margin="10,108,0,0" Grid.Column="0" FontSize="10"/>
|
||||
<TextBox x:Name="BusinessShares1Input" Text="{Binding BusinessShares1String, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="0,70,10,0" Width="32" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
Margin="0,100,10,0" Width="32" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
TextChanged="IntegerInput_TextChanged"/>
|
||||
<TextBox x:Name="BusinessShares2Input" Text="{Binding BusinessShares2String, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="37,70,10,0" Width="32" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
Margin="37,100,10,0" Width="32" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
TextChanged="IntegerInput_TextChanged"/>
|
||||
<TextBox x:Name="BusinessShares3Input" Text="{Binding BusinessShares3String, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="74,70,10,0" Width="32" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
Margin="74,100,10,0" Width="32" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
TextChanged="IntegerInput_TextChanged"/>
|
||||
|
||||
<Label Content="BH-Konto:" Margin="10,100,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="AccountingNrInput" Text="{Binding AccountingNr, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="0,100,10,0" Grid.Column="1"
|
||||
TextChanged="TextBox_TextChanged"/>
|
||||
<Button x:Name="BusinessSharesButton" FontFamily="Segoe MDL2 Assets" Content="" FontSize="16" Padding="0.5,0,0,0" IsEnabled="{Binding IsMemberSelected}"
|
||||
Margin="111,100,10,0" Width="25" Height="25" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Top"
|
||||
ToolTip="Geschäftsanteile bearbeiten"
|
||||
Click="BusinessSharesButton_Click"/>
|
||||
|
||||
<CheckBox x:Name="ActiveInput" Content="Aktiv" IsChecked="{Binding IsActive, Mode=TwoWay}" IsEnabled="False"
|
||||
Checked="ActiveInput_Changed" Unchecked="ActiveInput_Changed"
|
||||
@@ -663,7 +667,7 @@
|
||||
|
||||
<Label Content="Anmerkung:" Margin="10,190,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="CommentInput" Text="{Binding Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="0,190,10,70" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
Margin="0,190,10,70" Grid.Column="1" Grid.ColumnSpan="2" FontSize="12"
|
||||
TextChanged="TextBox_TextChanged"
|
||||
VerticalAlignment="Stretch" Height="auto" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"/>
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ using Elwig.Services;
|
||||
using Elwig.ViewModels;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Elwig.Windows {
|
||||
public partial class MemberAdminWindow : AdministrationWindow {
|
||||
@@ -38,9 +39,16 @@ namespace Elwig.Windows {
|
||||
CommandBindings.Add(new CommandBinding(CtrlO, Menu_List_ShowActive_Click));
|
||||
CommandBindings.Add(new CommandBinding(CtrlShiftP, Menu_MemberDataSheet_Print_Click));
|
||||
CommandBindings.Add(new CommandBinding(CtrlShiftO, Menu_List_PrintActive_Click));
|
||||
ExemptInputs = [
|
||||
List<Control> exempt = [
|
||||
SearchInput, ActiveMemberInput, MemberList,
|
||||
];
|
||||
if (App.Client.EnableMemberHistory) {
|
||||
exempt.AddRange([BusinessShares1Input, BusinessShares2Input, BusinessShares3Input]);
|
||||
BusinessShares1Input.IsReadOnly = true;
|
||||
BusinessShares2Input.IsReadOnly = true;
|
||||
BusinessShares3Input.IsReadOnly = true;
|
||||
}
|
||||
ExemptInputs = [.. exempt];
|
||||
RequiredInputs = [
|
||||
MgNrInput, GivenNameInput, NameInput,
|
||||
AddressInput, PlzInput, OrtInput, BillingOrtInput,
|
||||
@@ -101,6 +109,11 @@ namespace Elwig.Windows {
|
||||
BusinessShares2Input.Background = Brushes.WhiteSmoke;
|
||||
BusinessShares2Input.ToolTip = "Geschäftsanteile (ruhend)";
|
||||
BusinessShares3Input.Visibility = Visibility.Hidden;
|
||||
BusinessSharesButton.Margin = new(74, 100, 10, 0);
|
||||
}
|
||||
|
||||
if (!App.Client.EnableMemberHistory) {
|
||||
BusinessSharesButton.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
UpdateContactInfoVisibility();
|
||||
@@ -198,6 +211,17 @@ namespace Elwig.Windows {
|
||||
ClearOriginalValues();
|
||||
ClearDefaultValues();
|
||||
await ViewModel.InitInputs();
|
||||
if (App.Client.EnableMemberHistory) {
|
||||
BusinessShares1Input.Text = "0";
|
||||
BusinessShares2Input.Text = "0";
|
||||
BusinessShares3Input.Text = "0";
|
||||
} else if (App.Client.HasRedWhite) {
|
||||
BusinessShares3Input.Text = "0";
|
||||
SetDefaultValue(BusinessShares3Input);
|
||||
} else {
|
||||
BusinessShares2Input.Text = "0";
|
||||
SetDefaultValue(BusinessShares2Input);
|
||||
}
|
||||
SetDefaultValue(MgNrInput);
|
||||
SetDefaultValue(EntryDateInput);
|
||||
SetDefaultValue(ActiveInput);
|
||||
@@ -493,6 +517,11 @@ namespace Elwig.Windows {
|
||||
ViewModel.EnableSearchInputs = true;
|
||||
}
|
||||
|
||||
private void BusinessSharesButton_Click(object sender, RoutedEventArgs evt) {
|
||||
// TODO
|
||||
// App.FocusBusinessSharesWindow(ViewModel.SelectedMember!.MgNr);
|
||||
}
|
||||
|
||||
private void AreaCommitmentButton_Click(object sender, RoutedEventArgs evt) {
|
||||
App.FocusMemberAreaComs(ViewModel.SelectedMember!.MgNr);
|
||||
}
|
||||
@@ -760,6 +789,14 @@ namespace Elwig.Windows {
|
||||
|
||||
new protected void ClearInputs(bool validate = false) {
|
||||
ViewModel.ClearInputs();
|
||||
if (App.Client.EnableMemberHistory) {
|
||||
BusinessShares1Input.Text = "";
|
||||
BusinessShares2Input.Text = "";
|
||||
BusinessShares3Input.Text = "";
|
||||
ControlUtils.ClearInputState(BusinessShares1Input);
|
||||
ControlUtils.ClearInputState(BusinessShares2Input);
|
||||
ControlUtils.ClearInputState(BusinessShares3Input);
|
||||
}
|
||||
base.ClearInputs(validate);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user