BaseDataWindow: Fix Parameter in FillInputs()
This commit is contained in:
@ -148,7 +148,7 @@ namespace Elwig.Windows {
|
||||
|
||||
protected override async Task OnRenewContext(AppDbContext ctx) {
|
||||
await base.OnRenewContext(ctx);
|
||||
FillInputs(App.Client);
|
||||
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
|
||||
ControlUtils.RenewItemsSource(SeasonList, await ctx.Seasons
|
||||
.OrderByDescending(s => s.Year)
|
||||
.Include(s => s.Modifiers)
|
||||
@ -272,8 +272,9 @@ namespace Elwig.Windows {
|
||||
|
||||
await FinishEditing();
|
||||
|
||||
using var ctx = new AppDbContext();
|
||||
ClearInputStates();
|
||||
FillInputs(App.Client);
|
||||
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
|
||||
LockInputs();
|
||||
}
|
||||
|
||||
@ -291,8 +292,9 @@ namespace Elwig.Windows {
|
||||
|
||||
await InitEditing();
|
||||
|
||||
using var ctx = new AppDbContext();
|
||||
ClearInputStates();
|
||||
FillInputs(App.Client);
|
||||
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
|
||||
UpdateButtons();
|
||||
}
|
||||
|
||||
@ -321,14 +323,16 @@ namespace Elwig.Windows {
|
||||
|
||||
await FinishEditing();
|
||||
|
||||
using (var ctx = new AppDbContext()) {
|
||||
ClearInputStates();
|
||||
FillInputs(App.Client);
|
||||
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
|
||||
LockInputs();
|
||||
}
|
||||
|
||||
await HintContextChange();
|
||||
}
|
||||
|
||||
private void FillInputs(ClientParameters p) {
|
||||
private void FillInputs(ClientParameters p, Season s) {
|
||||
ClearOriginalValues();
|
||||
ClearDefaultValues();
|
||||
|
||||
@ -359,6 +363,10 @@ namespace Elwig.Windows {
|
||||
TextElementDeliveryConfirmation.Text = p.TextDeliveryConfirmation;
|
||||
TextElementCreditNote.Text = p.TextCreditNote;
|
||||
|
||||
ParameterAllowAttrIntoLowerInput.IsChecked = s.Billing_AllowAttrsIntoLower;
|
||||
ParameterAvoidUnderDeliveriesInput.IsChecked = s.Billing_AvoidUnderDeliveries;
|
||||
ParameterHonorGebundenInput.IsChecked = s.Billing_HonorGebunden;
|
||||
|
||||
FinishInputFilling();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user