Helpers: Add Normalizer to normalize street names in addresses
This commit is contained in:
@@ -1008,5 +1008,23 @@ namespace Elwig.Windows {
|
||||
ValidateRequiredInputs();
|
||||
UpdateButtons();
|
||||
}
|
||||
|
||||
new protected void AddressInput_TextChanged(object sender, TextChangedEventArgs? evt) {
|
||||
if ((IsCreating || IsEditing) && sender is TextBox b) {
|
||||
InputTextChanged(b, (i, r) => Validator.CheckAddress(i, r, b == BillingAddressInput ? ViewModel.BillingOrt?.Ort.Name : ViewModel.Ort?.Ort.Name));
|
||||
} else {
|
||||
TextBox_TextChanged(sender, evt);
|
||||
}
|
||||
}
|
||||
|
||||
private void OrtInput_SelectionChanged(object sender, SelectionChangedEventArgs? evt) {
|
||||
if (!IsCreating && !IsEditing)
|
||||
return;
|
||||
if (sender == BillingOrtInput) {
|
||||
InputTextChanged(BillingAddressInput, (i, r) => Validator.CheckAddress(i, r, ViewModel.BillingOrt?.Ort.Name));
|
||||
} else {
|
||||
InputTextChanged(AddressInput, (i, r) => Validator.CheckAddress(i, r, ViewModel.Ort?.Ort.Name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user