AreaComDialog: Fix property name (MaintainYearFrom)
This commit is contained in:
@ -51,7 +51,7 @@
|
||||
<CheckBox x:Name="CopyYearToInput" Content="Beginn der Laufzeit von Vorgänger übernehmen" Margin="0,80,0,0"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Top"
|
||||
Checked="CopyYearToInput_Changed" Unchecked="CopyYearToInput_Changed"
|
||||
IsChecked="{Binding MaintainYearTo}"/>
|
||||
IsChecked="{Binding MaintainYearFrom}"/>
|
||||
|
||||
<TextBlock x:Name="DescBlock1" Margin="0,105,0,0" TextAlignment="Center"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||
|
@ -7,7 +7,7 @@ namespace Elwig.Dialogs {
|
||||
|
||||
public int CancelSeason { get; set; }
|
||||
public int SuccessorSeason => CancelSeason + 1;
|
||||
public bool MaintainYearTo { get; set; }
|
||||
public bool MaintainYearFrom { get; set; }
|
||||
|
||||
public string AreaComNum { get; set; }
|
||||
public string Area { get; set; }
|
||||
@ -43,13 +43,13 @@ namespace Elwig.Dialogs {
|
||||
CancelSeason = (int)SeasonInput.Value!;
|
||||
CancelSeason1.Text = $"{CancelSeason}";
|
||||
CancelSeason2.Text = $"{CancelSeason}";
|
||||
TransferSeason.Text = MaintainYearTo ? "" : $"{SuccessorSeason}";
|
||||
DescBlock1Season.Text = MaintainYearTo ? "dem originalen Beginn der FB" : "inkl. Saison ";
|
||||
TransferSeason.Text = MaintainYearFrom ? "" : $"{SuccessorSeason}";
|
||||
DescBlock1Season.Text = MaintainYearFrom ? "dem originalen Beginn der FB" : "inkl. Saison ";
|
||||
}
|
||||
|
||||
private void CopyYearToInput_Changed(object sender, RoutedEventArgs evt) {
|
||||
TransferSeason.Text = MaintainYearTo ? "" : $"{SuccessorSeason}";
|
||||
DescBlock1Season.Text = MaintainYearTo ? "dem originalen Beginn der FB" : "inkl. Saison ";
|
||||
TransferSeason.Text = MaintainYearFrom ? "" : $"{SuccessorSeason}";
|
||||
DescBlock1Season.Text = MaintainYearFrom ? "dem originalen Beginn der FB" : "inkl. Saison ";
|
||||
}
|
||||
|
||||
private void ConfirmButton_Click(object sender, RoutedEventArgs evt) {
|
||||
|
@ -655,7 +655,7 @@ namespace Elwig.Services {
|
||||
KgNr = c.KgNr,
|
||||
GstNr = c.GstNr,
|
||||
RdNr = c.RdNr,
|
||||
YearFrom = vm.MaintainAreaComYearTo ? c.YearFrom : year,
|
||||
YearFrom = vm.MaintainAreaComYearFrom ? c.YearFrom : year,
|
||||
YearTo = c.YearTo,
|
||||
}));
|
||||
|
||||
|
@ -11,7 +11,7 @@ namespace Elwig.ViewModels {
|
||||
public partial class MemberAdminViewModel : ObservableObject {
|
||||
|
||||
public int? TransferPredecessorAreaComs = null;
|
||||
public bool MaintainAreaComYearTo = false;
|
||||
public bool MaintainAreaComYearFrom = false;
|
||||
public int? CancelAreaComs = null;
|
||||
|
||||
public ObservableCollection<KeyValuePair<string, string>> PhoneNrTypes { get; set; } = new(Utils.PhoneNrTypes);
|
||||
|
@ -784,7 +784,7 @@ namespace Elwig.Windows {
|
||||
if (d.ShowDialog() != true)
|
||||
return;
|
||||
ViewModel.TransferPredecessorAreaComs = d.SuccessorSeason;
|
||||
ViewModel.MaintainAreaComYearTo = d.MaintainYearTo;
|
||||
ViewModel.MaintainAreaComYearFrom = d.MaintainYearFrom;
|
||||
if (IsEditing)
|
||||
SetOriginalValue(PredecessorMgNrInput, -1); // hack to allow user to save
|
||||
UpdateButtons();
|
||||
|
Reference in New Issue
Block a user