MemberAdminWindow: Small code cleanup
This commit is contained in:
@ -464,20 +464,22 @@ namespace Elwig.Windows {
|
||||
protected void PlzInput_TextChanged(object sender, RoutedEventArgs evt) {
|
||||
var plz = (TextBox)sender;
|
||||
InputTextChanged(plz, Validator.CheckPlz);
|
||||
UpdatePlz(plz, GetPlzOrtInput(plz));
|
||||
if ("PLZ".Equals(plz.Tag))
|
||||
UpdatePlz(plz, GetPlzOrtInput(plz));
|
||||
}
|
||||
|
||||
protected void PlzInput_LostFocus(object sender, RoutedEventArgs evt) {
|
||||
var plz = (TextBox)sender;
|
||||
InputLostFocus(plz, Validator.CheckPlz);
|
||||
UpdatePlz(plz, GetPlzOrtInput(plz));
|
||||
if ("PLZ".Equals(plz.Tag))
|
||||
UpdatePlz(plz, GetPlzOrtInput(plz));
|
||||
}
|
||||
|
||||
protected void EmailInput_TextChanged(object sender, RoutedEventArgs evt) {
|
||||
protected void EmailAddressInput_TextChanged(object sender, RoutedEventArgs evt) {
|
||||
InputTextChanged((TextBox)sender, Validator.CheckEmailAddress);
|
||||
}
|
||||
|
||||
protected void EmailInput_LostFocus(object sender, RoutedEventArgs evt) {
|
||||
protected void EmailAddressInput_LostFocus(object sender, RoutedEventArgs evt) {
|
||||
InputLostFocus((TextBox)sender, Validator.CheckEmailAddress);
|
||||
}
|
||||
|
||||
|
@ -179,8 +179,8 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="E-Mail-Adresse:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="EmailInput" Margin="0,10,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
TextChanged="EmailInput_TextChanged" LostFocus="EmailInput_LostFocus"/>
|
||||
<TextBox x:Name="EmailAddressInput" Margin="0,10,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||
|
||||
<ComboBox x:Name="PhoneNr1TypeInput" DisplayMemberPath="Value" Margin="6,40,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||
<TextBox x:Name="PhoneNr1Input" Margin="0,40,5,0" Grid.Column="1"
|
||||
@ -265,7 +265,7 @@
|
||||
<TextBox x:Name="UstIdNrInput" Margin="0,10,10,0" Grid.Column="1" Width="120" HorizontalAlignment="Left"
|
||||
TextChanged="UstIdNrInput_TextChanged" LostFocus="UstIdNrInput_LostFocus"/>
|
||||
|
||||
<Label Content="BetriebsNr.:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||
<Label Content="Betriebs-Nr.:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="LfbisNrInput" Margin="0,40,10,0" Grid.Column="1" Width="64" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
TextChanged="LfbisNrInput_TextChanged" LostFocus="LfbisNrInput_LostFocus"/>
|
||||
|
||||
@ -332,7 +332,7 @@
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||
Grid.Column="2" HorizontalAlignment="Left" Margin="10,75,0,0" VerticalAlignment="Top" IsChecked="False"/>
|
||||
|
||||
<Label Content="StammZwst.:" Margin="10,130,0,0" Grid.Column="0"/>
|
||||
<Label Content="Stamm-Zwst.:" Margin="10,130,0,0" Grid.Column="0"/>
|
||||
<ComboBox x:Name="BranchInput" DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
||||
Margin="0,130,10,0" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
|
||||
|
@ -348,7 +348,7 @@ namespace Elwig.Windows {
|
||||
m.PostalDestId = ((AT_PlzDest)OrtInput.SelectedItem).Id;
|
||||
m.Address = AddressInput.Text;
|
||||
|
||||
m.Email = (EmailInput.Text == "") ? null : EmailInput.Text;
|
||||
m.Email = (EmailAddressInput.Text == "") ? null : EmailAddressInput.Text;
|
||||
|
||||
m.Iban = (IbanInput.Text == "") ? null : IbanInput.Text.Replace(" ", "");
|
||||
m.Bic = (BicInput.Text == "") ? null : BicInput.Text;
|
||||
@ -474,7 +474,7 @@ namespace Elwig.Windows {
|
||||
OrtInput.SelectedItem = null;
|
||||
}
|
||||
|
||||
EmailInput.Text = m.Email;
|
||||
EmailAddressInput.Text = m.Email;
|
||||
var phoneNrs = m.TelephoneNumbers.OrderBy(p => p.Nr).ToList();
|
||||
for (int i = 0; i < PhoneNrInputs.Length; i++) {
|
||||
if (i < phoneNrs.Count) {
|
||||
|
Reference in New Issue
Block a user