[#9] MemberAdminWindow: Add "Bio-Knopf"
This commit is contained in:
@ -341,6 +341,9 @@
|
||||
<CheckBox x:Name="OrganicInput" Content="Bio" IsEnabled="False"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||
Grid.Column="2" HorizontalAlignment="Left" Margin="10,45,0,0" VerticalAlignment="Top" IsChecked="False"/>
|
||||
<Button x:Name="OrganicButton" Content="easy-cert.com" Height="25" FontSize="12" IsEnabled="False"
|
||||
Click="OrganicButton_Click"
|
||||
Grid.Column="2" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="60,40,0,0"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Header="Rechnungsadresse (optional)" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" Margin="5,5,5,5">
|
||||
|
@ -11,6 +11,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
using System.Collections.ObjectModel;
|
||||
using Elwig.Documents;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Elwig.Windows {
|
||||
public partial class MemberAdminWindow : AdministrationWindow {
|
||||
@ -187,12 +188,14 @@ namespace Elwig.Windows {
|
||||
DeleteMemberButton.IsEnabled = true;
|
||||
AreaCommitmentButton.IsEnabled = true;
|
||||
DeliveryButton.IsEnabled = true;
|
||||
OrganicButton.IsEnabled = true;
|
||||
FillInputs(m);
|
||||
} else {
|
||||
EditMemberButton.IsEnabled = false;
|
||||
DeleteMemberButton.IsEnabled = false;
|
||||
AreaCommitmentButton.IsEnabled = false;
|
||||
DeliveryButton.IsEnabled = false;
|
||||
OrganicButton.IsEnabled = false;
|
||||
ClearOriginalValues();
|
||||
ClearDefaultValues();
|
||||
ClearInputs(validate);
|
||||
@ -791,5 +794,17 @@ namespace Elwig.Windows {
|
||||
App.FocusOriginHierarchy();
|
||||
}
|
||||
}
|
||||
|
||||
private void OrganicButton_Click(object sender, RoutedEventArgs evt) {
|
||||
if (MemberList.SelectedItem is not Member m)
|
||||
return;
|
||||
var url = "https://www.easy-cert.com/htm/suchergebnis.htm?" +
|
||||
//$"CustomerNumber={m.LfbisNr}&" +
|
||||
$"Name={(m.BillingAddress?.Name ?? m.Name).Replace(' ', '+')}&" +
|
||||
$"PostalCode={(m.BillingAddress?.PostalDest ?? m.PostalDest).AtPlz?.Plz}";
|
||||
Process.Start(new ProcessStartInfo(url) {
|
||||
UseShellExecute = true,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user