AdministrationWindow: Fix default value handling
This commit is contained in:
@ -131,17 +131,21 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
private void InitialInputs() {
|
||||
ClearOriginalValues();
|
||||
ClearDefaultValues();
|
||||
|
||||
HandPickedInput.IsChecked = null;
|
||||
SetDefaultValue(HandPickedInput, null);
|
||||
if (App.Client.IsMatzen) {
|
||||
GerebeltGewogenInput.IsChecked = true;
|
||||
GerebeltGewogenInput.IsEnabled = false;
|
||||
SetDefaultValue(GerebeltGewogenInput);
|
||||
} else {
|
||||
GerebeltGewogenInput.IsChecked = false;
|
||||
UnsetDefaultValue(GerebeltGewogenInput);
|
||||
GerebeltGewogenInput.IsEnabled = true;
|
||||
UnsetDefaultValue(GerebeltGewogenInput);
|
||||
}
|
||||
ClearOriginalValues();
|
||||
|
||||
SetDefaultValue(HandPickedInput);
|
||||
ValidateRequiredInputs();
|
||||
}
|
||||
|
||||
@ -426,6 +430,7 @@ namespace Elwig.Windows {
|
||||
FillInputs(d);
|
||||
} else {
|
||||
ClearOriginalValues();
|
||||
ClearDefaultValues();
|
||||
ClearInputs(validate);
|
||||
ClearInputStates();
|
||||
}
|
||||
@ -434,6 +439,7 @@ namespace Elwig.Windows {
|
||||
|
||||
private void FillInputs(Delivery d) {
|
||||
ClearOriginalValues();
|
||||
ClearDefaultValues();
|
||||
|
||||
MgNrInput.Text = d.MgNr.ToString();
|
||||
ControlUtils.SelectComboBoxItem(BranchInput, i => (i as Branch)?.ZwstId, d.ZwstId);
|
||||
@ -456,6 +462,7 @@ namespace Elwig.Windows {
|
||||
private void FillInputs(DeliveryPart p) {
|
||||
FillInputs(p.Delivery);
|
||||
ClearOriginalValues();
|
||||
ClearDefaultValues();
|
||||
|
||||
SortIdInput.Text = p?.SortId ?? "";
|
||||
ControlUtils.SelectCheckComboBoxItems(AttributesInput, p?.Attributes, i => (i as WineAttr)?.AttrId);
|
||||
|
Reference in New Issue
Block a user