Add BaseDataWindow
This commit is contained in:
157
Elwig/Windows/BaseDataWindow.xaml
Normal file
157
Elwig/Windows/BaseDataWindow.xaml
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
<local:AdministrationWindow x:Class="Elwig.Windows.BaseDataWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:Elwig.Windows"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Stammdaten - Elwig" Height="500" MinHeight="400" Width="800" MinWidth="800"
|
||||||
|
Loaded="Window_Loaded">
|
||||||
|
<Window.Resources>
|
||||||
|
<Style TargetType="Label">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
<Setter Property="Padding" Value="2,4,2,4"/>
|
||||||
|
<Setter Property="Height" Value="25"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="TextBox">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
<Setter Property="FontSize" Value="14"/>
|
||||||
|
<Setter Property="Padding" Value="2"/>
|
||||||
|
<Setter Property="Height" Value="25"/>
|
||||||
|
<Setter Property="TextWrapping" Value="NoWrap"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="ComboBox">
|
||||||
|
<Setter Property="Height" Value="25"/>
|
||||||
|
<Setter Property="FontSize" Value="14"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="Button">
|
||||||
|
<Setter Property="FontSize" Value="14"/>
|
||||||
|
<Setter Property="Padding" Value="9,3"/>
|
||||||
|
<Setter Property="Height" Value="27"/>
|
||||||
|
</Style>
|
||||||
|
</Window.Resources>
|
||||||
|
<Grid>
|
||||||
|
<TabControl Margin="10,10,10,50">
|
||||||
|
<TabItem Header="Mandant">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="130"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="90"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Content="Vollständiger Name:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="0" Margin="10,10,0,10"/>
|
||||||
|
<TextBox x:Name="ClientNameFull" IsEnabled="False"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Column="1" Grid.ColumnSpan="3" Margin="0,10,10,10"/>
|
||||||
|
|
||||||
|
<Label Content="Name:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="0" Margin="10,40,0,10"/>
|
||||||
|
<TextBox x:Name="ClientNameInput"
|
||||||
|
TextChanged="ClientNames_TextChanged"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Column="1" Grid.ColumnSpan="3" Margin="0,40,10,10"/>
|
||||||
|
|
||||||
|
<Label Content="Namenszusatz:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="0" Margin="10,70,0,10"/>
|
||||||
|
<TextBox x:Name="ClientNameSuffixInput"
|
||||||
|
TextChanged="ClientNames_TextChanged"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Column="1" Grid.ColumnSpan="3" Margin="0,70,10,10"/>
|
||||||
|
|
||||||
|
<Label Content="Gesellschaftsform:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="0" Margin="10,100,0,10"/>
|
||||||
|
<TextBox x:Name="ClientNameTypeInput"
|
||||||
|
TextChanged="ClientNames_TextChanged"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Column="1" Margin="0,100,10,10"/>
|
||||||
|
|
||||||
|
<Label Content="Kürzel/Kurzform:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="0" Margin="10,130,0,10"/>
|
||||||
|
<TextBox x:Name="ClientNameTokenInput"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="1" Margin="0,130,10,10" Width="70"/>
|
||||||
|
<TextBox x:Name="ClientNameShortInput"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Column="1" Margin="75,130,10,10"/>
|
||||||
|
|
||||||
|
<Label Content="Adresse:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="0" Margin="10,160,0,10"/>
|
||||||
|
<TextBox x:Name="ClientAddressInput"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Column="1" Margin="0,160,10,10"/>
|
||||||
|
|
||||||
|
<Label Content="PLZ/Ort:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="0" Margin="10,190,0,10"/>
|
||||||
|
<TextBox x:Name="ClientPlzInput"
|
||||||
|
Margin="0,190,0,0" Width="42" Grid.Column="1" HorizontalAlignment="Left"
|
||||||
|
TextChanged="PlzInput_TextChanged" LostFocus="PlzInput_LostFocus"/>
|
||||||
|
<TextBox x:Name="ClientOrtInput" Margin="47,190,10,0" Grid.Column="1"/>
|
||||||
|
|
||||||
|
<Label Content="IBAN:" Margin="10,220,0,0" Grid.Column="0"/>
|
||||||
|
<TextBox x:Name="ClientIbanInput" Margin="0,220,10,0" Grid.Column="1"
|
||||||
|
TextChanged="IbanInput_TextChanged" LostFocus="IbanInput_LostFocus"/>
|
||||||
|
|
||||||
|
<Label Content="BIC:" Margin="10,250,0,0" Grid.Column="0"/>
|
||||||
|
<TextBox x:Name="ClientBicInput" Margin="0,250,10,0" Grid.Column="1"
|
||||||
|
TextChanged="BicInput_TextChanged" LostFocus="BicInput_LostFocus"/>
|
||||||
|
|
||||||
|
<Label Content="UID:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="2" Margin="10,100,0,10"/>
|
||||||
|
<TextBox x:Name="ClientUstIdNrInput"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="3" Margin="0,100,10,10" Width="120"
|
||||||
|
TextChanged="UstIdNrInput_TextChanged" LostFocus="UstIdNrInput_LostFocus"/>
|
||||||
|
|
||||||
|
<Label Content="Betriebs-Nr.:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="2" Margin="10,130,0,10"/>
|
||||||
|
<TextBox x:Name="ClientLfbisNrInput"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="3" Margin="0,130,10,10" Width="64"
|
||||||
|
TextChanged="LfbisNrInput_TextChanged" LostFocus="LfbisNrInput_LostFocus"/>
|
||||||
|
|
||||||
|
<Label Content="Telefon-Nr.:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="2" Margin="10,160,0,10"/>
|
||||||
|
<TextBox x:Name="ClientPhoneNrInput" Margin="0,160,10,10" Grid.Column="3"
|
||||||
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
|
|
||||||
|
<Label Content="Fax-Nr.:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="2" Margin="10,190,0,10"/>
|
||||||
|
<TextBox x:Name="ClientFaxNrInput" Margin="0,190,10,10" Grid.Column="3"
|
||||||
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
|
|
||||||
|
<Label Content="E-Mail-Adr.:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="2" Margin="10,220,0,10"/>
|
||||||
|
<TextBox x:Name="ClientEmailAddressInput" Margin="0,220,10,0" Grid.Column="3"
|
||||||
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
|
<Label Content="Website:"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="2" Margin="10,250,0,10"/>
|
||||||
|
<TextBox x:Name="ClientWebsiteInput" Margin="0,250,10,0" Grid.Column="3"
|
||||||
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Zweigstellen">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Sortenattribute">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Bewirtschaftungsarten">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Flächenbindungsverträge">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
|
||||||
|
<TabItem Header="Saisons">
|
||||||
|
<Grid>
|
||||||
|
<ListBox/>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Parameter">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Textelemente">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
</local:AdministrationWindow>
|
38
Elwig/Windows/BaseDataWindow.xaml.cs
Normal file
38
Elwig/Windows/BaseDataWindow.xaml.cs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
|
namespace Elwig.Windows {
|
||||||
|
public partial class BaseDataWindow : AdministrationWindow {
|
||||||
|
public BaseDataWindow() {
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Window_Loaded(object sender, RoutedEventArgs evt) {
|
||||||
|
ClientNameInput.Text = App.Client.Name;
|
||||||
|
ClientNameSuffixInput.Text = App.Client.NameSuffix;
|
||||||
|
ClientNameTypeInput.Text = App.Client.NameType;
|
||||||
|
ClientNameTokenInput.Text = App.Client.NameToken;
|
||||||
|
ClientNameShortInput.Text = App.Client.NameShort;
|
||||||
|
ClientAddressInput.Text = App.Client.Address;
|
||||||
|
ClientPlzInput.Text = App.Client.Plz.ToString();
|
||||||
|
ClientOrtInput.Text = App.Client.Ort;
|
||||||
|
ClientIbanInput.Text = App.Client.Iban;
|
||||||
|
ClientBicInput.Text = App.Client.Bic;
|
||||||
|
ClientUstIdNrInput.Text = App.Client.UstIdNr;
|
||||||
|
ClientLfbisNrInput.Text = App.Client.LfbisNr;
|
||||||
|
ClientPhoneNrInput.Text = App.Client.PhoneNr;
|
||||||
|
ClientFaxNrInput.Text = App.Client.FaxNr;
|
||||||
|
ClientEmailAddressInput.Text = App.Client.EmailAddress;
|
||||||
|
ClientWebsiteInput.Text = App.Client.Website;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void UpdateButtons() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ClientNames_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||||
|
var suffix = ClientNameSuffixInput.Text.Length > 0 ? ClientNameSuffixInput.Text : null;
|
||||||
|
ClientNameFull.Text = $"{ClientNameInput.Text}{(suffix != null ? $", {suffix}," : "")} {ClientNameTypeInput.Text}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,12 +0,0 @@
|
|||||||
<local:AdministrationWindow x:Class="Elwig.Windows.ClientParamWindow"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:local="clr-namespace:Elwig.Windows"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Title="ClientParamWindow" Height="450" Width="800">
|
|
||||||
<Grid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</local:AdministrationWindow>
|
|
@ -1,18 +0,0 @@
|
|||||||
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Elwig.Windows {
|
|
||||||
public partial class ClientParamWindow : AdministrationWindow {
|
|
||||||
public ClientParamWindow() {
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void UpdateButtons() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override async Task RenewContext() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -49,11 +49,13 @@
|
|||||||
<Button x:Name="DeliveryListButton" Content="Lieferungungen" Click="DeliveryListButton_Click" IsEnabled="False"
|
<Button x:Name="DeliveryListButton" Content="Lieferungungen" Click="DeliveryListButton_Click" IsEnabled="False"
|
||||||
Margin="50,320,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
Margin="50,320,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
||||||
|
|
||||||
<Button x:Name="PdfButton" Content="PDF Erzeugen" Click="PdfButton_Click" Tag="Print"
|
<Button x:Name="BaseDataButton" Content="Stammdaten" Click="BaseDataButton_Click"
|
||||||
Margin="260,160,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
Margin="260,160,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
||||||
<Button x:Name="TestWindowButton" Content="Test Fenster" Click="TestWindowButton_Click"
|
<Button x:Name="PdfButton" Content="PDF Erzeugen" Click="PdfButton_Click" Tag="Print"
|
||||||
Margin="260,200,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
Margin="260,200,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
||||||
<Button x:Name="QueryWindowButton" Content="Datenbankabfragen" Click="QueryWindowButton_Click"
|
<Button x:Name="TestWindowButton" Content="Test Fenster" Click="TestWindowButton_Click"
|
||||||
Margin="260,240,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
Margin="260,240,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
||||||
|
<Button x:Name="QueryWindowButton" Content="Datenbankabfragen" Click="QueryWindowButton_Click"
|
||||||
|
Margin="260,280,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -56,5 +56,10 @@ namespace Elwig.Windows {
|
|||||||
var w = new QueryWindow();
|
var w = new QueryWindow();
|
||||||
w.Show();
|
w.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BaseDataButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
|
var w = new BaseDataWindow();
|
||||||
|
w.Show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user