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