Umbau für neues Zugangskonzept
@ -17,12 +17,8 @@
|
|||||||
<TextBlock Margin="10,10,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Kartennummer" VerticalAlignment="Top"/>
|
<TextBlock Margin="10,10,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Kartennummer" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbNummer" Margin="10,0,10,10" TextWrapping="Wrap" Height="23" VerticalAlignment="Bottom"/>
|
<TextBox x:Name="tbNummer" Margin="10,0,10,10" TextWrapping="Wrap" Height="23" VerticalAlignment="Bottom"/>
|
||||||
<TextBlock Margin="10,10,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Grid.Row="1" TextWrapping="Wrap" Text="Farbe" VerticalAlignment="Top"/>
|
<TextBlock Margin="10,10,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Grid.Row="1" TextWrapping="Wrap" Text="Farbe" VerticalAlignment="Top"/>
|
||||||
<ComboBox x:Name="cbColor" Margin="10,0,10,10" Grid.Row="1" Height="22" VerticalAlignment="Bottom">
|
<ComboBox x:Name="cbColor" Margin="10,0,10,10" Grid.Row="1" Height="22" VerticalAlignment="Bottom" SelectedIndex="0"/>
|
||||||
<ComboBoxItem Content="Grün"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="2" TextWrapping="Wrap" Text="Benutzer" VerticalAlignment="Top" Width="226"/>
|
||||||
<ComboBoxItem Content="Rot"/>
|
|
||||||
<ComboBoxItem Content="Gerätewagen"/>
|
|
||||||
</ComboBox>
|
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="2" TextWrapping="Wrap" Text="Firma / Benutzer" VerticalAlignment="Top" Width="226"/>
|
|
||||||
<TextBox x:Name="tbUser" Margin="10,0,10,10" Grid.Row="2" TextWrapping="Wrap" Height="23" VerticalAlignment="Bottom" PreviewTextInput="tbUser_PreviewTextInput"/>
|
<TextBox x:Name="tbUser" Margin="10,0,10,10" Grid.Row="2" TextWrapping="Wrap" Height="23" VerticalAlignment="Bottom" PreviewTextInput="tbUser_PreviewTextInput"/>
|
||||||
<TextBlock Margin="10,10,10,0" Grid.Row="3" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Telefonnummer" VerticalAlignment="Top"/>
|
<TextBlock Margin="10,10,10,0" Grid.Row="3" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Telefonnummer" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbTelnr" Height="23" Margin="10,0,10,10" Grid.Row="3" TextWrapping="Wrap" VerticalAlignment="Bottom"/>
|
<TextBox x:Name="tbTelnr" Height="23" Margin="10,0,10,10" Grid.Row="3" TextWrapping="Wrap" VerticalAlignment="Bottom"/>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -19,16 +20,35 @@ namespace ZKuP
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class AddCardUser : Window
|
public partial class AddCardUser : Window
|
||||||
{
|
{
|
||||||
public AddCardUser(string user = "")
|
string _user = "";
|
||||||
|
string _ansprechpartnerFirma = "";
|
||||||
|
List<string> comboList = new List<string>() { "Grün", "Rot", "Gerätewagen" };
|
||||||
|
List<string> comboListNurRot = new List<string>() { "Rot" };
|
||||||
|
|
||||||
|
byte[] _signature = null;
|
||||||
|
string _ap = "";
|
||||||
|
bool _needTel = true;
|
||||||
|
|
||||||
|
public AddCardUser(string user = "", bool isBesucher = false, string nr = "", string ap = "", bool needTel = true)
|
||||||
{
|
{
|
||||||
|
_user = user;
|
||||||
|
_ap = ap;
|
||||||
|
_needTel = needTel;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.Title = "Karten ausgeben - " + nr;
|
||||||
|
|
||||||
|
//cbColor.ItemsSource = isBesucher ? comboListNurRot : comboList;
|
||||||
|
cbColor.ItemsSource = comboListNurRot;
|
||||||
|
|
||||||
if (!user.Contains("["))
|
if (!user.Contains("["))
|
||||||
{
|
{
|
||||||
tbUser.Text = user;
|
tbUser.Text = user;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
tbTelnr.Text = SQL.ReadSingleValue($"SELECT Tel_Nr_Verantwortlicher_Firma FROM zkup.firmen WHERE Name='{user}'");
|
if (user != "")
|
||||||
|
tbTelnr.Text = SQL.ReadSingleValue($"SELECT Tel_Nr_Verantwortlicher_Firma FROM {MainWindow.table}.firmen WHERE Name='{user}'");
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
@ -37,7 +57,7 @@ namespace ZKuP
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
tbUser.Text = user.Split(',')[1].TrimEnd(']').Trim();
|
tbUser.Text = user.Split(',')[1].TrimEnd(']').Trim();
|
||||||
tbTelnr.Text = SQL.ReadSingleValue($"SELECT TelNr FROM zkup.family WHERE Name='{tbUser.Text}'");
|
tbTelnr.Text = SQL.ReadSingleValue($"SELECT TelNr FROM {MainWindow.table}.family WHERE Name='{tbUser.Text}'");
|
||||||
cbColor.SelectedIndex = 0;
|
cbColor.SelectedIndex = 0;
|
||||||
tbNummer.Focus();
|
tbNummer.Focus();
|
||||||
}
|
}
|
||||||
@ -50,19 +70,31 @@ namespace ZKuP
|
|||||||
else if (cbColor.SelectedIndex == -1)
|
else if (cbColor.SelectedIndex == -1)
|
||||||
MessageBox.Show(this, "Kartenfarbe auswählen!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show(this, "Kartenfarbe auswählen!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
else if (tbUser.Text == "")
|
else if (tbUser.Text == "")
|
||||||
MessageBox.Show(this, "Firma / Benutzer angeben!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show(this, "Benutzer angeben!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
else if (tbTelnr.Text == "")
|
else if (_needTel && tbTelnr.Text == "")
|
||||||
MessageBox.Show(this, "Telefonnummer angeben!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show(this, "Telefonnummer angeben!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"REPLACE INTO karten (kartennr,farbe,benutzer,telnr) VALUES ('{tbNummer.Text}','{(cbColor.SelectedItem as ComboBoxItem).Content.ToString()}','{tbUser.Text}','{tbTelnr.Text}')");
|
var sig = new Signature(Signature.DisclaimerType.Rot, tbUser.Text, tbTelnr.Text);
|
||||||
|
|
||||||
MessageBox.Show(this, "Karte erfolgreich verknüpft", "Erfolg", MessageBoxButton.OK, MessageBoxImage.Information);
|
if (sig.ShowDialog() == false)
|
||||||
|
{
|
||||||
|
_signature = sig.ResultByte;
|
||||||
|
|
||||||
|
if (_signature != null)
|
||||||
|
{
|
||||||
|
await SQL.WriteSQL($"REPLACE INTO karten (kartennr,farbe,benutzer,telnr,AusgegebenDurch,AusgegebenTimestamp,Signature,Ansprechpartner) VALUES ('{tbNummer.Text}','{cbColor.SelectedValue.ToString()}','{tbUser.Text}','{tbTelnr.Text}','{Environment.UserName}','{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', @signature, '{_ap}')", _signature);
|
||||||
|
|
||||||
|
MessageBox.Show(this, "Karte erfolgreich verknüpft", "Erfolg", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
|
|
||||||
|
ResetValues();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
else MessageBox.Show("Unterschrift nicht gefunden\nVorgang bitte wiederholen");
|
||||||
|
}
|
||||||
|
|
||||||
ResetValues();
|
|
||||||
//this.Close();
|
|
||||||
}
|
}
|
||||||
catch (MySql.Data.MySqlClient.MySqlException ex)
|
catch (MySql.Data.MySqlClient.MySqlException ex)
|
||||||
{
|
{
|
||||||
|
|||||||
15
ZKuP/AddVisitorsList.xaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<Window x:Class="ZKuP.AddVisitorsList"
|
||||||
|
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:ZKuP"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Besuchergruppe hinzufügen" MinHeight="70" MinWidth="330" Width="330" Loaded="Window_Loaded">
|
||||||
|
<Grid>
|
||||||
|
<StackPanel x:Name="spGroup" Orientation="Horizontal" Margin="0,0,0,50" >
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
<Button x:Name="btnAdd" Content="Eintragen" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="10" Click="btnAdd_Click"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
126
ZKuP/AddVisitorsList.xaml.cs
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
using MahApps.Metro.Controls;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace ZKuP
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für AddVisitorsList.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class AddVisitorsList : Window
|
||||||
|
{
|
||||||
|
public int GroupID { get; private set; }
|
||||||
|
int width = 0;
|
||||||
|
|
||||||
|
public AddVisitorsList(int VisitorCount)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
BuildWindow(VisitorCount);
|
||||||
|
//var col = (VisitorCount / 10) + 1;
|
||||||
|
|
||||||
|
//for (int j = 0; j < col; j++)
|
||||||
|
//{
|
||||||
|
// var spGroup = new StackPanel() { Orientation = Orientation.Vertical, Margin = new Thickness(0, 0, 0, 50) };
|
||||||
|
|
||||||
|
// for (int i = 0; i < VisitorCount; i++)
|
||||||
|
// {
|
||||||
|
// var sp = new StackPanel();
|
||||||
|
// var tb = new TextBlock() { Text = $"Besucher Nr. {i + 1}:", Margin = new Thickness(5), Height = 20 };
|
||||||
|
// tb.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||||
|
// MahApps.Metro.Controls.TextBoxHelper.SetWatermark(tb, "Vorname Nachname");
|
||||||
|
// sp.Children.Add(tb);
|
||||||
|
// sp.Children.Add(new TextBox() { Margin = new Thickness(10, 0, 10, 0), Height = 30 });
|
||||||
|
|
||||||
|
// spGroup.Children.Add(sp);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BuildWindow(int besucherAnzahl)
|
||||||
|
{
|
||||||
|
int maxProSpalte = 10; // Maximale Anzahl an Textfeldern pro Spalte
|
||||||
|
|
||||||
|
// PanelsContainer soll die WrapPanels halten
|
||||||
|
spGroup.Children.Clear(); // Vorherige Panels entfernen (falls schon welche existieren)
|
||||||
|
|
||||||
|
// Erstelle die WrapPanels und füge sie dem StackPanel hinzu
|
||||||
|
int columnCount = (int)Math.Ceiling((double)besucherAnzahl / maxProSpalte);
|
||||||
|
|
||||||
|
for (int i = 0; i < columnCount; i++)
|
||||||
|
{
|
||||||
|
WrapPanel wrapPanel = new WrapPanel
|
||||||
|
{
|
||||||
|
Orientation = Orientation.Vertical, // Jedes WrapPanel wird vertikal sein
|
||||||
|
Margin = new Thickness(10),
|
||||||
|
Width = 300
|
||||||
|
};
|
||||||
|
|
||||||
|
// Für jedes WrapPanel Textfelder hinzufügen
|
||||||
|
for (int j = 0; j < maxProSpalte && (i * maxProSpalte + j) < besucherAnzahl; j++)
|
||||||
|
{
|
||||||
|
var sp = new StackPanel();
|
||||||
|
var tb = new TextBlock() { Text = $"Besucher Nr. {i * maxProSpalte + j + 1}:", Margin = new Thickness(5), Height = 20 };
|
||||||
|
tb.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||||
|
MahApps.Metro.Controls.TextBoxHelper.SetWatermark(tb, "Vorname Nachname");
|
||||||
|
sp.Children.Add(tb);
|
||||||
|
sp.Children.Add(new TextBox() { Margin = new Thickness(10, 0, 10, 0), Height = 30, Width = 280 });
|
||||||
|
|
||||||
|
|
||||||
|
wrapPanel.Children.Add(sp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Das WrapPanel zum StackPanel hinzufügen
|
||||||
|
spGroup.Children.Add(wrapPanel);
|
||||||
|
}
|
||||||
|
|
||||||
|
width = (columnCount * 320) + 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.Height = spGroup.DesiredSize.Height + 40;
|
||||||
|
this.Width = width;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var visitors = "";
|
||||||
|
|
||||||
|
foreach (var t in this.FindChildren<TextBox>())
|
||||||
|
{
|
||||||
|
if(string.IsNullOrWhiteSpace(t.Text))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Alle Besucher müssen eingetragen werden!", "Unzureichende Eingabe", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
visitors += t.Text + ";";
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await SQL.WriteSQL($"Insert INTO {MainWindow.table}.besucherGroups (besucherList) VALUES ('{visitors}')");
|
||||||
|
GroupID = Convert.ToInt32(SQL.ReadSingleValue($"SELECT LAST_INSERT_ID()"));
|
||||||
|
|
||||||
|
this.DialogResult = true;
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteLog(ex.ToString());
|
||||||
|
MessageBox.Show("Es ist ein Fehler beim hinzufügen der Besucher aufgetreten, bitte erneut versuchen", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,18 +1,19 @@
|
|||||||
<Window x:Class="ZKuP.Arrivals"
|
<Window
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ZKuP"
|
xmlns:local="clr-namespace:ZKuP"
|
||||||
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" x:Class="ZKuP.Arrivals"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
Title="Ankunft bestätigen" Height="799.5" Width="479" ResizeMode="NoResize" Topmost="True" PreviewGotKeyboardFocus="Window_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="Window_PreviewLostKeyboardFocus" WindowStyle="None" AllowsTransparency="True" Loaded="Window_Loaded">
|
Title="Ankunft bestätigen" Height="720" Width="479" ResizeMode="NoResize" Topmost="True" PreviewGotKeyboardFocus="Window_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="Window_PreviewLostKeyboardFocus" WindowStyle="None" AllowsTransparency="True" Loaded="Window_Loaded">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid x:Name="WindowBar" VerticalAlignment="Top" Background="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" Height="30" PreviewMouseDown="Window_PreviewMouseDown">
|
<Grid x:Name="WindowBar" VerticalAlignment="Top" Background="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" Height="30" PreviewMouseDown="Window_PreviewMouseDown">
|
||||||
<TextBlock Text="Ankunft bestätigen" Margin="10,5,364,0" Padding="0" Foreground="White"/>
|
<TextBlock Text="Ankunft bestätigen" Margin="10,5,364,0" Padding="0" Foreground="White"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid x:Name="spinnerCanvas" Margin="0,25,0,0" Background="White" Panel.ZIndex="99">
|
<Grid x:Name="spinnerCanvas" Margin="0,25,0,0" Background="White" Panel.ZIndex="99" Visibility="Collapsed">
|
||||||
<local:ucSpinnerPiston Canvas.Left="74" Canvas.Top="230" RenderTransformOrigin="0.5,0.5" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="25" Height="27" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0">
|
<local:ucSpinnerPiston Canvas.Left="74" Canvas.Top="230" RenderTransformOrigin="0.5,0.5" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="25" Height="27" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0">
|
||||||
<local:ucSpinnerPiston.RenderTransform>
|
<local:ucSpinnerPiston.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
@ -26,64 +27,142 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Margin="0,30,0,0">
|
<Grid Margin="0,30,0,0">
|
||||||
<ComboBox x:Name="cbName" Margin="45,38,46,0" VerticalAlignment="Top" TabIndex="7" DisplayMemberPath="Value" SelectedValuePath="Key" SelectionChanged="CbName_SelectionChanged"/>
|
<Grid.RowDefinitions>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Height="23" Margin="30,15,0,0" TextWrapping="Wrap" Text="Firma/Besucher:" VerticalAlignment="Top" Width="120"/>
|
<RowDefinition/>
|
||||||
<TextBox x:Name="tbVerantwortlPerson" Height="23" Margin="45,83,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="1"/>
|
<RowDefinition x:Name="GParkTop" Height="480"/>
|
||||||
<TextBox x:Name="tbNrVerantwortlPerson" Height="23" Margin="45,108,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="2"/>
|
</Grid.RowDefinitions>
|
||||||
|
<ComboBox x:Name="cbName" Grid.Row="0" Margin="45,38,46,0" VerticalAlignment="Top" TabIndex="7" DisplayMemberPath="Value" SelectedValuePath="Key" SelectionChanged="CbName_SelectionChanged"/>
|
||||||
|
<TextBlock HorizontalAlignment="Left" Grid.Row="0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Height="23" Margin="30,15,0,0" TextWrapping="Wrap" Text="Firma/Besucher:" VerticalAlignment="Top" Width="120"/>
|
||||||
|
|
||||||
<TextBox x:Name="tbAnzahlPersonen" Height="23" Margin="45,142,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="3" PreviewTextInput="tbAnzahlPersonen_PreviewTextInput"/>
|
<TextBox x:Name="tbVerantwortlPerson" Grid.Row="0" Height="23" Margin="45,83,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="1" mah:TextBoxHelper.Watermark="Verantwortliche Person"/>
|
||||||
<TextBox x:Name="tbAnzahlFzg" Height="23" Margin="45,167,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="4" PreviewTextInput="tbAnzahlFzg_PreviewTextInput"/>
|
<!--<TextBlock Margin="45,86,46,0" Grid.Row="0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0" Text="Verantwortlicher MA" IsHitTestVisible="False"/>-->
|
||||||
<TextBlock Margin="45,145,311,0" TextWrapping="Wrap" Text="Anzahl Personen" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"/>
|
|
||||||
<TextBlock Margin="45,171,311,0" TextWrapping="Wrap" Text="Anzahl Fahrzeuge" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"/>
|
<TextBox x:Name="tbNrVerantwortlPerson" Grid.Row="0" Height="23" Margin="45,108,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="2" mah:TextBoxHelper.Watermark="Telefonnummer"/>
|
||||||
<TextBlock x:Name="lblAngemeldeteFzg" Margin="290,171,46,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#CCFF0000" Padding="0,0,5,0" TextAlignment="Right"/>
|
<!--<TextBlock Margin="45,111,311,0" Grid.Row="0" TextWrapping="Wrap" Text="Tel. Nr. des MA" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0" IsHitTestVisible="False"/>-->
|
||||||
|
|
||||||
|
<TextBox x:Name="tbAnzahlPersonen" Height="23" Grid.Row="0" Margin="45,142,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="3" PreviewTextInput="tbAnzahlPersonen_PreviewTextInput"/>
|
||||||
|
<TextBox x:Name="tbAnzahlFzg" Height="23" Grid.Row="0" Margin="45,167,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="4" PreviewTextInput="tbAnzahlFzg_PreviewTextInput"/>
|
||||||
|
<TextBlock Margin="45,145,311,0" Grid.Row="0" TextWrapping="Wrap" Text="Anzahl Personen" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"/>
|
||||||
|
<TextBlock Margin="45,171,311,0" Grid.Row="0" TextWrapping="Wrap" Text="Anzahl Fahrzeuge" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"/>
|
||||||
|
<TextBlock x:Name="lblAngemeldeteBesucher" Grid.Row="0" Margin="290,145,46,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#CCFF0000" Padding="0,0,5,0" TextAlignment="Right"/>
|
||||||
|
<TextBlock x:Name="lblAngemeldeteFzg" Grid.Row="0" Margin="290,171,46,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#CCFF0000" Padding="0,0,5,0" TextAlignment="Right"/>
|
||||||
|
|
||||||
|
|
||||||
<!--<TextBox x:Name="tbKennzeichen" Height="23" Margin="45,130,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="3"/>-->
|
<!--<TextBox x:Name="tbKennzeichen" Height="23" Margin="45,130,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="3"/>-->
|
||||||
<StackPanel x:Name="spKennzeichen" Margin="45,192,46,557"/>
|
<StackPanel x:Name="spKennzeichen" Margin="45,200,46,0" Grid.Row="0"/>
|
||||||
<Grid VerticalAlignment="Bottom" Height="552">
|
|
||||||
<Button x:Name="btnCheck" HorizontalContentAlignment="Center" Margin="44,135,47,0" VerticalAlignment="Top" Height="80" Click="BtnCheck_Click" TabIndex="5" IsEnabled="False">
|
|
||||||
<Button.Background>
|
<Grid Margin="10,0,10,35" Grid.Row="1">
|
||||||
<LinearGradientBrush EndPoint="190,80" StartPoint="190,0" MappingMode="Absolute">
|
<Grid.RowDefinitions>
|
||||||
<GradientStop Color="#FFA2FF00" Offset="1"/>
|
<RowDefinition Height="1.5*"/>
|
||||||
<GradientStop Color="#FF00C300"/>
|
<RowDefinition x:Name="GParkRow" Height="0*"/>
|
||||||
</LinearGradientBrush>
|
<RowDefinition Height="2*"/>
|
||||||
</Button.Background>
|
<RowDefinition Height="1*"/>
|
||||||
<Button.BorderThickness>
|
<RowDefinition Height="1*"/>
|
||||||
<Thickness Bottom="5" Left="5" Right="5" Top="5" />
|
<RowDefinition Height="1*"/>
|
||||||
</Button.BorderThickness>
|
<RowDefinition Height="1*"/>
|
||||||
<Button.BorderBrush>
|
<RowDefinition Height="0.6*"/>
|
||||||
<LinearGradientBrush EndPoint="190,80" StartPoint="190,0" MappingMode="Absolute">
|
<RowDefinition Height="0.6*"/>
|
||||||
<GradientStop Color="#FFB08000" Offset="1"/>
|
<RowDefinition Height="0.6*"/>
|
||||||
<GradientStop Color="#FFCB0000"/>
|
</Grid.RowDefinitions>
|
||||||
</LinearGradientBrush>
|
|
||||||
</Button.BorderBrush>
|
|
||||||
<TextBlock TextAlignment="Center" IsHitTestVisible="False" FontWeight="Bold"><Run Text="Ankunft jetzt"/><LineBreak/><Run Text="↓↓"/><LineBreak/><Run Text="Einweisung und Anmeldung"/><LineBreak/><Run Text="werden überprüft"/></TextBlock>
|
<Grid x:Name="gridBesucherPark" Visibility="Collapsed" Grid.Row="1">
|
||||||
</Button>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Gästeparkplatz zuweisen:" VerticalAlignment="Top" Width="170"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="28,230,0,0" TextWrapping="Wrap" Text="Anmeldung:" VerticalAlignment="Top" Width="190"/>
|
<Grid x:Name="BesuchP" Margin="0, 25, 0, 0" HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="28,330,0,0" TextWrapping="Wrap" Text="Einweisung:" VerticalAlignment="Top" Width="190"/>
|
<Rectangle x:Name="G1" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 0, 0, 0" StrokeThickness="1" Fill="Green"/>
|
||||||
|
<TextBlock Text="1" Margin="0, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
<Rectangle x:Name="G2" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="50, 0, 0, 0" StrokeThickness="1" Fill="Green"/>
|
||||||
|
<TextBlock Text="2" Margin="50, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
<Rectangle x:Name="G3" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100, 0, 0, 0" StrokeThickness="1" Fill="Green"/>
|
||||||
|
<TextBlock Text="3" Margin="100, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
<Rectangle x:Name="G4" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="150, 00, 0, 0" StrokeThickness="1" Fill="Green"/>
|
||||||
|
<TextBlock Text="4" Margin="150, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
<Rectangle x:Name="G5" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="200, 0, 0, 0" StrokeThickness="1" Fill="Green"/>
|
||||||
|
<TextBlock Text="5" Margin="200, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Border x:Name="borderParkkarteAusgeben" Visibility="Collapsed" BorderThickness="2" BorderBrush="Red" Height="40" VerticalAlignment="Bottom" Margin="60,0" CornerRadius="10">
|
||||||
|
<TextBlock x:Name="lblParkkarteAusgeben" Text="" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="2">
|
||||||
|
<TextBlock Text="Ankunft bestätigen:" HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Width="170"/>
|
||||||
|
<Button x:Name="btnCheck" HorizontalContentAlignment="Center" Padding="0" VerticalAlignment="Top" Height="70" Click="BtnCheck_Click" TabIndex="5" IsEnabled="False">
|
||||||
|
<Button.Background>
|
||||||
|
<LinearGradientBrush EndPoint="190,80" StartPoint="190,0" MappingMode="Absolute">
|
||||||
|
<GradientStop Color="#FFA2FF00" Offset="1"/>
|
||||||
|
<GradientStop Color="#FF00C300"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Button.Background>
|
||||||
|
<Button.BorderThickness>
|
||||||
|
<Thickness Bottom="5" Left="5" Right="5" Top="5" />
|
||||||
|
</Button.BorderThickness>
|
||||||
|
<Button.BorderBrush>
|
||||||
|
<LinearGradientBrush EndPoint="190,80" StartPoint="190,0" MappingMode="Absolute">
|
||||||
|
<GradientStop Color="#FFB08000" Offset="1"/>
|
||||||
|
<GradientStop Color="#FFCB0000"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Button.BorderBrush>
|
||||||
|
<TextBlock TextAlignment="Center" IsHitTestVisible="False" FontWeight="Bold"><Run Text="Ankunft jetzt"/><LineBreak/><Run Text="↓↓"/><LineBreak/><Run Text="Einweisung und Anmeldung"/><LineBreak/><Run Text="werden überprüft"/></TextBlock>
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="3">
|
||||||
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Anmeldung:" Width="190"/>
|
||||||
|
<Label x:Name="lblAnmeldung" Height="24" Foreground="Black" HorizontalContentAlignment="Center" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="4">
|
||||||
|
<TextBlock Grid.Row="4" HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Einweisung:" Width="190"/>
|
||||||
|
<Label x:Name="lblEinweisung" Grid.Row="4" Height="24" Foreground="Black" HorizontalContentAlignment="Center" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="5">
|
||||||
|
<TextBlock HorizontalAlignment="Left" Grid.Row="5" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap"><Run Text="Kleine Unterweisung"/><Run Text=":"/></TextBlock>
|
||||||
|
<Label x:Name="lblKleineUnterweisung" Grid.Row="5" Foreground="Black" HorizontalContentAlignment="Center" VerticalAlignment="Top" Height="24" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="6">
|
||||||
|
<TextBlock HorizontalAlignment="Left" Grid.Row="6" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Fahrzeuge:" Width="190"/>
|
||||||
|
<Label x:Name="lblFahrzeuge" Grid.Row="6" Height="24" Foreground="Black" HorizontalContentAlignment="Center" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="0" Margin="10,0">
|
||||||
|
<TextBlock Text="Bemerkung:" TextWrapping="Wrap" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Padding="0" Height="22"/>
|
||||||
|
<TextBox x:Name="tbBemerkung" Height="40" TextWrapping="Wrap" Padding="0,2,0,0" TabIndex="4" VerticalScrollBarVisibility="Auto" AcceptsReturn="True"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Button x:Name="btnSignature" Grid.Row="7" Padding="-2" Content="Unterschrift für Einfahrt" Height="25" Click="btnSignature_Click" ToolTipService.ShowOnDisabled="True" IsEnabled="True"/>
|
||||||
|
<Button x:Name="btnKlEinweisung_durchgeführt" Grid.Row="8" Padding="-2" Content="Hier bestätigen wenn die kleine Einweisung durchgeführt wurde" IsEnabled="False" Click="btnKlEinweisung_durchgeführt_Click" Height="25"/>
|
||||||
|
<Button x:Name="btnKarte" Content="Karte(n) ausgeben" Grid.Row="9" Padding="-2" Height="25" Click="btnKarte_Click" IsEnabled="False"/>
|
||||||
|
|
||||||
<Label x:Name="lblAnmeldung" Margin="44,251,47,0" VerticalAlignment="Top" Height="24" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Padding="1"/>
|
|
||||||
<Label x:Name="lblEinweisung" Margin="44,351,47,0" VerticalAlignment="Top" Height="24" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
|
|
||||||
<Label x:Name="lblKleineUnterweisung" Margin="44,401,47,0" VerticalAlignment="Top" Height="24" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
|
|
||||||
<Button x:Name="btnClose" Content="Schließen" Margin="-2,0,1,1" Height="28" BorderBrush="{x:Null}" Click="Close_Click" VerticalAlignment="Bottom" TabIndex="6" IsEnabled="False"/>
|
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="28,380,0,0" TextWrapping="Wrap" VerticalAlignment="Top"><Run Text="Kleine Unterweisung"/><Run Text=":"/></TextBlock>
|
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="28,280,0,0" TextWrapping="Wrap" Text="Fahrzeuge:" VerticalAlignment="Top" Width="190"/>
|
|
||||||
<Label x:Name="lblFahrzeuge" Margin="44,301,47,0" VerticalAlignment="Top" Height="24" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Padding="1"/>
|
|
||||||
<TextBlock HorizontalAlignment="Left" Margin="28,114,0,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Ankunft bestätigen:" VerticalAlignment="Top" Width="170"/>
|
|
||||||
<TextBox x:Name="tbBemerkung" Height="72" Margin="44,24,47,0" TextWrapping="Wrap" VerticalAlignment="Top" Padding="0,2,0,0" TabIndex="4" VerticalScrollBarVisibility="Auto" AcceptsReturn="True"/>
|
|
||||||
<TextBlock Margin="28,2,327,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Padding="0" Height="22"><Run Text="Bemerkung"/><Run Text=":"/></TextBlock>
|
|
||||||
<Button x:Name="btnSignature" Padding="-2" Content="Unterschrift für Einweisung" Margin="44,460,47,0" Height="25" VerticalAlignment="Top" Click="btnSignature_Click" ToolTipService.ShowOnDisabled="True" IsEnabled="True"/>
|
|
||||||
<Button x:Name="btnKlEinweisung_durchgeführt" Padding="-2" Content="Hier bestätigen wenn kleine Einweisung durchgeführt wurde" Margin="44,430,47,0" IsEnabled="False" Click="btnKlEinweisung_durchgeführt_Click" VerticalAlignment="Top" Height="25"/>
|
|
||||||
<Button x:Name="btnKarte" Content="Karte(n) ausgegeben" Padding="-2" Height="25" HorizontalAlignment="Left" Margin="44,495,0,0" VerticalAlignment="Top" Width="388" Click="btnKarte_Click" IsEnabled="False"/>
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<!--<TextBlock Margin="45,134,311,0" TextWrapping="Wrap" Text="Kennzeichen" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"/>-->
|
<!--<TextBlock Margin="45,134,311,0" TextWrapping="Wrap" Text="Kennzeichen" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"/>-->
|
||||||
<Button x:Name="btnClose_Copy" Content="✕" Padding="0,0,0,0" Margin="0,-25,5,0" Height="18" BorderBrush="{x:Null}" Background="PaleVioletRed" Click="CloseWithX_Click" VerticalAlignment="Top" TabIndex="6" IsEnabled="True" HorizontalAlignment="Right" Width="20"/>
|
<Button x:Name="btnClose_Copy" Grid.Row="0" Content="✕" Padding="0,0,0,0" Margin="0,-25,5,0" Height="18" BorderBrush="{x:Null}" Background="PaleVioletRed" Click="CloseWithX_Click" VerticalAlignment="Top" TabIndex="6" IsEnabled="True" HorizontalAlignment="Right" Width="20"/>
|
||||||
<TextBlock Margin="45,67,46,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"><Run Text="Verantwortlicher MA der"/><Run Text=" einfahrenden Personen"/><Run Text=":"/></TextBlock>
|
|
||||||
<TextBlock Margin="45,111,311,0" TextWrapping="Wrap" Text="Tel. Nr. des MA" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
<Button x:Name="btnClose" Content="Schließen" Grid.Row="1" Margin="-2,0,1,1" Height="28" BorderBrush="{x:Null}" Click="Close_Click" VerticalAlignment="Bottom" TabIndex="6" IsEnabled="False"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Popup x:Name="popBE" IsOpen="False" Width="700" Height="500" AllowsTransparency="True" Placement="Right" HorizontalOffset="20" VerticalOffset="200" PlacementTarget="{Binding DataContext, ElementName=popBE}">
|
||||||
|
<Grid>
|
||||||
|
<Image x:Name="imgBE" Source="{Binding BE}" Width="700" Height="500" Stretch="Fill"/>
|
||||||
|
<TextBlock Text="Gebuchte BE-Fläche der Firma:" FontSize="16" Background="White" Width="230" Padding="5,0" Height="20" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||||
|
<Button x:Name="btnCloseBE" Background="Salmon" Content="✕" BorderThickness="2" BorderBrush="Black" Padding="0,-2,0,0" Width="30" Height="30" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,20,20,0" Click="btnCloseBE_Click"/>
|
||||||
|
</Grid>
|
||||||
|
</Popup>
|
||||||
|
<Popup x:Name="popBesucher" IsOpen="False" Width="400" AllowsTransparency="True" Placement="Right" HorizontalOffset="20" VerticalOffset="200" PlacementTarget="{Binding DataContext, ElementName=popBE}">
|
||||||
|
<Border BorderThickness="1" BorderBrush="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}">
|
||||||
|
<Grid Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
|
||||||
|
<TextBlock Text="Angemeldete Personen:" FontSize="16" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Width="180" Height="30" Margin="10,15,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||||
|
<Button x:Name="btnClosePopBesucher" Background="Salmon" Content="✕" BorderThickness="2" BorderBrush="Black" Padding="0,-2,0,0" Width="30" Height="30" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Click="btnClosePopBesucher_Click"/>
|
||||||
|
|
||||||
|
<StackPanel x:Name="spBesucher" Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="15,50,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
using System;
|
using MahApps.Metro.Controls;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Web.UI.WebControls.WebParts;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
@ -36,6 +39,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
int fzgCount = 0;
|
int fzgCount = 0;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -52,11 +56,33 @@ namespace ZKuP
|
|||||||
selectedID = id == -1 ? name : id.ToString();
|
selectedID = id == -1 ? name : id.ToString();
|
||||||
isBesucher = IsBesucher;
|
isBesucher = IsBesucher;
|
||||||
Name = name;
|
Name = name;
|
||||||
|
|
||||||
|
if(isBesucher == 1)
|
||||||
|
{
|
||||||
|
TextBoxHelper.SetWatermark(tbVerantwortlPerson, "Verantwortlicher Besucher");
|
||||||
|
TextBoxHelper.SetWatermark(tbNrVerantwortlPerson, "Telefonnummer Besucher");
|
||||||
|
}
|
||||||
|
|
||||||
|
var park = SQL.ReadListString($"SELECT parkplatznr FROM {MainWindow.table}.`parkplaetze` WHERE parkplatznr LIKE 'G%'").Result;
|
||||||
|
var rectsG = BesuchP.Children.OfType<Rectangle>();
|
||||||
|
|
||||||
|
foreach (Rectangle s in rectsG)
|
||||||
|
{
|
||||||
|
if (park.Contains(s.Name))
|
||||||
|
{
|
||||||
|
//var x = Helper.FindVisualChildren<Rectangle>(BE, s.Name).First();
|
||||||
|
s.Fill = new SolidColorBrush(Colors.Red);
|
||||||
|
}
|
||||||
|
else if (!s.Name.StartsWith("Red"))
|
||||||
|
{
|
||||||
|
s.Fill = new SolidColorBrush(Colors.Green);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task initialize()
|
private async Task initialize()
|
||||||
{
|
{
|
||||||
var list = await SQL.ReadDictionary("Select idFirmen, Name FROM zkup.firmen ORDER BY Name", 0, 1);
|
var list = await SQL.ReadDictionary($"Select idFirmen, Name FROM {MainWindow.table}.firmen ORDER BY Name", 0, 1);
|
||||||
//list = list.OrderBy(p => p.Value).ToDictionary();
|
//list = list.OrderBy(p => p.Value).ToDictionary();
|
||||||
|
|
||||||
NamesList.Add(0, "Firmen:");
|
NamesList.Add(0, "Firmen:");
|
||||||
@ -72,7 +98,7 @@ namespace ZKuP
|
|||||||
firmenCount = NamesList.Count;
|
firmenCount = NamesList.Count;
|
||||||
|
|
||||||
|
|
||||||
list = await SQL.ReadDictionary("Select idBesucher, Name FROM zkup.besucher ORDER BY Name", 0, 1);
|
list = await SQL.ReadDictionary($"Select idBesucher, Name FROM {MainWindow.table}.besucher ORDER BY Name", 0, 1);
|
||||||
//list.OrderBy(p => p).ToList();
|
//list.OrderBy(p => p).ToList();
|
||||||
|
|
||||||
NamesList.Add(999994, "Besucher:");
|
NamesList.Add(999994, "Besucher:");
|
||||||
@ -89,7 +115,7 @@ namespace ZKuP
|
|||||||
besucherCount = NamesList.Count - firmenCount;
|
besucherCount = NamesList.Count - firmenCount;
|
||||||
|
|
||||||
|
|
||||||
list = await SQL.ReadDictionary("Select idfamily, Name FROM zkup.family ORDER BY Name", 0, 1);
|
list = await SQL.ReadDictionary($"Select idfamily, Name FROM {MainWindow.table}.family ORDER BY Name", 0, 1);
|
||||||
//list.OrderBy(p => p).ToList();
|
//list.OrderBy(p => p).ToList();
|
||||||
|
|
||||||
NamesList.Add(999999, "Führung:");
|
NamesList.Add(999999, "Führung:");
|
||||||
@ -127,19 +153,19 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (isBesucher == 0)
|
if (isBesucher == 0)
|
||||||
{
|
{
|
||||||
tbVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Verantwortlicher_MA_Firma FROM zkup.firmen WHERE `idFirmen` = '{selectedID}' LIMIT 1");
|
tbVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Verantwortlicher_MA_Firma FROM {MainWindow.table}.firmen WHERE `idFirmen` = '{selectedID}' LIMIT 1");
|
||||||
tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Tel_Nr_Verantwortlicher_Firma FROM zkup.firmen WHERE `idFirmen` = '{selectedID}' LIMIT 1");
|
tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Tel_Nr_Verantwortlicher_Firma FROM {MainWindow.table}.firmen WHERE `idFirmen` = '{selectedID}' LIMIT 1");
|
||||||
}
|
}
|
||||||
else if (isBesucher == 1)
|
else if (isBesucher == 1)
|
||||||
{
|
{
|
||||||
tbVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Name FROM zkup.besucher WHERE `idbesucher` = '{selectedID}' LIMIT 1");
|
tbVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Verantwortlicher_MA FROM {MainWindow.table}.besucher WHERE `idbesucher` = '{selectedID}' LIMIT 1");
|
||||||
tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Tel_Nr_Besucher FROM zkup.besucher WHERE `idbesucher` = '{selectedID}' LIMIT 1");
|
tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Tel_Nr_Besucher FROM {MainWindow.table}.besucher WHERE `idbesucher` = '{selectedID}' LIMIT 1");
|
||||||
}
|
}
|
||||||
else if (isBesucher == 2)
|
else if (isBesucher == 2)
|
||||||
{
|
{
|
||||||
tbVerantwortlPerson.Text = Name;
|
tbVerantwortlPerson.Text = Name;
|
||||||
tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT TelNr AS Tel_Nr_Besucher FROM zkup.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT TelNr AS Tel_Nr_Besucher FROM {MainWindow.table}.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
||||||
tbAnzahlPersonen.Text = await SQL.ReadSingleValueAsync($"SELECT AnzBegleiter FROM zkup.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
tbAnzahlPersonen.Text = await SQL.ReadSingleValueAsync($"SELECT AnzBegleiter FROM {MainWindow.table}.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//else if (isBesucher == 2)
|
//else if (isBesucher == 2)
|
||||||
@ -152,8 +178,8 @@ namespace ZKuP
|
|||||||
// //cbName.SelectedItem = cbName.Items.IndexOf(cbName.ItemsSource as )
|
// //cbName.SelectedItem = cbName.Items.IndexOf(cbName.ItemsSource as )
|
||||||
// //cbName.SelectedValue = Name;
|
// //cbName.SelectedValue = Name;
|
||||||
// tbVerantwortlPerson.Text = Name;
|
// tbVerantwortlPerson.Text = Name;
|
||||||
// tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT TelNr AS Tel_Nr_Besucher FROM zkup.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
// tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT TelNr AS Tel_Nr_Besucher FROM {MainWindow.table}.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
||||||
// tbAnzahlPersonen.Text = await SQL.ReadSingleValueAsync($"SELECT AnzBegleiter FROM zkup.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
// tbAnzahlPersonen.Text = await SQL.ReadSingleValueAsync($"SELECT AnzBegleiter FROM {MainWindow.table}.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
||||||
//}
|
//}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -169,15 +195,53 @@ namespace ZKuP
|
|||||||
btnSignature.ToolTip = "Kein Unterschriftenpad gefunden";
|
btnSignature.ToolTip = "Kein Unterschriftenpad gefunden";
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
string x = SQL.ReadSingleValue($"SELECT BEint FROM {MainWindow.table}.firmen WHERE idFirmen = '{selectedID}'");
|
||||||
|
int beID = Convert.ToInt16(x != "" ? x : "-1");
|
||||||
|
if (isBesucher == 0 && (beID != -1))
|
||||||
|
{
|
||||||
|
imgBE.Source = new BitmapImage(new Uri(@"pack://application:,,,/"
|
||||||
|
+ System.Reflection.Assembly.GetExecutingAssembly().GetName().Name
|
||||||
|
+ ";component/"
|
||||||
|
+ $"Assets/BE{beID.ToString()}.png", UriKind.Absolute));
|
||||||
|
popBE.IsOpen = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isBesucher == 1)
|
||||||
|
{
|
||||||
|
gridBesucherPark.Visibility = Visibility.Visible;
|
||||||
|
GParkRow.Height = new GridLength(1.8, GridUnitType.Star);
|
||||||
|
this.Height = this.Height + 100;
|
||||||
|
GParkTop.Height = new GridLength(GParkTop.Height.Value + 100, GridUnitType.Pixel);
|
||||||
|
|
||||||
|
var besucher = SQL.ReadSingleValue($"SELECT besucherList FROM {MainWindow.table}.besucherGroups WHERE idBesucher = '{selectedID}'");
|
||||||
|
|
||||||
|
if (besucher.Contains(';'))
|
||||||
|
{
|
||||||
|
var finalBesucher = besucher.TrimEnd(';').Split(';');
|
||||||
|
lblAngemeldeteBesucher.Text = $"{finalBesucher.Length} angemeldet";
|
||||||
|
|
||||||
|
foreach (var b in finalBesucher)
|
||||||
|
{
|
||||||
|
var lbl = new TextBlock() { Text = "- " + b, Height = 25, FontSize = 14 };
|
||||||
|
lbl.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||||
|
|
||||||
|
spBesucher.Children.Add(lbl);
|
||||||
|
}
|
||||||
|
|
||||||
|
popBesucher.Height = 50 + (finalBesucher.Length * 25) + 10;
|
||||||
|
popBesucher.IsOpen = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void BtnCheck_Click(object sender, RoutedEventArgs e)
|
private async void BtnCheck_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var zutritt = "";
|
var zutritt = "";
|
||||||
|
string kat = "1";
|
||||||
|
|
||||||
var einweis = "";
|
var einweis = "";
|
||||||
var kl_einweis = "";
|
var kl_einweis = "";
|
||||||
string kat = "1";
|
|
||||||
string asp = "";
|
string asp = "";
|
||||||
string anzFzg = "";
|
string anzFzg = "";
|
||||||
int klUnterweis = 0;
|
int klUnterweis = 0;
|
||||||
@ -187,17 +251,17 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (cbName.SelectedIndex < firmenCount)
|
if (cbName.SelectedIndex < firmenCount)
|
||||||
{
|
{
|
||||||
table = await SQL.ReadSQL("Select * FROM zkup.firmen");
|
table = await SQL.ReadSQL($"Select * FROM {MainWindow.table}.firmen");
|
||||||
kat = "1";
|
kat = "1";
|
||||||
}
|
}
|
||||||
else if (cbName.SelectedIndex >= (firmenCount + besucherCount + 2))
|
else if (cbName.SelectedIndex >= (firmenCount + besucherCount + 2))
|
||||||
{
|
{
|
||||||
table = await SQL.ReadSQL("Select * FROM zkup.family");
|
table = await SQL.ReadSQL($"Select * FROM {MainWindow.table}.family");
|
||||||
kat = "5";
|
kat = "5";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
table = await SQL.ReadSQL("Select * FROM zkup.besucher");
|
table = await SQL.ReadSQL($"Select * FROM {MainWindow.table}.besucher");
|
||||||
kat = "2";
|
kat = "2";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,7 +354,8 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (kat == "2")
|
if (kat == "2")
|
||||||
{
|
{
|
||||||
|
|
||||||
if (DateTime.TryParse(row.ItemArray[5].ToString(), out beginnDT))
|
if (DateTime.TryParse(row.ItemArray[5].ToString(), out beginnDT))
|
||||||
{
|
{
|
||||||
if (DateTime.Now.Date == beginnDT)
|
if (DateTime.Now.Date == beginnDT)
|
||||||
@ -421,7 +486,12 @@ namespace ZKuP
|
|||||||
btnSignature.Content = "Unterschrift bereits vorhanden";
|
btnSignature.Content = "Unterschrift bereits vorhanden";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arrivalClicked) btnClose.IsEnabled = true;
|
if (arrivalClicked) btnKarte.IsEnabled = true;
|
||||||
|
if (kat == "2")
|
||||||
|
{
|
||||||
|
Helper.PrintPDF("\\\\mhb00swfs003v.fv-werke.db.de\\GLW99\\ZKuP\\Einweisungsflyer.pdf");
|
||||||
|
btnCheck.Content = "Einweisungflyer wird gedruckt...";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -487,7 +557,7 @@ namespace ZKuP
|
|||||||
string a_Fzg = "0";
|
string a_Fzg = "0";
|
||||||
if (cbName.SelectedIndex < firmenCount)
|
if (cbName.SelectedIndex < firmenCount)
|
||||||
{
|
{
|
||||||
a_Fzg = await SQL.ReadSingleValueAsync($"SELECT Anzahl_Fzg FROM zkup.firmen WHERE `idFirmen`='{selectedID}' AND `Arbeitsbeginn` <= current_date() AND `Arbeitsende` >= current_date()");
|
a_Fzg = await SQL.ReadSingleValueAsync($"SELECT Anzahl_Fzg FROM {MainWindow.table}.firmen WHERE `idFirmen`='{selectedID}' AND `Arbeitsbeginn` <= current_date() AND `Arbeitsende` >= current_date()");
|
||||||
lblAngemeldeteFzg.Text = !string.IsNullOrWhiteSpace(a_Fzg) ? a_Fzg + " Fzg. angemeldet" : "keine Fzg. angemeldet";
|
lblAngemeldeteFzg.Text = !string.IsNullOrWhiteSpace(a_Fzg) ? a_Fzg + " Fzg. angemeldet" : "keine Fzg. angemeldet";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -527,7 +597,7 @@ namespace ZKuP
|
|||||||
Padding = new Thickness(5, 0, 0, 0)
|
Padding = new Thickness(5, 0, 0, 0)
|
||||||
});
|
});
|
||||||
|
|
||||||
this.Height = this.Height + 11;
|
this.Height = this.Height + 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,6 +606,53 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<string> selectedGPark = new List<string>();
|
||||||
|
private async void G_ParkPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
var block = sender as TextBlock;
|
||||||
|
var parkplatz = block.Text;
|
||||||
|
|
||||||
|
foreach (var rect in BesuchP.Children.OfType<Rectangle>())
|
||||||
|
{
|
||||||
|
if (rect.Name == "G" + parkplatz)
|
||||||
|
{
|
||||||
|
if (rect.Fill.ToString() == Colors.Red.ToString())
|
||||||
|
{
|
||||||
|
rect.Fill = new SolidColorBrush(Colors.Green);
|
||||||
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.parkplaetze WHERE parkplatznr='G{parkplatz}'");
|
||||||
|
selectedGPark.Remove(parkplatz);
|
||||||
|
}
|
||||||
|
else if (rect.Fill.ToString() == Colors.Green.ToString())
|
||||||
|
{
|
||||||
|
rect.Fill = new SolidColorBrush(Colors.Red);
|
||||||
|
await SQL.WriteSQL($"INSERT INTO {MainWindow.table}.parkplaetze (parkplatznr) VALUES ('G{parkplatz}')");
|
||||||
|
selectedGPark.Add(parkplatz);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedGPark.Count > 0)
|
||||||
|
{
|
||||||
|
string s = "";
|
||||||
|
s = String.Join(", ", selectedGPark.OrderBy(p => p));
|
||||||
|
//s = s.TrimEnd(',');
|
||||||
|
borderParkkarteAusgeben.Visibility = Visibility.Visible;
|
||||||
|
lblParkkarteAusgeben.Text = $"Parkkarte Nr. {s}\nan Besucher {cbName.Text} ausgeben";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lblParkkarteAusgeben.Text = "";
|
||||||
|
borderParkkarteAusgeben.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private async void btnSignature_Click(object sender, RoutedEventArgs e)
|
private async void btnSignature_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
string kat = "1";
|
string kat = "1";
|
||||||
@ -559,12 +676,12 @@ namespace ZKuP
|
|||||||
//if (cbName.SelectedIndex < firmenCount)
|
//if (cbName.SelectedIndex < firmenCount)
|
||||||
//{
|
//{
|
||||||
// //firmaBesucher = cbName.SelectedItem.ToString();
|
// //firmaBesucher = cbName.SelectedItem.ToString();
|
||||||
// name = await SQL.ReadSingleValueAsync($"SELECT Verantwortlicher_MA_Firma FROM zkup.firmen WHERE `idFirmen` = '{selectedID}'");
|
// name = await SQL.ReadSingleValueAsync($"SELECT Verantwortlicher_MA_Firma FROM {MainWindow.table}.firmen WHERE `idFirmen` = '{selectedID}'");
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
// //firmaBesucher = cbName.SelectedItem.ToString();
|
// //firmaBesucher = cbName.SelectedItem.ToString();
|
||||||
// name = await SQL.ReadSingleValueAsync($"SELECT Ansprechpartner_Intern FROM zkup.besucher WHERE `idBesucher` = '{selectedID}'");
|
// name = await SQL.ReadSingleValueAsync($"SELECT Ansprechpartner_Intern FROM {MainWindow.table}.besucher WHERE `idBesucher` = '{selectedID}'");
|
||||||
//}
|
//}
|
||||||
|
|
||||||
name = tbVerantwortlPerson.Text;
|
name = tbVerantwortlPerson.Text;
|
||||||
@ -593,9 +710,9 @@ namespace ZKuP
|
|||||||
else { btnSignature.IsEnabled = true; btnSignature.Content = "Unterschrift einholen!"; }
|
else { btnSignature.IsEnabled = true; btnSignature.Content = "Unterschrift einholen!"; }
|
||||||
|
|
||||||
if (!cbName.SelectedValue.ToString().StartsWith("9999"))
|
if (!cbName.SelectedValue.ToString().StartsWith("9999"))
|
||||||
await SQL.WriteSQL($"UPDATE zkup.firmen SET Kleine_Unterweisung_bis = '{(DateTime.Now.Date.AddYears(1)).ToString("yyyy-MM-dd")}' WHERE `idFirmen` = '{selectedID}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.firmen SET Kleine_Unterweisung_bis = '{(DateTime.Now.Date.AddYears(1)).ToString("yyyy-MM-dd")}' WHERE `idFirmen` = '{selectedID}'");
|
||||||
else
|
else
|
||||||
await SQL.WriteSQL($"UPDATE zkup.besucher SET Kleine_Unterweisung_bis = '{(DateTime.Now.Date.AddYears(1)).ToString("yyyy-MM-dd")}' WHERE `idBesucher` = '{selectedID}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.besucher SET Kleine_Unterweisung_bis = '{(DateTime.Now.Date.AddYears(1)).ToString("yyyy-MM-dd")}' WHERE `idBesucher` = '{selectedID}'");
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -611,9 +728,38 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void btnKarte_Click(object sender, RoutedEventArgs e)
|
private void btnKarte_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
AddCardUser aI = new AddCardUser(cbName.SelectedItem.ToString());
|
if (!string.IsNullOrWhiteSpace(tbAnzahlPersonen.Text))
|
||||||
aI.Owner = this;
|
{
|
||||||
aI.ShowDialog();
|
var ap = SQL.ReadSingleValue($"SELECT Ansprechpartner_Intern FROM {MainWindow.table}.firmen WHERE idFirmen='{selectedID}'");
|
||||||
|
var user = "";
|
||||||
|
if(isBesucher == 1 && Convert.ToInt16(tbAnzahlPersonen.Text) > 1)
|
||||||
|
{
|
||||||
|
user = SQL.ReadSingleValue($"SELECT besucherList FROM {MainWindow.table}.besucherGroups WHERE idbesucher = '{selectedID}'");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < Convert.ToInt16(tbAnzahlPersonen.Text); i++)
|
||||||
|
{
|
||||||
|
if (i == 0)
|
||||||
|
{
|
||||||
|
AddCardUser aI = new AddCardUser(cbName.SelectedItem.ToString(), isBesucher == 1 ? true : false, (i + 1).ToString() + " / " + tbAnzahlPersonen.Text, ap);
|
||||||
|
aI.Owner = this;
|
||||||
|
aI.ShowDialog();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var u = "";
|
||||||
|
if (user.Contains(';')) u = user.Split(';')[i - 1];
|
||||||
|
|
||||||
|
AddCardUser aI = new AddCardUser(u, isBesucher == 1 ? true : false, (i + 1).ToString() + " / " + tbAnzahlPersonen.Text, ap, false);
|
||||||
|
aI.Owner = this;
|
||||||
|
aI.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (arrivalClicked) btnClose.IsEnabled = true;
|
||||||
|
}
|
||||||
|
else MessageBox.Show("Anzahl Personen muss angegeben werden", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_PreviewGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
|
private void Window_PreviewGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
|
||||||
@ -658,6 +804,12 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void tbAnzahlFzg_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
private void tbAnzahlFzg_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||||
{
|
{
|
||||||
|
if(isBesucher == 1)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Besucher dürfen nicht mit einem Fahrzeug einfahren!\nDem Besucher einen Besucherparkplatz zuweisen!", "Einfahrt verboten!", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Regex.IsMatch(e.Text, "[0-9]"))
|
if (!Regex.IsMatch(e.Text, "[0-9]"))
|
||||||
{
|
{
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
@ -668,5 +820,15 @@ namespace ZKuP
|
|||||||
tip.IsOpen = true;
|
tip.IsOpen = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnCloseBE_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
popBE.IsOpen = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnClosePopBesucher_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
popBesucher.IsOpen = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,7 +80,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DatePicker x:Name="dPOverviewVon" HorizontalAlignment="Left" Margin="90,5,0,0" VerticalAlignment="Top" Width="100" SelectedDateChanged="dPOverviewVon_SelectedDateChanged" DateValidationError="dPOverviewVon_DateValidationError">
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dPOverviewVon" HorizontalAlignment="Left" Margin="90,5,0,0" VerticalAlignment="Top" Width="100" SelectedDateChanged="dPOverviewVon_SelectedDateChanged" DateValidationError="dPOverviewVon_DateValidationError">
|
||||||
<DatePicker.Resources>
|
<DatePicker.Resources>
|
||||||
<Style TargetType="DatePickerTextBox">
|
<Style TargetType="DatePickerTextBox">
|
||||||
<Setter Property="IsReadOnly" Value="True"/>
|
<Setter Property="IsReadOnly" Value="True"/>
|
||||||
@ -94,7 +94,7 @@
|
|||||||
</DatePicker>
|
</DatePicker>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,14,0,0" TextWrapping="Wrap" Text="Ansicht von:" VerticalAlignment="Top" Height="20" Width="75"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,14,0,0" TextWrapping="Wrap" Text="Ansicht von:" VerticalAlignment="Top" Height="20" Width="75"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="200,14,0,0" TextWrapping="Wrap" Text="bis:" VerticalAlignment="Top" Height="20" Width="26"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="200,14,0,0" TextWrapping="Wrap" Text="bis:" VerticalAlignment="Top" Height="20" Width="26"/>
|
||||||
<DatePicker x:Name="dPOverviewBis" HorizontalAlignment="Left" Margin="230,5,0,0" VerticalAlignment="Top" Width="100" SelectedDateChanged="dPOverviewBis_SelectedDateChanged" DateValidationError="dPOverviewBis_DateValidationError">
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dPOverviewBis" HorizontalAlignment="Left" Margin="230,5,0,0" VerticalAlignment="Top" Width="100" SelectedDateChanged="dPOverviewBis_SelectedDateChanged" DateValidationError="dPOverviewBis_DateValidationError">
|
||||||
<DatePicker.Resources>
|
<DatePicker.Resources>
|
||||||
<Style TargetType="DatePickerTextBox">
|
<Style TargetType="DatePickerTextBox">
|
||||||
<Setter Property="IsReadOnly" Value="True"/>
|
<Setter Property="IsReadOnly" Value="True"/>
|
||||||
|
|||||||
@ -42,20 +42,20 @@ namespace ZKuP
|
|||||||
|
|
||||||
private async void FillDataGrid(DateTime von, DateTime bis)
|
private async void FillDataGrid(DateTime von, DateTime bis)
|
||||||
{
|
{
|
||||||
if (LoggedInRole == Roles.Admin || LoggedInRole == Roles.Pförtner || LoggedInRole == Roles.Controller)
|
if (LoggedInRole == Roles.Admin || LoggedInRole == Roles.Pförtner)
|
||||||
{
|
{
|
||||||
todayFirm = await SQL.ReadSQL($"Select * From zkup.firmen where (Arbeitsbeginn >= '{von.ToString("yyyy-MM-dd")}' AND Arbeitsende <= '{bis.ToString("yyyy-MM-dd")}') OR '{von.ToString("yyyy-MM-dd")}' BETWEEN Arbeitsbeginn AND Arbeitsende", todayFirm);
|
todayFirm = await SQL.ReadSQL($"Select * From {MainWindow.table}.firmen where (Arbeitsbeginn >= '{von.ToString("yyyy-MM-dd")}' AND Arbeitsende <= '{bis.ToString("yyyy-MM-dd")}') OR '{von.ToString("yyyy-MM-dd")}' BETWEEN Arbeitsbeginn AND Arbeitsende", todayFirm);
|
||||||
todayBesuch = await SQL.ReadSQL($"SELECT idbesucher, concat('Besucher: ', Name) AS Name, Verantwortlicher_MA AS Verantwortlicher_MA_Firma,Tel_Nr_Besucher AS Tel_Nr_Verantwortlicher_Firma,Besuchstag AS Arbeitsbeginn,Grund_des_Besuchs AS Beauftragte_Leistung,Ansprechpartner_Intern from zkup.besucher WHERE (Besuchstag >= '{von.ToString("yyyy-MM-dd")}' AND Besuchstag <= '{bis.ToString("yyyy-MM-dd")}')", todayBesuch);
|
todayBesuch = await SQL.ReadSQL($"SELECT idbesucher, concat('Besucher: ', Name) AS Name, Verantwortlicher_MA AS Verantwortlicher_MA_Firma,Tel_Nr_Besucher AS Tel_Nr_Verantwortlicher_Firma,Besuchstag AS Arbeitsbeginn,Grund_des_Besuchs AS Beauftragte_Leistung,Ansprechpartner_Intern from {MainWindow.table}.besucher WHERE (Besuchstag >= '{von.ToString("yyyy-MM-dd")}' AND Besuchstag <= '{bis.ToString("yyyy-MM-dd")}')", todayBesuch);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
todayFirm = await SQL.ReadSQL($"Select * From zkup.firmen where ((Arbeitsbeginn >= '{von.ToString("yyyy-MM-dd")}' AND Arbeitsende <= '{bis.ToString("yyyy-MM-dd")}') OR '{von.ToString("yyyy-MM-dd")}' BETWEEN Arbeitsbeginn AND Arbeitsende) AND (Ersteller = '{Environment.UserName}' " +
|
todayFirm = await SQL.ReadSQL($"Select * From {MainWindow.table}.firmen where ((Arbeitsbeginn >= '{von.ToString("yyyy-MM-dd")}' AND Arbeitsende <= '{bis.ToString("yyyy-MM-dd")}') OR '{von.ToString("yyyy-MM-dd")}' BETWEEN Arbeitsbeginn AND Arbeitsende) AND (Ersteller = '{Environment.UserName}' " +
|
||||||
$"OR Ersteller = '{Environment.UserDomainName}{Environment.UserName}' " +
|
$"OR Ersteller = '{Environment.UserDomainName}{Environment.UserName}' " +
|
||||||
$"OR Ersteller = '{SQL.ReadSingleValue($"SELECT Vertreter FROM zkup.ansprechpartner WHERE Name = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'")}' " +
|
$"OR Ersteller = '{SQL.ReadSingleValue($"SELECT Vertreter FROM {MainWindow.table}.ansprechpartner WHERE Name = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'")}' " +
|
||||||
$"OR Ansprechpartner_Intern = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}')", todayFirm);
|
$"OR Ansprechpartner_Intern = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}')", todayFirm);
|
||||||
todayBesuch = await SQL.ReadSQL($"SELECT idbesucher, concat('Besucher: ', Name) AS Name, Verantwortlicher_MA AS Verantwortlicher_MA_Firma,Tel_Nr_Besucher AS Tel_Nr_Verantwortlicher_Firma,Besuchstag AS Arbeitsbeginn,Grund_des_Besuchs AS Beauftragte_Leistung,Ansprechpartner_Intern from zkup.besucher WHERE (Besuchstag >= '{von.ToString("yyyy-MM-dd")}' AND Besuchstag <= '{bis.ToString("yyyy-MM-dd")}') AND (Ersteller = '{Environment.UserName}' " +
|
todayBesuch = await SQL.ReadSQL($"SELECT idbesucher, concat('Besucher: ', Name) AS Name, Verantwortlicher_MA AS Verantwortlicher_MA_Firma,Tel_Nr_Besucher AS Tel_Nr_Verantwortlicher_Firma,Besuchstag AS Arbeitsbeginn,Grund_des_Besuchs AS Beauftragte_Leistung,Ansprechpartner_Intern from {MainWindow.table}.besucher WHERE (Besuchstag >= '{von.ToString("yyyy-MM-dd")}' AND Besuchstag <= '{bis.ToString("yyyy-MM-dd")}') AND (Ersteller = '{Environment.UserName}' " +
|
||||||
$"OR Ersteller = '{Environment.UserDomainName}{Environment.UserName}' " +
|
$"OR Ersteller = '{Environment.UserDomainName}{Environment.UserName}' " +
|
||||||
$"OR Ersteller = '{SQL.ReadSingleValue($"SELECT Vertreter FROM zkup.ansprechpartner WHERE Name = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'")}' " +
|
$"OR Ersteller = '{SQL.ReadSingleValue($"SELECT Vertreter FROM {MainWindow.table}.ansprechpartner WHERE Name = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'")}' " +
|
||||||
$"OR Ansprechpartner_Intern = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}')", todayBesuch);
|
$"OR Ansprechpartner_Intern = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}')", todayBesuch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -59,11 +59,11 @@ namespace ZKuP
|
|||||||
string aspName = "";
|
string aspName = "";
|
||||||
|
|
||||||
if (firmOrVisit != "family")
|
if (firmOrVisit != "family")
|
||||||
aspName = SQL.ReadSingleValue($"SELECT Ansprechpartner_Intern FROM zkup.{firmOrVisit.ToLower()} WHERE id{firmOrVisit}='{idFirma_Besucher}'");
|
aspName = SQL.ReadSingleValue($"SELECT Ansprechpartner_Intern FROM {MainWindow.table}.{firmOrVisit.ToLower()} WHERE id{firmOrVisit}='{idFirma_Besucher}'");
|
||||||
else
|
else
|
||||||
aspName = Asp;
|
aspName = Asp;
|
||||||
|
|
||||||
System.Data.DataTable asp = SQL.ReadSQL($"SELECT * FROM zkup.ansprechpartner WHERE Name='{aspName}'").Result;
|
System.Data.DataTable asp = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.ansprechpartner WHERE Name='{aspName}'").Result;
|
||||||
|
|
||||||
if (asp.Rows.Count > 0)
|
if (asp.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
@ -75,7 +75,7 @@ namespace ZKuP
|
|||||||
tbTelVorgesetzter.Text = asp.Rows[0].ItemArray[5].ToString();
|
tbTelVorgesetzter.Text = asp.Rows[0].ItemArray[5].ToString();
|
||||||
|
|
||||||
|
|
||||||
tbBemerkung.Text = SQL.ReadSingleValue($"SELECT Bemerkung FROM zkup.zutritte WHERE idzutritte='{idzutritte}'");
|
tbBemerkung.Text = SQL.ReadSingleValue($"SELECT Bemerkung FROM {MainWindow.table}.zutritte WHERE idzutritte='{idzutritte}'");
|
||||||
|
|
||||||
this.Visibility = Visibility.Visible;
|
this.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ namespace ZKuP
|
|||||||
lblTelAsp.Text = "Telefonnummer Fahrer:";
|
lblTelAsp.Text = "Telefonnummer Fahrer:";
|
||||||
lblBemerkung.Text = "Parkplatz / Bemerkung";
|
lblBemerkung.Text = "Parkplatz / Bemerkung";
|
||||||
|
|
||||||
System.Data.DataTable asp = SQL.ReadSQL($"SELECT * FROM zkup.zutritte WHERE idzutritte='{idzutritte}'").Result;
|
System.Data.DataTable asp = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.zutritte WHERE idzutritte='{idzutritte}'").Result;
|
||||||
if (asp.Rows.Count > 0)
|
if (asp.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
tbAsp.Text = asp.Rows[0].ItemArray[2].ToString().Split(new[] { "Fahrer: " }, StringSplitOptions.None)[1];
|
tbAsp.Text = asp.Rows[0].ItemArray[2].ToString().Split(new[] { "Fahrer: " }, StringSplitOptions.None)[1];
|
||||||
@ -130,7 +130,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
private async void btnSignature_Click(object sender, RoutedEventArgs e)
|
private async void btnSignature_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var x = SQL.ReadSingleByteArr($"SELECT signature_blob FROM zkup.zutritte WHERE idzutritte = '{id}'");
|
var x = SQL.ReadSingleByteArr($"SELECT signature_blob FROM {MainWindow.table}.zutritte WHERE idzutritte = '{id}'");
|
||||||
//var i = DBImageManager.ImageFromByte(x);
|
//var i = DBImageManager.ImageFromByte(x);
|
||||||
ImageView iv;
|
ImageView iv;
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 211 KiB |
BIN
ZKuP/Assets/BE1.png
Normal file
|
After Width: | Height: | Size: 921 KiB |
|
Before Width: | Height: | Size: 265 KiB |
BIN
ZKuP/Assets/BE10.png
Normal file
|
After Width: | Height: | Size: 931 KiB |
|
Before Width: | Height: | Size: 147 KiB |
BIN
ZKuP/Assets/BE11.png
Normal file
|
After Width: | Height: | Size: 665 KiB |
|
Before Width: | Height: | Size: 140 KiB |
BIN
ZKuP/Assets/BE12.png
Normal file
|
After Width: | Height: | Size: 892 KiB |
BIN
ZKuP/Assets/BE13.png
Normal file
|
After Width: | Height: | Size: 909 KiB |
|
Before Width: | Height: | Size: 210 KiB |
BIN
ZKuP/Assets/BE2.png
Normal file
|
After Width: | Height: | Size: 892 KiB |
|
Before Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 187 KiB |
BIN
ZKuP/Assets/BE4.png
Normal file
|
After Width: | Height: | Size: 987 KiB |
|
Before Width: | Height: | Size: 262 KiB |
|
Before Width: | Height: | Size: 229 KiB |
BIN
ZKuP/Assets/BE6.png
Normal file
|
After Width: | Height: | Size: 573 KiB |
|
Before Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 254 KiB |
BIN
ZKuP/Assets/BE8.png
Normal file
|
After Width: | Height: | Size: 868 KiB |
|
Before Width: | Height: | Size: 268 KiB |
BIN
ZKuP/Assets/BE9.png
Normal file
|
After Width: | Height: | Size: 804 KiB |
BIN
ZKuP/Assets/Parkplatz/01.png
Normal file
|
After Width: | Height: | Size: 395 KiB |
BIN
ZKuP/Assets/Parkplatz/02.png
Normal file
|
After Width: | Height: | Size: 394 KiB |
BIN
ZKuP/Assets/Parkplatz/03.png
Normal file
|
After Width: | Height: | Size: 397 KiB |
BIN
ZKuP/Assets/Parkplatz/04.png
Normal file
|
After Width: | Height: | Size: 399 KiB |
BIN
ZKuP/Assets/Parkplatz/05.png
Normal file
|
After Width: | Height: | Size: 415 KiB |
BIN
ZKuP/Assets/Parkplatz/06.png
Normal file
|
After Width: | Height: | Size: 401 KiB |
BIN
ZKuP/Assets/Parkplatz/07.png
Normal file
|
After Width: | Height: | Size: 455 KiB |
BIN
ZKuP/Assets/Parkplatz/08.png
Normal file
|
After Width: | Height: | Size: 436 KiB |
BIN
ZKuP/Assets/Parkplatz/09.png
Normal file
|
After Width: | Height: | Size: 392 KiB |
BIN
ZKuP/Assets/Parkplatz/10.png
Normal file
|
After Width: | Height: | Size: 393 KiB |
BIN
ZKuP/Assets/Parkplatz/11.png
Normal file
|
After Width: | Height: | Size: 391 KiB |
BIN
ZKuP/Assets/Parkplatz/12.png
Normal file
|
After Width: | Height: | Size: 397 KiB |
BIN
ZKuP/Assets/Parkplatz/13.png
Normal file
|
After Width: | Height: | Size: 398 KiB |
BIN
ZKuP/Assets/Parkplatz/14.png
Normal file
|
After Width: | Height: | Size: 400 KiB |
BIN
ZKuP/Assets/Parkplatz/15.png
Normal file
|
After Width: | Height: | Size: 386 KiB |
BIN
ZKuP/Assets/Parkplatz/16.png
Normal file
|
After Width: | Height: | Size: 397 KiB |
BIN
ZKuP/Assets/Parkplatz/17.png
Normal file
|
After Width: | Height: | Size: 389 KiB |
BIN
ZKuP/Assets/Parkplatz/18.png
Normal file
|
After Width: | Height: | Size: 392 KiB |
BIN
ZKuP/Assets/Parkplatz/19.png
Normal file
|
After Width: | Height: | Size: 391 KiB |
BIN
ZKuP/Assets/Parkplatz/20.png
Normal file
|
After Width: | Height: | Size: 394 KiB |
BIN
ZKuP/Assets/Parkplatz/21.png
Normal file
|
After Width: | Height: | Size: 410 KiB |
BIN
ZKuP/Assets/Parkplatz/22.png
Normal file
|
After Width: | Height: | Size: 403 KiB |
BIN
ZKuP/Assets/Parkplatz/23.png
Normal file
|
After Width: | Height: | Size: 400 KiB |
BIN
ZKuP/Assets/Parkplatz/24.png
Normal file
|
After Width: | Height: | Size: 407 KiB |
BIN
ZKuP/Assets/Parkplatz/25.png
Normal file
|
After Width: | Height: | Size: 400 KiB |
BIN
ZKuP/Assets/Parkplatz/26.png
Normal file
|
After Width: | Height: | Size: 402 KiB |
BIN
ZKuP/Assets/Parkplatz/27.png
Normal file
|
After Width: | Height: | Size: 407 KiB |
BIN
ZKuP/Assets/Parkplatz/28.png
Normal file
|
After Width: | Height: | Size: 394 KiB |
BIN
ZKuP/Assets/Parkplatz/29.png
Normal file
|
After Width: | Height: | Size: 398 KiB |
BIN
ZKuP/Assets/Parkplatz/30.png
Normal file
|
After Width: | Height: | Size: 407 KiB |
BIN
ZKuP/Assets/Parkplatz/31.png
Normal file
|
After Width: | Height: | Size: 407 KiB |
BIN
ZKuP/Assets/Parkplatz/32.png
Normal file
|
After Width: | Height: | Size: 438 KiB |
BIN
ZKuP/Assets/Parkplatz/33.png
Normal file
|
After Width: | Height: | Size: 440 KiB |
BIN
ZKuP/Assets/Parkplatz/34.png
Normal file
|
After Width: | Height: | Size: 448 KiB |
@ -12,16 +12,14 @@
|
|||||||
<ComboBoxItem Content="BE-Fläche wählen..."/>
|
<ComboBoxItem Content="BE-Fläche wählen..."/>
|
||||||
<ComboBoxItem Content="BE-Fläche 1 (ICE-West/Containerburg)"/>
|
<ComboBoxItem Content="BE-Fläche 1 (ICE-West/Containerburg)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 2 (ICE-West/MaWi/Gleisabstellung)"/>
|
<ComboBoxItem Content="BE-Fläche 2 (ICE-West/MaWi/Gleisabstellung)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 3 (MaWi-Rampe)"/>
|
|
||||||
<ComboBoxItem Content="BE-Fläche 4 (Aufgang Friedenheimer-Brücke)"/>
|
<ComboBoxItem Content="BE-Fläche 4 (Aufgang Friedenheimer-Brücke)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 5 (Stellwerk)"/>
|
|
||||||
<ComboBoxItem Content="BE-Fläche 6 (Lokhalle Gleisbereich Süd-Ost)"/>
|
<ComboBoxItem Content="BE-Fläche 6 (Lokhalle Gleisbereich Süd-Ost)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 7 (Lokhalle Gleisbereich Nord-Ost)"/>
|
|
||||||
<ComboBoxItem Content="BE-Fläche 8 (Schichtparkplatz)"/>
|
<ComboBoxItem Content="BE-Fläche 8 (Schichtparkplatz)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 9 (Kantine)"/>
|
<ComboBoxItem Content="BE-Fläche 9 (Kantine)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 10 (Gebäude G)"/>
|
<ComboBoxItem Content="BE-Fläche 10 (Gebäude G)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 11 (Gaslager)"/>
|
<ComboBoxItem Content="BE-Fläche 11 (Gaslager)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 12 (Feuerwehrzufahrt Süd)"/>
|
<ComboBoxItem Content="BE-Fläche 12 (Feuerwehrzufahrt Süd)"/>
|
||||||
|
<ComboBoxItem Content="BE-Fläche 13 (Feuerwehrzufahrt Süd)"/>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="35,10,0,0" TextWrapping="Wrap" Text="BE-Fläche:" VerticalAlignment="Top" Height="22" Width="104" Padding="0,2,0,0"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="35,10,0,0" TextWrapping="Wrap" Text="BE-Fläche:" VerticalAlignment="Top" Height="22" Width="104" Padding="0,2,0,0"/>
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ namespace ZKuP
|
|||||||
private void cbBE_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void cbBE_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if ((sender as ComboBox).SelectedIndex != 0 && (sender as ComboBox).SelectedIndex != -1)
|
if ((sender as ComboBox).SelectedIndex != 0 && (sender as ComboBox).SelectedIndex != -1)
|
||||||
imgBE.Source = new BitmapImage(new Uri($"Assets\\BE{cbBE.SelectedIndex}.jpg", UriKind.Relative));
|
imgBE.Source = new BitmapImage(new Uri($"Assets\\BE{cbBE.SelectedIndex}.png", UriKind.Relative));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changePicture(int selectedPicture)
|
public void changePicture(int selectedPicture)
|
||||||
|
|||||||
@ -168,7 +168,7 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
||||||
<DatePicker SelectedDate="{Binding b1von}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" SelectedDate="{Binding b1von}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
||||||
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@ -184,7 +184,7 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
||||||
<DatePicker SelectedDate="{Binding b1bis}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" SelectedDate="{Binding b1bis}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
||||||
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@ -236,7 +236,7 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
||||||
<DatePicker SelectedDate="{Binding b2von}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" SelectedDate="{Binding b2von}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
||||||
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@ -258,7 +258,7 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
||||||
<DatePicker SelectedDate="{Binding b2bis}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" SelectedDate="{Binding b2bis}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
||||||
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@ -303,7 +303,7 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
||||||
<DatePicker SelectedDate="{Binding b3von}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" SelectedDate="{Binding b3von}" Height="35" Width="100" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
||||||
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@ -319,7 +319,7 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
<StackPanel Tag="pan" Orientation="Horizontal" MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">
|
||||||
<DatePicker SelectedDate="{Binding b3bis}" Width="100" Height="35" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" SelectedDate="{Binding b3bis}" Width="100" Height="35" IsEnabled="False" DateValidationError="DatePicker_DateValidationError"/>
|
||||||
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="35" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|||||||
@ -29,7 +29,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
belegung = SQL.ReadSQL($"SELECT * FROM zkup.`be-belegung`", belegung).Result;
|
belegung = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.`be-belegung`", belegung).Result;
|
||||||
dgBelegung.DataContext = belegung;
|
dgBelegung.DataContext = belegung;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
//select = select.TrimEnd(' ', ',');
|
//select = select.TrimEnd(' ', ',');
|
||||||
|
|
||||||
ersteller = await SQL.ReadSQL($"SELECT b1Ersteller, b2Ersteller, b3Ersteller FROM zkup.`be-belegung`", ersteller);
|
ersteller = await SQL.ReadSQL($"SELECT b1Ersteller, b2Ersteller, b3Ersteller FROM {MainWindow.table}.`be-belegung`", ersteller);
|
||||||
|
|
||||||
for (var j = 1; j <= 12; j++)
|
for (var j = 1; j <= 12; j++)
|
||||||
{
|
{
|
||||||
@ -136,39 +136,39 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
case "B1 Projekt":
|
case "B1 Projekt":
|
||||||
if (!string.IsNullOrWhiteSpace(newValue))
|
if (!string.IsNullOrWhiteSpace(newValue))
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b1Projekt = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b1Projekt = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
||||||
else
|
else
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b1Projekt = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b1Projekt = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
||||||
break;
|
break;
|
||||||
case "B1 Projektleiter":
|
case "B1 Projektleiter":
|
||||||
if (!string.IsNullOrWhiteSpace(newValue))
|
if (!string.IsNullOrWhiteSpace(newValue))
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b1Projektleiter = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b1Projektleiter = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
||||||
else
|
else
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b1Projektleiter = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b1Projektleiter = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
||||||
break;
|
break;
|
||||||
case "B2 Projekt":
|
case "B2 Projekt":
|
||||||
if (!string.IsNullOrWhiteSpace(newValue))
|
if (!string.IsNullOrWhiteSpace(newValue))
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b2Projekt = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b2Projekt = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
||||||
else
|
else
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b2Projekt = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b2Projekt = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
||||||
break;
|
break;
|
||||||
case "B2 Projektleiter":
|
case "B2 Projektleiter":
|
||||||
if (!string.IsNullOrWhiteSpace(newValue))
|
if (!string.IsNullOrWhiteSpace(newValue))
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b2Projektleiter = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b2Projektleiter = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
||||||
else
|
else
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b2Projektleiter = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b2Projektleiter = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
||||||
break;
|
break;
|
||||||
case "B3 Projekt":
|
case "B3 Projekt":
|
||||||
if (!string.IsNullOrWhiteSpace(newValue))
|
if (!string.IsNullOrWhiteSpace(newValue))
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b3Projekt = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b3Projekt = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
||||||
else
|
else
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b3Projekt = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b3Projekt = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
||||||
break;
|
break;
|
||||||
case "B3 Projektleiter":
|
case "B3 Projektleiter":
|
||||||
if (!string.IsNullOrWhiteSpace(newValue))
|
if (!string.IsNullOrWhiteSpace(newValue))
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b3Projektleiter = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b3Projektleiter = '{newValue}', `{col}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{id}'");
|
||||||
else
|
else
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b3Projektleiter = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b3Projektleiter = '{newValue}', `{col}Ersteller` = '' WHERE `idbe-belegung` = '{id}'");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
if(hasChanged)
|
if(hasChanged)
|
||||||
{
|
{
|
||||||
belegung = SQL.ReadSQL($"SELECT * FROM zkup.`be-belegung`", belegung).Result;
|
belegung = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.`be-belegung`", belegung).Result;
|
||||||
dgBelegung.DataContext = belegung;
|
dgBelegung.DataContext = belegung;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,23 +29,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="1" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="1" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -54,48 +54,48 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="2" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="2" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Tag="3">
|
<StackPanel Orientation="Horizontal" Tag="3">
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="3" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="3" TextDecorations="Strikethrough" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" TextDecorations="Strikethrough" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -104,23 +104,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="4" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="4" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -129,23 +129,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="5" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="5" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="ICE (West)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -154,23 +154,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="6" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="6" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Lokhalle (Ost)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Lokhalle (Ost)" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -179,23 +179,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="7" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="7" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Lokhalle (Ost)" TextDecorations="Strikethrough" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Lokhalle (Ost)" TextDecorations="Strikethrough" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -204,23 +204,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="8" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="8" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Schichtparkplatz" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Schichtparkplatz" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -229,23 +229,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="9" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="9" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Kantine" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Kantine" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -254,23 +254,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="10" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="10" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Gebäude G" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Gebäude G" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -279,23 +279,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="11" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="11" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Gaslager" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Gaslager" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
@ -304,23 +304,23 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="12" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="12" Width="35" Height="45" Padding="0,8" TextAlignment="Center"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Feuerwehrzufahrt Süd" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" MouseLeftButtonDown="OpenImage_Click" Text="Feuerwehrzufahrt Süd" Width="120" Padding="0,8" Height="45" TextAlignment="Center"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<DatePicker Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" Padding="1,12" Height="45" Width="100" IsEnabled="False"/>
|
||||||
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
<Button Width="20" Height="45" Content="✕" FontSize="12" Padding="3" HorizontalContentAlignment="Left" FontWeight="Bold" Foreground="Red" Click="ButtonDelDate_Click" IsEnabled="False"/>
|
||||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
private async void Init()
|
private async void Init()
|
||||||
{
|
{
|
||||||
belegung = await SQL.ReadSQL($"SELECT * FROM zkup.`be-belegung`", belegung);
|
belegung = await SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.`be-belegung`", belegung);
|
||||||
|
|
||||||
FillRows();
|
FillRows();
|
||||||
DisableFields();
|
DisableFields();
|
||||||
@ -89,7 +89,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
Dictionary<string, string> dict = new Dictionary<string, string>();
|
Dictionary<string, string> dict = new Dictionary<string, string>();
|
||||||
|
|
||||||
ersteller = await SQL.ReadSQL($"SELECT b1Ersteller, b2Ersteller, b3Ersteller FROM zkup.`be-belegung`", ersteller);
|
ersteller = await SQL.ReadSQL($"SELECT b1Ersteller, b2Ersteller, b3Ersteller FROM {MainWindow.table}.`be-belegung`", ersteller);
|
||||||
|
|
||||||
for (var j = 1; j <= 12; j++)
|
for (var j = 1; j <= 12; j++)
|
||||||
{
|
{
|
||||||
@ -152,9 +152,9 @@ namespace ZKuP
|
|||||||
ProjektOderLeiter = boxOneTwo == 1 ? "Projekt" : "Projektleiter";
|
ProjektOderLeiter = boxOneTwo == 1 ? "Projekt" : "Projektleiter";
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(box.Text))
|
if (!string.IsNullOrWhiteSpace(box.Text))
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b{boxIndex}{ProjektOderLeiter} = '{box.Text}', `b{boxIndex}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{SPindex}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b{boxIndex}{ProjektOderLeiter} = '{box.Text}', `b{boxIndex}Ersteller` = '{Environment.UserName}' WHERE `idbe-belegung` = '{SPindex}'");
|
||||||
else
|
else
|
||||||
await SQL.WriteSQL($"UPDATE zkup.`be-belegung` SET b{boxIndex}{ProjektOderLeiter} = '{box.Text}', `b{boxIndex}Ersteller` = '' WHERE `idbe-belegung` = '{SPindex}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.`be-belegung` SET b{boxIndex}{ProjektOderLeiter} = '{box.Text}', `b{boxIndex}Ersteller` = '' WHERE `idbe-belegung` = '{SPindex}'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void DatePicker_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
|
private async void DatePicker_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
|
||||||
@ -242,7 +242,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (hasChanged)
|
if (hasChanged)
|
||||||
{
|
{
|
||||||
belegung = SQL.ReadSQL($"SELECT * FROM zkup.`be-belegung`", belegung).Result;
|
belegung = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.`be-belegung`", belegung).Result;
|
||||||
|
|
||||||
FillRows();
|
FillRows();
|
||||||
DisableFields();
|
DisableFields();
|
||||||
|
|||||||
104
ZKuP/Cards.xaml
@ -5,30 +5,110 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ZKuP"
|
xmlns:local="clr-namespace:ZKuP"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Karten" Height="530" Width="943.5" ResizeMode="NoResize">
|
Title="Karten" Height="530" Width="943.5">
|
||||||
<Grid>
|
<Grid>
|
||||||
<TabControl>
|
<Grid.RowDefinitions>
|
||||||
<TabItem Header="Grün/Rot Karten" Margin="6,0,-6,0" Width="460" HorizontalAlignment="Left" Padding="0" Background="#252F3B">
|
<RowDefinition Height="50"/>
|
||||||
<Grid>
|
<RowDefinition/>
|
||||||
<DataGrid x:Name="dgCards" Margin="10,40,10,10" ItemsSource="{Binding Path=., Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" CanUserAddRows="False" AutoGenerateColumns="False" CanUserDeleteRows="False" PreviewKeyDown="dgCards_PreviewKeyDown" SelectionChanged="dgCards_SelectionChanged">
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Grid.Row="0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Grid.Column="0" FontFamily="Segoe UI" Padding="0" FontSize="28" Foreground="Green" BorderBrush="Beige" BorderThickness="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#252F3B" Click="GruenRot_Click">
|
||||||
|
<Button.Content>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Image Source="/Resources/AusweisGruen_small.png" Height="30" Margin="0,0,20,0">
|
||||||
|
<Image.LayoutTransform>
|
||||||
|
<RotateTransform Angle="-5"/>
|
||||||
|
</Image.LayoutTransform>
|
||||||
|
</Image>
|
||||||
|
<TextBlock Text="Grün/Rot Karten"/>
|
||||||
|
<Image Source="/Resources/AusweisRot_small.png" Height="30" Margin="20,0,0,0">
|
||||||
|
<Image.LayoutTransform>
|
||||||
|
<RotateTransform Angle="5"/>
|
||||||
|
</Image.LayoutTransform>
|
||||||
|
</Image>
|
||||||
|
</StackPanel>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
<Button BorderBrush="Beige" BorderThickness="1" Grid.Column="1" Padding="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#252F3B" Click="McFit_Click">
|
||||||
|
<Button.Content>
|
||||||
|
<Image Source="/Resources/mcfit.png" Height="39" Width="265"/>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
<TabControl x:Name="tabcontrol" TabStripPlacement="Top" Grid.Row="1">
|
||||||
|
<TabItem>
|
||||||
|
<TabItem.Style>
|
||||||
|
<Style TargetType="TabItem" BasedOn="{StaticResource MahApps.Styles.TabItem}">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
</Style>
|
||||||
|
</TabItem.Style>
|
||||||
|
<Grid Margin="5,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="60"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<DataGrid x:Name="dgCards" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,10" EnableRowVirtualization="False" ItemsSource="{Binding Path=., Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" CanUserAddRows="False" AutoGenerateColumns="False" CanUserDeleteRows="False" PreviewKeyDown="dgCards_PreviewKeyDown" SelectionChanged="dgCards_SelectionChanged">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
|
<DataGridCheckBoxColumn Header="☑">
|
||||||
|
<DataGridCheckBoxColumn.CellStyle>
|
||||||
|
<Style TargetType="DataGridCell">
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="IsEditing" Value="True"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</DataGridCheckBoxColumn.CellStyle>
|
||||||
|
</DataGridCheckBoxColumn>
|
||||||
<DataGridTextColumn Binding="{Binding kartennr}" ClipboardContentBinding="{x:Null}" Header="Kartennummer" Width="*"/>
|
<DataGridTextColumn Binding="{Binding kartennr}" ClipboardContentBinding="{x:Null}" Header="Kartennummer" Width="*"/>
|
||||||
<DataGridTextColumn Binding="{Binding farbe}" ClipboardContentBinding="{x:Null}" Header="Farbe" Width="*"/>
|
<DataGridTextColumn Binding="{Binding farbe}" ClipboardContentBinding="{x:Null}" Header="Farbe" Width="80">
|
||||||
|
<DataGridTextColumn.HeaderStyle>
|
||||||
|
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MahApps.Styles.DataGridColumnHeader}">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.HeaderStyle>
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Binding="{Binding benutzer}" ClipboardContentBinding="{x:Null}" Header="Firma / Benutzer" Width="*"/>
|
<DataGridTextColumn Binding="{Binding benutzer}" ClipboardContentBinding="{x:Null}" Header="Firma / Benutzer" Width="*"/>
|
||||||
<DataGridTextColumn Binding="{Binding telnr}" ClipboardContentBinding="{x:Null}" Header="Telefonnummer" Width="*"/>
|
<DataGridTextColumn Binding="{Binding telnr}" ClipboardContentBinding="{x:Null}" Header="Telefonnummer" Width="*"/>
|
||||||
|
<DataGridTextColumn Binding="{Binding AusgegebenDurch}" ClipboardContentBinding="{x:Null}" Header="Ausgegeben durch" Width="*"/>
|
||||||
|
<DataGridTextColumn Binding="{Binding AusgegebenTimestamp}" ClipboardContentBinding="{x:Null}" Header="Ausgegeben am" Width="*"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<Button x:Name="btnAdd" Content="Karte hinzufügen" Height="25" Padding="-2" Margin="0,10,10,0" VerticalAlignment="Top" Click="btnAdd_Click" HorizontalAlignment="Right" Width="152"/>
|
<Button x:Name="btnAdd" Grid.Row="0" Grid.Column="0" Margin="0,10,10,0" VerticalAlignment="Stretch" Click="btnAdd_Click" HorizontalAlignment="Stretch">
|
||||||
<Button x:Name="btnDelete" Content="Markierte Karte löschen" Height="25" Padding="-2" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="150" IsEnabled="False" Click="btnDelete_Click"/>
|
<Button.Content>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="Karte ausgeben" FontSize="20" VerticalAlignment="Center" Margin="0,0,20,0"/>
|
||||||
|
<Image Source="/Resources/KarteAusgeben_small.png"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="btnDelete" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" Margin="10,10,0,0" VerticalAlignment="Stretch" IsEnabled="False" Click="btnDelete_Click">
|
||||||
|
<Button.Content>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="Markierte Karte(n) zurücknehmen" VerticalAlignment="Center" Margin="0,0,20,0" FontSize="20"/>
|
||||||
|
<Image Source="/Resources/KarteZuruecknehmen_small.png"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<TabItem Margin="0,0,0,0" HorizontalAlignment="Right" Width="460" Background="#252F3B">
|
<TabItem>
|
||||||
<TabItem.Header>
|
|
||||||
<Image Source="/Resources/mcfit.png" Height="39" Width="265"/>
|
|
||||||
</TabItem.Header>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|
||||||
<Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="110" Margin="5,8,0,0" VerticalAlignment="Top" Width="915" Background="#19FF0000"/>
|
<Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="110" Margin="5,8,0,0" VerticalAlignment="Top" Width="915" Background="#19FF0000"/>
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
using System;
|
using ControlzEx.Standard;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -33,10 +35,10 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
karten = SQL.ReadSQL("Select * from zkup.karten", karten).Result;
|
karten = SQL.ReadSQL($"Select * from {MainWindow.table}.karten", karten).Result;
|
||||||
dgCards.DataContext = karten;
|
dgCards.DataContext = karten;
|
||||||
|
|
||||||
mcFit = SQL.ReadSQL("SELECT * FROM zkup.mcFit", mcFit).Result;
|
mcFit = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.mcFit", mcFit).Result;
|
||||||
dgMcFit.DataContext = mcFit;
|
dgMcFit.DataContext = mcFit;
|
||||||
|
|
||||||
textInputTimer.Interval = TimeSpan.FromSeconds(0.5);
|
textInputTimer.Interval = TimeSpan.FromSeconds(0.5);
|
||||||
@ -45,20 +47,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
private async void dgCards_PreviewKeyDown(object sender, KeyEventArgs e)
|
private async void dgCards_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
var dg = sender as DataGrid;
|
if (e.Key == Key.Delete) await DeleteCard();
|
||||||
var row = dg.SelectedItem as System.Data.DataRowView;
|
|
||||||
var arr = row.Row.ItemArray;
|
|
||||||
|
|
||||||
if (e.Key == Key.Delete)
|
|
||||||
{
|
|
||||||
if (MessageBox.Show(this, $"Karte {arr[1]},\nausgegeben an {arr[3]} wirklich entfernen?", "Karte entfernen?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.karten WHERE `kartennr` = '{arr[1]}'");
|
|
||||||
|
|
||||||
karten = await SQL.ReadSQL("Select * FROM zkup.karten", karten);
|
|
||||||
dgCards.DataContext = karten;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnAdd_Click(object sender, RoutedEventArgs e)
|
private void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||||
@ -67,7 +56,7 @@ namespace ZKuP
|
|||||||
addCardUser.Owner = this;
|
addCardUser.Owner = this;
|
||||||
addCardUser.ShowDialog();
|
addCardUser.ShowDialog();
|
||||||
|
|
||||||
karten = SQL.ReadSQL("Select * from zkup.karten", karten).Result;
|
karten = SQL.ReadSQL($"Select * from {MainWindow.table}.karten", karten).Result;
|
||||||
dgCards.DataContext = karten;
|
dgCards.DataContext = karten;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,18 +70,101 @@ namespace ZKuP
|
|||||||
else btnDelete.IsEnabled = false;
|
else btnDelete.IsEnabled = false;
|
||||||
}
|
}
|
||||||
private async void btnDelete_Click(object sender, RoutedEventArgs e)
|
private async void btnDelete_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
await DeleteCard();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task DeleteCard()
|
||||||
{
|
{
|
||||||
var dg = dgCards;
|
var dg = dgCards;
|
||||||
var row = dg.SelectedItem as System.Data.DataRowView;
|
var row = dg.SelectedItem as System.Data.DataRowView;
|
||||||
var arr = row.Row.ItemArray;
|
var arr = row.Row.ItemArray;
|
||||||
|
|
||||||
if(MessageBox.Show(this, $"Karte {arr[1]},\nausgegeben an {arr[3]} wirklich entfernen?", "Karte entfernen?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
string cardsQuery = "";
|
||||||
|
string cardsQueryTimestamp = "";
|
||||||
|
string rueckgeber = "";
|
||||||
|
|
||||||
|
for (int i = 0; i < dg.Items.Count; i++)
|
||||||
{
|
{
|
||||||
|
DataRowView item = dg.Items[i] as DataRowView;
|
||||||
|
var r = dg.ItemContainerGenerator.ContainerFromItem(item) as DataGridRow;
|
||||||
|
if (r != null)
|
||||||
|
{
|
||||||
|
var mycheckbox = dg.Columns[0].GetCellContent(r) as CheckBox;
|
||||||
|
if ((bool)mycheckbox.IsChecked)
|
||||||
|
{
|
||||||
|
cardsQuery += (item as DataRowView).Row.ItemArray[1].ToString() + ";";
|
||||||
|
cardsQueryTimestamp += (item as DataRowView).Row.ItemArray[6].ToString() + ";";
|
||||||
|
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.karten WHERE `kartennr` = '{arr[1]}'");
|
if (!string.IsNullOrWhiteSpace((item as DataRowView).Row.ItemArray[7].ToString()))
|
||||||
|
rueckgeber = (item as DataRowView).Row.ItemArray[7].ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
karten = await SQL.ReadSQL("Select * FROM zkup.karten", karten);
|
if (cardsQuery == "")
|
||||||
dgCards.DataContext = karten;
|
{
|
||||||
|
if (MessageBox.Show(this, $"Karte {arr[1]},\nausgegeben an {arr[3]} wurde zurückgegeben?\n\nUnterschrift des Zurückgebers wird abgefragt...", "Karte zurückgegeben?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
||||||
|
{
|
||||||
|
var sig = new Signature(Signature.DisclaimerType.Rueck, arr[3].ToString(), arr[1].ToString(), "", true, arr[7].ToString());
|
||||||
|
|
||||||
|
if (sig.ShowDialog() == false)
|
||||||
|
{
|
||||||
|
_signature = sig.ResultByte;
|
||||||
|
|
||||||
|
if (_signature != null)
|
||||||
|
{
|
||||||
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.karten WHERE `kartennr` = '{arr[1]}'");
|
||||||
|
|
||||||
|
karten = await SQL.ReadSQL($"Select * FROM {MainWindow.table}.karten", karten);
|
||||||
|
dgCards.DataContext = karten;
|
||||||
|
|
||||||
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.kartenLog SET RueckgabeSignature = @signature, Ansprechpartner = '{arr[7]}' WHERE idkarten = '{arr[0]}' AND Ausgebucht = 1 AND `timestamp` > (now() - INTERVAL 2 MINUTE)", _signature);
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string cards = "";
|
||||||
|
string delCards = "";
|
||||||
|
string delCardsLog = "";
|
||||||
|
for(var i = 0; i < cardsQuery.Split(';').Length - 1; i++)
|
||||||
|
{
|
||||||
|
cards += $"{cardsQuery.Split(';')[i].Trim()} ausgegeben am: {cardsQueryTimestamp.Split(';')[i]}\n";
|
||||||
|
delCards += $"`kartennr` = '{cardsQuery.Split(';')[i].Trim()}' OR ";
|
||||||
|
|
||||||
|
delCardsLog += $"(`kartennr` = '{cardsQuery.Split(';')[i].Trim()}' AND Ausgebucht = 1 AND `timestamp` > (now() - INTERVAL 2 MINUTE)) OR ";
|
||||||
|
}
|
||||||
|
int lastIndex = delCards.LastIndexOf(" OR ");
|
||||||
|
if (lastIndex != -1) delCards = delCards.Remove(lastIndex);
|
||||||
|
|
||||||
|
int lastIndexLog = delCardsLog.LastIndexOf(" OR ");
|
||||||
|
if (lastIndexLog != -1) delCardsLog = delCardsLog.Remove(lastIndexLog);
|
||||||
|
|
||||||
|
if (MessageBox.Show(this, $"Die Karten\n\n{cards}\nwurden zurückgegeben?\n\nUnterschrift des Zurückgebers wird abgefragt...", "Karten zurückgegeben?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
||||||
|
{
|
||||||
|
var sig = new Signature(Signature.DisclaimerType.Rueck, arr[3].ToString(), arr[1].ToString(), "", true, rueckgeber);
|
||||||
|
|
||||||
|
if (sig.ShowDialog() == false)
|
||||||
|
{
|
||||||
|
_signature = sig.ResultByte;
|
||||||
|
|
||||||
|
if (_signature != null)
|
||||||
|
{
|
||||||
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.karten WHERE {delCards}");
|
||||||
|
|
||||||
|
karten = await SQL.ReadSQL($"Select * FROM {MainWindow.table}.karten", karten);
|
||||||
|
dgCards.DataContext = karten;
|
||||||
|
|
||||||
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.kartenLog SET RueckgabeSignature = @signature WHERE {delCardsLog}", _signature);
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +189,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
textInputTimer.Stop();
|
textInputTimer.Stop();
|
||||||
|
|
||||||
var cBItemSource = await SQL.ReadListStringMultipleColumns($"SELECT idmcFitUsers, Name, Vorname FROM zkup.mcFitUsers WHERE `Name` LIKE '{lastTextBox.Text}%'");
|
var cBItemSource = await SQL.ReadListStringMultipleColumns($"SELECT idmcFitUsers, Name, Vorname FROM {MainWindow.table}.mcFitUsers WHERE `Name` LIKE '{lastTextBox.Text}%'");
|
||||||
List<string> temp = new List<string>();
|
List<string> temp = new List<string>();
|
||||||
|
|
||||||
foreach (var line in cBItemSource)
|
foreach (var line in cBItemSource)
|
||||||
@ -139,7 +211,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
if (cBNameAusgabe != null && cBNameAusgabe.SelectedItem != null)
|
if (cBNameAusgabe != null && cBNameAusgabe.SelectedItem != null)
|
||||||
{
|
{
|
||||||
var result = await SQL.ReadListStringMultipleColumns($"SELECT Name,Vorname,Abteilung,Handynr,Email FROM zkup.mcFitUsers WHERE idmcFitUsers = '{cBNameAusgabe.SelectedItem.ToString().Split(' ')[0]}'", 5);
|
var result = await SQL.ReadListStringMultipleColumns($"SELECT Name,Vorname,Abteilung,Handynr,Email FROM {MainWindow.table}.mcFitUsers WHERE idmcFitUsers = '{cBNameAusgabe.SelectedItem.ToString().Split(' ')[0]}'", 5);
|
||||||
|
|
||||||
tbAusNachname.TextChanged -= tbAusNachname_TextChanged;
|
tbAusNachname.TextChanged -= tbAusNachname_TextChanged;
|
||||||
|
|
||||||
@ -157,7 +229,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
int Kartennr = Convert.ToInt32(cBZurKarte.SelectedValue.ToString().Split(' ')[2]);
|
int Kartennr = Convert.ToInt32(cBZurKarte.SelectedValue.ToString().Split(' ')[2]);
|
||||||
|
|
||||||
var result = await SQL.ReadListStringMultipleColumns($"SELECT Nachname,Vorname,Abteilung,Handynr,Email FROM zkup.mcFit WHERE Kartennr = '{Kartennr}'", 5);
|
var result = await SQL.ReadListStringMultipleColumns($"SELECT Nachname,Vorname,Abteilung,Handynr,Email FROM {MainWindow.table}.mcFit WHERE Kartennr = '{Kartennr}'", 5);
|
||||||
|
|
||||||
tbZurNachname.Text = result.First().Split(';')[0];
|
tbZurNachname.Text = result.First().Split(';')[0];
|
||||||
tbZurVorname.Text = result.First().Split(';')[1];
|
tbZurVorname.Text = result.First().Split(';')[1];
|
||||||
@ -190,9 +262,9 @@ namespace ZKuP
|
|||||||
int Kartennr = Convert.ToInt32(cBAusKarte.SelectedValue.ToString().Split(' ')[2]);
|
int Kartennr = Convert.ToInt32(cBAusKarte.SelectedValue.ToString().Split(' ')[2]);
|
||||||
|
|
||||||
|
|
||||||
await SQL.WriteSQL($"UPDATE zkup.mcFit SET Vorname = '{tbAusVorname.Text}', Nachname = '{tbAusNachname.Text}', Abteilung = '{tbAusAbteilung.Text}', Handynr = '{tbAusHandy.Text}', Email = '{tbAusEmail.Text}', AusgabeTimestamp = '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', ZurueckTimestamp = null, AktuellAusgegeben = '1', Signature = @signature WHERE Kartennr = '{Kartennr}'", _signature);
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.mcFit SET Vorname = '{tbAusVorname.Text}', Nachname = '{tbAusNachname.Text}', Abteilung = '{tbAusAbteilung.Text}', Handynr = '{tbAusHandy.Text}', Email = '{tbAusEmail.Text}', AusgabeTimestamp = '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', ZurueckTimestamp = null, AktuellAusgegeben = '1', Signature = @signature, AusgegebenDruch = '{Environment.UserName}' WHERE Kartennr = '{Kartennr}'", _signature);
|
||||||
|
|
||||||
mcFit = SQL.ReadSQL("SELECT * FROM zkup.mcFit", mcFit).Result;
|
mcFit = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.mcFit", mcFit).Result;
|
||||||
dgMcFit.DataContext = mcFit;
|
dgMcFit.DataContext = mcFit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -212,9 +284,9 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
int Kartennr = Convert.ToInt32(cBZurKarte.SelectedValue.ToString().Split(' ')[2]);
|
int Kartennr = Convert.ToInt32(cBZurKarte.SelectedValue.ToString().Split(' ')[2]);
|
||||||
|
|
||||||
await SQL.WriteSQL($"UPDATE zkup.mcFit SET ZurueckTimestamp = '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', AktuellAusgegeben = '0' WHERE Kartennr = '{Kartennr}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.mcFit SET ZurueckTimestamp = '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', AktuellAusgegeben = '0' WHERE Kartennr = '{Kartennr}'");
|
||||||
|
|
||||||
mcFit = SQL.ReadSQL("SELECT * FROM zkup.mcFit", mcFit).Result;
|
mcFit = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.mcFit", mcFit).Result;
|
||||||
dgMcFit.DataContext = mcFit;
|
dgMcFit.DataContext = mcFit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +294,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
var signBtn = ((sender as Button).DataContext) as System.Data.DataRowView;
|
var signBtn = ((sender as Button).DataContext) as System.Data.DataRowView;
|
||||||
|
|
||||||
var i = SQL.ReadSingleByteArr($"SELECT Signature FROM zkup.mcFit WHERE Kartennr = '{(signBtn).Row.ItemArray[0].ToString()}'");
|
var i = SQL.ReadSingleByteArr($"SELECT Signature FROM {MainWindow.table}.mcFit WHERE Kartennr = '{(signBtn).Row.ItemArray[0].ToString()}'");
|
||||||
BitmapImage image = null;
|
BitmapImage image = null;
|
||||||
|
|
||||||
if (i != null)
|
if (i != null)
|
||||||
@ -234,5 +306,15 @@ namespace ZKuP
|
|||||||
iv.Owner = this;
|
iv.Owner = this;
|
||||||
iv.ShowDialog();
|
iv.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void GruenRot_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
tabcontrol.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void McFit_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
tabcontrol.SelectedIndex = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,7 +40,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(tbKennzeichen.Text))
|
if (!string.IsNullOrWhiteSpace(tbKennzeichen.Text))
|
||||||
{
|
{
|
||||||
var list = SQL.ReadSQL($"SELECT Kennzeichen, Name, Ansprechpartner, DATE_FORMAT(Zutritt, \"%d.%m.%y %I:%i\") AS \"Zutritt\" FROM zkup.zutritte WHERE Kennzeichen LIKE '%{tbKennzeichen.Text}%'").Result;
|
var list = SQL.ReadSQL($"SELECT Kennzeichen, Name, Ansprechpartner, DATE_FORMAT(Zutritt, \"%d.%m.%y %I:%i\") AS \"Zutritt\" FROM {MainWindow.table}.zutritte WHERE Kennzeichen LIKE '%{tbKennzeichen.Text}%'").Result;
|
||||||
|
|
||||||
if (list.Rows.Count == 0)
|
if (list.Rows.Count == 0)
|
||||||
list.Rows.Add("Keine Ergebnisse...");
|
list.Rows.Add("Keine Ergebnisse...");
|
||||||
|
|||||||
@ -23,14 +23,14 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
var list = SQL.ReadSQL($"SELECT Kennzeichen, MA_Vorname AS Vorname, MA_Name AS Nachname, Telefon, Abteilung, Vorgesetzter FROM zkup.parkausweise WHERE Genehmigt = '1'").Result;
|
var list = SQL.ReadSQL($"SELECT Kennzeichen, MA_Vorname AS Vorname, MA_Name AS Nachname, Telefon, Abteilung, Vorgesetzter FROM {MainWindow.table}.parkausweise WHERE Genehmigt = '1'").Result;
|
||||||
dgCheck.DataContext = list;
|
dgCheck.DataContext = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void btnSearch_Click(object sender, RoutedEventArgs e)
|
private void btnSearch_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var list = SQL.ReadSQL($"SELECT Kennzeichen, MA_Vorname AS Vorname, MA_Name AS Nachname, Telefon, Abteilung, Vorgesetzter FROM zkup.parkausweise WHERE Genehmigt = '1' AND Kennzeichen LIKE '%{tbSearch.Text}%'").Result;
|
var list = SQL.ReadSQL($"SELECT Kennzeichen, MA_Vorname AS Vorname, MA_Name AS Nachname, Telefon, Abteilung, Vorgesetzter FROM {MainWindow.table}.parkausweise WHERE Genehmigt = '1' AND Kennzeichen LIKE '%{tbSearch.Text}%'").Result;
|
||||||
dgCheck.DataContext = list;
|
dgCheck.DataContext = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
if(e.Key == Key.Enter)
|
if(e.Key == Key.Enter)
|
||||||
{
|
{
|
||||||
var list = SQL.ReadSQL($"SELECT Kennzeichen, MA_Vorname AS Vorname, MA_Name AS Nachname, Telefon, Abteilung, Vorgesetzter FROM zkup.parkausweise WHERE Genehmigt = '1' AND Kennzeichen LIKE '%{tbSearch.Text}%'").Result;
|
var list = SQL.ReadSQL($"SELECT Kennzeichen, MA_Vorname AS Vorname, MA_Name AS Nachname, Telefon, Abteilung, Vorgesetzter FROM {MainWindow.table}.parkausweise WHERE Genehmigt = '1' AND Kennzeichen LIKE '%{tbSearch.Text}%'").Result;
|
||||||
dgCheck.DataContext = list;
|
dgCheck.DataContext = list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
await Task.Run(() =>
|
await Task.Run(() =>
|
||||||
{
|
{
|
||||||
var res = SQL.ReadSQL($"SELECT Kennzeichen, MA_Vorname AS Vorname, MA_Name AS Nachname, Telefon, Abteilung, Vorgesetzter FROM zkup.parkausweise WHERE Gedruckt = '1'").Result;
|
var res = SQL.ReadSQL($"SELECT Kennzeichen, MA_Vorname AS Vorname, MA_Name AS Nachname, Telefon, Abteilung, Vorgesetzter FROM {MainWindow.table}.parkausweise WHERE Gedruckt = '1'").Result;
|
||||||
var ex = new ExcelExporter();
|
var ex = new ExcelExporter();
|
||||||
ex.Export(res);
|
ex.Export(res);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" x:Class="ZKuP.CreateFirma"
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" x:Class="ZKuP.CreateFirma"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Firmen verwalten" Height="682" Width="1378"
|
Title="Firmen verwalten" Height="682" Width="1378"
|
||||||
WindowStartupLocation="CenterOwner">
|
WindowStartupLocation="CenterOwner" Closing="Window_Closing">
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
@ -191,7 +191,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<Grid x:Name="grid">
|
<Grid x:Name="grid">
|
||||||
<TextBox x:Name="tbName" HorizontalAlignment="Left" Height="23" Margin="10,57,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="340" TabIndex="1" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbName" HorizontalAlignment="Left" Height="23" Margin="10,57,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="340" TabIndex="1" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextChanged="tbName_TextChanged" LostFocus="tbName_LostFocus"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,36,0,0" TextWrapping="Wrap" VerticalAlignment="Top"><Run Text="Name der Firma"/></TextBlock>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,36,0,0" TextWrapping="Wrap" VerticalAlignment="Top"><Run Text="Name der Firma"/></TextBlock>
|
||||||
<TextBox x:Name="tbVerantwortlicher_MA" HorizontalAlignment="Left" Height="23" Margin="10,106,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="340" TabIndex="2" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbVerantwortlicher_MA" HorizontalAlignment="Left" Height="23" Margin="10,106,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="340" TabIndex="2" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,85,0,0" TextWrapping="Wrap" VerticalAlignment="Top"><Run Text="Verantwortlicher Mitarbeiter der Firma"/></TextBlock>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,85,0,0" TextWrapping="Wrap" VerticalAlignment="Top"><Run Text="Verantwortlicher Mitarbeiter der Firma"/></TextBlock>
|
||||||
@ -205,8 +205,8 @@
|
|||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,532,0,0" TextWrapping="Wrap" Text="Ansprechpartner intern" VerticalAlignment="Top"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,532,0,0" TextWrapping="Wrap" Text="Ansprechpartner intern" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbTel_Nr_Ansprechpartner_Intern" HorizontalAlignment="Left" Height="23" Margin="10,602,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="340" TabIndex="14" PreviewKeyDown="TextBoxes_PreviewKeyDown" PreviewTextInput="tbTel_Nr_Ansprechpartner_Intern_PreviewTextInput"/>
|
<TextBox x:Name="tbTel_Nr_Ansprechpartner_Intern" HorizontalAlignment="Left" Height="23" Margin="10,602,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="340" TabIndex="14" PreviewKeyDown="TextBoxes_PreviewKeyDown" PreviewTextInput="tbTel_Nr_Ansprechpartner_Intern_PreviewTextInput"/>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,581,0,0" TextWrapping="Wrap" Text="Telefonnummer Ansprechpartner" VerticalAlignment="Top"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,581,0,0" TextWrapping="Wrap" Text="Telefonnummer Ansprechpartner" VerticalAlignment="Top"/>
|
||||||
<DatePicker x:Name="dpArbeitsbeginn" HorizontalAlignment="Left" Margin="10,400,0,0" VerticalAlignment="Top" TabIndex="8" PreviewKeyDown="DpArbeitsbeginn_PreviewKeyDown" IsTabStop="True" DateValidationError="dpArbeitsbeginn_DateValidationError"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dpArbeitsbeginn" HorizontalAlignment="Left" Margin="10,400,0,0" VerticalAlignment="Top" TabIndex="8" PreviewKeyDown="DpArbeitsbeginn_PreviewKeyDown" IsTabStop="True" DateValidationError="dpArbeitsbeginn_DateValidationError"/>
|
||||||
<DatePicker x:Name="dpEinweisung_Bis" HorizontalAlignment="Left" Margin="10,450,0,0" VerticalAlignment="Top" Width="340" TabIndex="10" IsTabStop="True" Focusable="True" PreviewKeyDown="DpEinweisung_Bis_PreviewKeyDown" DateValidationError="dpEinweisung_Bis_DateValidationError">
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dpEinweisung_Bis" HorizontalAlignment="Left" Margin="10,450,0,0" VerticalAlignment="Top" Width="340" TabIndex="10" IsTabStop="True" Focusable="True" PreviewKeyDown="DpEinweisung_Bis_PreviewKeyDown" DateValidationError="dpEinweisung_Bis_DateValidationError">
|
||||||
<DatePicker.Resources>
|
<DatePicker.Resources>
|
||||||
<Style x:Key="dpEinweisungStyle" TargetType="{x:Type DatePickerTextBox}">
|
<Style x:Key="dpEinweisungStyle" TargetType="{x:Type DatePickerTextBox}">
|
||||||
<Setter Property="Text" Value="Datum auswählen →"/>
|
<Setter Property="Text" Value="Datum auswählen →"/>
|
||||||
@ -219,16 +219,14 @@
|
|||||||
<ComboBoxItem Content=""/>
|
<ComboBoxItem Content=""/>
|
||||||
<ComboBoxItem Content="BE-Fläche 1 (ICE-West/Containerburg)"/>
|
<ComboBoxItem Content="BE-Fläche 1 (ICE-West/Containerburg)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 2 (ICE-West/MaWi/Gleisabstellung)"/>
|
<ComboBoxItem Content="BE-Fläche 2 (ICE-West/MaWi/Gleisabstellung)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 3 (MaWi-Rampe)"/>
|
|
||||||
<ComboBoxItem Content="BE-Fläche 4 (Aufgang Friedenheimer-Brücke)"/>
|
<ComboBoxItem Content="BE-Fläche 4 (Aufgang Friedenheimer-Brücke)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 5 (Stellwerk)"/>
|
|
||||||
<ComboBoxItem Content="BE-Fläche 6 (Lokhalle Gleisbereich Süd-Ost)"/>
|
<ComboBoxItem Content="BE-Fläche 6 (Lokhalle Gleisbereich Süd-Ost)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 7 (Lokhalle Gleisbereich Nord-Ost)"/>
|
|
||||||
<ComboBoxItem Content="BE-Fläche 8 (Schichtparkplatz)"/>
|
<ComboBoxItem Content="BE-Fläche 8 (Schichtparkplatz)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 9 (Kantine)"/>
|
<ComboBoxItem Content="BE-Fläche 9 (Kantine)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 10 (Gebäude G)"/>
|
<ComboBoxItem Content="BE-Fläche 10 (Gebäude G)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 11 (Gaslager)"/>
|
<ComboBoxItem Content="BE-Fläche 11 (Gaslager)"/>
|
||||||
<ComboBoxItem Content="BE-Fläche 12 (Feuerwehrzufahrt Süd)"/>
|
<ComboBoxItem Content="BE-Fläche 12 (Feuerwehrzufahrt Süd)"/>
|
||||||
|
<ComboBoxItem Content="BE-Fläche 13 (Feuerwehrzufahrt Süd)"/>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,328,0,0" TextWrapping="Wrap" Text="Gebuchte BE-Fläche" VerticalAlignment="Top"/>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" HorizontalAlignment="Left" Margin="10,328,0,0" TextWrapping="Wrap" Text="Gebuchte BE-Fläche" VerticalAlignment="Top"/>
|
||||||
|
|
||||||
@ -327,7 +325,7 @@
|
|||||||
<DataGridTemplateColumn ClipboardContentBinding="{x:Null}" Header="Arbeitsbeginn" Width="100">
|
<DataGridTemplateColumn ClipboardContentBinding="{x:Null}" Header="Arbeitsbeginn" Width="100">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<DatePicker x:Name="dpDataGridArbeitsbeginn" Width="98" SelectedDate="{Binding Arbeitsbeginn, StringFormat=\{0:dd.MM.yyyy\}}" ToolTip="Datum über Kalender ändern" CalendarOpened="dpDataGridArbeitsbeginn_CalendarOpened" CalendarClosed="dpDataGridArbeitsbeginn_CalendarClosed" DateValidationError="dpArbeitsbeginn_DateValidationError">
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dpDataGridArbeitsbeginn" Width="98" SelectedDate="{Binding Arbeitsbeginn, StringFormat=\{0:dd.MM.yyyy\}}" ToolTip="Datum über Kalender ändern" CalendarOpened="dpDataGridArbeitsbeginn_CalendarOpened" CalendarClosed="dpDataGridArbeitsbeginn_CalendarClosed" DateValidationError="dpArbeitsbeginn_DateValidationError">
|
||||||
<DatePicker.Resources>
|
<DatePicker.Resources>
|
||||||
<Style TargetType="{x:Type DatePickerTextBox}">
|
<Style TargetType="{x:Type DatePickerTextBox}">
|
||||||
<Setter Property="IsReadOnly" Value="True"/>
|
<Setter Property="IsReadOnly" Value="True"/>
|
||||||
@ -340,7 +338,7 @@
|
|||||||
<DataGridTemplateColumn ClipboardContentBinding="{x:Null}" Header="Arbeitsende" Width="100">
|
<DataGridTemplateColumn ClipboardContentBinding="{x:Null}" Header="Arbeitsende" Width="100">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<DatePicker x:Name="dpDataGridArbeitsende" Width="98" SelectedDate="{Binding Arbeitsende, StringFormat=\{0:dd.MM.yyyy\}}" ToolTip="Datum über Kalender ändern" CalendarOpened="dpDataGridArbeitsende_CalendarOpened" CalendarClosed="dpDataGridArbeitsende_CalendarClosed" DateValidationError="dpArbeitsende_DateValidationError">
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dpDataGridArbeitsende" Width="98" SelectedDate="{Binding Arbeitsende, StringFormat=\{0:dd.MM.yyyy\}}" ToolTip="Datum über Kalender ändern" CalendarOpened="dpDataGridArbeitsende_CalendarOpened" CalendarClosed="dpDataGridArbeitsende_CalendarClosed" DateValidationError="dpArbeitsende_DateValidationError">
|
||||||
<DatePicker.Resources>
|
<DatePicker.Resources>
|
||||||
<Style TargetType="{x:Type DatePickerTextBox}">
|
<Style TargetType="{x:Type DatePickerTextBox}">
|
||||||
<Setter Property="IsReadOnly" Value="True"/>
|
<Setter Property="IsReadOnly" Value="True"/>
|
||||||
@ -370,7 +368,7 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<DatePicker x:Name="dpDataGridEinweisung" Width="98" SelectedDate="{Binding Örtliche_Einweisung_bis, StringFormat=\{0:dd.MM.yyyy\}}" ToolTip="Datum über Kalender ändern" CalendarOpened="dpDataGridEinweisung_CalendarOpened" CalendarClosed="dpDataGridEinweisung_CalendarClosed" DateValidationError="dpEinweisung_Bis_DateValidationError">
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dpDataGridEinweisung" Width="98" SelectedDate="{Binding Örtliche_Einweisung_bis, StringFormat=\{0:dd.MM.yyyy\}}" ToolTip="Datum über Kalender ändern" CalendarOpened="dpDataGridEinweisung_CalendarOpened" CalendarClosed="dpDataGridEinweisung_CalendarClosed" DateValidationError="dpEinweisung_Bis_DateValidationError">
|
||||||
<DatePicker.Resources>
|
<DatePicker.Resources>
|
||||||
<Style TargetType="{x:Type DatePickerTextBox}">
|
<Style TargetType="{x:Type DatePickerTextBox}">
|
||||||
<Setter Property="IsReadOnly" Value="True"/>
|
<Setter Property="IsReadOnly" Value="True"/>
|
||||||
@ -428,7 +426,7 @@
|
|||||||
<TextBox x:Name="tbBeauftragte_Leistung" HorizontalAlignment="Left" Height="23" Margin="10,302,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="340" TabIndex="6" PreviewKeyDown="TbBeauftragte_Leistung_PreviewKeyDown"/>
|
<TextBox x:Name="tbBeauftragte_Leistung" HorizontalAlignment="Left" Height="23" Margin="10,302,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="340" TabIndex="6" PreviewKeyDown="TbBeauftragte_Leistung_PreviewKeyDown"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,281,0,0" TextWrapping="Wrap" Text="Beauftragte Leistung" VerticalAlignment="Top"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,281,0,0" TextWrapping="Wrap" Text="Beauftragte Leistung" VerticalAlignment="Top"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="170,379,0,0" TextWrapping="Wrap" Text="Arbeitsende bis" VerticalAlignment="Top"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="170,379,0,0" TextWrapping="Wrap" Text="Arbeitsende bis" VerticalAlignment="Top"/>
|
||||||
<DatePicker x:Name="dpArbeitsende" HorizontalAlignment="Left" Margin="170,400,0,0" VerticalAlignment="Top" TabIndex="9" PreviewKeyDown="DpArbeitsende_PreviewKeyDown" IsTabStop="True" DateValidationError="dpArbeitsende_DateValidationError"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dpArbeitsende" HorizontalAlignment="Left" Margin="170,400,0,0" VerticalAlignment="Top" TabIndex="9" PreviewKeyDown="DpArbeitsende_PreviewKeyDown" IsTabStop="True" DateValidationError="dpArbeitsende_DateValidationError"/>
|
||||||
<Button x:Name="btnEinweisung_1Jahr" Content="↑ Für ein Jahr" FontSize="12" Padding="-2" HorizontalAlignment="Left" Margin="245,477,0,0" VerticalAlignment="Top" Width="105" Click="BtnEinweisung_PreValues_Click" Height="24" TabIndex="13" ToolTip="Firma hat bereits eine Einweisung bekommen
Ablauf in einem Jahr wird automatisch eingetragen"/>
|
<Button x:Name="btnEinweisung_1Jahr" Content="↑ Für ein Jahr" FontSize="12" Padding="-2" HorizontalAlignment="Left" Margin="245,477,0,0" VerticalAlignment="Top" Width="105" Click="BtnEinweisung_PreValues_Click" Height="24" TabIndex="13" ToolTip="Firma hat bereits eine Einweisung bekommen
Ablauf in einem Jahr wird automatisch eingetragen"/>
|
||||||
<Button x:Name="btnEinweisung_1Monat" Content="↑ Für einen Monat" FontSize="12" Padding="-2" HorizontalAlignment="Left" Margin="124,477,0,0" VerticalAlignment="Top" Width="116" Click="BtnEinweisung_PreValues_Click" Height="24" TabIndex="12" ToolTip="Firma hat bereits eine Einweisung bekommen
Ablauf in einem Monat wird automatisch eingetragen"/>
|
<Button x:Name="btnEinweisung_1Monat" Content="↑ Für einen Monat" FontSize="12" Padding="-2" HorizontalAlignment="Left" Margin="124,477,0,0" VerticalAlignment="Top" Width="116" Click="BtnEinweisung_PreValues_Click" Height="24" TabIndex="12" ToolTip="Firma hat bereits eine Einweisung bekommen
Ablauf in einem Monat wird automatisch eingetragen"/>
|
||||||
<Button x:Name="btnEinweisung_1Woche" Content="↑ Für eine Woche" FontSize="12" Padding="-2" HorizontalAlignment="Left" Margin="10,477,0,0" VerticalAlignment="Top" Width="109" Click="BtnEinweisung_PreValues_Click" Height="24" TabIndex="11" ToolTip="Firma hat bereits eine Einweisung bekommen
Ablauf in einer Woche wird automatisch eingetragen"/>
|
<Button x:Name="btnEinweisung_1Woche" Content="↑ Für eine Woche" FontSize="12" Padding="-2" HorizontalAlignment="Left" Margin="10,477,0,0" VerticalAlignment="Top" Width="109" Click="BtnEinweisung_PreValues_Click" Height="24" TabIndex="11" ToolTip="Firma hat bereits eine Einweisung bekommen
Ablauf in einer Woche wird automatisch eingetragen"/>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using FuzzySharp;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@ -34,6 +35,7 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
|
|
||||||
DataTable firmen = new DataTable("Firmen");
|
DataTable firmen = new DataTable("Firmen");
|
||||||
|
private Dictionary<string, List<string>> firmenSearchList = new Dictionary<string, List<string>>();
|
||||||
|
|
||||||
private List<string> aspVar;
|
private List<string> aspVar;
|
||||||
public List<string> asp
|
public List<string> asp
|
||||||
@ -62,11 +64,11 @@ namespace ZKuP
|
|||||||
|
|
||||||
Dispatcher.Invoke(() => dgFirmen.Columns.FirstOrDefault(c => c.Header.ToString() == "Name").SortDirection = ListSortDirection.Ascending);
|
Dispatcher.Invoke(() => dgFirmen.Columns.FirstOrDefault(c => c.Header.ToString() == "Name").SortDirection = ListSortDirection.Ascending);
|
||||||
|
|
||||||
asp = SQL.ReadListString("SELECT Name FROM zkup.ansprechpartner").Result;
|
asp = SQL.ReadListString($"SELECT Name FROM {MainWindow.table}.ansprechpartner").Result;
|
||||||
asp = asp.OrderBy(p => p).ToList();
|
asp = asp.OrderBy(p => p).ToList();
|
||||||
|
|
||||||
|
|
||||||
searchTimer.Interval = TimeSpan.FromSeconds(0.5);
|
searchTimer.Interval = TimeSpan.FromSeconds(0.0005);
|
||||||
searchTimer.Tick += SearchTimer_Tick;
|
searchTimer.Tick += SearchTimer_Tick;
|
||||||
|
|
||||||
cbAnsprechpartner_Intern.ItemsSource = asp;
|
cbAnsprechpartner_Intern.ItemsSource = asp;
|
||||||
@ -79,7 +81,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void updateList()
|
private void updateList()
|
||||||
{
|
{
|
||||||
if (MainWindow.LoggedInRole == Roles.Admin || MainWindow.LoggedInRole == Roles.Pförtner || MainWindow.LoggedInRole == Roles.Controller)
|
if (MainWindow.LoggedInRole == Roles.Admin || MainWindow.LoggedInRole == Roles.Pförtner)
|
||||||
{
|
{
|
||||||
requestListAdmin();
|
requestListAdmin();
|
||||||
}
|
}
|
||||||
@ -91,23 +93,51 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void requestList()
|
private void requestList()
|
||||||
{
|
{
|
||||||
firmen = SQL.ReadSQL($"SELECT * FROM zkup.firmen WHERE Ersteller = '{Environment.UserName}' " +
|
firmen = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.firmen WHERE Ersteller = '{Environment.UserName}' " +
|
||||||
$"OR Ersteller = '{Environment.UserDomainName}{Environment.UserName}' " +
|
$"OR Ersteller = '{Environment.UserDomainName}{Environment.UserName}' " +
|
||||||
$"OR Ersteller = '{SQL.ReadSingleValue($"SELECT Vertreter FROM zkup.ansprechpartner WHERE Name = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'").Replace("-", "").Replace(" ", "")}' " +
|
$"OR Ersteller = '{SQL.ReadSingleValue($"SELECT Vertreter FROM {MainWindow.table}.ansprechpartner WHERE Name = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'").Replace("-", "").Replace(" ", "")}' " +
|
||||||
$"OR Ersteller = '{Environment.UserDomainName}{SQL.ReadSingleValue($"SELECT Vertreter FROM zkup.ansprechpartner WHERE Name = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'").Replace("-", "").Replace(" ", "")}' " +
|
$"OR Ersteller = '{Environment.UserDomainName}{SQL.ReadSingleValue($"SELECT Vertreter FROM {MainWindow.table}.ansprechpartner WHERE Name = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'").Replace("-", "").Replace(" ", "")}' " +
|
||||||
$"OR Ersteller = '{SQL.ReadSingleValue($"SELECT Name FROM zkup.ansprechpartner WHERE Vertreter = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'").Replace("-", "").Replace(" ", "")}' " +
|
$"OR Ersteller = '{SQL.ReadSingleValue($"SELECT Name FROM {MainWindow.table}.ansprechpartner WHERE Vertreter = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'").Replace("-", "").Replace(" ", "")}' " +
|
||||||
$"OR Ersteller = '{Environment.UserDomainName}{SQL.ReadSingleValue($"SELECT Name FROM zkup.ansprechpartner WHERE Vertreter = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'").Replace("-", "").Replace(" ", "")}' " +
|
$"OR Ersteller = '{Environment.UserDomainName}{SQL.ReadSingleValue($"SELECT Name FROM {MainWindow.table}.ansprechpartner WHERE Vertreter = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'").Replace("-", "").Replace(" ", "")}' " +
|
||||||
$"OR Ansprechpartner_Intern = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}' ORDER BY Name ASC"
|
$"OR Ansprechpartner_Intern = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}' ORDER BY Name ASC"
|
||||||
, firmen).Result;
|
, firmen).Result;
|
||||||
FirmaView = Firma.DataTableToFirma(firmen);
|
FirmaView = Firma.DataTableToFirma(firmen);
|
||||||
dgFirmen.DataContext = firmen;
|
dgFirmen.DataContext = firmen;
|
||||||
|
|
||||||
|
firmenSearchList.Clear();
|
||||||
|
|
||||||
|
foreach (var firma in firmen.AsEnumerable().Select(p => p.Field<string>("Name").Trim()).ToList().Distinct())
|
||||||
|
{
|
||||||
|
if (firma.Contains(' '))
|
||||||
|
{
|
||||||
|
firmenSearchList.Add(firma, new List<string>());
|
||||||
|
|
||||||
|
for (var i = 0; i < firma.Split(' ').Count(); i++)
|
||||||
|
firmenSearchList[firma].Add(firma.Split(' ')[i]);
|
||||||
|
}
|
||||||
|
else firmenSearchList.Add(firma, new List<string>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void requestListAdmin()
|
private void requestListAdmin()
|
||||||
{
|
{
|
||||||
firmen = SQL.ReadSQL("SELECT * FROM zkup.firmen ORDER BY Name ASC", firmen).Result;
|
firmen = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.firmen ORDER BY Name ASC", firmen).Result;
|
||||||
FirmaView = Firma.DataTableToFirma(firmen);
|
FirmaView = Firma.DataTableToFirma(firmen);
|
||||||
dgFirmen.DataContext = firmen;
|
dgFirmen.DataContext = firmen;
|
||||||
|
|
||||||
|
firmenSearchList.Clear();
|
||||||
|
|
||||||
|
foreach(var firma in firmen.AsEnumerable().Select(p => p.Field<string>("Name").Trim()).ToList().Distinct())
|
||||||
|
{
|
||||||
|
if(firma.Contains(' '))
|
||||||
|
{
|
||||||
|
firmenSearchList.Add(firma, new List<string>());
|
||||||
|
|
||||||
|
for (var i = 0; i < firma.Split(' ').Count(); i++)
|
||||||
|
firmenSearchList[firma].Add(firma.Split(' ')[i]);
|
||||||
|
}
|
||||||
|
else firmenSearchList.Add(firma, new List<string>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -125,8 +155,53 @@ namespace ZKuP
|
|||||||
|
|
||||||
private async void btnAdd_Click(object sender, RoutedEventArgs e)
|
private async void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
tt.IsOpen = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (firmenSearchList.Keys.Select(p => p.ToLower()).Contains(tbName.Text.Trim().ToLower()))
|
||||||
|
{
|
||||||
|
if (MessageBox.Show($"Die Firma {tbName.Text} ist bereits angelegt.\n" +
|
||||||
|
$"Firmen dürfen nur mehrfach angelegt werden, wenn diese an mehreren Projekten gleichzeitig im Werk arbeiten!\n\n" +
|
||||||
|
$"Ist dies nicht der Fall, bitte die Firma in der Liste bearbeiten.\n" +
|
||||||
|
$"Hierfür einfach die zu ändernden Felder anklicken und bearbeiten.\n\n" +
|
||||||
|
$"Sollte es sich um eine andere Firma handeln, kann diese Meldung ignoriert werden\n" +
|
||||||
|
$"Möchten Sie diese Firma sicher nochmals hinzufügen?", "Doppelter Eintrag", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<string> similarities = new List<string>();
|
||||||
|
|
||||||
|
foreach (var item in firmenSearchList)
|
||||||
|
{
|
||||||
|
if (item.Value.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var val in item.Value)
|
||||||
|
if (Fuzz.Ratio(tbName.Text.ToLower(), val.ToLower()) > 60)
|
||||||
|
similarities.Add(item.Key);
|
||||||
|
}
|
||||||
|
else if (Fuzz.Ratio(tbName.Text.ToLower(), item.Key.ToLower()) > 60)
|
||||||
|
similarities.Add(item.Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (similarities.Count > 0)
|
||||||
|
{
|
||||||
|
similarities.Sort();
|
||||||
|
if (MessageBox.Show($"Die Firma {tbName.Text} ist sehr ähnlich zu der Firma {Helper.FirstCharToUpperCase(similarities.First())}.\n" +
|
||||||
|
$"Firmen dürfen nur mehrfach angelegt werden, wenn diese an mehreren Projekten gleichzeitig im Werk arbeiten!\n\n" +
|
||||||
|
$"Ist dies nicht der Fall, bitte die Firma in der Liste bearbeiten.\n" +
|
||||||
|
$"Hierfür einfach die zu ändernden Felder anklicken und bearbeiten.\n\n" +
|
||||||
|
$"Sollte es sich um eine andere Firma handeln, kann diese Meldung ignoriert werden\n" +
|
||||||
|
$"Möchten Sie diese Firma sicher hinzufügen?", "Doppelter Eintrag?", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(tbName.Text))
|
if (string.IsNullOrWhiteSpace(tbName.Text))
|
||||||
{
|
{
|
||||||
MessageBox.Show("Namen eintragen!", "Fehler");
|
MessageBox.Show("Namen eintragen!", "Fehler");
|
||||||
@ -342,7 +417,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void CbAnsprechpartner_Intern_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void CbAnsprechpartner_Intern_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
string test = SQL.ReadSingleValue($"SELECT Tel_Nr FROM zkup.ansprechpartner WHERE Name='{cbAnsprechpartner_Intern.SelectedValue}'");
|
string test = SQL.ReadSingleValue($"SELECT Tel_Nr FROM {MainWindow.table}.ansprechpartner WHERE Name='{cbAnsprechpartner_Intern.SelectedValue}'");
|
||||||
tbTel_Nr_Ansprechpartner_Intern.Text = test;
|
tbTel_Nr_Ansprechpartner_Intern.Text = test;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -447,7 +522,7 @@ namespace ZKuP
|
|||||||
break;
|
break;
|
||||||
case "Arbeitsbeginn":
|
case "Arbeitsbeginn":
|
||||||
await SQL.WriteSQL($"UPDATE firmen SET Arbeitsbeginn = '{newValue}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE firmen SET Arbeitsbeginn = '{newValue}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||||
if (Convert.ToDateTime(SQL.ReadSingleValue($"SELECT Arbeitsende FROM zkup.firmen WHERE idFirmen = '{id}'")) < MessageDate)
|
if (Convert.ToDateTime(SQL.ReadSingleValue($"SELECT Arbeitsende FROM {MainWindow.table}.firmen WHERE idFirmen = '{id}'")) < MessageDate)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Arbeitsende darf nicht kleiner als Arbeitsbeginn sein\nDatum wird automatisch angepasst", "Achtung!", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show(this, "Arbeitsende darf nicht kleiner als Arbeitsbeginn sein\nDatum wird automatisch angepasst", "Achtung!", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
await SQL.WriteSQL($"UPDATE firmen SET Arbeitsende = '{newValue}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE firmen SET Arbeitsende = '{newValue}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||||
@ -455,7 +530,7 @@ namespace ZKuP
|
|||||||
break;
|
break;
|
||||||
case "Arbeitsende":
|
case "Arbeitsende":
|
||||||
await SQL.WriteSQL($"UPDATE firmen SET Arbeitsende = '{newValue}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE firmen SET Arbeitsende = '{newValue}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||||
if (Convert.ToDateTime(SQL.ReadSingleValue($"SELECT Arbeitsbeginn FROM zkup.firmen WHERE idFirmen = '{id}'")) > MessageDate)
|
if (Convert.ToDateTime(SQL.ReadSingleValue($"SELECT Arbeitsbeginn FROM {MainWindow.table}.firmen WHERE idFirmen = '{id}'")) > MessageDate)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Arbeitbeginn darf nicht größer als Arbeitsende sein\nDatum wird automatisch angepasst", "Achtung!", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show(this, "Arbeitbeginn darf nicht größer als Arbeitsende sein\nDatum wird automatisch angepasst", "Achtung!", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
await SQL.WriteSQL($"UPDATE firmen SET Arbeitsbeginn = '{newValue}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE firmen SET Arbeitsbeginn = '{newValue}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||||
@ -694,7 +769,7 @@ namespace ZKuP
|
|||||||
await SQL.WriteSQL("INSERT INTO firmenLog (idfirmen,Name,Verantwortlicher_MA_Firma,Tel_Nr_Verantwortlicher_Firma,Anzahl_Begleiter,Anzahl_Fzg,Beauftragte_Leistung,Arbeitsbeginn,Arbeitsende,Ansprechpartner_Intern,Tel_Nr_Ansprechpartner_Intern,Geloescht_Von) VALUES " +
|
await SQL.WriteSQL("INSERT INTO firmenLog (idfirmen,Name,Verantwortlicher_MA_Firma,Tel_Nr_Verantwortlicher_Firma,Anzahl_Begleiter,Anzahl_Fzg,Beauftragte_Leistung,Arbeitsbeginn,Arbeitsende,Ansprechpartner_Intern,Tel_Nr_Ansprechpartner_Intern,Geloescht_Von) VALUES " +
|
||||||
$"('{arr[0]}','{arr[1].ToString()}','{arr[2].ToString()}','{arr[3].ToString()}','{arr[4].ToString()}','{arr[5].ToString()}','{arr[6].ToString()}','{Convert.ToDateTime(arr[7].ToString()).ToString("yyyy-MM-dd")}','{Convert.ToDateTime(arr[8].ToString()).ToString("yyyy-MM-dd")}','{arr[10].ToString()}','{arr[11].ToString()}','{Environment.UserName}')");
|
$"('{arr[0]}','{arr[1].ToString()}','{arr[2].ToString()}','{arr[3].ToString()}','{arr[4].ToString()}','{arr[5].ToString()}','{arr[6].ToString()}','{Convert.ToDateTime(arr[7].ToString()).ToString("yyyy-MM-dd")}','{Convert.ToDateTime(arr[8].ToString()).ToString("yyyy-MM-dd")}','{arr[10].ToString()}','{arr[11].ToString()}','{Environment.UserName}')");
|
||||||
|
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.firmen WHERE `idFirmen` = '{arr[0]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.firmen WHERE `idFirmen` = '{arr[0]}'");
|
||||||
|
|
||||||
updateList();
|
updateList();
|
||||||
}
|
}
|
||||||
@ -750,7 +825,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
if (MessageBox.Show(this, $"Möchten Sie den Eintrag '{oldValue}' in der Spalte 'Anspr. intern' sicher zu '{box.Text}' ändern?", "Sicher ändern?", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) == MessageBoxResult.Yes)
|
if (MessageBox.Show(this, $"Möchten Sie den Eintrag '{oldValue}' in der Spalte 'Anspr. intern' sicher zu '{box.Text}' ändern?", "Sicher ändern?", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) == MessageBoxResult.Yes)
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"UPDATE firmen SET Ansprechpartner_Intern = '{box.Text}',Tel_Nr_Ansprechpartner_Intern = '{SQL.ReadSingleValue($"SELECT Tel_Nr FROM zkup.ansprechpartner WHERE Name = '{(sender as ComboBox).Text}'")}', Bearbeiter = '{Environment.UserName}' WHERE idfirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE firmen SET Ansprechpartner_Intern = '{box.Text}',Tel_Nr_Ansprechpartner_Intern = '{SQL.ReadSingleValue($"SELECT Tel_Nr FROM {MainWindow.table}.ansprechpartner WHERE Name = '{(sender as ComboBox).Text}'")}', Bearbeiter = '{Environment.UserName}' WHERE idfirmen = '{id}'");
|
||||||
|
|
||||||
updateList();
|
updateList();
|
||||||
|
|
||||||
@ -893,12 +968,12 @@ namespace ZKuP
|
|||||||
int index = dataGridRow.GetIndex();
|
int index = dataGridRow.GetIndex();
|
||||||
|
|
||||||
var id = (DataGridRow.GetRowContainingElement((sender as DatePicker)).Item as DataRowView).Row.ItemArray[0];
|
var id = (DataGridRow.GetRowContainingElement((sender as DatePicker)).Item as DataRowView).Row.ItemArray[0];
|
||||||
await SQL.WriteSQL($"UPDATE zkup.firmen SET Arbeitsbeginn = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.firmen SET Arbeitsbeginn = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||||
|
|
||||||
if (Convert.ToDateTime(SQL.ReadSingleValue($"SELECT Arbeitsende FROM zkup.firmen WHERE idFirmen = '{id}'")) < (sender as DatePicker).SelectedDate.Value)
|
if (Convert.ToDateTime(SQL.ReadSingleValue($"SELECT Arbeitsende FROM {MainWindow.table}.firmen WHERE idFirmen = '{id}'")) < (sender as DatePicker).SelectedDate.Value)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Arbeitsende darf nicht kleiner als Arbeitsbeginn sein\nDatum wird automatisch angepasst", "Achtung!", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show(this, "Arbeitsende darf nicht kleiner als Arbeitsbeginn sein\nDatum wird automatisch angepasst", "Achtung!", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
await SQL.WriteSQL($"UPDATE zkup.firmen SET Arbeitsende = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.firmen SET Arbeitsende = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||||
}
|
}
|
||||||
|
|
||||||
updateList();
|
updateList();
|
||||||
@ -926,12 +1001,12 @@ namespace ZKuP
|
|||||||
int index = dataGridRow.GetIndex();
|
int index = dataGridRow.GetIndex();
|
||||||
|
|
||||||
var id = (DataGridRow.GetRowContainingElement((sender as DatePicker)).Item as DataRowView).Row.ItemArray[0];
|
var id = (DataGridRow.GetRowContainingElement((sender as DatePicker)).Item as DataRowView).Row.ItemArray[0];
|
||||||
await SQL.WriteSQL($"UPDATE zkup.firmen SET Arbeitsende = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.firmen SET Arbeitsende = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||||
|
|
||||||
if (Convert.ToDateTime(SQL.ReadSingleValue($"SELECT Arbeitsbeginn FROM zkup.firmen WHERE idFirmen = '{id}'")) > (sender as DatePicker).SelectedDate.Value)
|
if (Convert.ToDateTime(SQL.ReadSingleValue($"SELECT Arbeitsbeginn FROM {MainWindow.table}.firmen WHERE idFirmen = '{id}'")) > (sender as DatePicker).SelectedDate.Value)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Arbeitsbeginn darf nicht größer als Arbeitsende sein\nDatum wird automatisch angepasst", "Achtung!", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show(this, "Arbeitsbeginn darf nicht größer als Arbeitsende sein\nDatum wird automatisch angepasst", "Achtung!", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
await SQL.WriteSQL($"UPDATE zkup.firmen SET Arbeitsbeginn = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.firmen SET Arbeitsbeginn = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||||
}
|
}
|
||||||
|
|
||||||
updateList();
|
updateList();
|
||||||
@ -967,7 +1042,7 @@ namespace ZKuP
|
|||||||
int index = dataGridRow.GetIndex();
|
int index = dataGridRow.GetIndex();
|
||||||
|
|
||||||
var id = (DataGridRow.GetRowContainingElement((sender as DatePicker)).Item as DataRowView).Row.ItemArray[0];
|
var id = (DataGridRow.GetRowContainingElement((sender as DatePicker)).Item as DataRowView).Row.ItemArray[0];
|
||||||
await SQL.WriteSQL($"UPDATE zkup.firmen SET Örtliche_Einweisung_bis = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.firmen SET Örtliche_Einweisung_bis = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||||
|
|
||||||
updateList();
|
updateList();
|
||||||
|
|
||||||
@ -1049,22 +1124,80 @@ namespace ZKuP
|
|||||||
|
|
||||||
searchTerm = (sender as TextBox).Text;
|
searchTerm = (sender as TextBox).Text;
|
||||||
searchTimer.Start();
|
searchTimer.Start();
|
||||||
|
//SearchTimer_Tick(null, null);
|
||||||
}
|
}
|
||||||
private void SearchTimer_Tick(object sender, EventArgs e)
|
private void SearchTimer_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (searchTerm == "")
|
if (searchTerm == "")
|
||||||
{
|
{
|
||||||
firmen.DefaultView.RowFilter = $"";
|
firmen.DefaultView.RowFilter = $"";
|
||||||
|
|
||||||
Task.Run(() => FirmaView = Firma.DataTableToFirma(firmen));
|
//Task.Run(() => FirmaView = Firma.DataTableToFirma(firmen));
|
||||||
dgFirmen.DataContext = firmen;
|
//dgFirmen.DataContext = firmen;
|
||||||
|
}
|
||||||
|
else if(searchTerm.Length < 4)
|
||||||
|
{
|
||||||
|
firmen.DefaultView.RowFilter = $"Name LIKE '%{searchTerm}%' OR Verantwortlicher_MA_Firma LIKE '%{searchTerm}%'";
|
||||||
|
//dgFirmen.DataContext = firmen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
firmen.DefaultView.RowFilter = $"Name LIKE '%{searchTerm}%' OR Verantwortlicher_MA_Firma LIKE '%{searchTerm}%'";
|
List<string> similarities = new List<string>();
|
||||||
|
|
||||||
Task.Run(() => FirmaView = Firma.DataTableToFirma(firmen));
|
foreach (var item in firmen.Rows)
|
||||||
dgFirmen.DataContext = firmen;
|
{
|
||||||
|
var ratio = Fuzz.Ratio(tbSearch.Text.ToLower(), (item as DataRow).ItemArray[1].ToString().ToLower());
|
||||||
|
Debug.WriteLine(ratio, (item as DataRow).ItemArray[1].ToString().ToLower());
|
||||||
|
|
||||||
|
if (ratio > 80)
|
||||||
|
similarities.Add((item as DataRow).ItemArray[1].ToString());
|
||||||
|
|
||||||
|
ratio = Fuzz.Ratio(tbSearch.Text.ToLower(), (item as DataRow).ItemArray[2].ToString().ToLower());
|
||||||
|
if (ratio > 80)
|
||||||
|
similarities.Add((item as DataRow).ItemArray[2].ToString());
|
||||||
|
|
||||||
|
ratio = Fuzz.Ratio(tbSearch.Text.ToLower(), (item as DataRow).ItemArray[6].ToString().ToLower());
|
||||||
|
if (ratio > 80)
|
||||||
|
similarities.Add((item as DataRow).ItemArray[6].ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder str = new StringBuilder();
|
||||||
|
str.Append($"Name LIKE '%");
|
||||||
|
|
||||||
|
if (similarities.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var s in similarities)
|
||||||
|
str.Append($"{s}%' OR Name LIKE '%");
|
||||||
|
|
||||||
|
str.Remove(str.Length - 16, 16);
|
||||||
|
|
||||||
|
|
||||||
|
str.Append(" OR Verantwortlicher_MA_Firma LIKE '%");
|
||||||
|
|
||||||
|
foreach (var s in similarities)
|
||||||
|
str.Append($"{s}%' OR Ansprechpartner_Intern LIKE '%");
|
||||||
|
|
||||||
|
str.Remove(str.Length - 34, 34);
|
||||||
|
|
||||||
|
|
||||||
|
str.Append(" OR Beauftragte_Leistung LIKE '%");
|
||||||
|
|
||||||
|
foreach (var s in similarities)
|
||||||
|
str.Append($"{s}%' OR Beauftragte_Leistung LIKE '%");
|
||||||
|
|
||||||
|
str.Remove(str.Length - 31, 31);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
firmen.DefaultView.RowFilter = str.ToString();
|
||||||
|
|
||||||
|
//dgFirmen.DataContext = firmen;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
firmen.DefaultView.RowFilter = "";
|
||||||
|
//dgFirmen.DataContext = new DataTable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
searchProgress.Visibility = Visibility.Collapsed;
|
searchProgress.Visibility = Visibility.Collapsed;
|
||||||
@ -1079,6 +1212,68 @@ namespace ZKuP
|
|||||||
new Popup() { Child = new TextBlock() { Text = $"'{e.Text}' ist kein gültiges Zeichen\nTelefonnummer muss qualifiziert eingetragen werden!", Foreground = new SolidColorBrush(Colors.White), Margin = new Thickness(5) }, IsOpen = true, StaysOpen = false, Placement = PlacementMode.Mouse };
|
new Popup() { Child = new TextBlock() { Text = $"'{e.Text}' ist kein gültiges Zeichen\nTelefonnummer muss qualifiziert eingetragen werden!", Foreground = new SolidColorBrush(Colors.White), Margin = new Thickness(5) }, IsOpen = true, StaysOpen = false, Placement = PlacementMode.Mouse };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ToolTip tt = new ToolTip();
|
||||||
|
private void tbName_TextChanged(object sender, TextChangedEventArgs e)
|
||||||
|
{
|
||||||
|
List<Tuple<int, string>> similarities = new List<Tuple<int, string>>();
|
||||||
|
|
||||||
|
foreach(var item in firmenSearchList)
|
||||||
|
{
|
||||||
|
if (item.Value.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var val in item.Value)
|
||||||
|
{
|
||||||
|
var ratio = Fuzz.Ratio(tbName.Text.ToLower(), val.ToLower());
|
||||||
|
if (ratio > 50)
|
||||||
|
similarities.Add(new Tuple<int, string>(ratio, item.Key));
|
||||||
|
else if (!string.IsNullOrWhiteSpace(tbName.Text) && val.ToLower().StartsWith(tbName.Text.ToLower()))
|
||||||
|
similarities.Add(new Tuple<int, string>(50, val));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (Fuzz.Ratio(tbName.Text.ToLower(), item.Key.ToLower()) > 80)
|
||||||
|
similarities.Add(new Tuple<int, string>(100, item.Key));
|
||||||
|
else if (!string.IsNullOrWhiteSpace(tbName.Text) && item.Key.ToLower().StartsWith(tbName.Text.ToLower()))
|
||||||
|
similarities.Add(new Tuple<int, string>(65, item.Key));
|
||||||
|
}
|
||||||
|
|
||||||
|
similarities = similarities.OrderByDescending(p => p.Item1).ToList();
|
||||||
|
|
||||||
|
if(similarities.Count > 0)
|
||||||
|
{
|
||||||
|
tt.Placement = PlacementMode.RelativePoint;
|
||||||
|
tt.PlacementTarget = tbName;
|
||||||
|
tt.VerticalOffset = tbName.Height;
|
||||||
|
tt.Width = tbName.Width;
|
||||||
|
tt.Background = new SolidColorBrush(Colors.Red);
|
||||||
|
tt.Content = new Grid();
|
||||||
|
(tt.Content as Grid).Background = new SolidColorBrush(Colors.Red);
|
||||||
|
(tt.Content as Grid).Children.Add(new StackPanel());
|
||||||
|
((tt.Content as Grid).Children[0] as StackPanel).Children.Add(new TextBlock() { Text = "Firmen nicht doppelt anlegen!\n\nMeinen Sie:\n" });
|
||||||
|
|
||||||
|
foreach (var item in similarities.Select(p => p.Item2).Distinct())
|
||||||
|
((tt.Content as Grid).Children[0] as StackPanel).Children.Add(new TextBlock() { Text = Helper.FirstCharToUpperCase(item)});
|
||||||
|
|
||||||
|
tt.IsOpen = true;
|
||||||
|
tbName.ToolTip = tt;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tt.IsOpen = false;
|
||||||
|
tbName.ToolTip = tt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Window_Closing(object sender, CancelEventArgs e)
|
||||||
|
{
|
||||||
|
tt.IsOpen = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbName_LostFocus(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
tt.IsOpen = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Firma
|
public class Firma
|
||||||
|
|||||||
@ -43,7 +43,7 @@ namespace ZKuP
|
|||||||
tbHandynr.Text != "" &&
|
tbHandynr.Text != "" &&
|
||||||
tbEmail.Text != "")
|
tbEmail.Text != "")
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"INSERT INTO zkup.mcFitUsers (Vorname, Name, Abteilung, Handynr, Email) VALUES ('{tbVorname.Text}','{tbNachname.Text}','{tbAbteilung.Text}','{tbHandynr.Text}','{tbEmail.Text}')");
|
await SQL.WriteSQL($"INSERT INTO {MainWindow.table}.mcFitUsers (Vorname, Name, Abteilung, Handynr, Email) VALUES ('{tbVorname.Text}','{tbNachname.Text}','{tbAbteilung.Text}','{tbHandynr.Text}','{tbEmail.Text}')");
|
||||||
|
|
||||||
var exist = await SQL.RowExists("mcFitUsers", "Email", tbEmail.Text);
|
var exist = await SQL.RowExists("mcFitUsers", "Email", tbEmail.Text);
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ZKuP"
|
xmlns:local="clr-namespace:ZKuP"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Parkausweis beantragen" Height="810" Width="335" MinWidth="330" MinHeight="707">
|
Title="Parkausweis beantragen" Height="850" Width="360" MinWidth="360" MinHeight="850">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
@ -16,12 +16,12 @@
|
|||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="1.2*"/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition Height="2*"/>
|
||||||
<RowDefinition/>
|
<RowDefinition Height="0.8*"/>
|
||||||
<RowDefinition/>
|
<RowDefinition x:Name="CommentRow" Height="1*" />
|
||||||
<RowDefinition x:Name="CommentRow" Height="2*" />
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Vorname*" VerticalAlignment="Top"/>
|
<TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Vorname*" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbVorname" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbVorname" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
||||||
@ -54,19 +54,38 @@
|
|||||||
<TextBox x:Name="tbPLZ" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="7" PreviewTextInput="tbPLZ_PreviewTextInput" TextInput="tbPLZ_TextInput" CommandManager.PreviewExecuted="tbPLZ_PreviewExecuted" TextChanged="tbPLZ_TextChanged" ContextMenu="{x:Null}"/>
|
<TextBox x:Name="tbPLZ" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="7" PreviewTextInput="tbPLZ_PreviewTextInput" TextInput="tbPLZ_TextInput" CommandManager.PreviewExecuted="tbPLZ_PreviewExecuted" TextChanged="tbPLZ_TextChanged" ContextMenu="{x:Null}"/>
|
||||||
<!---->
|
<!---->
|
||||||
|
|
||||||
<TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Kennzeichen*" VerticalAlignment="Top" Grid.Row="8"/>
|
<TextBlock Text="Fahrzeugtyp" Grid.Row="8" Margin="10,5,10,10" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
<TextBlock Margin="48,26,0,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Grid.Row="8" Text="-" HorizontalAlignment="Left" Visibility="Visible" FontSize="14" FontWeight="SemiBold" Padding="0,2,0,0"/>
|
<StackPanel Orientation="Horizontal" Grid.Row="8" VerticalAlignment="Center" Margin="10,30,10,10" HorizontalAlignment="Left" Height="24" Width="292">
|
||||||
<TextBox x:Name="tbDTownKennzeichen" Height="25" Margin="10,26,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="8" Visibility="Visible" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextAlignment="Center" Width="37" PreviewTextInput="tbDTownKennzeichen_PreviewTextInput" TextChanged="Textboxes_Changed"/>
|
<RadioButton x:Name="rbPKW" Content="PKW" HorizontalAlignment="Center" Width="100" Margin="50,0,0,0" IsChecked="True"/>
|
||||||
<TextBox x:Name="tbDCharsKennzeichen" Height="25" Margin="55,26,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="8" Visibility="Visible" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextAlignment="Center" Width="32" PreviewTextInput="tbDCharsKennzeichen_PreviewTextInput" TextChanged="Textboxes_Changed"/>
|
<RadioButton x:Name="rbKrad" Content="Kraftrad" HorizontalAlignment="Left"/>
|
||||||
<TextBox x:Name="tbDDigitsKennzeichen" Height="25" Margin="95,26,0,0" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="8" Visibility="Visible" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextAlignment="Center" Width="39" PreviewTextInput="tbDDigitsKennzeichen_PreviewTextInput" TextChanged="Textboxes_Changed"/>
|
</StackPanel>
|
||||||
<TextBox x:Name="tbOtherKennzeichen" Height="25" Margin="10,26,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="8" Visibility="Hidden" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextChanged="Textboxes_Changed" Width="124"/>
|
|
||||||
<RadioButton x:Name="rbDKennzeichen" Content="Deutsches Kennzeichen" Height="25" Margin="139,0,10,12" Grid.Row="8" VerticalAlignment="Bottom" IsChecked="True" Checked="rbDKennzeichen_Checked"/>
|
|
||||||
<RadioButton x:Name="rbOtherKennzeichen" Content="Ausländisches Kennzeichen" Height="25" Margin="139,0,10,-9" VerticalAlignment="Bottom" Grid.Row="8" Checked="rbOtherKennzeichen_Checked"/>
|
|
||||||
|
|
||||||
<TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Vorgesetzter*" VerticalAlignment="Top" Grid.Row="9"/>
|
<TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Vorgesetzter*" VerticalAlignment="Top" Grid.Row="9"/>
|
||||||
<TextBox x:Name="tbVorgesetzter" Margin="10,26,10,0" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="9" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbVorgesetzter" Margin="10,26,10,0" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="9" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
||||||
|
|
||||||
<CheckBox x:Name="cBSchicht" Content="Beantrager in Wechsel- oder Schichtdienst tätig" Grid.Row="10" VerticalAlignment="Center" Margin="10,18,10,10" HorizontalAlignment="Left" Height="24" Width="292" Checked="cBSchicht_Checked" Unchecked="cBSchicht_Unchecked"/> <!--ToolTip="Es sind nur Personen berechtigt für eine Parkkarte, die in Wechsel- oder Schichtdienst tätig sind"-->
|
|
||||||
|
<StackPanel Margin="150,20,10,12" Grid.Row="10">
|
||||||
|
<RadioButton x:Name="rbDKennzeichen" Content="Deutsches Kennzeichen" Height="25" VerticalAlignment="Bottom" IsChecked="True"/>
|
||||||
|
<RadioButton x:Name="rbOtherKennzeichen" Content="Ausländisches Kennzeichen" Height="25" VerticalAlignment="Bottom" Checked="rbOtherKennzeichen_Checked"/>
|
||||||
|
<RadioButton x:Name="rbVersKennzeichen" Content="Versicherungskennzeichen" Height="25" VerticalAlignment="Bottom" Checked="rbVersKennzeichen_Checked"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
|
<TextBlock Text="Kennzeichen*" Margin="10,10,0,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" VerticalAlignment="Top" Grid.Row="10"/>
|
||||||
|
|
||||||
|
<StackPanel x:Name="spDKennzeichen" Margin="10,36,0,20" Grid.Row="10" HorizontalAlignment="Left" Orientation="Horizontal" Width="130">
|
||||||
|
<TextBox x:Name="tbDTownKennzeichen" Height="25" CharacterCasing="Upper" Padding="0,4,0,0" TextWrapping="Wrap" Visibility="Visible" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextAlignment="Center" Width="37" PreviewTextInput="tbDTownKennzeichen_PreviewTextInput" TextChanged="Textboxes_Changed"/>
|
||||||
|
<TextBlock Margin="5,0,0,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="-" HorizontalAlignment="Left" Visibility="Visible" FontSize="14" FontWeight="SemiBold" Padding="0,2,0,0" Height="20"/>
|
||||||
|
<TextBox x:Name="tbDCharsKennzeichen" Height="25" Margin="5,0,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" Visibility="Visible" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextAlignment="Center" Width="32" PreviewTextInput="tbDCharsKennzeichen_PreviewTextInput" TextChanged="Textboxes_Changed"/>
|
||||||
|
<TextBox x:Name="tbDDigitsKennzeichen" Height="25" Margin="5,0,0,0" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" Visibility="Visible" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextAlignment="Center" Width="39" PreviewTextInput="tbDDigitsKennzeichen_PreviewTextInput" TextChanged="Textboxes_Changed"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBox x:Name="tbOtherKennzeichen" Height="25" Margin="10,0,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" Visibility="Collapsed" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextChanged="Textboxes_Changed" Width="124"/>
|
||||||
|
|
||||||
|
<StackPanel x:Name="spVersKennzeichen" Orientation="Horizontal" Visibility="Collapsed" Grid.Row="10" Margin="10,15,0,0">
|
||||||
|
<TextBox x:Name="tbVersKennzeichen1" MaxLength="3" Height="25" Margin="10,0,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextChanged="Textboxes_Changed" Width="40"/>
|
||||||
|
<TextBox x:Name="tbVersKennzeichen2" MaxLength="3" Height="25" Margin="10,0,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextChanged="Textboxes_Changed" Width="40"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<CheckBox x:Name="cBCorrectness" Content="Hiermit bestätige ich die Richtigkeit 
und Vollständigkeit der Angaben" Grid.Row="11" HorizontalAlignment="Center" VerticalAlignment="Center" Unchecked="cBCorrectness_Unchecked" Checked="cBCorrectness_Checked"/>
|
<CheckBox x:Name="cBCorrectness" Content="Hiermit bestätige ich die Richtigkeit 
und Vollständigkeit der Angaben" Grid.Row="11" HorizontalAlignment="Center" VerticalAlignment="Center" Unchecked="cBCorrectness_Unchecked" Checked="cBCorrectness_Checked"/>
|
||||||
|
|
||||||
|
|||||||
@ -72,47 +72,52 @@ namespace ZKuP
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
special = Special;
|
special = Special;
|
||||||
|
|
||||||
if(special)
|
//if(special)
|
||||||
{
|
//{
|
||||||
CommentRow.Height = new GridLength(2, GridUnitType.Star);
|
// CommentRow.Height = new GridLength(2, GridUnitType.Star);
|
||||||
MinWidth = 330;
|
// MinWidth = 360;
|
||||||
MinHeight = 800;
|
// MinHeight = 850;
|
||||||
Width = 330;
|
// Width = 360;
|
||||||
Height = 800;
|
// Height = 850;
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
CommentRow.Height = new GridLength(0, GridUnitType.Star);
|
// CommentRow.Height = new GridLength(0, GridUnitType.Star);
|
||||||
MinWidth = 330;
|
// MinWidth = 330;
|
||||||
MinHeight = 707;
|
// MinHeight = 707;
|
||||||
Width = 330;
|
// Width = 330;
|
||||||
Height = 707;
|
// Height = 707;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
rbDKennzeichen.Checked += rbDKennzeichen_Checked;
|
||||||
|
|
||||||
//var uri = new Uri("pack://application:,,,/Resources/PLZ_MUC.txt");
|
//var uri = new Uri("pack://application:,,,/Resources/PLZ_MUC.txt");
|
||||||
//var resourceStream = Application.GetResourceStream(uri);
|
//var resourceStream = Application.GetResourceStream(uri);
|
||||||
|
|
||||||
using (var reader = new System.IO.StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("ZKuP.Resources.PLZ_MUC.txt")))
|
//using (var reader = new System.IO.StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("ZKuP.Resources.PLZ_MUC.txt")))
|
||||||
{
|
//{
|
||||||
plz = reader.ReadToEnd().Replace("\r", "").Split('\n').ToList();
|
// plz = reader.ReadToEnd().Replace("\r", "").Split('\n').ToList();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Textboxes_Changed(object sender, TextChangedEventArgs e)
|
private void Textboxes_Changed(object sender, TextChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (System.Text.RegularExpressions.Regex.IsMatch(tbAdresse.Text, @"^.+\s{1}\d+\s*\w*"))
|
if (System.Text.RegularExpressions.Regex.IsMatch(tbAdresse.Text, @"^.+\s{1}\d+\s*\w*"))
|
||||||
{
|
{
|
||||||
tbAdresse.Foreground = new SolidColorBrush(Colors.Black);
|
tbAdresse.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||||
|
//tbAdresse.Foreground = new SolidColorBrush(Colors.Black);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (System.Text.RegularExpressions.Regex.IsMatch(tbEmail.Text, @"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"))
|
if (System.Text.RegularExpressions.Regex.IsMatch(tbEmail.Text, @"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"))
|
||||||
{
|
{
|
||||||
tbEmail.Foreground = new SolidColorBrush(Colors.Black);
|
tbEmail.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||||
|
//tbEmail.Foreground = new SolidColorBrush(Colors.Black);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tbTelefon.Text.ToList<char>().Distinct().Count() > 4)
|
if (tbTelefon.Text.ToList<char>().Distinct().Count() > 4)
|
||||||
{
|
{
|
||||||
tbTelefon.Foreground = new SolidColorBrush(Colors.Black);
|
tbTelefon.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||||
|
//tbTelefon.Foreground = new SolidColorBrush(Colors.Black);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkButton();
|
checkButton();
|
||||||
@ -142,6 +147,10 @@ namespace ZKuP
|
|||||||
||
|
||
|
||||||
(rbOtherKennzeichen.IsChecked.Value &&
|
(rbOtherKennzeichen.IsChecked.Value &&
|
||||||
!string.IsNullOrWhiteSpace(tbOtherKennzeichen.Text)))
|
!string.IsNullOrWhiteSpace(tbOtherKennzeichen.Text)))
|
||||||
|
||
|
||||||
|
(rbVersKennzeichen.IsChecked.Value &&
|
||||||
|
!string.IsNullOrWhiteSpace(tbVersKennzeichen1.Text) &&
|
||||||
|
!string.IsNullOrWhiteSpace(tbVersKennzeichen2.Text))
|
||||||
)
|
)
|
||||||
btnCreate.IsEnabled = true;
|
btnCreate.IsEnabled = true;
|
||||||
else btnCreate.IsEnabled = false;
|
else btnCreate.IsEnabled = false;
|
||||||
@ -202,6 +211,14 @@ namespace ZKuP
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rbVersKennzeichen.IsChecked.Value &&
|
||||||
|
string.IsNullOrWhiteSpace(tbVersKennzeichen1.Text) &&
|
||||||
|
string.IsNullOrWhiteSpace(tbVersKennzeichen2.Text))
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "Kennzeichen muss vollständig ausgefüllt sein", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!System.Text.RegularExpressions.Regex.IsMatch(tbEmail.Text, @"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"))
|
if (!System.Text.RegularExpressions.Regex.IsMatch(tbEmail.Text, @"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"))
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Email nicht vollständig oder falsches Format", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show(this, "Email nicht vollständig oder falsches Format", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
@ -222,7 +239,7 @@ namespace ZKuP
|
|||||||
string.IsNullOrWhiteSpace(tbAdresse.Text) &&
|
string.IsNullOrWhiteSpace(tbAdresse.Text) &&
|
||||||
string.IsNullOrWhiteSpace(tbPLZ.Text) &&
|
string.IsNullOrWhiteSpace(tbPLZ.Text) &&
|
||||||
string.IsNullOrWhiteSpace(tbVorgesetzter.Text) &&
|
string.IsNullOrWhiteSpace(tbVorgesetzter.Text) &&
|
||||||
!cBSchicht.IsChecked.Value &&
|
//!cBSchicht.IsChecked.Value &&
|
||||||
!cBCorrectness.IsChecked.Value)
|
!cBCorrectness.IsChecked.Value)
|
||||||
|| special)
|
|| special)
|
||||||
{
|
{
|
||||||
@ -230,15 +247,17 @@ namespace ZKuP
|
|||||||
int _schicht = 0, _correctness = 0;
|
int _schicht = 0, _correctness = 0;
|
||||||
string _bemerkung = "Erstellt durch ZKuP";
|
string _bemerkung = "Erstellt durch ZKuP";
|
||||||
|
|
||||||
if (cBSchicht.IsChecked.Value) _schicht = 1;
|
//if (cBSchicht.IsChecked.Value) _schicht = 1;
|
||||||
if (cBCorrectness.IsChecked.Value) _correctness = 1;
|
if (cBCorrectness.IsChecked.Value) _correctness = 1;
|
||||||
if (!string.IsNullOrWhiteSpace(tbBemerkung.Text)) _bemerkung = tbBemerkung.Text;
|
if (!string.IsNullOrWhiteSpace(tbBemerkung.Text)) _bemerkung = tbBemerkung.Text;
|
||||||
|
|
||||||
|
var isKrad = rbPKW.IsChecked.Value ? 0 : 1;
|
||||||
|
|
||||||
if (rbOtherKennzeichen.IsChecked.Value)
|
if (rbOtherKennzeichen.IsChecked.Value)
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"INSERT INTO parkausweise (MA_Vorname,MA_Name,Kennzeichen,Email,Telefon,Abteilung,Firma,Adresse,PLZ,Vorgesetzter,AcceptedCorrectness,Schicht,Bemerkung) VALUES ('{tbVorname.Text}','{tbNachname.Text}','{tbOtherKennzeichen.Text}','{tbEmail.Text}','{tbTelefon.Text}','{tbAbteilung.Text}','{cbFirma.Text}','{tbAdresse.Text}','{tbPLZ.Text}','{tbVorgesetzter.Text}','{_correctness}','{_schicht}','{_bemerkung}')");
|
await SQL.WriteSQL($"INSERT INTO {MainWindow.table}.`parkausweise` (MA_Vorname,MA_Name,Kennzeichen,Email,Telefon,Abteilung,Firma,Adresse,PLZ,Vorgesetzter,AcceptedCorrectness,Schicht,Bemerkung,isKrad) VALUES ('{tbVorname.Text}','{tbNachname.Text}','{tbOtherKennzeichen.Text}','{tbEmail.Text}','{tbTelefon.Text}','{tbAbteilung.Text}','{cbFirma.Text}','{tbAdresse.Text}','{tbPLZ.Text}','{tbVorgesetzter.Text}','{_correctness}','{_schicht}','{_bemerkung}',{isKrad})");
|
||||||
var id = SQL.ReadSingleValue($"SELECT idparkausweise FROM zkup.parkausweise ORDER BY idparkausweise DESC LIMIT 1");
|
var id = SQL.ReadSingleValue($"SELECT idparkausweise FROM {MainWindow.table}.parkausweise ORDER BY idparkausweise DESC LIMIT 1");
|
||||||
var name = SQL.ReadSingleValue($"SELECT MA_Name FROM zkup.parkausweise WHERE idparkausweise={id}");
|
var name = SQL.ReadSingleValue($"SELECT MA_Name FROM {MainWindow.table}.parkausweise WHERE idparkausweise={id}");
|
||||||
|
|
||||||
if (name == tbNachname.Text)
|
if (name == tbNachname.Text)
|
||||||
{
|
{
|
||||||
@ -254,9 +273,27 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
else if (rbDKennzeichen.IsChecked.Value)
|
else if (rbDKennzeichen.IsChecked.Value)
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"INSERT INTO parkausweise (MA_Vorname,MA_Name,Kennzeichen,Email,Telefon,Abteilung,Firma,Adresse,PLZ,Vorgesetzter,AcceptedCorrectness,Schicht,Bemerkung) VALUES ('{tbVorname.Text}','{tbNachname.Text}','{tbDTownKennzeichen.Text}-{tbDCharsKennzeichen.Text} {tbDDigitsKennzeichen.Text}','{tbEmail.Text}','{tbTelefon.Text}','{tbAbteilung.Text}','{cbFirma.Text}','{tbAdresse.Text}','{tbPLZ.Text}','{tbVorgesetzter.Text}','{_correctness}','{_schicht}','{_bemerkung}')");
|
await SQL.WriteSQL($"INSERT INTO parkausweise (MA_Vorname,MA_Name,Kennzeichen,Email,Telefon,Abteilung,Firma,Adresse,PLZ,Vorgesetzter,AcceptedCorrectness,Schicht,Bemerkung,isKrad) VALUES ('{tbVorname.Text}','{tbNachname.Text}','{tbDTownKennzeichen.Text}-{tbDCharsKennzeichen.Text} {tbDDigitsKennzeichen.Text}','{tbEmail.Text}','{tbTelefon.Text}','{tbAbteilung.Text}','{cbFirma.Text}','{tbAdresse.Text}','{tbPLZ.Text}','{tbVorgesetzter.Text}','{_correctness}','{_schicht}','{_bemerkung}',{isKrad})");
|
||||||
var id = SQL.ReadSingleValue($"SELECT idparkausweise FROM zkup.parkausweise ORDER BY idparkausweise DESC LIMIT 1");
|
var id = SQL.ReadSingleValue($"SELECT idparkausweise FROM {MainWindow.table}.parkausweise ORDER BY idparkausweise DESC LIMIT 1");
|
||||||
var name = SQL.ReadSingleValue($"SELECT MA_Name FROM zkup.parkausweise WHERE idparkausweise={id}");
|
var name = SQL.ReadSingleValue($"SELECT MA_Name FROM {MainWindow.table}.parkausweise WHERE idparkausweise={id}");
|
||||||
|
|
||||||
|
if (name == tbNachname.Text)
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, $"Antrag erfolgreich abgeschickt\n\nIhre Karte hat die Nr. {id}", "Erfolg", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, $"Antrag konnte nicht gesendet werden, bitte erneut versuchen\n\nSollte der Fehler weiterhin auftreten, bitte an Ihren Administrator wenden", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (rbVersKennzeichen.IsChecked.Value)
|
||||||
|
{
|
||||||
|
await SQL.WriteSQL($"INSERT INTO parkausweise (MA_Vorname,MA_Name,Kennzeichen,Email,Telefon,Abteilung,Firma,Adresse,PLZ,Vorgesetzter,AcceptedCorrectness,Schicht,Bemerkung,isKrad) VALUES ('{tbVorname.Text}','{tbNachname.Text}','{tbVersKennzeichen1.Text} {tbVersKennzeichen2.Text}','{tbEmail.Text}','{tbTelefon.Text}','{tbAbteilung.Text}','{cbFirma.Text}','{tbAdresse.Text}','{tbPLZ.Text}','{tbVorgesetzter.Text}','{_correctness}','{_schicht}','{_bemerkung}',{isKrad})");
|
||||||
|
var id = SQL.ReadSingleValue($"SELECT idparkausweise FROM {MainWindow.table}.parkausweise ORDER BY idparkausweise DESC LIMIT 1");
|
||||||
|
var name = SQL.ReadSingleValue($"SELECT MA_Name FROM {MainWindow.table}.parkausweise WHERE idparkausweise={id}");
|
||||||
|
|
||||||
if (name == tbNachname.Text)
|
if (name == tbNachname.Text)
|
||||||
{
|
{
|
||||||
@ -355,20 +392,18 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void rbDKennzeichen_Checked(object sender, RoutedEventArgs e)
|
private void rbDKennzeichen_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
tbOtherKennzeichen.Visibility = Visibility.Hidden;
|
tbOtherKennzeichen.Visibility = Visibility.Collapsed;
|
||||||
|
spVersKennzeichen.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
tbDTownKennzeichen.Visibility = Visibility.Visible;
|
spDKennzeichen.Visibility = Visibility.Visible;
|
||||||
tbDCharsKennzeichen.Visibility = Visibility.Visible;
|
|
||||||
tbDDigitsKennzeichen.Visibility = Visibility.Visible;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rbOtherKennzeichen_Checked(object sender, RoutedEventArgs e)
|
private void rbOtherKennzeichen_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (MessageBox.Show(this, "Diese Funktion darf nicht für deutsche Kennzeichen genutzt werden\nDie Kennzeichen werden überprüft und bei deutschem Kennzeichen abgelehnt\n\nMöchten Sie sicher ein ausländisches Kennzeichen eingeben?", "Achtung!", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No) == MessageBoxResult.Yes)
|
if (MessageBox.Show(this, "Diese Funktion darf nicht für deutsche Kennzeichen genutzt werden\nDie Kennzeichen werden überprüft und bei deutschem Kennzeichen abgelehnt\n\nMöchten Sie sicher ein ausländisches Kennzeichen eingeben?", "Achtung!", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No) == MessageBoxResult.Yes)
|
||||||
{
|
{
|
||||||
tbDTownKennzeichen.Visibility = Visibility.Collapsed;
|
spDKennzeichen.Visibility = Visibility.Collapsed;
|
||||||
tbDCharsKennzeichen.Visibility = Visibility.Collapsed;
|
spVersKennzeichen.Visibility = Visibility.Collapsed;
|
||||||
tbDDigitsKennzeichen.Visibility = Visibility.Collapsed;
|
|
||||||
|
|
||||||
tbOtherKennzeichen.Visibility = Visibility.Visible;
|
tbOtherKennzeichen.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
@ -378,6 +413,15 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void rbVersKennzeichen_Checked(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
tbOtherKennzeichen.Visibility = Visibility.Collapsed;
|
||||||
|
spDKennzeichen.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
|
spVersKennzeichen.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void tbDTownKennzeichen_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
private void tbDTownKennzeichen_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||||
{
|
{
|
||||||
if ((sender as TextBox).Text.Length >= 3)
|
if ((sender as TextBox).Text.Length >= 3)
|
||||||
@ -432,7 +476,8 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tbAdresse.Foreground = new SolidColorBrush(Colors.Black);
|
tbAdresse.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||||
|
//tbAdresse.Foreground = new SolidColorBrush(Colors.Black);
|
||||||
tbAdresse.ToolTip = "";
|
tbAdresse.ToolTip = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -446,7 +491,8 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tbEmail.Foreground = new SolidColorBrush(Colors.Black);
|
tbEmail.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||||
|
//tbEmail.Foreground = new SolidColorBrush(Colors.Black);
|
||||||
tbEmail.ToolTip = "";
|
tbEmail.ToolTip = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -462,7 +508,8 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tbTelefon.Foreground = new SolidColorBrush(Colors.Black);
|
tbTelefon.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||||
|
//tbTelefon.Foreground = new SolidColorBrush(Colors.Black);
|
||||||
tbTelefon.ToolTip = "";
|
tbTelefon.ToolTip = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,20 +22,16 @@
|
|||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,380,0,0" TextWrapping="Wrap" Text="Ansprechpartner intern" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,380,0,0" TextWrapping="Wrap" Text="Ansprechpartner intern" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
|
||||||
<TextBox x:Name="tbTel_Ansprechp" HorizontalAlignment="Left" Height="23" Margin="10,450,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="330" TabIndex="9" PreviewKeyDown="TextBoxes_PreviewKeyDown" Grid.ColumnSpan="2"/>
|
<TextBox x:Name="tbTel_Ansprechp" HorizontalAlignment="Left" Height="23" Margin="10,450,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="330" TabIndex="9" PreviewKeyDown="TextBoxes_PreviewKeyDown" Grid.ColumnSpan="2"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,429,0,0" TextWrapping="Wrap" Text="Telefonnummer Ansprechpartner" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,429,0,0" TextWrapping="Wrap" Text="Telefonnummer Ansprechpartner" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
|
||||||
<DatePicker x:Name="dpBesuchstag" HorizontalAlignment="Left" Margin="12,253,0,0" VerticalAlignment="Top" TabIndex="5" PreviewKeyDown="DpBesuchstag_PreviewKeyDown" Grid.ColumnSpan="2" DateValidationError="dpBesuchstag_DateValidationError"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dpBesuchstag" HorizontalAlignment="Left" Margin="12,253,0,0" VerticalAlignment="Top" TabIndex="5" PreviewKeyDown="DpBesuchstag_PreviewKeyDown" Grid.ColumnSpan="2" DateValidationError="dpBesuchstag_DateValidationError"/>
|
||||||
<Button x:Name="btnAdd" Content="Besucher erstellen" HorizontalAlignment="Left" Margin="10,518,0,0" VerticalAlignment="Top" Width="330" Height="61" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Click="BtnAdd_Click" TabIndex="10" PreviewKeyDown="TextBoxes_PreviewKeyDown" Grid.ColumnSpan="2"/>
|
<Button x:Name="btnAdd" Content="Besucher erstellen" HorizontalAlignment="Left" Margin="10,518,0,0" VerticalAlignment="Top" Width="330" Height="61" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Click="BtnAdd_Click" TabIndex="10" PreviewKeyDown="TextBoxes_PreviewKeyDown" Grid.ColumnSpan="2"/>
|
||||||
<TextBox x:Name="tbGrundDesBesuchs" HorizontalAlignment="Left" Height="23" Margin="10,303,0,0" TextWrapping="Wrap" Text="" Width="330" VerticalAlignment="Top" TabIndex="6" PreviewKeyDown="TextBoxes_PreviewKeyDown" Grid.ColumnSpan="2"/>
|
<TextBox x:Name="tbGrundDesBesuchs" HorizontalAlignment="Left" Height="23" Margin="10,303,0,0" TextWrapping="Wrap" Text="" Width="330" VerticalAlignment="Top" TabIndex="6" PreviewKeyDown="TextBoxes_PreviewKeyDown" Grid.ColumnSpan="2"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,331,0,0" TextWrapping="Wrap" Text="Örtlichkeit" Width="330" VerticalAlignment="Top"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,331,0,0" TextWrapping="Wrap" Text="Örtlichkeit" Width="330" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbOertlichkeit" Height="23" HorizontalAlignment="Left" Width="330" Margin="10,352,11,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" TabIndex="7" PreviewKeyDown="TextBoxes_PreviewKeyDown" Grid.ColumnSpan="2"/>
|
<TextBox x:Name="tbOertlichkeit" Height="23" HorizontalAlignment="Left" Width="330" Margin="10,352,11,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" TabIndex="7" PreviewKeyDown="TextBoxes_PreviewKeyDown" Grid.ColumnSpan="2"/>
|
||||||
<Button x:Name="btnMyVisitors" Content="Meine erstellten Besucher" Margin="10,480,0,0" HorizontalAlignment="Left" Width="330" VerticalAlignment="Top" Click="btnMyVisitors_Click" Grid.ColumnSpan="2" ToolTip="Nur bereits erstellte Besucher können eingesehen werden"/>
|
<Button x:Name="btnMyVisitors" Content="Meine erstellten Besucher" Margin="10,480,0,0" HorizontalAlignment="Left" Width="330" VerticalAlignment="Top" Click="btnMyVisitors_Click" Grid.ColumnSpan="2" ToolTip="Nur bereits erstellte Besucher können eingesehen werden"/>
|
||||||
|
|
||||||
<TextBlock Text="Besucher sind immer ohne KFZ!" Foreground="Red" FontSize="16" FontWeight="Bold" Margin="0,50,10,0" Height="50" VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
|
||||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Right" Margin="0,100,5,0" Width="250">
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Right" Margin="0,100,5,0" Width="250">
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextAlignment="Center"><Run Text="Besucher dürfen nicht mit Fahrzeugen"/><LineBreak/><Run Text="auf das Gelände fahren."/></TextBlock>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextAlignment="Center"><Run Text="Besucher dürfen nicht mit Fahrzeugen"/><LineBreak/><Run Text="auf das Gelände fahren."/></TextBlock>
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextAlignment="Center"><Run/><LineBreak/><Run Text="Wird ein Fahrzeug auf dem Gelände dringend"/><LineBreak/><Run Text="benötigt, so muss der Besucher als Firma"/><LineBreak/><Run Text="unter 'Firmen verwalten' eingetragen werden"/></TextBlock>
|
<!--<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextAlignment="Center"><Run/><LineBreak/><Run Text="Wird ein Fahrzeug auf dem Gelände dringend"/><LineBreak/><Run Text="benötigt, so muss der Besucher als Firma"/><LineBreak/><Run Text="unter 'Firmen verwalten' eingetragen werden"/></TextBlock>-->
|
||||||
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextAlignment="Center"><Run/><LineBreak/><Run Text="Wenn Ihnen der Button 'Firmen verwalten'"/><LineBreak/><Run Text="nicht angezeigt wird, wenden Sie sich bitte"/><LineBreak/><Run Text=" an Ihren Fremdfirmenkoordinator"/></TextBlock>
|
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextAlignment="Center"><Run/><LineBreak/><Run Text="Wenn Ihnen der Button 'Firmen verwalten'"/><LineBreak/><Run Text="nicht angezeigt wird, wenden Sie sich bitte"/><LineBreak/><Run Text=" an Ihren Fremdfirmenkoordinator"/></TextBlock>
|
||||||
<TextBlock TextAlignment="Center" Foreground="Red" FontSize="16"><Run Text="
Besucher die hier mit Fahrzeugen"/><LineBreak/><Run Text="eingetragen wurden, werden "/><LineBreak/><Run Language="de-de" Text="r"/><Run Text="egelmäßig gelöscht und dann"/><LineBreak/><Run Text=" vom Pförtner nicht hereingelassen"/></TextBlock>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -41,7 +41,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
this.Title = "Besucherliste von: " + Helper.InsertSpaceBeforeUpperCase(Environment.UserName);
|
this.Title = "Besucherliste von: " + Helper.InsertSpaceBeforeUpperCase(Environment.UserName);
|
||||||
|
|
||||||
visitors = SQL.ReadSQL($"SELECT * FROM zkup.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
visitors = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
||||||
VisitorView = Visitor.DataTableToVisitor(visitors);
|
VisitorView = Visitor.DataTableToVisitor(visitors);
|
||||||
dgVisitors.DataContext = visitors;
|
dgVisitors.DataContext = visitors;
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ namespace ZKuP
|
|||||||
index = e.Row.GetIndex();
|
index = e.Row.GetIndex();
|
||||||
dgVisitors.PreviewKeyDown += DgVisitors_PreviewKeyDown;
|
dgVisitors.PreviewKeyDown += DgVisitors_PreviewKeyDown;
|
||||||
|
|
||||||
visitors = SQL.ReadSQL($"Select * from zkup.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
visitors = SQL.ReadSQL($"Select * from {MainWindow.table}.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
||||||
VisitorView = Visitor.DataTableToVisitor(visitors);
|
VisitorView = Visitor.DataTableToVisitor(visitors);
|
||||||
|
|
||||||
|
|
||||||
@ -171,9 +171,9 @@ namespace ZKuP
|
|||||||
await SQL.WriteSQL("INSERT INTO besucherLog (idbesucher, Name,Verantwortlicher_MA,Tel_Nr_Besucher,Anzahl_Begleitpersonen,Besuchstag,Grund_des_Besuchs,Ansprechpartner_Intern,Tel_Nr_Ansprechpartner_Intern,Oertlichkeit,Geloescht_Von) VALUES " +
|
await SQL.WriteSQL("INSERT INTO besucherLog (idbesucher, Name,Verantwortlicher_MA,Tel_Nr_Besucher,Anzahl_Begleitpersonen,Besuchstag,Grund_des_Besuchs,Ansprechpartner_Intern,Tel_Nr_Ansprechpartner_Intern,Oertlichkeit,Geloescht_Von) VALUES " +
|
||||||
$"('{arr[0]}','{arr[1].ToString()}','{arr[2].ToString()}','{arr[3].ToString()}','{arr[4].ToString()}','{Convert.ToDateTime(arr[5].ToString()).ToString("yyyy-MM-dd")}','{arr[6].ToString()}','{arr[7].ToString()}','{arr[8].ToString()}','{arr[10].ToString()}','{Environment.UserName}')");
|
$"('{arr[0]}','{arr[1].ToString()}','{arr[2].ToString()}','{arr[3].ToString()}','{arr[4].ToString()}','{Convert.ToDateTime(arr[5].ToString()).ToString("yyyy-MM-dd")}','{arr[6].ToString()}','{arr[7].ToString()}','{arr[8].ToString()}','{arr[10].ToString()}','{Environment.UserName}')");
|
||||||
|
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.besucher WHERE `idbesucher` = '{arr[0]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.besucher WHERE `idbesucher` = '{arr[0]}'");
|
||||||
|
|
||||||
visitors = SQL.ReadSQL($"Select * from zkup.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
visitors = SQL.ReadSQL($"Select * from {MainWindow.table}.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
||||||
VisitorView = Visitor.DataTableToVisitor(visitors);
|
VisitorView = Visitor.DataTableToVisitor(visitors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ZKuP"
|
xmlns:local="clr-namespace:ZKuP"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Lieferant" Height="657" Width="434" MinHeight="540">
|
Title="Lieferant" Height="660" Width="500" MinHeight="620" Loaded="Window_Loaded" Visibility="Collapsed">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
@ -14,32 +14,79 @@
|
|||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
|
||||||
<RowDefinition Height="2*"/>
|
<RowDefinition Height="2*"/>
|
||||||
<RowDefinition Height="0.8*"/>
|
<RowDefinition Height="0.8*"/>
|
||||||
<RowDefinition Height="0.8*"/>
|
<RowDefinition Height="1.4*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Margin="10,10,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Lieferantenliste filtern:" VerticalAlignment="Top"/>
|
<TextBlock x:Name="lblFiltern" Margin="10,10,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Lieferantenliste filtern:" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbFilter" Margin="10,0,0,0" TextWrapping="Wrap" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="255" KeyDown="tbFilter_KeyDown"/>
|
<TextBox x:Name="tbFilter" Margin="10,0,0,0" TextWrapping="Wrap" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="255" KeyDown="tbFilter_KeyDown"/>
|
||||||
<Button x:Name="btnFiltern" Content="Filtern" FontSize="12" Padding="-2" Height="26" Margin="270,31,10,0" Click="btnFiltern_Click"/>
|
<Button x:Name="btnFiltern" Content="Filtern" FontSize="12" Padding="-2" Height="26" Margin="270,35,10,0" Click="btnFiltern_Click"/>
|
||||||
<TextBlock Margin="12,10,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" VerticalAlignment="Top" Grid.Row="1"><Run Text="Hinterlegte"/><Run Text=" Lieferanten"/><Run Text=":"/></TextBlock>
|
<TextBlock x:Name="lblHinterlegt" Margin="12,10,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" VerticalAlignment="Top" Grid.Row="1" Text="Hinterlegte Lieferanten:"/>
|
||||||
<ComboBox x:Name="cBLieferfirma" Margin="10,0" Height="21" VerticalAlignment="Bottom" SelectionChanged="cBLieferfirma_SelectionChanged" Grid.Row="1"/>
|
<ComboBox x:Name="cBLieferfirma" Margin="10,0" Height="21" VerticalAlignment="Bottom" SelectionChanged="cBLieferfirma_SelectionChanged" Grid.Row="1"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" TextWrapping="Wrap" Text="Firma:" VerticalAlignment="Top" Grid.Row="2"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" TextWrapping="Wrap" Text="Firma:" VerticalAlignment="Top" Grid.Row="2"/>
|
||||||
<TextBox x:Name="tbFirma" Margin="10,31,10,0" TextWrapping="Wrap" Padding="2" Grid.Row="2" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbFirma" Margin="10,31,10,0" TextWrapping="Wrap" Padding="2" Grid.Row="2" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextChanged="tbFirma_TextChanged"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="3" TextWrapping="Wrap" Text="Fahrername:" VerticalAlignment="Top"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="3" TextWrapping="Wrap" Text="Fahrername:" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbFahrer" Margin="10,31,10,0" Grid.Row="3" TextWrapping="Wrap" Padding="3" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbFahrer" Margin="10,31,10,0" Grid.Row="3" TextWrapping="Wrap" Padding="3" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="4" TextWrapping="Wrap" Text="Handynummer:" VerticalAlignment="Top"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="4" TextWrapping="Wrap" Text="Handynummer:" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbHandy" Margin="10,31,10,0" Grid.Row="4" TextWrapping="Wrap" Padding="2" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbHandy" Margin="10,31,10,0" Grid.Row="4" TextWrapping="Wrap" Padding="2" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="5" TextWrapping="Wrap" VerticalAlignment="Top"><Run Text="Kennzeichen:"/></TextBlock>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="5" TextWrapping="Wrap" VerticalAlignment="Top"><Run Text="Kennzeichen:"/></TextBlock>
|
||||||
<TextBox x:Name="tbKennzeichen" Margin="10,31,10,0" Grid.Row="5" TextWrapping="Wrap" Padding="2" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbKennzeichen" Margin="10,31,10,0" Grid.Row="5" TextWrapping="Wrap" Padding="2" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="6" TextWrapping="Wrap" Text="Parkplatz:" VerticalAlignment="Top"/>
|
<!--<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="6" TextWrapping="Wrap" Text="Parkplatz:" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbParkplatz" Margin="10,31,10,0" Grid.Row="6" TextWrapping="Wrap" Padding="2" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbParkplatz" Margin="10,31,10,0" Grid.Row="6" TextWrapping="Wrap" Padding="2" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>-->
|
||||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="7" TextWrapping="Wrap" Text="Bemerkung:" VerticalAlignment="Top"/>
|
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10,10,0,0" Grid.Row="6" TextWrapping="Wrap" Text="Bemerkung:" VerticalAlignment="Top"/>
|
||||||
<TextBox x:Name="tbBemerkung" Margin="10,35,10,10" Grid.Row="7" TextWrapping="Wrap" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
<TextBox x:Name="tbBemerkung" Margin="10,35,10,10" Grid.Row="6" TextWrapping="Wrap" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>
|
||||||
|
|
||||||
<Button x:Name="btnSignature" Content="Unterschrift" Margin="10,5" Grid.Row="8" Click="btnSignature_Click"/>
|
<Button x:Name="btnSignature" Content="Unterschrift" Margin="5,5" Grid.Row="7" Click="btnSignature_Click"/>
|
||||||
<Button x:Name="btnAdd" Content="Hinzufügen" HorizontalAlignment="Stretch" Margin="10,5" Grid.Row="9" Click="btnAdd_Click"/>
|
|
||||||
|
<Grid HorizontalAlignment="Stretch" Grid.Row="8" Margin="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button x:Name="btnAddLKWLang" Padding="1" HorizontalAlignment="Stretch" Margin="2,5" Grid.Column="0" Grid.Row="9" Click="btnAdd_Click" ToolTipService.ShowOnDisabled="True" ToolTipService.InitialShowDelay="0">
|
||||||
|
<Button.Content>
|
||||||
|
<StackPanel Orientation="Vertical">
|
||||||
|
<Image x:Name="imgLKWLang" Source="/Resources/LKWLang_button.png" ToolTip="Lieferanten mit LKW < 7,5t im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="1" Grid.Row="1" Stretch="Fill" Width="100" Height="45"/>
|
||||||
|
<TextBlock Text="LKW > 7,5t" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="btnAddLKW" Padding="1" HorizontalAlignment="Stretch" Margin="2,5" Grid.Column="1" Grid.Row="9" Click="btnAdd_Click" ToolTipService.ShowOnDisabled="True" ToolTipService.InitialShowDelay="0">
|
||||||
|
<Button.Content>
|
||||||
|
<StackPanel Orientation="Vertical">
|
||||||
|
<Image x:Name="imgLKW" Source="/Resources/LKW_button.png" ToolTip="Lieferanten mit LKW < 7,5t im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="1" Grid.Row="1" Stretch="Fill" Width="70" Height="45"/>
|
||||||
|
<TextBlock Text="LKW < 7,5t" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="btnAddSprinter" Padding="1" HorizontalAlignment="Stretch" Margin="2,5" Grid.Column="2" Grid.Row="9" Click="btnAdd_Click" ToolTipService.ShowOnDisabled="True" ToolTipService.InitialShowDelay="0">
|
||||||
|
<Button.Content>
|
||||||
|
<StackPanel Orientation="Vertical">
|
||||||
|
<Image x:Name="imgSprinter" Source="/Resources/Sprinter_button.png" ToolTip="Lieferanten mit LKW < 7,5t im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="1" Grid.Row="1" Stretch="Fill" Width="70" Height="45"/>
|
||||||
|
<TextBlock Text="Sprinter" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="btnAddPKW" Padding="1" HorizontalAlignment="Stretch" Margin="2,5" Grid.Column="3" Grid.Row="9" Click="btnAdd_Click" ToolTipService.ShowOnDisabled="True" ToolTipService.InitialShowDelay="0">
|
||||||
|
<Button.Content>
|
||||||
|
<StackPanel Orientation="Vertical">
|
||||||
|
<Image x:Name="imgPKW" Source="/Resources/PKW_button.png" ToolTip="Lieferanten mit LKW < 7,5t im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="1" Grid.Row="1" Stretch="Fill" Width="70" Height="45"/>
|
||||||
|
<TextBlock Text="PKW" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
<Popup x:Name="popupParkplatz" IsOpen="False" Width="700" Height="350" AllowsTransparency="True" Placement="Right" HorizontalOffset="20" VerticalOffset="200" PlacementTarget="{Binding DataContext, ElementName=popBE}" PopupAnimation="Slide">
|
||||||
|
<Grid Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
|
||||||
|
<TextBlock x:Name="tbParkplatzHinweis" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="10" FontSize="18"/>
|
||||||
|
<Image x:Name="imgParkplatz" Source="/Assets/Parkplatz/01.png" VerticalAlignment="Bottom"/>
|
||||||
|
</Grid>
|
||||||
|
</Popup>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
using System;
|
using FuzzySharp;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -19,10 +22,31 @@ namespace ZKuP
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class Delivery : Window
|
public partial class Delivery : Window
|
||||||
{
|
{
|
||||||
|
public static int GesamtFzg = 32;
|
||||||
|
public static int LKWLang = 11;
|
||||||
|
public static int LKW = 10;
|
||||||
|
public static int Sprinter = 5;
|
||||||
|
public static int PKW = 2;
|
||||||
|
|
||||||
|
|
||||||
|
Dictionary<string, int> EmergencyParkList = new Dictionary<string, int>()
|
||||||
|
{
|
||||||
|
{ "Netz", 6 },
|
||||||
|
{"DB Netz",6 },
|
||||||
|
{"DB InfraGo",6},
|
||||||
|
{"InfraGo",6 },
|
||||||
|
{"Energie",7 },
|
||||||
|
{"DB Energie",7 }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
string query = "";
|
string query = "";
|
||||||
|
|
||||||
byte[] _signature = null;
|
byte[] _signature = null;
|
||||||
bool _emergency = false;
|
bool _emergency = false;
|
||||||
|
bool noMoreDeliveries = false;
|
||||||
|
|
||||||
|
const string zuViele = "Es sind bereits zu viele Fahrzeuge im Werk";
|
||||||
|
|
||||||
public Delivery(bool Emergency = false)
|
public Delivery(bool Emergency = false)
|
||||||
{
|
{
|
||||||
@ -33,38 +57,147 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (_emergency)
|
if (_emergency)
|
||||||
{
|
{
|
||||||
//var list = SQL.ReadListStringTwoColumns($"SELECT Firma, Fahrer FROM zkup.lieferanten WHERE Firma LIKE 'DB%'", " Fahrer: ").Result;
|
this.Title = "DB Intern Entstördienst";
|
||||||
|
lblFiltern.Text = "DB Interne filtern:";
|
||||||
|
lblHinterlegt.Text = "Hinterlegte DB Firmen:";
|
||||||
|
//var list = SQL.ReadListStringTwoColumns($"SELECT Firma, Fahrer FROM {MainWindow.table}.lieferanten WHERE Firma LIKE 'DB%'", " Fahrer: ").Result;
|
||||||
//list = list.OrderBy(p => p).ToList();
|
//list = list.OrderBy(p => p).ToList();
|
||||||
//cBLieferfirma.ItemsSource = list;
|
//cBLieferfirma.ItemsSource = list;
|
||||||
|
|
||||||
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM zkup.lieferanten WHERE Firma LIKE 'DB%'", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
//var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM {MainWindow.table}.lieferanten WHERE Firma LIKE 'DB%'", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
||||||
|
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM {MainWindow.table}.lieferanten WHERE (Firma = 'DB Energie' OR (Firma = 'DB Energie' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma = 'DB Energie' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma = 'DB Energie' AND ID LIKE '%{tbFilter.Text}%')) OR" +
|
||||||
|
$"(Firma = 'DB InfraGo' OR (Firma = 'DB InfraGo' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma = 'DB InfraGo' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma = 'DB InfraGo' AND ID LIKE '%{tbFilter.Text}%')) OR" +
|
||||||
|
$"(Firma = 'DB Notfallmanager' OR (Firma = 'DB Notfallmanager' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma = 'DB Notfallmanager' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma = 'DB Notfallmanager' AND ID LIKE '%{tbFilter.Text}%')) OR" +
|
||||||
|
$"(Firma = 'DB KT' OR (Firma = 'DB KT' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma = 'DB KT' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma = 'DB KT' AND ID LIKE '%{tbFilter.Text}%'))", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
||||||
|
|
||||||
list = list.OrderBy(p => p).ToList();
|
list = list.OrderBy(p => p).ToList();
|
||||||
cBLieferfirma.ItemsSource = list;
|
cBLieferfirma.ItemsSource = list;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM zkup.lieferanten WHERE Firma NOT LIKE 'DB%'", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM {MainWindow.table}.lieferanten WHERE Firma NOT LIKE 'DB%'", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
||||||
list = list.OrderBy(p => p).ToList();
|
list = list.OrderBy(p => p).ToList();
|
||||||
cBLieferfirma.ItemsSource = list;
|
cBLieferfirma.ItemsSource = list;
|
||||||
|
|
||||||
|
|
||||||
|
var imWerk = SQL.ReadListStringMultipleColumns($"SELECT * FROM {MainWindow.table}.fahrzeuge", 4).Result.First().Split(';');
|
||||||
|
var all = (Convert.ToInt16(imWerk[0]) * LKW) + (Convert.ToInt16(imWerk[1]) * Sprinter) + (Convert.ToInt16(imWerk[2]) * PKW) + (Convert.ToInt16(imWerk[3]) * LKWLang);
|
||||||
|
|
||||||
|
switch(GesamtFzg - all)
|
||||||
|
{
|
||||||
|
case int n when n < PKW:
|
||||||
|
MessageBox.Show("Es können keine Lieferanten mehr eingelassen werden, da sich bereits zu viele Fahrzeuge im Werk befinden", "Kein Einlass!", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||||
|
noMoreDeliveries = true;
|
||||||
|
|
||||||
|
btnAddLKWLang.IsEnabled = false;
|
||||||
|
btnAddLKWLang.ToolTip = zuViele;
|
||||||
|
|
||||||
|
btnAddLKW.IsEnabled = false;
|
||||||
|
btnAddLKW.ToolTip = zuViele;
|
||||||
|
|
||||||
|
btnAddSprinter.IsEnabled = false;
|
||||||
|
btnAddSprinter.ToolTip = zuViele;
|
||||||
|
|
||||||
|
btnAddPKW.IsEnabled = false;
|
||||||
|
btnAddPKW.ToolTip = zuViele;
|
||||||
|
break;
|
||||||
|
case int n when n >= PKW && n < Sprinter:
|
||||||
|
btnAddLKWLang.IsEnabled = false;
|
||||||
|
btnAddLKWLang.ToolTip = zuViele;
|
||||||
|
|
||||||
|
btnAddLKW.IsEnabled = false;
|
||||||
|
btnAddLKW.ToolTip = zuViele;
|
||||||
|
|
||||||
|
btnAddSprinter.IsEnabled = false;
|
||||||
|
btnAddSprinter.ToolTip = zuViele;
|
||||||
|
|
||||||
|
btnAddPKW.IsEnabled = true;
|
||||||
|
btnAddPKW.ToolTip = null;
|
||||||
|
break;
|
||||||
|
case int n when n >= Sprinter && n < LKW:
|
||||||
|
btnAddLKWLang.IsEnabled = false;
|
||||||
|
btnAddLKWLang.ToolTip = zuViele;
|
||||||
|
|
||||||
|
btnAddLKW.IsEnabled = false;
|
||||||
|
btnAddLKW.ToolTip = zuViele;
|
||||||
|
|
||||||
|
btnAddSprinter.IsEnabled = true;
|
||||||
|
btnAddSprinter.ToolTip = null;
|
||||||
|
|
||||||
|
btnAddPKW.IsEnabled = true;
|
||||||
|
btnAddPKW.ToolTip = null;
|
||||||
|
break;
|
||||||
|
case int n when n >= LKW && n < LKWLang:
|
||||||
|
btnAddLKWLang.IsEnabled = false;
|
||||||
|
btnAddLKWLang.ToolTip = zuViele;
|
||||||
|
|
||||||
|
btnAddLKW.IsEnabled = true;
|
||||||
|
btnAddLKW.ToolTip = null;
|
||||||
|
|
||||||
|
btnAddSprinter.IsEnabled = true;
|
||||||
|
btnAddSprinter.ToolTip = null;
|
||||||
|
|
||||||
|
btnAddPKW.IsEnabled = true;
|
||||||
|
btnAddPKW.ToolTip = null;
|
||||||
|
break;
|
||||||
|
case int n when n >= LKWLang:
|
||||||
|
btnAddLKWLang.IsEnabled = true;
|
||||||
|
btnAddLKWLang.ToolTip = null;
|
||||||
|
|
||||||
|
btnAddLKW.IsEnabled = true;
|
||||||
|
btnAddLKW.ToolTip = null;
|
||||||
|
|
||||||
|
btnAddSprinter.IsEnabled = true;
|
||||||
|
btnAddSprinter.ToolTip = null;
|
||||||
|
|
||||||
|
btnAddPKW.IsEnabled = true;
|
||||||
|
btnAddPKW.ToolTip = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (noMoreDeliveries)
|
||||||
|
this.Close();
|
||||||
|
else
|
||||||
|
this.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void btnFiltern_Click(object sender, RoutedEventArgs e)
|
private void btnFiltern_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
//var list = SQL.ReadListStringTwoColumns($"SELECT Firma, Fahrer FROM zkup.lieferanten WHERE Firma LIKE '%{tbFilter.Text}%' OR Fahrer LIKE '%{tbFilter.Text}%'", " Fahrer: ").Result;
|
//var list = SQL.ReadListStringTwoColumns($"SELECT Firma, Fahrer FROM {MainWindow.table}.lieferanten WHERE Firma LIKE '%{tbFilter.Text}%' OR Fahrer LIKE '%{tbFilter.Text}%'", " Fahrer: ").Result;
|
||||||
//list = list.OrderBy(p => p).ToList();
|
//list = list.OrderBy(p => p).ToList();
|
||||||
//cBLieferfirma.ItemsSource = list;
|
//cBLieferfirma.ItemsSource = list;
|
||||||
|
|
||||||
|
Filter();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbFilter_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if(e.Key == Key.Enter)
|
||||||
|
{
|
||||||
|
Filter();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Filter()
|
||||||
|
{
|
||||||
if (_emergency)
|
if (_emergency)
|
||||||
{
|
{
|
||||||
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM zkup.lieferanten WHERE Firma LIKE 'DB %{tbFilter.Text}%' OR (Firma LIKE 'DB%' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma LIKE 'DB%' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma LIKE 'DB%' AND ID LIKE '%{tbFilter.Text}%')", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM {MainWindow.table}.lieferanten WHERE (Firma = 'DB Energie' OR (Firma = 'DB Energie' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma = 'DB Energie' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma = 'DB Energie' AND ID LIKE '%{tbFilter.Text}%')) OR" +
|
||||||
|
$"(Firma = 'DB InfraGo' OR (Firma = 'DB InfraGo' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma = 'DB InfraGo' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma = 'DB InfraGo' AND ID LIKE '%{tbFilter.Text}%')) OR" +
|
||||||
|
$"(Firma = 'DB Notfallmanager' OR (Firma = 'DB Notfallmanager' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma = 'DB Notfallmanager' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma = 'DB Notfallmanager' AND ID LIKE '%{tbFilter.Text}%')) OR" +
|
||||||
|
$"(Firma = 'DB KT' OR (Firma = 'DB KT' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma = 'DB KT' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma = 'DB KT' AND ID LIKE '%{tbFilter.Text}%'))", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
||||||
|
|
||||||
list = list.OrderBy(p => p).ToList();
|
list = list.OrderBy(p => p).ToList();
|
||||||
cBLieferfirma.ItemsSource = list;
|
cBLieferfirma.ItemsSource = list;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM zkup.lieferanten WHERE Firma NOT LIKE 'DB%' AND (Fahrer LIKE '%{tbFilter.Text}%' OR Firma LIKE '%{tbFilter.Text}%' OR Kennzeichen LIKE '%{tbFilter.Text}%' OR ID LIKE '%{tbFilter.Text}%')", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM {MainWindow.table}.lieferanten WHERE Firma NOT LIKE 'DB%' AND (Fahrer LIKE '%{tbFilter.Text}%' OR Firma LIKE '%{tbFilter.Text}%' OR Kennzeichen LIKE '%{tbFilter.Text}%' OR ID LIKE '%{tbFilter.Text}%')", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
||||||
list = list.OrderBy(p => p).ToList();
|
list = list.OrderBy(p => p).ToList();
|
||||||
cBLieferfirma.ItemsSource = list;
|
cBLieferfirma.ItemsSource = list;
|
||||||
}
|
}
|
||||||
@ -73,29 +206,6 @@ namespace ZKuP
|
|||||||
cBLieferfirma.Focus();
|
cBLieferfirma.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tbFilter_KeyDown(object sender, KeyEventArgs e)
|
|
||||||
{
|
|
||||||
if(e.Key == Key.Enter)
|
|
||||||
{
|
|
||||||
if (_emergency)
|
|
||||||
{
|
|
||||||
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM zkup.lieferanten WHERE Firma LIKE 'DB %{tbFilter.Text}%' OR (Firma LIKE 'DB%' AND Fahrer LIKE '%{tbFilter.Text}%') OR (Firma LIKE 'DB%' AND Kennzeichen LIKE '%{tbFilter.Text}%') OR (Firma LIKE 'DB%' AND ID LIKE '%{tbFilter.Text}%')", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
|
||||||
list = list.OrderBy(p => p).ToList();
|
|
||||||
cBLieferfirma.ItemsSource = list;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var list = SQL.ReadListStringMultipleColumns($"SELECT Firma, Fahrer, Kennzeichen, ID FROM zkup.lieferanten WHERE Firma NOT LIKE 'DB%' AND (Fahrer LIKE '%{tbFilter.Text}%' OR Firma LIKE '%{tbFilter.Text}%' OR Kennzeichen LIKE '%{tbFilter.Text}%' OR ID LIKE '%{tbFilter.Text}%')", 4, " Fahrer: ", " Kennz.: ", " ID: ").Result;
|
|
||||||
list = list.OrderBy(p => p).ToList();
|
|
||||||
cBLieferfirma.ItemsSource = list;
|
|
||||||
}
|
|
||||||
|
|
||||||
cBLieferfirma.IsDropDownOpen = true;
|
|
||||||
cBLieferfirma.Focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private async void btnSignature_Click(object sender, RoutedEventArgs e)
|
private async void btnSignature_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -122,31 +232,84 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private async void btnAdd_Click(object sender, RoutedEventArgs e)
|
private async void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
int Kategorie = 3;
|
int Kategorie = 3;
|
||||||
|
bool trotzdemAnlegen = true;
|
||||||
|
|
||||||
if (_emergency)
|
if (_emergency)
|
||||||
Kategorie = 4;
|
Kategorie = 4;
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (tbParkplatz.Text != "")
|
|
||||||
query = ($"INSERT INTO zutritte (Kategorie,Name,Zutritt,Pruefung_Zutritt,Pruefung_Einweisung,AnzahlPers,AnzahlFzg,Ansprechpartner,Kl_Unterweisung,Fzg_gemeldet,Kennzeichen,Bemerkung, signature_blob) VALUES ('{Kategorie}','Firma: {tbFirma.Text}, Fahrer: {tbFahrer.Text}','{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}','--','--','1','1','{tbHandy.Text}','1','1','{tbKennzeichen.Text}','Parkplatz: {tbParkplatz.Text}\n\nBemerkung:\n{tbBemerkung.Text}', @signature)");
|
|
||||||
else
|
|
||||||
query = ($"INSERT INTO zutritte (Kategorie,Name,Zutritt,Pruefung_Zutritt,Pruefung_Einweisung,AnzahlPers,AnzahlFzg,Ansprechpartner,Kl_Unterweisung,Fzg_gemeldet,Kennzeichen,Bemerkung, signature_blob) VALUES ('{Kategorie}','Firma: {tbFirma.Text}, Fahrer: {tbFahrer.Text}','{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}','--','--','1','1','{tbHandy.Text}','1','1','{tbKennzeichen.Text}','{tbBemerkung.Text}', @signature)");
|
|
||||||
|
|
||||||
await SQL.WriteSQL(query, _signature);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Log.WriteLog(ex.ToString());
|
|
||||||
MessageBox.Show(this, "Fehler beim Eintragen des Lieferanten", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.Close();
|
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(tbFirma.Text) && !string.IsNullOrWhiteSpace(tbFahrer.Text) && !string.IsNullOrWhiteSpace(tbHandy.Text) && !string.IsNullOrWhiteSpace(tbKennzeichen.Text))
|
||||||
|
{
|
||||||
|
if (SQL.RowExists($"{MainWindow.table}.firmen", "Name", tbFirma.Text, true).Result == true)
|
||||||
|
{
|
||||||
|
if (MessageBoxResult.No == MessageBox.Show($"{tbFirma.Text} existiert schon als Firma!\nFirmen dürfen nicht als Lieferant eingetragen werden!\n\nFirma in der \"Ankuft heute\" Liste bestätigen und falls diese nicht angezeigt wird, Firma abweisen!\n\nLieferant trotzdem anlegen?", "Firma nicht als Lieferant!", MessageBoxButton.YesNo, MessageBoxImage.Error))
|
||||||
|
{
|
||||||
|
trotzdemAnlegen = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (trotzdemAnlegen)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
string fzgQuery = "";
|
||||||
|
|
||||||
|
switch ((sender as Button).Name.ToString().Replace("btnAdd", ""))
|
||||||
|
{
|
||||||
|
case "LKW":
|
||||||
|
i = Convert.ToInt16(SQL.ReadSingleValue($"SELECT lkw FROM {MainWindow.table}.fahrzeuge"));
|
||||||
|
fzgQuery = ($"UPDATE {MainWindow.table}.fahrzeuge SET `lkw`='{i + 1}'");
|
||||||
|
break;
|
||||||
|
case "Sprinter":
|
||||||
|
i = Convert.ToInt16(SQL.ReadSingleValue($"SELECT sprinter FROM {MainWindow.table}.fahrzeuge"));
|
||||||
|
fzgQuery = ($"UPDATE {MainWindow.table}.fahrzeuge SET `sprinter`='{i + 1}'");
|
||||||
|
break;
|
||||||
|
case "PKW":
|
||||||
|
i = Convert.ToInt16(SQL.ReadSingleValue($"SELECT pkw FROM {MainWindow.table}.fahrzeuge"));
|
||||||
|
fzgQuery = ($"UPDATE {MainWindow.table}.fahrzeuge SET `pkw`='{i + 1}'");
|
||||||
|
break;
|
||||||
|
case "LKWLang":
|
||||||
|
i = Convert.ToInt16(SQL.ReadSingleValue("SELECT lkwlang FROM zkup.fahrzeuge"));
|
||||||
|
fzgQuery = ($"UPDATE {MainWindow.table}.fahrzeuge SET `lkwlang`='{i + 1}'");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(fzgQuery))
|
||||||
|
await SQL.WriteSQL(fzgQuery);
|
||||||
|
|
||||||
|
|
||||||
|
//if (tbParkplatz.Text != "")
|
||||||
|
// query = ($"INSERT INTO zutritte (Kategorie,Name,Zutritt,Pruefung_Zutritt,Pruefung_Einweisung,AnzahlPers,AnzahlFzg,Ansprechpartner,Kl_Unterweisung,Fzg_gemeldet,Kennzeichen,Bemerkung, signature_blob) VALUES ('{Kategorie}','Firma: {tbFirma.Text}, Fahrer: {tbFahrer.Text}','{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}','--','--','1','1','{tbHandy.Text}','1','1','{tbKennzeichen.Text}','Parkplatz: {tbParkplatz.Text}\n\nBemerkung:\n{tbBemerkung.Text}', @signature)");
|
||||||
|
//else
|
||||||
|
query = ($"INSERT INTO zutritte (Kategorie,Name,Zutritt,Pruefung_Zutritt,Pruefung_Einweisung,AnzahlPers,AnzahlFzg,Ansprechpartner,Kl_Unterweisung,Fzg_gemeldet,Kennzeichen,Bemerkung, signature_blob) VALUES ('{Kategorie}','Firma: {tbFirma.Text}, Fahrer: {tbFahrer.Text}','{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}','--','--','1','1','{tbHandy.Text}','1','1','{tbKennzeichen.Text}','{tbBemerkung.Text}', @signature)");
|
||||||
|
|
||||||
|
await SQL.WriteSQL(query, _signature);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteLog(ex.ToString());
|
||||||
|
MessageBox.Show(this, "Fehler beim Eintragen des Lieferanten", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Felder Firma, Fahrer, Handynummer und Kennzeichen müssen ausgefüllt sein", "Fehlende Felder", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void cBLieferfirma_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private async void cBLieferfirma_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
@ -159,20 +322,54 @@ namespace ZKuP
|
|||||||
//string fahrer = (sender as ComboBox).SelectedItem.ToString().Split(new string[] { " Fahrer: " }, StringSplitOptions.None)[1].Split(new string[] { " Kennz.: " }, StringSplitOptions.None)[0].TrimEnd(' ');
|
//string fahrer = (sender as ComboBox).SelectedItem.ToString().Split(new string[] { " Fahrer: " }, StringSplitOptions.None)[1].Split(new string[] { " Kennz.: " }, StringSplitOptions.None)[0].TrimEnd(' ');
|
||||||
|
|
||||||
//if (fahrer != "")
|
//if (fahrer != "")
|
||||||
// result = await SQL.ReadSQL($"SELECT * FROM zkup.lieferanten WHERE Firma = '{firma}' AND Fahrer = '{fahrer}' LIMIT 1");
|
// result = await SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.lieferanten WHERE Firma = '{firma}' AND Fahrer = '{fahrer}' LIMIT 1");
|
||||||
//else
|
//else
|
||||||
// result = await SQL.ReadSQL($"SELECT * FROM zkup.lieferanten WHERE Firma = '{firma}' LIMIT 1");
|
// result = await SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.lieferanten WHERE Firma = '{firma}' LIMIT 1");
|
||||||
|
|
||||||
result = await SQL.ReadSQL($"SELECT * FROM zkup.lieferanten WHERE ID = '{id}' LIMIT 1");
|
result = await SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.lieferanten WHERE ID = '{id}' LIMIT 1");
|
||||||
|
|
||||||
|
|
||||||
tbFirma.Text = result.Rows[0].ItemArray[0] != null ? result.Rows[0].ItemArray[0].ToString() : "";
|
tbFirma.Text = result.Rows[0].ItemArray[0] != null ? result.Rows[0].ItemArray[0].ToString() : "";
|
||||||
tbFahrer.Text = result.Rows[0].ItemArray[1] != null ? result.Rows[0].ItemArray[1].ToString() : "";
|
tbFahrer.Text = result.Rows[0].ItemArray[1] != null ? result.Rows[0].ItemArray[1].ToString() : "";
|
||||||
tbHandy.Text = result.Rows[0].ItemArray[2] != null ? result.Rows[0].ItemArray[2].ToString() : "";
|
tbHandy.Text = result.Rows[0].ItemArray[2] != null ? result.Rows[0].ItemArray[2].ToString() : "";
|
||||||
tbKennzeichen.Text = result.Rows[0].ItemArray[3] != null ? result.Rows[0].ItemArray[3].ToString() : "";
|
tbKennzeichen.Text = result.Rows[0].ItemArray[3] != null ? result.Rows[0].ItemArray[3].ToString() : "";
|
||||||
|
|
||||||
|
CheckParkplatz();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CheckParkplatz()
|
||||||
|
{
|
||||||
|
List<string> similarities = new List<string>();
|
||||||
|
|
||||||
|
foreach (var s in EmergencyParkList)
|
||||||
|
{
|
||||||
|
var ratio = Fuzz.Ratio(tbFirma.Text.ToLower(), s.Key.ToLower());
|
||||||
|
if (ratio > 80)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(ratio);
|
||||||
|
ShowParkplatz(s.Key, s.Value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else popupParkplatz.IsOpen = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowParkplatz(string s, int parkplatz)
|
||||||
|
{
|
||||||
|
string isEnergie = "";
|
||||||
|
if (parkplatz == 7) isEnergie = " oder 34";
|
||||||
|
|
||||||
|
string _parkplatz = parkplatz.ToString().PadLeft(2,'0');
|
||||||
|
tbParkplatzHinweis.Text = $"{s} nur den Parkplatz Nr. {_parkplatz}{isEnergie} vergeben";
|
||||||
|
|
||||||
|
imgParkplatz.Source = new BitmapImage(new Uri(@"pack://application:,,,/"
|
||||||
|
+ System.Reflection.Assembly.GetExecutingAssembly().GetName().Name
|
||||||
|
+ ";component/"
|
||||||
|
+ $"Assets/Parkplatz/{_parkplatz}.png", UriKind.Absolute));
|
||||||
|
popupParkplatz.IsOpen = true;
|
||||||
|
}
|
||||||
|
|
||||||
private void TextBoxes_PreviewKeyDown(object sender, KeyEventArgs e)
|
private void TextBoxes_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Key != Key.OemComma)
|
if (e.Key != Key.OemComma)
|
||||||
@ -186,5 +383,10 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tbFirma_TextChanged(object sender, TextChangedEventArgs e)
|
||||||
|
{
|
||||||
|
CheckParkplatz();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Text="Gewünschten Tag wählen:" Grid.RowSpan="2" Margin="10" HorizontalAlignment="Center" VerticalAlignment="Top" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
<TextBlock Text="Gewünschten Tag wählen:" Grid.RowSpan="2" Margin="10" HorizontalAlignment="Center" VerticalAlignment="Top" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
<DatePicker x:Name="dPdate" Grid.RowSpan="2" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="30" SelectedDateChanged="dPdate_SelectedDateChanged"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dPdate" Grid.RowSpan="2" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="30" SelectedDateChanged="dPdate_SelectedDateChanged"/>
|
||||||
<!--<TextBlock Text="Samstag" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10" Height="30"/>
|
<!--<TextBlock Text="Samstag" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10" Height="30"/>
|
||||||
<TextBlock x:Name="lblDateSat" Text="Date Saturday" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="30" Height="30"/>
|
<TextBlock x:Name="lblDateSat" Text="Date Saturday" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="30" Height="30"/>
|
||||||
-->
|
-->
|
||||||
|
|||||||
@ -52,7 +52,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
private async void QueryTables()
|
private async void QueryTables()
|
||||||
{
|
{
|
||||||
dtOwn = await SQL.ReadSQL($"SELECT `Date`, `Slot` FROM zkup.family WHERE `User` = '{Environment.UserName}'");
|
dtOwn = await SQL.ReadSQL($"SELECT `Date`, `Slot` FROM {MainWindow.table}.family WHERE `User` = '{Environment.UserName}'");
|
||||||
//dtAll = await SQL.ReadSQL($"SELECT `Date`, count(`Date`) AS Count FROM zkup.family GROUP BY `Date`");
|
//dtAll = await SQL.ReadSQL($"SELECT `Date`, count(`Date`) AS Count FROM zkup.family GROUP BY `Date`");
|
||||||
|
|
||||||
dgOwn.ItemsSource = dtOwn.DefaultView;
|
dgOwn.ItemsSource = dtOwn.DefaultView;
|
||||||
@ -125,7 +125,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void DateChanged(object sender)
|
private void DateChanged(object sender)
|
||||||
{
|
{
|
||||||
var count = SQL.ReadSingleValue($"SELECT COUNT(`Date`) FROM zkup.family WHERE `Date` = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}'");
|
var count = SQL.ReadSingleValue($"SELECT COUNT(`Date`) FROM {MainWindow.table}.family WHERE `Date` = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}'");
|
||||||
|
|
||||||
btnSatSlot1.IsEnabled = true;
|
btnSatSlot1.IsEnabled = true;
|
||||||
btnSatSlot2.IsEnabled = true;
|
btnSatSlot2.IsEnabled = true;
|
||||||
@ -137,7 +137,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (int.Parse(count) > 0)
|
if (int.Parse(count) > 0)
|
||||||
{
|
{
|
||||||
var usedSlots = SQL.ReadListString($"SELECT `Slot` FROM zkup.family WHERE `Date` = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}'").Result;
|
var usedSlots = SQL.ReadListString($"SELECT `Slot` FROM {MainWindow.table}.family WHERE `Date` = '{(sender as DatePicker).SelectedDate.Value.ToString("yyyy-MM-dd")}'").Result;
|
||||||
|
|
||||||
if(usedSlots.Contains("1"))
|
if(usedSlots.Contains("1"))
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ namespace ZKuP
|
|||||||
var res = MessageBox.Show($"Möchten Sie Ihre Buchung am {DateTime.Parse(y.Row.ItemArray[0].ToString()).ToString("dd.MM.yyyy")} stornieren?", "Wirklich löschen?", MessageBoxButton.YesNoCancel, MessageBoxImage.Exclamation);
|
var res = MessageBox.Show($"Möchten Sie Ihre Buchung am {DateTime.Parse(y.Row.ItemArray[0].ToString()).ToString("dd.MM.yyyy")} stornieren?", "Wirklich löschen?", MessageBoxButton.YesNoCancel, MessageBoxImage.Exclamation);
|
||||||
if(res == MessageBoxResult.Yes)
|
if(res == MessageBoxResult.Yes)
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.family WHERE `User` = '{Environment.UserName}' AND `Date` = '{DateTime.Parse(y.Row.ItemArray[0].ToString()).ToString("yyyy-MM-dd")}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.family WHERE `User` = '{Environment.UserName}' AND `Date` = '{DateTime.Parse(y.Row.ItemArray[0].ToString()).ToString("yyyy-MM-dd")}'");
|
||||||
|
|
||||||
QueryTables();
|
QueryTables();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,13 +55,13 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
if (CheckButtons())
|
if (CheckButtons())
|
||||||
{
|
{
|
||||||
var count = SQL.ReadSingleValue($"SELECT COUNT(`Date`) FROM zkup.family WHERE `Date` = '{date.ToString("yyyy-MM-dd")}'");
|
var count = SQL.ReadSingleValue($"SELECT COUNT(`Date`) FROM {MainWindow.table}.family WHERE `Date` = '{date.ToString("yyyy-MM-dd")}'");
|
||||||
|
|
||||||
if (int.Parse(count) < 3)
|
if (int.Parse(count) < 3)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"INSERT INTO zkup.family (Name, TelNr, Persnr, AnzBegleiter, Date, Slot, User, Email) VALUES ('{tbName.Text}','{tbTel.Text}','{tbPersnr.Text}','{tbAnzBegleiter.Text}','{date.ToString("yyyy-MM-dd")}','{slot}','{Environment.UserName}','{tbEmail.Text}')");
|
await SQL.WriteSQL($"INSERT INTO {MainWindow.table}.family (Name, TelNr, Persnr, AnzBegleiter, Date, Slot, User, Email) VALUES ('{tbName.Text}','{tbTel.Text}','{tbPersnr.Text}','{tbAnzBegleiter.Text}','{date.ToString("yyyy-MM-dd")}','{slot}','{Environment.UserName}','{tbEmail.Text}')");
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,7 +32,8 @@
|
|||||||
<DataGridTextColumn Binding="{Binding Email}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="E-Mail" IsReadOnly="True" Width="220"/>
|
<DataGridTextColumn Binding="{Binding Email}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="E-Mail" IsReadOnly="True" Width="220"/>
|
||||||
<DataGridTextColumn Binding="{Binding Telefon}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Telefon" IsReadOnly="True" Width="*"/>
|
<DataGridTextColumn Binding="{Binding Telefon}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Telefon" IsReadOnly="True" Width="*"/>
|
||||||
<DataGridTextColumn Binding="{Binding Vorgesetzter}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Vorgesetzter" IsReadOnly="True" Width="110"/>
|
<DataGridTextColumn Binding="{Binding Vorgesetzter}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Vorgesetzter" IsReadOnly="True" Width="110"/>
|
||||||
<DataGridCheckBoxColumn Binding="{Binding Schicht}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Schicht" IsReadOnly="True" Width="72"/>
|
<DataGridCheckBoxColumn Binding="{Binding Schicht}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Schicht" IsReadOnly="True" MaxWidth="0"/>
|
||||||
|
<DataGridCheckBoxColumn Binding="{Binding isKrad}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Kraftrad?" IsReadOnly="True" Width="92"/>
|
||||||
<DataGridTemplateColumn CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Genehmigen" Width="90">
|
<DataGridTemplateColumn CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Genehmigen" Width="90">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@ -40,7 +41,7 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<DataGridTemplateColumn CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Ablehnen" Width="80">
|
<DataGridTemplateColumn CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Ablehnen" Width="90">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Button x:Name="btnDecline" Content="Ablehnen" FontSize="12" Padding="-2" Height="25" Click="btnDecline_Click"/>
|
<Button x:Name="btnDecline" Content="Ablehnen" FontSize="12" Padding="-2" Height="25" Click="btnDecline_Click"/>
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
var list = SQL.ReadSQL($"SELECT * FROM zkup.parkausweise WHERE Genehmigt = '0'").Result;
|
var list = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.parkausweise WHERE Genehmigt = '0'").Result;
|
||||||
dgGrant.DataContext = list;
|
dgGrant.DataContext = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,9 +35,9 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
await SQL.WriteSQL($"UPDATE parkausweise SET Genehmigt = '1', Genehmiger = '{Environment.UserName}' WHERE idparkausweise = '{(int)arr[0]}'");
|
await SQL.WriteSQL($"UPDATE parkausweise SET Genehmigt = '1', Genehmiger = '{Environment.UserName}' WHERE idparkausweise = '{(int)arr[0]}'");
|
||||||
|
|
||||||
SendMail((int)arr[0], $"{arr[1].ToString()} {arr[2].ToString()}", arr[3].ToString(), arr[4].ToString(), arr[7].ToString(), true);
|
SendMail((int)arr[0], $"{arr[1].ToString()} {arr[2].ToString()}", arr[3].ToString(), arr[4].ToString(), arr[7].ToString(), true, Convert.ToInt16(arr[19]));
|
||||||
|
|
||||||
var list = SQL.ReadSQL($"SELECT * FROM zkup.parkausweise WHERE Genehmigt = '0'").Result;
|
var list = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.parkausweise WHERE Genehmigt = '0'").Result;
|
||||||
dgGrant.DataContext = list;
|
dgGrant.DataContext = list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,27 +48,28 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (MessageBox.Show(this, $"Möchten Sie den Parkausweis für {arr[1].ToString()} {arr[2].ToString()} sicher ablehnen?\n\nDer Antrag wird dadurch gelöscht!", "Sicher?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes) == MessageBoxResult.Yes)
|
if (MessageBox.Show(this, $"Möchten Sie den Parkausweis für {arr[1].ToString()} {arr[2].ToString()} sicher ablehnen?\n\nDer Antrag wird dadurch gelöscht!", "Sicher?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes) == MessageBoxResult.Yes)
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.parkausweise WHERE idparkausweise = '{(int)arr[0]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.parkausweise WHERE idparkausweise = '{(int)arr[0]}'");
|
||||||
|
|
||||||
SendMail((int)arr[0], $"{arr[1].ToString()} {arr[2].ToString()}", "", arr[4].ToString(), "", false);
|
SendMail((int)arr[0], $"{arr[1].ToString()} {arr[2].ToString()}", "", arr[4].ToString(), "", false);
|
||||||
|
|
||||||
var list = SQL.ReadSQL($"SELECT * FROM zkup.parkausweise WHERE Genehmigt = '0'").Result;
|
var list = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.parkausweise WHERE Genehmigt = '0'").Result;
|
||||||
dgGrant.DataContext = list;
|
dgGrant.DataContext = list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void SendMail(int id, string Name, string Kennzeichen, string Email, string Firma, bool Genehmigt)
|
public void SendMail(int id, string Name, string Kennzeichen, string Email, string Firma, bool Genehmigt, int isKrad = 0)
|
||||||
{
|
{
|
||||||
var user = System.Text.RegularExpressions.Regex.Split(Environment.UserName, @"(?<!^)(?=[A-Z])");
|
var user = System.Text.RegularExpressions.Regex.Split(Environment.UserName, @"(?<!^)(?=[A-Z])");
|
||||||
|
var krad = isKrad == 1 ? "Kraftrad-" : "";
|
||||||
|
|
||||||
switch (Genehmigt)
|
switch (Genehmigt)
|
||||||
{
|
{
|
||||||
case true:
|
case true:
|
||||||
System.Diagnostics.Process.Start($"mailto:{Email}?subject=Neue Parkkarte&body=" +
|
System.Diagnostics.Process.Start($"mailto:{Email}?subject=Neue Parkkarte&body=" +
|
||||||
"Guten Tag,%0D%0A%0D%0A" +
|
"Guten Tag,%0D%0A%0D%0A" +
|
||||||
"eine neue Parkkarte wurde genehmigt%0D%0A%0D%0A" +
|
$"eine neue {krad}Parkkarte wurde genehmigt%0D%0A%0D%0A" +
|
||||||
$"Parkausweis Nr.: {id}%0D%0A" +
|
$"Parkausweis Nr.: {id}%0D%0A" +
|
||||||
$"Name: {Name}%0D%0A" +
|
$"Name: {Name}%0D%0A" +
|
||||||
$"Kennzeichen: {Kennzeichen}%0D%0A" +
|
$"Kennzeichen: {Kennzeichen}%0D%0A" +
|
||||||
@ -106,6 +107,7 @@ namespace ZKuP
|
|||||||
string PLZ;
|
string PLZ;
|
||||||
string Vorgesetzter;
|
string Vorgesetzter;
|
||||||
int Schicht;
|
int Schicht;
|
||||||
|
int isKrad;
|
||||||
|
|
||||||
|
|
||||||
public static List<Grant> DataTableToGrant(System.Data.DataTable dataTable)
|
public static List<Grant> DataTableToGrant(System.Data.DataTable dataTable)
|
||||||
@ -127,7 +129,8 @@ namespace ZKuP
|
|||||||
Adresse = dr[8].ToString(),
|
Adresse = dr[8].ToString(),
|
||||||
PLZ = dr[9].ToString(),
|
PLZ = dr[9].ToString(),
|
||||||
Vorgesetzter = dr[10].ToString(),
|
Vorgesetzter = dr[10].ToString(),
|
||||||
Schicht = (int)dr[11]
|
Schicht = (int)dr[11],
|
||||||
|
isKrad = (int)dr[12]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
280
ZKuP/Helper.cs
@ -1,17 +1,22 @@
|
|||||||
using System;
|
using Microsoft.Win32;
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using Excel = Microsoft.Office.Interop.Excel;
|
using Excel = Microsoft.Office.Interop.Excel;
|
||||||
//using Word = Microsoft.Office.Interop.Word;
|
|
||||||
|
|
||||||
namespace ZKuP
|
namespace ZKuP
|
||||||
{
|
{
|
||||||
@ -259,7 +264,7 @@ namespace ZKuP
|
|||||||
return BitmapImage2Bitmap(new System.Windows.Media.Imaging.BitmapImage(new Uri(@"pack://application:,,,/" + assembly.GetName().Name + ";component/" + pathInApplication, UriKind.Absolute)));
|
return BitmapImage2Bitmap(new System.Windows.Media.Imaging.BitmapImage(new Uri(@"pack://application:,,,/" + assembly.GetName().Name + ";component/" + pathInApplication, UriKind.Absolute)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static System.Drawing.Bitmap BitmapImage2Bitmap(System.Windows.Media.Imaging.BitmapImage bitmapImage)
|
public static System.Drawing.Bitmap BitmapImage2Bitmap(System.Windows.Media.Imaging.BitmapImage bitmapImage)
|
||||||
{
|
{
|
||||||
// BitmapImage bitmapImage = new BitmapImage(new Uri("../Images/test.png", UriKind.Relative));
|
// BitmapImage bitmapImage = new BitmapImage(new Uri("../Images/test.png", UriKind.Relative));
|
||||||
|
|
||||||
@ -282,14 +287,23 @@ namespace ZKuP
|
|||||||
/// <returns>The image as a BitmapImage for WPF</returns>
|
/// <returns>The image as a BitmapImage for WPF</returns>
|
||||||
public static BitmapImage ConvertBitmapToImage(System.Drawing.Bitmap src)
|
public static BitmapImage ConvertBitmapToImage(System.Drawing.Bitmap src)
|
||||||
{
|
{
|
||||||
System.IO.MemoryStream ms = new System.IO.MemoryStream();
|
try
|
||||||
src.Save(ms, System.Drawing.Imaging.ImageFormat.Tiff);
|
{
|
||||||
BitmapImage image = new BitmapImage();
|
System.IO.MemoryStream ms = new System.IO.MemoryStream();
|
||||||
image.BeginInit();
|
src.Save(ms, System.Drawing.Imaging.ImageFormat.Tiff);
|
||||||
ms.Seek(0, System.IO.SeekOrigin.Begin);
|
BitmapImage image = new BitmapImage();
|
||||||
image.StreamSource = ms;
|
image.BeginInit();
|
||||||
image.EndInit();
|
ms.Seek(0, System.IO.SeekOrigin.Begin);
|
||||||
return image;
|
image.StreamSource = ms;
|
||||||
|
image.EndInit();
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteLog(ex.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -303,9 +317,13 @@ namespace ZKuP
|
|||||||
image.EndInit();
|
image.EndInit();
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
public static byte[] ConvertImageToByteArray(System.Drawing.Image img)
|
||||||
|
{
|
||||||
|
ImageConverter converter = new ImageConverter();
|
||||||
|
return (byte[])converter.ConvertTo(img, typeof(byte[]));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool OpenAndEditWord(string Name, string Kennzeichen, string Firma, string Nr, int isKrad = 0, string OE = "")
|
||||||
public static bool OpenAndEditWord(string Name, string Kennzeichen, string Firma, string Nr)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -326,34 +344,73 @@ namespace ZKuP
|
|||||||
|
|
||||||
wordApp.Visible = true;
|
wordApp.Visible = true;
|
||||||
|
|
||||||
//Word.Document document = wordApp.Documents.OpenNoRepairDialog("https://dbsw.sharepoint.com/:w:/r/sites/PfoertnerWerkMuenche/Freigegebene%20Dokumente/DBSecurity/Parkkarte_Template_ab_2020.dotx");
|
dynamic document;
|
||||||
dynamic document = wordApp.Documents.OpenNoRepairDialog("https://dbsw.sharepoint.com/:w:/r/sites/PfoertnerWerkMuenche/Freigegebene%20Dokumente/DBSecurity/Parkkarte_Template_ab_2020.dotx");
|
if (isKrad == 0)
|
||||||
|
|
||||||
document.Activate();
|
|
||||||
|
|
||||||
//Word.Table table = document.Tables[1];
|
|
||||||
dynamic table = document.Tables[1];
|
|
||||||
table.Cell(1, 2).Range.Text = Nr;
|
|
||||||
table.Cell(3, 2).Range.Text = Kennzeichen;
|
|
||||||
table.Cell(4, 2).Range.Text = Firma;
|
|
||||||
|
|
||||||
//Word.Table table2 = document.Tables[2];
|
|
||||||
dynamic table2 = document.Tables[2];
|
|
||||||
table2.Cell(1, 1).Range.Text = Name;
|
|
||||||
|
|
||||||
//Word.Dialog dialog = null;
|
|
||||||
dynamic dialog = null;
|
|
||||||
dialog = wordApp.Dialogs[88];/*Word.WdWordDialog.wdDialogFilePrint*/
|
|
||||||
var dialogResult = dialog.Show();
|
|
||||||
if (dialogResult == 1)
|
|
||||||
{
|
{
|
||||||
document.PrintOut(false);
|
document = wordApp.Documents.OpenNoRepairDialog("https://dbsw.sharepoint.com/:w:/r/sites/PfoertnerWerkMuenche/Freigegebene%20Dokumente/Zutrittskontrolle/Parkkarte_Template_ab_2020.dotx");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
document.Activate();
|
||||||
|
|
||||||
|
//Word.Table table = document.Tables[1];
|
||||||
|
dynamic table = document.Tables[1];
|
||||||
|
table.Cell(1, 2).Range.Text = Nr;
|
||||||
|
table.Cell(3, 2).Range.Text = Kennzeichen;
|
||||||
|
table.Cell(4, 2).Range.Text = Firma;
|
||||||
|
|
||||||
|
//Word.Table table2 = document.Tables[2];
|
||||||
|
dynamic table2 = document.Tables[2];
|
||||||
|
table2.Cell(1, 1).Range.Text = Name;
|
||||||
|
|
||||||
|
//Word.Dialog dialog = null;
|
||||||
|
dynamic dialog = null;
|
||||||
|
dialog = wordApp.Dialogs[88];/*Word.WdWordDialog.wdDialogFilePrint*/
|
||||||
|
var dialogResult = dialog.Show();
|
||||||
|
if (dialogResult == 1)
|
||||||
|
{
|
||||||
|
document.PrintOut(false);
|
||||||
|
}
|
||||||
|
else if (dialogResult == -1)
|
||||||
|
{
|
||||||
|
document.Close(0);/*Word.WdSaveOptions.wdDoNotSaveChanges*/
|
||||||
|
wordApp.Quit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (dialogResult == -1)
|
else if (isKrad == 1)
|
||||||
{
|
{
|
||||||
document.Close(0);/*Word.WdSaveOptions.wdDoNotSaveChanges*/
|
document = wordApp.Documents.OpenNoRepairDialog("https://dbsw.sharepoint.com/:w:/r/sites/PfoertnerWerkMuenche/Freigegebene%20Dokumente/Zutrittskontrolle/Parkausweis_Kraftrad_DinA5.docx");
|
||||||
wordApp.Quit();
|
|
||||||
|
|
||||||
|
document.Activate();
|
||||||
|
|
||||||
|
//Word.Table table = document.Tables[1];
|
||||||
|
dynamic table = document.Tables[1];
|
||||||
|
table.Cell(1, 2).Range.Text = Name;
|
||||||
|
table.Cell(2, 2).Range.Text = OE;
|
||||||
|
table.Cell(3, 2).Range.Text = Kennzeichen;
|
||||||
|
table.Cell(4, 2).Range.Text = Nr;
|
||||||
|
|
||||||
|
//Word.Dialog dialog = null;
|
||||||
|
dynamic dialog = null;
|
||||||
|
dialog = wordApp.Dialogs[88];/*Word.WdWordDialog.wdDialogFilePrint*/
|
||||||
|
var dialogResult = dialog.Show();
|
||||||
|
if (dialogResult == 1)
|
||||||
|
{
|
||||||
|
document.PrintOut(false);
|
||||||
|
}
|
||||||
|
else if (dialogResult == -1)
|
||||||
|
{
|
||||||
|
document.Close(0);/*Word.WdSaveOptions.wdDoNotSaveChanges*/
|
||||||
|
wordApp.Quit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Weder PKW noch Krad?!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -367,6 +424,21 @@ namespace ZKuP
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async static void PrintPDF(string path)
|
||||||
|
{
|
||||||
|
Process p = new Process();
|
||||||
|
p.StartInfo = new ProcessStartInfo()
|
||||||
|
{
|
||||||
|
CreateNoWindow = true,
|
||||||
|
Verb = "print",
|
||||||
|
FileName = path //put the path to pdf here
|
||||||
|
};
|
||||||
|
p.Start();
|
||||||
|
await Task.Delay(8000);
|
||||||
|
p.CloseMainWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static bool OverMaxLength(object value, int maxLength, string regex = "")
|
public static bool OverMaxLength(object value, int maxLength, string regex = "")
|
||||||
{
|
{
|
||||||
@ -743,7 +815,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||||
{
|
{
|
||||||
string[] roles = { "Pförtner", "Editor", "Admin", "Controller" };
|
string[] roles = { "Pförtner", "FFK", "Admin", "FFK-Sasse", "M2" };
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -778,4 +850,136 @@ namespace ZKuP
|
|||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class DatePickerHelper
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty ShowTodayButtonProperty = DependencyProperty.RegisterAttached("ShowTodayButton", typeof(bool), typeof(DatePickerHelper), new FrameworkPropertyMetadata(false, ShowTodayButtonChanged));
|
||||||
|
public static readonly DependencyProperty ShowTodayButtonContentProperty = DependencyProperty.RegisterAttached("ShowTodayButtonContent", typeof(string), typeof(DatePickerHelper), new FrameworkPropertyMetadata("Today", ShowTodayButtonContentChanged));
|
||||||
|
|
||||||
|
private static void ShowTodayButtonContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
//Call twice to update Button Content if was setted after ShowTodayButton
|
||||||
|
SetShowTodayButton(d, !GetShowTodayButton(d));
|
||||||
|
SetShowTodayButton(d, !GetShowTodayButton(d));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ShowTodayButtonChanged(object sender, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is DatePicker)
|
||||||
|
{
|
||||||
|
var d = (DatePicker)sender;
|
||||||
|
var showButton = (bool)(e.NewValue);
|
||||||
|
|
||||||
|
if (showButton)
|
||||||
|
{
|
||||||
|
//I want to reproduce this xaml in c#:
|
||||||
|
//<Style TargetType="{x:Type Calendar}">
|
||||||
|
// <Setter Property="Template">
|
||||||
|
// <Setter.Value>
|
||||||
|
// <ControlTemplate TargetType="{x:Type Calendar}">
|
||||||
|
// <StackPanel Name="PART_Root"
|
||||||
|
// HorizontalAlignment="Center">
|
||||||
|
// <CalendarItem Name="PART_CalendarItem"
|
||||||
|
// Background="{TemplateBinding Control.Background}"
|
||||||
|
// BorderBrush="{TemplateBinding Control.BorderBrush}"
|
||||||
|
// BorderThickness="{TemplateBinding Control.BorderThickness}"
|
||||||
|
// Style="{TemplateBinding Calendar.CalendarItemStyle}" />
|
||||||
|
// <Button Command="SelectToday"
|
||||||
|
// Content="Today" />
|
||||||
|
// </StackPanel>
|
||||||
|
// </ControlTemplate>
|
||||||
|
// </Setter.Value>
|
||||||
|
// </Setter>
|
||||||
|
//</Style>
|
||||||
|
|
||||||
|
Setter setter = new Setter();
|
||||||
|
setter.Property = Calendar.TemplateProperty;
|
||||||
|
ControlTemplate template = new ControlTemplate(typeof(Calendar));
|
||||||
|
var stackPanel = new FrameworkElementFactory(typeof(StackPanel));
|
||||||
|
stackPanel.Name = "PART_Root";
|
||||||
|
stackPanel.SetValue(StackPanel.HorizontalAlignmentProperty, HorizontalAlignment.Center);
|
||||||
|
|
||||||
|
var calendar = new FrameworkElementFactory(typeof(CalendarItem));
|
||||||
|
calendar.Name = "PART_CalendarItem";
|
||||||
|
|
||||||
|
calendar.SetBinding(CalendarItem.BackgroundProperty,
|
||||||
|
new Binding(CalendarItem.BackgroundProperty.Name)
|
||||||
|
{
|
||||||
|
Path = new PropertyPath(Control.BackgroundProperty),
|
||||||
|
RelativeSource = new RelativeSource(RelativeSourceMode.TemplatedParent)
|
||||||
|
});
|
||||||
|
|
||||||
|
calendar.SetBinding(CalendarItem.BorderBrushProperty, new Binding(CalendarItem.BorderBrushProperty.Name)
|
||||||
|
{
|
||||||
|
Path = new PropertyPath(Control.BorderBrushProperty),
|
||||||
|
RelativeSource = new RelativeSource(RelativeSourceMode.TemplatedParent)
|
||||||
|
});
|
||||||
|
|
||||||
|
calendar.SetBinding(CalendarItem.BorderThicknessProperty, new Binding(CalendarItem.BorderThicknessProperty.Name)
|
||||||
|
{
|
||||||
|
Path = new PropertyPath(Control.BorderThicknessProperty),
|
||||||
|
RelativeSource = new RelativeSource(RelativeSourceMode.TemplatedParent)
|
||||||
|
});
|
||||||
|
|
||||||
|
calendar.SetBinding(CalendarItem.StyleProperty, new Binding(CalendarItem.StyleProperty.Name)
|
||||||
|
{
|
||||||
|
Path = new PropertyPath(Calendar.CalendarItemStyleProperty),
|
||||||
|
RelativeSource = new RelativeSource(RelativeSourceMode.TemplatedParent)
|
||||||
|
});
|
||||||
|
|
||||||
|
stackPanel.AppendChild(calendar);
|
||||||
|
|
||||||
|
var btn = new FrameworkElementFactory(typeof(Button));
|
||||||
|
btn.SetValue(Button.ContentProperty, GetShowTodayButtonContent(d));
|
||||||
|
|
||||||
|
var SelectToday = new RoutedCommand("Today", typeof(DatePickerHelper));
|
||||||
|
|
||||||
|
d.CommandBindings.Add(new CommandBinding(SelectToday,
|
||||||
|
(s, ea) =>
|
||||||
|
{
|
||||||
|
(s as DatePicker).SelectedDate = DateTime.Now.Date;
|
||||||
|
(s as DatePicker).IsDropDownOpen = false;
|
||||||
|
},
|
||||||
|
(s, ea) => { ea.CanExecute = true; }));
|
||||||
|
|
||||||
|
btn.SetValue(Button.CommandProperty, SelectToday);
|
||||||
|
|
||||||
|
stackPanel.AppendChild(btn);
|
||||||
|
|
||||||
|
template.VisualTree = stackPanel;
|
||||||
|
setter.Value = template;
|
||||||
|
|
||||||
|
Style Temp = new Style(typeof(Calendar));
|
||||||
|
|
||||||
|
Temp.Setters.Add(setter);
|
||||||
|
|
||||||
|
d.CalendarStyle = Temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[AttachedPropertyBrowsableForType(typeof(DatePicker))]
|
||||||
|
public static bool GetShowTodayButton(DependencyObject obj)
|
||||||
|
{
|
||||||
|
return (bool)obj.GetValue(ShowTodayButtonProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
[AttachedPropertyBrowsableForType(typeof(DatePicker))]
|
||||||
|
public static void SetShowTodayButton(DependencyObject obj, bool value)
|
||||||
|
{
|
||||||
|
obj.SetValue(ShowTodayButtonProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
[AttachedPropertyBrowsableForType(typeof(DatePicker))]
|
||||||
|
public static string GetShowTodayButtonContent(Control obj)
|
||||||
|
{
|
||||||
|
return (string)obj.GetValue(ShowTodayButtonContentProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
[AttachedPropertyBrowsableForType(typeof(DatePicker))]
|
||||||
|
public static void SetShowTodayButtonContent(Control obj, string value)
|
||||||
|
{
|
||||||
|
obj.SetValue(ShowTodayButtonContentProperty, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,20 +5,28 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ZKuP"
|
xmlns:local="clr-namespace:ZKuP"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Unterschriftenanzeige" Height="342" Width="419">
|
Title="Unterschriftenanzeige" Height="370" Width="419" Loaded="Window_Loaded">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<Grid>
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<RadioButton Content="Zutritte" Margin="5" Checked="RadioButton_Checked" IsChecked="True"/>
|
||||||
|
<RadioButton Content="Karten" Margin="5" Checked="RadioButton_Checked"/>
|
||||||
|
<RadioButton Content="McFit" Margin="5" Checked="RadioButton_Checked"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<DatePicker x:Name="dPDate" Height="25" Margin="10,10,106,0" Text="" VerticalAlignment="Top" SelectedDateChanged="DatePicker_SelectedDateChanged" DateValidationError="dPDate_DateValidationError"/>
|
<Grid Margin="0,20,0,0">
|
||||||
<Image x:Name="imageSignature" Margin="10,95,10,10" Source="Resources/NoSignature.png"/>
|
<DatePicker local:DatePickerHelper.ShowTodayButton="True" local:DatePickerHelper.ShowTodayButtonContent="Heute" x:Name="dPDate" Height="25" Margin="10,10,106,0" Text="" VerticalAlignment="Top" SelectedDateChanged="DatePicker_SelectedDateChanged" DateValidationError="dPDate_DateValidationError"/>
|
||||||
<ComboBox x:Name="cBSignature" Margin="10,68,10,0" VerticalAlignment="Top" SelectionChanged="cBSignature_SelectionChanged"/>
|
<Image x:Name="imageSignature" Margin="10,95,10,10" Source="Resources/NoSignature.png"/>
|
||||||
<Button x:Name="btnToday" Content="Heute" FontSize="12" Padding="-2" Margin="0,13,140,0" VerticalAlignment="Top" Height="19" Click="btnToday_Click" HorizontalAlignment="Right" Width="55"/>
|
<ComboBox x:Name="cBSignature" Margin="10,68,10,0" VerticalAlignment="Top" SelectionChanged="cBSignature_SelectionChanged"/>
|
||||||
<Button x:Name="btnUp" Content="▲" Margin="0,13,201,0" VerticalAlignment="Top" Height="19" Padding="1,0,1,1" Click="btnUp_Click" HorizontalAlignment="Right" Width="20"/>
|
<Button x:Name="btnToday" Content="Heute" FontSize="12" Padding="-2" Margin="0,13,140,0" VerticalAlignment="Top" Height="19" Click="btnToday_Click" HorizontalAlignment="Right" Width="55"/>
|
||||||
<Button x:Name="btnDown" Content="▼" Margin="0,13,225,0" VerticalAlignment="Top" Height="19" Padding="1,0,1,1" HorizontalAlignment="Right" Width="20" Click="btnDown_Click"/>
|
<Button x:Name="btnUp" Content="▲" Margin="0,13,201,0" VerticalAlignment="Top" Height="19" Padding="1,0,1,1" Click="btnUp_Click" HorizontalAlignment="Right" Width="20"/>
|
||||||
<TextBox x:Name="tbFilter" Height="23" Margin="10,40,106,0" TextWrapping="Wrap" VerticalAlignment="Top" PreviewGotKeyboardFocus="tbFilter_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="tbFilter_PreviewLostKeyboardFocus" PreviewKeyDown="tbFilter_PreviewKeyDown"/>
|
<Button x:Name="btnDown" Content="▼" Margin="0,13,225,0" VerticalAlignment="Top" Height="19" Padding="1,0,1,1" HorizontalAlignment="Right" Width="20" Click="btnDown_Click"/>
|
||||||
<TextBlock x:Name="lblFilter" Height="23" Margin="10,40,106,0" Padding="2" TextWrapping="Wrap" Foreground="Gray" Text="Nach Firma/Name filtern" VerticalAlignment="Top" PreviewGotKeyboardFocus="tbFilter_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="tbFilter_PreviewLostKeyboardFocus" PreviewKeyDown="tbFilter_PreviewKeyDown" IsHitTestVisible="False"/>
|
<TextBox x:Name="tbFilter" Height="23" Margin="10,40,106,0" TextWrapping="Wrap" VerticalAlignment="Top" PreviewGotKeyboardFocus="tbFilter_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="tbFilter_PreviewLostKeyboardFocus" PreviewKeyDown="tbFilter_PreviewKeyDown"/>
|
||||||
<Button x:Name="btnFiltern" Content="Filtern" FontSize="12" Padding="-2" HorizontalAlignment="Right" Margin="0,40,10,0" VerticalAlignment="Top" Width="91" Height="23" Click="btnFiltern_Click"/>
|
<TextBlock x:Name="lblFilter" Height="23" Margin="10,40,106,0" Padding="2" TextWrapping="Wrap" Foreground="Gray" Text="Nach Firma/Name filtern" VerticalAlignment="Top" PreviewGotKeyboardFocus="tbFilter_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="tbFilter_PreviewLostKeyboardFocus" PreviewKeyDown="tbFilter_PreviewKeyDown" IsHitTestVisible="False"/>
|
||||||
<CheckBox x:Name="cbOnlyWithSignature" Content="Nur mit
Unterschrift" Margin="0,10,8,0" VerticalAlignment="Top" Height="25" FontSize="10" Checked="cbOnlyWithSignature_Checked" Unchecked="cbOnlyWithSignature_Unchecked" Width="91" HorizontalAlignment="Right" IsChecked="True"/>
|
<Button x:Name="btnFiltern" Content="Filtern" FontSize="12" Padding="-2" HorizontalAlignment="Right" Margin="0,40,10,0" VerticalAlignment="Top" Width="91" Height="23" Click="btnFiltern_Click"/>
|
||||||
|
<CheckBox x:Name="cbOnlyWithSignature" Content="Nur mit
Unterschrift" Margin="0,10,8,0" VerticalAlignment="Top" Height="25" FontSize="10" Checked="cbOnlyWithSignature_Checked" Unchecked="cbOnlyWithSignature_Unchecked" Width="91" HorizontalAlignment="Right" IsChecked="True"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<Grid x:Name="gridSpinner" Background="White">
|
<Grid x:Name="gridSpinner" Background="White">
|
||||||
<local:ucSpinnerPiston RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Height="25" Width="25" Margin="25,25,0,0" >
|
<local:ucSpinnerPiston RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Height="25" Width="25" Margin="25,25,0,0" >
|
||||||
|
|||||||
@ -19,12 +19,31 @@ namespace ZKuP
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ImageView : Window
|
public partial class ImageView : Window
|
||||||
{
|
{
|
||||||
|
Categories category = Categories.Zutritte;
|
||||||
|
|
||||||
|
|
||||||
|
enum Categories
|
||||||
|
{
|
||||||
|
Zutritte,
|
||||||
|
Karten,
|
||||||
|
McFit
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BitmapImage _image = null;
|
||||||
|
bool _showComboBox = false;
|
||||||
|
|
||||||
public ImageView(BitmapImage image, bool showComboBox = false)
|
public ImageView(BitmapImage image, bool showComboBox = false)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
_image = image;
|
||||||
|
_showComboBox = showComboBox;
|
||||||
|
|
||||||
Task.Run(() => Init(image, showComboBox));
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
await Task.Run(() => Init(_image, _showComboBox));
|
||||||
|
|
||||||
dPDate.SelectedDate = DateTime.Now;
|
dPDate.SelectedDate = DateTime.Now;
|
||||||
}
|
}
|
||||||
@ -44,32 +63,64 @@ namespace ZKuP
|
|||||||
}));
|
}));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var list = await SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM zkup.zutritteLog");
|
//var list = await SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM {MainWindow.table}.zutritteLog");
|
||||||
list = list.OrderByDescending(p => p).ToList();
|
//list = list.OrderByDescending(p => p).ToList();
|
||||||
|
|
||||||
|
|
||||||
Dispatcher.Invoke(new Action(() =>
|
Dispatcher.Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
cBSignature.ItemsSource = list;
|
//cBSignature.ItemsSource = list;
|
||||||
|
|
||||||
gridSpinner.Visibility = Visibility.Collapsed;
|
gridSpinner.Visibility = Visibility.Collapsed;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cBSignature_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void cBSignature_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (cBSignature.SelectedItem != null && cBSignature.SelectedIndex != -1)
|
switch (category)
|
||||||
{
|
{
|
||||||
var i = SQL.ReadSingleByteArr($"SELECT signature_blob FROM zkup.zutritteLog WHERE Name = '{cBSignature.SelectedItem.ToString().Split(';')[1]}' AND Zutritt = '{cBSignature.SelectedItem.ToString().Split(';')[0]}'");
|
case Categories.Zutritte:
|
||||||
|
if (cBSignature.SelectedItem != null && cBSignature.SelectedIndex != -1)
|
||||||
|
{
|
||||||
|
var i = SQL.ReadSingleByteArr($"SELECT signature_blob FROM {MainWindow.table}.zutritteLog WHERE Name = '{cBSignature.SelectedItem.ToString().Split(';')[1]}' AND Zutritt = '{cBSignature.SelectedItem.ToString().Split(';')[0]}'");
|
||||||
|
|
||||||
|
|
||||||
if (i != null)
|
if (i != null)
|
||||||
imageSignature.Source = Helper.ConvertBitmapToImage(i);
|
imageSignature.Source = Helper.ConvertBitmapToImage(i);
|
||||||
else
|
else
|
||||||
imageSignature.Source = new BitmapImage(new Uri(@"/Resources/NoSignature.png", UriKind.Relative));
|
imageSignature.Source = new BitmapImage(new Uri(@"/Resources/NoSignature.png", UriKind.Relative));
|
||||||
//MessageBox.Show(this, "Keine Unterschrift vorhanden!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
//MessageBox.Show(this, "Keine Unterschrift vorhanden!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Categories.Karten:
|
||||||
|
if (cBSignature.SelectedItem != null && cBSignature.SelectedIndex != -1)
|
||||||
|
{
|
||||||
|
var i = SQL.ReadSingleByteArr($"SELECT Signature FROM {MainWindow.table}.kartenLog WHERE benutzer = '{cBSignature.SelectedItem.ToString().Split(';')[1]}' AND AusgegebenTimestamp = '{cBSignature.SelectedItem.ToString().Split(';')[0]}'");
|
||||||
|
|
||||||
|
|
||||||
|
if (i != null)
|
||||||
|
imageSignature.Source = Helper.ConvertBitmapToImage(i);
|
||||||
|
else
|
||||||
|
imageSignature.Source = new BitmapImage(new Uri(@"/Resources/NoSignature.png", UriKind.Relative));
|
||||||
|
//MessageBox.Show(this, "Keine Unterschrift vorhanden!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Categories.McFit:
|
||||||
|
if (cBSignature.SelectedItem != null && cBSignature.SelectedIndex != -1)
|
||||||
|
{
|
||||||
|
var i = SQL.ReadSingleByteArr($"SELECT Signature FROM {MainWindow.table}.mcFitLog WHERE Nachname = '{cBSignature.SelectedItem.ToString().Split(';')[1]}' AND AusgabeTimestamp = '{cBSignature.SelectedItem.ToString().Split(';')[0]}'");
|
||||||
|
|
||||||
|
|
||||||
|
if (i != null)
|
||||||
|
imageSignature.Source = Helper.ConvertBitmapToImage(i);
|
||||||
|
else
|
||||||
|
imageSignature.Source = new BitmapImage(new Uri(@"/Resources/NoSignature.png", UriKind.Relative));
|
||||||
|
//MessageBox.Show(this, "Keine Unterschrift vorhanden!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DatePicker_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
|
private void DatePicker_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
|
||||||
@ -122,25 +173,46 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void Filtern()
|
private void Filtern()
|
||||||
|
{
|
||||||
|
switch (category)
|
||||||
|
{
|
||||||
|
case Categories.Zutritte:
|
||||||
|
FilterZutritte();
|
||||||
|
break;
|
||||||
|
case Categories.Karten:
|
||||||
|
FilterKarten();
|
||||||
|
break;
|
||||||
|
case Categories.McFit:
|
||||||
|
FilterMcFit();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cBSignature.Items.Count == 0) cBSignature.ItemsSource = new List<string>() { "Keine Einträge gefunden..." };
|
||||||
|
|
||||||
|
//cBSignature.IsDropDownOpen = false;
|
||||||
|
//cBSignature.IsDropDownOpen = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FilterZutritte()
|
||||||
{
|
{
|
||||||
string withSign = "";
|
string withSign = "";
|
||||||
if (cbOnlyWithSignature.IsChecked.Value) withSign = " AND signature_blob IS NOT NULL";
|
if (cbOnlyWithSignature.IsChecked.Value) withSign = " AND signature_blob IS NOT NULL";
|
||||||
|
|
||||||
if (dPDate.SelectedDate.HasValue && !string.IsNullOrWhiteSpace(tbFilter.Text))
|
if (dPDate.SelectedDate.HasValue && !string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
{
|
{
|
||||||
var list = SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM zkup.zutritteLog WHERE Zutritt LIKE '%{(dPDate).SelectedDate.Value.ToString("yyyy-MM-dd")}%' AND Name LIKE '%{tbFilter.Text}%'{withSign}").Result;
|
var list = SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM {MainWindow.table}.zutritteLog WHERE Zutritt LIKE '%{(dPDate).SelectedDate.Value.ToString("yyyy-MM-dd")}%' AND Name LIKE '%{tbFilter.Text}%'{withSign}").Result;
|
||||||
|
|
||||||
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
}
|
}
|
||||||
else if (!dPDate.SelectedDate.HasValue && !string.IsNullOrWhiteSpace(tbFilter.Text))
|
else if (!dPDate.SelectedDate.HasValue && !string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
{
|
{
|
||||||
var list = SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM zkup.zutritteLog WHERE Name LIKE '%{tbFilter.Text}%'{withSign}").Result;
|
var list = SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM {MainWindow.table}.zutritteLog WHERE Name LIKE '%{tbFilter.Text}%'{withSign}").Result;
|
||||||
|
|
||||||
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
}
|
}
|
||||||
else if (dPDate.SelectedDate.HasValue && string.IsNullOrWhiteSpace(tbFilter.Text))
|
else if (dPDate.SelectedDate.HasValue && string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
{
|
{
|
||||||
var list = SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM zkup.zutritteLog WHERE Zutritt LIKE '%{(dPDate).SelectedDate.Value.ToString("yyyy-MM-dd")}%'{withSign}").Result;
|
var list = SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM {MainWindow.table}.zutritteLog WHERE Zutritt LIKE '%{(dPDate).SelectedDate.Value.ToString("yyyy-MM-dd")}%'{withSign}").Result;
|
||||||
|
|
||||||
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
}
|
}
|
||||||
@ -148,15 +220,78 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
if (cbOnlyWithSignature.IsChecked.Value) withSign = " WHERE signature_blob IS NOT NULL";
|
if (cbOnlyWithSignature.IsChecked.Value) withSign = " WHERE signature_blob IS NOT NULL";
|
||||||
cbOnlyWithSignature.IsChecked = false;
|
cbOnlyWithSignature.IsChecked = false;
|
||||||
var list = SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM zkup.zutritteLog{withSign}").Result;
|
var list = SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM {MainWindow.table}.zutritteLog{withSign}").Result;
|
||||||
|
|
||||||
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (cBSignature.Items.Count == 0) cBSignature.ItemsSource = new List<string>() { "Keine Einträge gefunden..." };
|
private void FilterKarten()
|
||||||
|
{
|
||||||
|
//throw new NotImplementedException();
|
||||||
|
string withSign = "";
|
||||||
|
if (cbOnlyWithSignature.IsChecked.Value) withSign = " AND signature_blob IS NOT NULL";
|
||||||
|
|
||||||
cBSignature.IsDropDownOpen = false;
|
if (dPDate.SelectedDate.HasValue && !string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
cBSignature.IsDropDownOpen = true;
|
{
|
||||||
|
var list = SQL.ReadDateTimeAndStringList($"SELECT AusgegebenTimestamp,benutzer FROM {MainWindow.table}.kartenLog WHERE AusgegebenTimestamp LIKE '%{(dPDate).SelectedDate.Value.ToString("yyyy-MM-dd")}%' AND Name LIKE '%{tbFilter.Text}%'{withSign}").Result;
|
||||||
|
|
||||||
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
|
}
|
||||||
|
else if (!dPDate.SelectedDate.HasValue && !string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
|
{
|
||||||
|
var list = SQL.ReadDateTimeAndStringList($"SELECT AusgegebenTimestamp,benutzer FROM {MainWindow.table}.kartenLog WHERE benutzer LIKE '%{tbFilter.Text}%'{withSign}").Result;
|
||||||
|
|
||||||
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
|
}
|
||||||
|
else if (dPDate.SelectedDate.HasValue && string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
|
{
|
||||||
|
var list = SQL.ReadDateTimeAndStringList($"SELECT AusgegebenTimestamp,benutzer FROM {MainWindow.table}.kartenLog WHERE AusgegebenTimestamp LIKE '%{(dPDate).SelectedDate.Value.ToString("yyyy-MM-dd")}%'{withSign}").Result;
|
||||||
|
|
||||||
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
|
}
|
||||||
|
else if (!dPDate.SelectedDate.HasValue && string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
|
{
|
||||||
|
if (cbOnlyWithSignature.IsChecked.Value) withSign = " WHERE signature_blob IS NOT NULL";
|
||||||
|
cbOnlyWithSignature.IsChecked = false;
|
||||||
|
var list = SQL.ReadDateTimeAndStringList($"SELECT AusgegebenTimestamp,benutzer FROM {MainWindow.table}.kartenLog{withSign}").Result;
|
||||||
|
|
||||||
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FilterMcFit()
|
||||||
|
{
|
||||||
|
|
||||||
|
string withSign = "";
|
||||||
|
if (cbOnlyWithSignature.IsChecked.Value) withSign = " AND signature_blob IS NOT NULL";
|
||||||
|
|
||||||
|
if (dPDate.SelectedDate.HasValue && !string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
|
{
|
||||||
|
var list = SQL.ReadDateTimeAndStringList($"SELECT AusgabeTimestamp,Nachname FROM {MainWindow.table}.mcFitLog WHERE AusgabeTimestamp LIKE '%{(dPDate).SelectedDate.Value.ToString("yyyy-MM-dd")}%' AND Name LIKE '%{tbFilter.Text}%'{withSign}").Result;
|
||||||
|
|
||||||
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
|
}
|
||||||
|
else if (!dPDate.SelectedDate.HasValue && !string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
|
{
|
||||||
|
var list = SQL.ReadDateTimeAndStringList($"SELECT AusgabeTimestamp,Nachname FROM {MainWindow.table}.mcFitLog WHERE Nachname LIKE '%{tbFilter.Text}%'{withSign}").Result;
|
||||||
|
|
||||||
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
|
}
|
||||||
|
else if (dPDate.SelectedDate.HasValue && string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
|
{
|
||||||
|
var list = SQL.ReadDateTimeAndStringList($"SELECT AusgabeTimestamp,Nachname FROM {MainWindow.table}.mcFitLog WHERE AusgabeTimestamp LIKE '%{(dPDate).SelectedDate.Value.ToString("yyyy-MM-dd")}%'{withSign}").Result;
|
||||||
|
|
||||||
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
|
}
|
||||||
|
else if (!dPDate.SelectedDate.HasValue && string.IsNullOrWhiteSpace(tbFilter.Text))
|
||||||
|
{
|
||||||
|
if (cbOnlyWithSignature.IsChecked.Value) withSign = " WHERE signature_blob IS NOT NULL";
|
||||||
|
cbOnlyWithSignature.IsChecked = false;
|
||||||
|
var list = SQL.ReadDateTimeAndStringList($"SELECT AusgabeTimestamp,Nachname FROM {MainWindow.table}.mcFitLog{withSign}").Result;
|
||||||
|
|
||||||
|
cBSignature.ItemsSource = list.OrderByDescending(p => p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cbOnlyWithSignature_Unchecked(object sender, RoutedEventArgs e)
|
private void cbOnlyWithSignature_Unchecked(object sender, RoutedEventArgs e)
|
||||||
@ -173,5 +308,43 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
MessageBox.Show("Kein gültiges Datumsformat in Feld 'Datum'", "Fehler", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show("Kein gültiges Datumsformat in Feld 'Datum'", "Fehler", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void RadioButton_Checked(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
List<string> list = new List<string>();
|
||||||
|
|
||||||
|
switch ((sender as RadioButton).Content)
|
||||||
|
{
|
||||||
|
case "Zutritte":
|
||||||
|
category = Categories.Zutritte;
|
||||||
|
list = await SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM {MainWindow.table}.zutritteLog");
|
||||||
|
list = list.OrderByDescending(p => p).ToList();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Karten":
|
||||||
|
category = Categories.Karten;
|
||||||
|
list = await SQL.ReadDateTimeAndStringList($"SELECT AusgegebenTimestamp,benutzer FROM {MainWindow.table}.kartenLog");
|
||||||
|
list = list.OrderByDescending(p => p).ToList();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "McFit":
|
||||||
|
category = Categories.McFit;
|
||||||
|
list = await SQL.ReadDateTimeAndStringList($"SELECT AusgabeTimestamp,Nachname FROM {MainWindow.table}.mcFitLog");
|
||||||
|
list = list.OrderByDescending(p => p).ToList();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dispatcher.Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
if (cBSignature != null)
|
||||||
|
{
|
||||||
|
cBSignature.ItemsSource = list;
|
||||||
|
gridSpinner.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
29
ZKuP/KartenTausch.xaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<Window x:Class="ZKuP.KartenTausch"
|
||||||
|
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:ZKuP"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Rote Karte zu Grüner Karte tauschen" Height="250" Width="400">
|
||||||
|
<Grid Margin="10">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1.5*"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="0">
|
||||||
|
<TextBlock Text="Zurückgegebene Rote Karte:" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
|
<ComboBox x:Name="cbRot" SelectionChanged="cbRot_SelectionChanged"/>
|
||||||
|
<TextBlock x:Name="lblRotInfo" Text="" Margin="0,5,0,0" TextAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="1">
|
||||||
|
<TextBlock Text="Ausgegebene Grün Karte:" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
|
<TextBox x:Name="tbGruen"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Button x:Name="btnClose" Content="Bestätigen" Grid.Row="2" Height="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="btnClose_Click"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
68
ZKuP/KartenTausch.xaml.cs
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace ZKuP
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für KartenTausch.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class KartenTausch : Window
|
||||||
|
{
|
||||||
|
|
||||||
|
public KartenTausch()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
cbRot.ItemsSource = SQL.ReadListString($"SELECT kartennr From {MainWindow.table}.karten WHERE farbe = 'Rot'").Result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cbRot_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var info = SQL.ReadListStringTwoColumns($"SELECT benutzer,telnr From {MainWindow.table}.karten WHERE kartennr = '{(sender as ComboBox).SelectedValue}'").Result;
|
||||||
|
var split = info.First().ToString().Split(';');
|
||||||
|
|
||||||
|
lblRotInfo.Text = $"Benutzer: {split[0]} Telefon: {split[1]}";
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void btnClose_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
byte[] _signature = null;
|
||||||
|
|
||||||
|
|
||||||
|
var info = SQL.ReadListStringTwoColumns($"SELECT benutzer,telnr From {MainWindow.table}.karten WHERE kartennr = '{cbRot.SelectedValue}'").Result;
|
||||||
|
var split = info.First().ToString().Split(';');
|
||||||
|
|
||||||
|
var sig = new Signature(Signature.DisclaimerType.Gruen, split[0], split[1]);
|
||||||
|
|
||||||
|
if (cbRot.SelectedIndex != -1 && !string.IsNullOrWhiteSpace(tbGruen.Text))
|
||||||
|
{
|
||||||
|
if (sig.ShowDialog() == false)
|
||||||
|
{
|
||||||
|
_signature = sig.ResultByte;
|
||||||
|
|
||||||
|
if (_signature != null)
|
||||||
|
{
|
||||||
|
var red = SQL.ReadListStringMultipleColumns($"SELECT * From {MainWindow.table}.karten WHERE kartennr = '{cbRot.SelectedValue}'", 5).Result.First().Split(';');
|
||||||
|
SQL.WriteSQL($"DELETE FROM {MainWindow.table}.karten WHERE kartennr = '{red[1]}'");
|
||||||
|
|
||||||
|
SQL.WriteSQL($"INSERT INTO {MainWindow.table}.karten (kartennr,farbe,benutzer,telnr,AusgegebenDurch,AusgegebenTimestamp,Signature) VALUES ('{tbGruen.Text}','Grün','{red[3]}','{red[4]}','{Environment.UserName}','{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', @signature)", _signature);
|
||||||
|
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -15,7 +15,7 @@
|
|||||||
Top="{Binding Source={x:Static p:Settings.Default}, Path=Top, Mode=TwoWay}"
|
Top="{Binding Source={x:Static p:Settings.Default}, Path=Top, Mode=TwoWay}"
|
||||||
|
|
||||||
MinHeight="610"
|
MinHeight="610"
|
||||||
MinWidth="1360"
|
MinWidth="1660"
|
||||||
Closing="Window_Closing"
|
Closing="Window_Closing"
|
||||||
PreviewKeyDown="Window_PreviewKeyDown" Loaded="Window_Loaded" ContentRendered="Window_ContentRendered" SizeChanged="Window_SizeChanged"
|
PreviewKeyDown="Window_PreviewKeyDown" Loaded="Window_Loaded" ContentRendered="Window_ContentRendered" SizeChanged="Window_SizeChanged"
|
||||||
>
|
>
|
||||||
@ -36,13 +36,21 @@
|
|||||||
|
|
||||||
<local:SystemIconConverter x:Key="SystemIcon"></local:SystemIconConverter>
|
<local:SystemIconConverter x:Key="SystemIcon"></local:SystemIconConverter>
|
||||||
|
|
||||||
|
|
||||||
|
<Storyboard x:Key="sbConnection" RepeatBehavior="Forever">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="imgConnection" Storyboard.TargetProperty="(UIElement.Opacity)">
|
||||||
|
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
|
||||||
|
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
|
||||||
|
<EasingDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Grid x:Name="gridBackground">
|
<Grid x:Name="gridBackground">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="120"/>
|
<RowDefinition Height="135"/>
|
||||||
<RowDefinition Height="{Binding gridOverviewHeight, Source={x:Static p:Settings.Default}, Mode=TwoWay}" MinHeight="300"/>
|
<RowDefinition Height="{Binding gridOverviewHeight, Source={x:Static p:Settings.Default}, Mode=TwoWay}" MinHeight="300"/>
|
||||||
<RowDefinition Height="10" MinHeight="10"/>
|
<RowDefinition Height="10" MinHeight="10"/>
|
||||||
<RowDefinition Height="1*" MinHeight="100"/>
|
<RowDefinition Height="1*" MinHeight="100"/>
|
||||||
@ -54,7 +62,7 @@
|
|||||||
</Canvas.Background>
|
</Canvas.Background>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
|
|
||||||
<Grid x:Name="gridSpinner" Background="White" Grid.RowSpan="4" Panel.ZIndex="99" Margin="0">
|
<Grid x:Name="gridSpinner" Background="White" Grid.RowSpan="4" Panel.ZIndex="99" Margin="0" Visibility="Visible">
|
||||||
<Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Width="90" Height="90">
|
<Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Width="90" Height="90">
|
||||||
<local:ucSpinnerPiston RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Canvas.Left="46" Canvas.Top="46" Height="25" Width="25" >
|
<local:ucSpinnerPiston RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Canvas.Left="46" Canvas.Top="46" Height="25" Width="25" >
|
||||||
<local:ucSpinnerPiston.RenderTransform>
|
<local:ucSpinnerPiston.RenderTransform>
|
||||||
@ -74,10 +82,10 @@
|
|||||||
|
|
||||||
<Button x:Name="btnHelp" Content="Hilfe" Margin="0,63,182,0" Height="23" FontSize="12" Padding="-5" FontWeight="Regular" VerticalAlignment="Top" Click="BtnHelp_Click" HorizontalAlignment="Right" Width="87" Visibility="Visible" Grid.RowSpan="3"/>
|
<Button x:Name="btnHelp" Content="Hilfe" Margin="0,63,182,0" Height="23" FontSize="12" Padding="-5" FontWeight="Regular" VerticalAlignment="Top" Click="BtnHelp_Click" HorizontalAlignment="Right" Width="87" Visibility="Visible" Grid.RowSpan="3"/>
|
||||||
|
|
||||||
<Grid x:Name="Main" Visibility="Collapsed" Margin="10,0" Height="120" VerticalAlignment="Top" Grid.Row="0">
|
<Grid x:Name="Main" Margin="10,0" Height="130" VerticalAlignment="Top" Grid.Row="0" Visibility="Hidden">
|
||||||
|
|
||||||
|
|
||||||
<TabControl HorizontalAlignment="Right" Width="650" Height="130" Margin="0,0,-15,0" SelectionChanged="TabControl_SelectionChanged">
|
<TabControl x:Name="tcMainMenu" HorizontalAlignment="Right" Width="650" Height="130" Margin="0,0,-15,0" SelectionChanged="TabControl_SelectionChanged">
|
||||||
<TabItem x:Name="tabPark" Header="Parkausweise" Visibility="Collapsed" Margin="5,0,5,0" Width="130" Height="30" mah:HeaderedControlHelper.HeaderFontSize="18" mah:HeaderedControlHelper.HeaderHorizontalContentAlignment="Center" mah:HeaderedControlHelper.HeaderVerticalContentAlignment="Center">
|
<TabItem x:Name="tabPark" Header="Parkausweise" Visibility="Collapsed" Margin="5,0,5,0" Width="130" Height="30" mah:HeaderedControlHelper.HeaderFontSize="18" mah:HeaderedControlHelper.HeaderHorizontalContentAlignment="Center" mah:HeaderedControlHelper.HeaderVerticalContentAlignment="Center">
|
||||||
<StackPanel Orientation="Horizontal" Margin="5">
|
<StackPanel Orientation="Horizontal" Margin="5">
|
||||||
<StackPanel Orientation="Vertical" Margin="2">
|
<StackPanel Orientation="Vertical" Margin="2">
|
||||||
@ -148,8 +156,27 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem x:Name="tabPfoertner" Header="Pförtner" Visibility="Collapsed" Margin="5,0,5,0" Width="90" FontSize="8" Height="30" mah:HeaderedControlHelper.HeaderFontSize="18" mah:HeaderedControlHelper.HeaderHorizontalContentAlignment="Center" mah:HeaderedControlHelper.HeaderVerticalContentAlignment="Center">
|
<TabItem x:Name="tabPfoertner" Header="Pförtner" Visibility="Collapsed" Margin="5,0,5,0" Width="90" FontSize="8" Height="30" mah:HeaderedControlHelper.HeaderFontSize="18" mah:HeaderedControlHelper.HeaderHorizontalContentAlignment="Center" mah:HeaderedControlHelper.HeaderVerticalContentAlignment="Center">
|
||||||
<StackPanel Orientation="Horizontal" Margin="5">
|
<StackPanel Orientation="Horizontal" Margin="5">
|
||||||
<StackPanel Orientation="Vertical" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2">
|
||||||
<Button x:Name="btnKarten" Content="Karten" Height="30" FontSize="12" Padding="-5" Margin="2" FontWeight="Regular" Click="btnKarten_Click" Width="150" Visibility="Collapsed"/>
|
<Button x:Name="btnKarten" Height="80" FontSize="12" Padding="-5" Margin="2" FontWeight="Regular" Click="btnKarten_Click" Width="150" Visibility="Collapsed">
|
||||||
|
<Button.Content>
|
||||||
|
<StackPanel>
|
||||||
|
<Border BorderThickness="0" BorderBrush="Black" Margin="0,0,0,10">
|
||||||
|
<Image Source="/Resources/Karten.png" Height="40"/>
|
||||||
|
</Border>
|
||||||
|
<TextBlock Text="Karten" TextAlignment="Center" FontSize="14"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="btnKartenTausch" Height="80" FontSize="12" Padding="-5" Margin="2" FontWeight="Regular" Click="btnKartenTausch_Click" Width="150" Visibility="Collapsed">
|
||||||
|
<Button.Content>
|
||||||
|
<StackPanel>
|
||||||
|
<Border BorderThickness="0" BorderBrush="Black" Margin="0,0,0,10" Width="100">
|
||||||
|
<Image Source="/Resources/KartenTausch.png" Height="40"/>
|
||||||
|
</Border>
|
||||||
|
<TextBlock Text="Rot zu Grün tauschen" FontSize="14"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Vertical" Margin="2">
|
<StackPanel Orientation="Vertical" Margin="2">
|
||||||
<Button x:Name="btnCreateDeliveries" Content="Lieferanten verwalten" Height="30" FontSize="12" Padding="-5" Margin="2" FontWeight="Regular" Width="150" Visibility="Collapsed" Click="btnCreateDeliveries_Click"/>
|
<Button x:Name="btnCreateDeliveries" Content="Lieferanten verwalten" Height="30" FontSize="12" Padding="-5" Margin="2" FontWeight="Regular" Width="150" Visibility="Collapsed" Click="btnCreateDeliveries_Click"/>
|
||||||
@ -159,8 +186,8 @@
|
|||||||
<TabItem x:Name="tabSonstiges" Header="Sonstiges" Visibility="Collapsed" Margin="5,0,5,0" Width="100" FontSize="8" Height="30" mah:HeaderedControlHelper.HeaderFontSize="18" mah:HeaderedControlHelper.HeaderHorizontalContentAlignment="Center" mah:HeaderedControlHelper.HeaderVerticalContentAlignment="Center">
|
<TabItem x:Name="tabSonstiges" Header="Sonstiges" Visibility="Collapsed" Margin="5,0,5,0" Width="100" FontSize="8" Height="30" mah:HeaderedControlHelper.HeaderFontSize="18" mah:HeaderedControlHelper.HeaderHorizontalContentAlignment="Center" mah:HeaderedControlHelper.HeaderVerticalContentAlignment="Center">
|
||||||
<StackPanel Orientation="Horizontal" Margin="5">
|
<StackPanel Orientation="Horizontal" Margin="5">
|
||||||
<StackPanel Orientation="Vertical" Margin="2">
|
<StackPanel Orientation="Vertical" Margin="2">
|
||||||
|
<Button x:Name="btnHelp2" Content="Hilfe" Height="30" FontSize="12" Padding="-5" Margin="2,2,2,2" FontWeight="Regular" Click="BtnHelp_Click" Width="150" Visibility="Visible"/>
|
||||||
<Button x:Name="btnBelegung" Content="BE-Flächen" Height="30" FontSize="12" Padding="-5" Margin="2" FontWeight="Regular" Width="150" Visibility="Collapsed" Click="btnBelegung_Click"/>
|
<Button x:Name="btnBelegung" Content="BE-Flächen" Height="30" FontSize="12" Padding="-5" Margin="2" FontWeight="Regular" Width="150" Visibility="Collapsed" Click="btnBelegung_Click"/>
|
||||||
<Button x:Name="btnHelp2" Content="Hilfe" Height="30" FontSize="12" Padding="-5" Margin="2,10,2,2" FontWeight="Regular" Click="BtnHelp_Click" Width="150" Visibility="Visible"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Vertical" Margin="2">
|
<StackPanel Orientation="Vertical" Margin="2">
|
||||||
<Button x:Name="btnArrivalsOverview" Content="Ankunftsübersicht" Height="30" FontSize="12" Padding="-5" Margin="2" FontWeight="Regular" Width="150" Visibility="Collapsed" Click="btnArrivalsOverview_Click"/>
|
<Button x:Name="btnArrivalsOverview" Content="Ankunftsübersicht" Height="30" FontSize="12" Padding="-5" Margin="2" FontWeight="Regular" Width="150" Visibility="Collapsed" Click="btnArrivalsOverview_Click"/>
|
||||||
@ -188,11 +215,11 @@
|
|||||||
|
|
||||||
<Button x:Name="btnIvoBackground" VerticalAlignment="Top" HorizontalAlignment="Right" Height="95" Width="10" Margin="0,13,-3,0" Click="btnIvoBackground_Click" Visibility="Collapsed"/>
|
<Button x:Name="btnIvoBackground" VerticalAlignment="Top" HorizontalAlignment="Right" Height="95" Width="10" Margin="0,13,-3,0" Click="btnIvoBackground_Click" Visibility="Collapsed"/>
|
||||||
|
|
||||||
<Button x:Name="btnNew" Content="Firma/Besucher kommt an" Height="23" FontSize="12" Padding="-5" HorizontalAlignment="Left" FontWeight="Regular" Margin="0,13,0,0" VerticalAlignment="Top" Width="200" Click="BtnNew_Click" Visibility="Collapsed"/>
|
<!--<Button x:Name="btnNew" Content="Firma/Besucher kommt an" Height="23" FontSize="12" Padding="-5" HorizontalAlignment="Left" FontWeight="Regular" Margin="0,13,0,0" VerticalAlignment="Top" Width="200" Click="BtnNew_Click" Visibility="Collapsed"/>-->
|
||||||
<Button x:Name="btnDelivery" Content="Lieferant kommt an" Height="23" FontSize="12" Padding="-5" HorizontalAlignment="Left" FontWeight="Regular" Margin="0,38,0,0" VerticalAlignment="Top" Width="200" Click="btnDelivery_Click" Visibility="Collapsed"/>
|
<Button x:Name="btnDelivery" Content="Lieferant kommt an" Tag="Lieferant" Height="23" FontSize="12" Padding="-5" HorizontalAlignment="Left" FontWeight="Regular" Margin="0,38,0,0" VerticalAlignment="Top" Width="200" Click="btnDelivery_Click" Visibility="Collapsed"/>
|
||||||
<Button x:Name="btnEmergency" Content="DB Intern Entstördienst kommt an" Height="23" FontSize="12" Padding="-5" HorizontalAlignment="Left" FontWeight="Regular" Margin="0,63,0,0" VerticalAlignment="Top" Width="200" Click="btnDelivery_Click" Visibility="Collapsed"/>
|
<Button x:Name="btnEmergency" Content="DB Intern Entstördienst kommt an" Tag="DB" Height="23" FontSize="12" Padding="-5" HorizontalAlignment="Left" FontWeight="Regular" Margin="0,63,0,0" VerticalAlignment="Top" Width="200" Click="btnDelivery_Click" Visibility="Collapsed"/>
|
||||||
|
|
||||||
<Border x:Name="canvasHinweis" Visibility="Collapsed" CornerRadius="8" BorderBrush="Red" BorderThickness="1" Width="300" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="410,13,0,0" Height="90">
|
<!--<Border x:Name="canvasHinweis" Visibility="Collapsed" CornerRadius="8" BorderBrush="Red" BorderThickness="1" Width="300" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="580,13,0,0" Height="90">
|
||||||
<Grid Width="300" HorizontalAlignment="Left">
|
<Grid Width="300" HorizontalAlignment="Left">
|
||||||
|
|
||||||
<Image Visibility="Visible"
|
<Image Visibility="Visible"
|
||||||
@ -204,14 +231,14 @@
|
|||||||
Source="{Binding Converter={StaticResource SystemIcon}, ConverterParameter=Warning}"/>
|
Source="{Binding Converter={StaticResource SystemIcon}, ConverterParameter=Warning}"/>
|
||||||
|
|
||||||
<TextBlock x:Name="lblHinweis" TextWrapping="Wrap" TextAlignment="Center" Padding="55,5,10,5" HorizontalAlignment="Right" VerticalAlignment="Center" Width="300" Height="NaN" />
|
<TextBlock x:Name="lblHinweis" TextWrapping="Wrap" TextAlignment="Center" Padding="55,5,10,5" HorizontalAlignment="Right" VerticalAlignment="Center" Width="300" Height="NaN" />
|
||||||
<!--Background="#32FF5D00"-->
|
--><!--Background="#32FF5D00"--><!--
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<Button x:Name="btnSetHinweis" Visibility="Collapsed" FontSize="12" Padding="-5" Height="23" Content="Hinweis setzen" FontWeight="Regular" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="450,0,0,-10" Width="220" Click="btnSetHinweis_Click"/>
|
<Button x:Name="btnSetHinweis" Visibility="Collapsed" FontSize="12" Padding="-5" Height="23" Content="Hinweis setzen" FontWeight="Regular" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="620,0,0,-10" Width="220" Click="btnSetHinweis_Click"/>-->
|
||||||
|
|
||||||
<Button x:Name="btnSettings" Content="" ToolTip="Einstellungen" FontFamily="Segoe UI Symbol" Click="btnSettings_Click" FontSize="20" Padding="-5" FontWeight="Regular" Visibility="Collapsed" HorizontalAlignment="Right" Width="25" Height="25" VerticalAlignment="Bottom" Margin="0,0,0,-20"/>
|
<Button x:Name="btnSettings" Content="" ToolTip="Einstellungen" FontFamily="Segoe UI Symbol" Click="btnSettings_Click" FontSize="20" Padding="-5" FontWeight="Regular" Visibility="Collapsed" HorizontalAlignment="Right" Width="25" Height="25" VerticalAlignment="Bottom" Margin="0,0,0,-20"/>
|
||||||
<Button x:Name="btnDarkMode" Click="btnDarkMode_Click" Padding="-1" FontWeight="Regular" Visibility="Visible" HorizontalAlignment="Right" Width="25" Height="23" VerticalAlignment="Bottom" Margin="0,0,0,9">
|
<Button x:Name="btnDarkMode" Click="btnDarkMode_Click" Padding="-1" FontWeight="Regular" Visibility="Visible" Panel.ZIndex="100" HorizontalAlignment="Right" Width="25" Height="23" VerticalAlignment="Bottom" Margin="0,0,0,9">
|
||||||
<Image x:Name="imgDarkModeButton" Source="/Resources/Moon.png"/>
|
<Image x:Name="imgDarkModeButton" Source="/Resources/Moon.png"/>
|
||||||
<Button.ContextMenu>
|
<Button.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
@ -233,9 +260,10 @@
|
|||||||
</Button.ToolTip>
|
</Button.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<Grid x:Name="BE" Margin="210, 30, 0, 0" Width="350" HorizontalAlignment="Left" ToolTip="Rote Parkplätze sind belegt, Grüne frei">
|
||||||
|
|
||||||
<Button x:Name="btnBE" Content="BE-Flächenansicht" FontSize="12" Padding="-5" Margin="220, 0, 0, -10" Height="20" FontWeight="Regular" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="150" Visibility="Collapsed" Click="btnBEImages_Click"/>
|
<TextBlock Text="Parkplätze im Werk:" Margin="0, -20, 0, 0" Height="20" Width="150" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||||
<Grid x:Name="BE" Margin="210, 13, 0, 0" Width="350" HorizontalAlignment="Left" ToolTip="Rote Parkplätze sind belegt, Grüne frei">
|
<Button x:Name="btnBE" Content="BE-Flächenansicht" FontSize="12" Padding="-5" Margin="0, 0, 120, -25" Height="20" FontWeight="Regular" HorizontalAlignment="Center" VerticalAlignment="Bottom" Width="150" Visibility="Collapsed" Click="btnBEImages_Click"/>
|
||||||
<Rectangle x:Name="P1" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 0, 0, 0" StrokeThickness="1" Fill="Green" PreviewMouseLeftButtonDown="ParkPreviewMouseLeftButtonDown"/>
|
<Rectangle x:Name="P1" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 0, 0, 0" StrokeThickness="1" Fill="Green" PreviewMouseLeftButtonDown="ParkPreviewMouseLeftButtonDown"/>
|
||||||
<TextBlock Text="1" Margin="0, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="ParkPreviewMouseLeftButtonDown"/>
|
<TextBlock Text="1" Margin="0, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
|
||||||
@ -305,6 +333,13 @@
|
|||||||
<TextBlock Text="30" Margin="175, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
|
<TextBlock Text="30" Margin="175, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
|
||||||
<Rectangle x:Name="P31" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="175, 40, 0, 0" StrokeThickness="1" Fill="Green" Stroke="Aqua"/>
|
<Rectangle x:Name="P31" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="175, 40, 0, 0" StrokeThickness="1" Fill="Green" Stroke="Aqua"/>
|
||||||
<TextBlock Text="31" Margin="175, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
|
<TextBlock Text="31" Margin="175, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
|
||||||
|
<Rectangle x:Name="P32" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="175, 60, 0, 0" StrokeThickness="1" Fill="Green" Stroke="Aqua"/>
|
||||||
|
<TextBlock Text="32" Margin="175, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
|
||||||
|
|
||||||
|
<Rectangle x:Name="P33" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="200, 0, 0, 0" StrokeThickness="1" Fill="Green" Stroke="Aqua"/>
|
||||||
|
<TextBlock Text="33" Margin="200, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
|
||||||
|
<Rectangle x:Name="P34" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="200, 20, 0, 0" StrokeThickness="1" Fill="Green" Stroke="Aqua"/>
|
||||||
|
<TextBlock Text="34" Margin="200, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -314,130 +349,283 @@
|
|||||||
<TextBlock x:Name="lblRedCounter" Text="23" TextAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="148, 78, 0, 0"/>
|
<TextBlock x:Name="lblRedCounter" Text="23" TextAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="148, 78, 0, 0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<!--<ItemsControl ItemsSource="{Binding Source='Besucherparkplätze'}" Margin="410,13,0,0">
|
||||||
|
<ItemsControl.ItemContainerStyle>
|
||||||
|
<Style TargetType="ContentPresenter">
|
||||||
|
<Setter Property="Margin" Value="0,-5,0,0"/>
|
||||||
|
</Style>
|
||||||
|
</ItemsControl.ItemContainerStyle>
|
||||||
|
</ItemsControl>-->
|
||||||
|
<Grid x:Name="BesuchP" Margin="460, 10, 0, 10" Width="30" HorizontalAlignment="Left" VerticalAlignment="Bottom">
|
||||||
|
<TextBlock Text="Besucherparkplätze" Margin="-20,1,0,-5" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top">
|
||||||
|
<TextBlock.LayoutTransform>
|
||||||
|
<RotateTransform Angle="270"/>
|
||||||
|
</TextBlock.LayoutTransform>
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
|
<Grid x:Name="BesuchPButtons" Margin="2,4,0,0">
|
||||||
|
<Rectangle x:Name="G1" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 0, 0, 0" StrokeThickness="1" Fill="Green" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
<TextBlock Text="1" Margin="0, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
<Rectangle x:Name="G2" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 20, 0, 0" StrokeThickness="1" Fill="Green"/>
|
||||||
|
<TextBlock Text="2" Margin="0, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
<Rectangle x:Name="G3" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 40, 0, 0" StrokeThickness="1" Fill="Green"/>
|
||||||
|
<TextBlock Text="3" Margin="0, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
<Rectangle x:Name="G4" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 60, 0, 0" StrokeThickness="1" Fill="Green"/>
|
||||||
|
<TextBlock Text="4" Margin="0, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
<Rectangle x:Name="G5" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 80, 0, 0" StrokeThickness="1" Fill="Green"/>
|
||||||
|
<TextBlock Text="5" Margin="0, 80, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
<Grid x:Name="gridBike" Visibility="Collapsed" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="510,13,0,-10" Height="140" Width="110">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="20"/>
|
||||||
|
<RowDefinition Height="55"/>
|
||||||
|
<RowDefinition Height="20"/>
|
||||||
|
<RowDefinition Height="30"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="Krafträder im Werk:" Grid.ColumnSpan="3" Grid.Row="0"/>
|
||||||
|
<Image x:Name="imgBike" Source="/Resources/Bike.png" Grid.Row="1" Width="70" Height="50" Stretch="Uniform"/>
|
||||||
|
<TextBlock x:Name="lblBike" Text="0 / 16" FontSize="16" ToolTip="Motorräder im Werk" Grid.Row="2" Width="100" Height="20" Margin="0,0,0,0" TextAlignment="Center"/>
|
||||||
|
<Button x:Name="btnBikeIn" ToolTip="Motorrad fährt ein" Background="PaleVioletRed" ToolTipService.ShowOnDisabled="True" ToolTipService.InitialShowDelay="0" Grid.Row="3" Width="40" Height="30" Margin="0,0,60,-5" VerticalAlignment="Bottom" Padding="7,0,7,4" Panel.ZIndex="100" Click="BikeEinfahrt_Click">
|
||||||
|
<Image x:Name="imgBikeIn" Source="/Resources/In.png" ToolTip="Motorrad fährt ein" ToolTipService.ShowOnDisabled="True" ToolTipService.InitialShowDelay="0"/>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="btnBikeOut" ToolTip="Motorrad fährt aus" Background="LightGreen" ToolTipService.ShowOnDisabled="True" ToolTipService.InitialShowDelay="0" Grid.Row="3" Width="40" Height="30" Margin="55,0,0,-5" VerticalAlignment="Bottom" Padding="7,0,7,4" Panel.ZIndex="100" Click="BikeAusfahrt_Click">
|
||||||
|
<Image x:Name="imgBikeOut" Source="/Resources/Out.png" ToolTip="Motorrad fährt aus" ToolTipService.ShowOnDisabled="True" ToolTipService.InitialShowDelay="0"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
<Grid x:Name="gridLieferanten" Visibility="Collapsed" Margin="650, 13, 0, -10" Width="340" Height="140" HorizontalAlignment="Left">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="20"/>
|
||||||
|
<RowDefinition Height="55"/>
|
||||||
|
<RowDefinition Height="20"/>
|
||||||
|
<RowDefinition Height="30"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.1*"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Text="Lieferanten im Werk:" Grid.ColumnSpan="3" Grid.Row="0"/>
|
||||||
|
|
||||||
|
<Image x:Name="imgLKWLang" Source="/Resources/LKWLang.png" ToolTip="Lieferanten mit LKW > 7,5t im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="0" Grid.Row="1" Stretch="Fill" Width="90" Height="45"/>
|
||||||
|
<TextBlock x:Name="lblLKWLang" Text="Text" FontSize="16" ToolTip="Lieferanten mit LKW > 7,5t im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="0" Grid.Row="2" Width="70" Height="50" Margin="0,0,0,0" TextAlignment="Center"/>
|
||||||
|
<Button x:Name="btnLKWLang" Content="Ausfahrt" ToolTip="Lieferant mit LKW > 7,5t fährt raus" ToolTipService.InitialShowDelay="1" Grid.Column="0" Grid.Row="3" Width="80" Height="30" Margin="0,0,0,-10" VerticalAlignment="Bottom" Padding="0,-10,0,0" Panel.ZIndex="100" Click="Ausfahrt_Click"/>
|
||||||
|
|
||||||
|
<Image x:Name="imgLKW" Source="/Resources/LKW.png" ToolTip="Lieferanten mit LKW < 7,5t im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="1" Grid.Row="1" Stretch="Fill" Width="70" Height="45"/>
|
||||||
|
<TextBlock x:Name="lblLKW" Text="Text" FontSize="16" ToolTip="Lieferanten mit LKW < 7,5t im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="1" Grid.Row="2" Width="70" Height="20" Margin="0,0,0,0" TextAlignment="Center"/>
|
||||||
|
<Button x:Name="btnLKW" Content="Ausfahrt" ToolTip="Lieferant mit LKW < 7,5t fährt raus" ToolTipService.InitialShowDelay="1" Grid.Column="1" Grid.Row="3" Width="80" Height="30" Margin="0,0,0,-10" VerticalAlignment="Bottom" Padding="0,-10,0,0" Panel.ZIndex="100" Click="Ausfahrt_Click"/>
|
||||||
|
|
||||||
|
<Image x:Name="imgSprinter" Source="/Resources/Sprinter.png" ToolTip="Lieferanten mit Sprinter im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="2" Grid.Row="1" Stretch="Fill" Width="70" Height="45"/>
|
||||||
|
<TextBlock x:Name="lblSprinter" Text="Text" FontSize="16" ToolTip="Lieferanten mit Sprinter im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="2" Grid.Row="2" Width="70" Height="20" Margin="0,0,0,0" TextAlignment="Center"/>
|
||||||
|
<Button x:Name="btnSprinter" Content="Ausfahrt" ToolTip="Lieferant mit Sprinter fährt raus" ToolTipService.InitialShowDelay="1" Grid.Column="2" Grid.Row="3" Width="80" Height="30" Margin="0,0,0,-10" VerticalAlignment="Bottom" Padding="0,-10,0,0" Panel.ZIndex="100" Click="Ausfahrt_Click"/>
|
||||||
|
|
||||||
|
<Image x:Name="imgPKW" Source="/Resources/PKW.png" ToolTip="Lieferanten mit PKW im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="3" Grid.Row="1" Stretch="Fill" Width="70" Height="45"/>
|
||||||
|
<TextBlock x:Name="lblPKW" Text="Text" FontSize="16" ToolTip="Lieferanten mit PKW im Werk" ToolTipService.InitialShowDelay="1" Grid.Column="3" Grid.Row="2" Width="70" Height="20" Margin="0,0,0,0" TextAlignment="Center"/>
|
||||||
|
<Button x:Name="btnPKW" Content="Ausfahrt" ToolTip="Lieferant mit PKW fährt raus" ToolTipService.InitialShowDelay="1" Grid.Row="3" Grid.Column="3" Width="80" Height="30" Margin="0,0,0,-10" VerticalAlignment="Bottom" Padding="0,-10,0,0" Panel.ZIndex="100" Click="Ausfahrt_Click"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
<Grid x:Name="gridToday" Grid.Row="1" Visibility="Collapsed" VerticalAlignment="Stretch" MinHeight="100" Margin="0,5,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid x:Name="gridToday" Grid.Row="1" Visibility="Collapsed" VerticalAlignment="Stretch" MinHeight="100" Margin="0,5,0,0">
|
<TextBox x:Name="tbSearch" HorizontalAlignment="Left" Height="23" Margin="10,-15,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="180" Visibility="Collapsed" Padding="0,2,0,0" TextChanged="TextBox_TextChanged" PreviewGotKeyboardFocus="TbSearch_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="TbSearch_PreviewLostKeyboardFocus"/>
|
||||||
<!--<Grid.RowDefinitions>
|
<TextBlock x:Name="lblSearch" Text="Ankunft heute durchsuchen..." Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" IsHitTestVisible="False" Margin="12,-15,0,0" Padding="3" Visibility="Collapsed" HorizontalAlignment="Left" Width="180"/>
|
||||||
<RowDefinition/>
|
<Button x:Name="btnClearSearch" HorizontalAlignment="Left" Content="X" Padding="0" VerticalAlignment="Top" Margin="190,-15,0,0" Height="26" Width="14" Foreground="Red" Visibility="Collapsed" FontWeight="Bold" ToolTip="Suchfeld leeren" Click="btnClearSearch_Click"/>
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>-->
|
|
||||||
|
|
||||||
<TextBox x:Name="tbSearch" HorizontalAlignment="Left" Height="23" Margin="10,-15,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="180" Visibility="Collapsed" Padding="0,2,0,0" TextChanged="TextBox_TextChanged" PreviewGotKeyboardFocus="TbSearch_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="TbSearch_PreviewLostKeyboardFocus"/>
|
<TextBlock x:Name="lblAnkunftHeuteFirmen" Grid.Row="0" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Ankunft heute Firmen:" VerticalAlignment="Top" Margin="10,15,0,0"/>
|
||||||
<TextBlock x:Name="lblSearch" Text="Ankunft heute durchsuchen..." Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" IsHitTestVisible="False" Margin="12,-15,0,0" Padding="3" Visibility="Collapsed" HorizontalAlignment="Left" Width="180"/>
|
<TextBlock Grid.Column="1" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Ankunft heute Besucher und Werksführungen:" VerticalAlignment="Top" Margin="10,15,0,0"/>
|
||||||
<Button x:Name="btnClearSearch" HorizontalAlignment="Left" Content="X" Padding="0" VerticalAlignment="Top" Margin="190,-15,0,0" Height="26" Width="14" Foreground="Red" Visibility="Collapsed" FontWeight="Bold" ToolTip="Suchfeld leeren" Click="btnClearSearch_Click"/>
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="0" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Ankunft heute: (Firmen: Rot, Besucher: Grün, MA-Führung: Blau)" VerticalAlignment="Top" Margin="10,15,0,0"/>
|
<TextBlock x:Name="lblmcfit" Text="Aktuell verfügbare McFit Karten: " Grid.ColumnSpan="2" HorizontalAlignment="Right" Margin="0,0,100,0" Visibility="Collapsed"/>
|
||||||
|
<!--<Button x:Name="btnResetListsMain" Content="Listengröße zurücksetzen" Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Top" Width="150" Height="22" Click="btnResetLists_Click" Visibility="Visible"/>-->
|
||||||
|
|
||||||
<TextBlock x:Name="lblmcfit" Text="Aktuell verfügbare McFit Karten: " HorizontalAlignment="Right" Margin="0,5,405,0" Visibility="Collapsed"/>
|
<DataGrid Grid.Column="0" x:Name="dgToday" RowHeaderWidth="0" HorizontalGridLinesBrush="Gray" GridLinesVisibility="Horizontal" KeyboardNavigation.TabNavigation="None" ItemsSource="{Binding ., UpdateSourceTrigger=PropertyChanged}" CanUserAddRows="False" CanUserDeleteRows="False" AutoGenerateColumns="False" Margin="10,35,10,10" IsReadOnly="True">
|
||||||
<!--<Button x:Name="btnResetListsMain" Content="Listengröße zurücksetzen" Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Top" Width="150" Height="22" Click="btnResetLists_Click" Visibility="Visible"/>-->
|
<DataGrid.Resources>
|
||||||
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
|
<EventSetter Event="Control.MouseDoubleClick" Handler="DataGridRow_MouseDoubleClick"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.Resources>
|
||||||
|
<DataGrid.RowStyle>
|
||||||
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
|
<EventSetter Event="Control.MouseDoubleClick" Handler="DataGridRow_MouseDoubleClick"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding Name, Converter={StaticResource ConvertToBackground2}}" Value="1">
|
||||||
|
<Setter Property="Background" Value="#3000FF00"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding Name, Converter={StaticResource ConvertToBackground2}}" Value="0">
|
||||||
|
<Setter Property="Background" Value="#30FF0000"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding Name, Converter={StaticResource ConvertToBackground2}}" Value="2">
|
||||||
|
<Setter Property="Background" Value="#80095feb"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.RowStyle>
|
||||||
|
<DataGrid.Columns>
|
||||||
|
|
||||||
<DataGrid Grid.Row="0" x:Name="dgToday" RowHeaderWidth="0" HorizontalGridLinesBrush="Gray" GridLinesVisibility="Horizontal" KeyboardNavigation.TabNavigation="None" ItemsSource="{Binding ., UpdateSourceTrigger=PropertyChanged}" CanUserAddRows="False" CanUserDeleteRows="False" AutoGenerateColumns="False" Margin="10,35,10,10" IsReadOnly="True">
|
<DataGridTextColumn Header="Firma" Binding="{Binding Name}" Width="*" SortDirection="Ascending" IsReadOnly="True">
|
||||||
<DataGrid.Resources>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type DataGridRow}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<EventSetter Event="Control.MouseDoubleClick" Handler="DataGridRow_MouseDoubleClick"/>
|
<Setter Property="Margin" Value="4"/>
|
||||||
</Style>
|
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
||||||
</DataGrid.Resources>
|
</Style>
|
||||||
<DataGrid.RowStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type DataGridRow}">
|
</DataGridTextColumn>
|
||||||
<EventSetter Event="Control.MouseDoubleClick" Handler="DataGridRow_MouseDoubleClick"/>
|
<DataGridTextColumn Header="Ansprechpartner der Firma" Binding="{Binding Verantwortlicher_MA_Firma}" Width="*" IsReadOnly="True">
|
||||||
<Style.Triggers>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<DataTrigger Binding="{Binding Name, Converter={StaticResource ConvertToBackground2}}" Value="1">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="Background" Value="#3000FF00"/>
|
<Setter Property="Margin" Value="4"/>
|
||||||
</DataTrigger>
|
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
||||||
<DataTrigger Binding="{Binding Name, Converter={StaticResource ConvertToBackground2}}" Value="0">
|
</Style>
|
||||||
<Setter Property="Background" Value="#30FF0000"/>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataTrigger>
|
</DataGridTextColumn>
|
||||||
<DataTrigger Binding="{Binding Name, Converter={StaticResource ConvertToBackground2}}" Value="2">
|
<DataGridTextColumn Header="Tel. Ansprechpartner Firma" Binding="{Binding Tel_Nr_Verantwortlicher_Firma}" Width="*" IsReadOnly="True">
|
||||||
<Setter Property="Background" Value="#80095feb"/>
|
<DataGridTextColumn.ElementStyle>
|
||||||
</DataTrigger>
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
</Style.Triggers>
|
<Setter Property="Margin" Value="4"/>
|
||||||
</Style>
|
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
||||||
</DataGrid.RowStyle>
|
</Style>
|
||||||
<DataGrid.Columns>
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*" SortDirection="Ascending" IsReadOnly="True">
|
<DataGridTextColumn Header="Fremdfirmenkoordinator DB" Binding="{Binding Ansprechpartner_Intern}" Width="*" IsReadOnly="True">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="Margin" Value="4"/>
|
<Setter Property="Margin" Value="4"/>
|
||||||
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Header="Verantwortlicher Firma / Besucher" Binding="{Binding Verantwortlicher_MA_Firma}" Width="*" IsReadOnly="True">
|
<DataGridTemplateColumn Header="Asp-Info" IsReadOnly="True">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<DataTemplate>
|
||||||
<Setter Property="Margin" Value="4"/>
|
<Button x:Name="btnInfo" Click="BtnInfo_Click" Content="Info"/>
|
||||||
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
</DataTemplate>
|
||||||
</Style>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTemplateColumn>
|
||||||
</DataGridTextColumn>
|
<DataGridTextColumn Header="BE-Fläche" Binding="{Binding BE}" Width="*" IsReadOnly="True">
|
||||||
<DataGridTextColumn Header="Tel. Verantwortlicher Firma / Tel. Besucher" Binding="{Binding Tel_Nr_Verantwortlicher_Firma}" Width="*" IsReadOnly="True">
|
<DataGridTextColumn.ElementStyle>
|
||||||
<DataGridTextColumn.ElementStyle>
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Setter Property="Margin" Value="4"/>
|
||||||
<Setter Property="Margin" Value="4"/>
|
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
||||||
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
</Style>
|
||||||
</Style>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn>
|
||||||
</DataGridTextColumn>
|
<DataGridTemplateColumn MinWidth="0.1" MaxWidth="0.5" CanUserResize="False" CanUserSort="False" CanUserReorder="False"/>
|
||||||
<DataGridTextColumn Header="Ansprechpartner Intern" Binding="{Binding Ansprechpartner_Intern}" Width="*" IsReadOnly="True">
|
<DataGridTemplateColumn x:Name="columnFzg" Header="Fzg" IsReadOnly="True" Visibility="Collapsed" Width="30">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<DataTemplate>
|
||||||
<Setter Property="Margin" Value="4"/>
|
<TextBlock Text="{Binding Anzahl_Fzg}" FontSize="14" FontWeight="SemiBold" TextAlignment="Center" Padding="2"/>
|
||||||
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
</DataTemplate>
|
||||||
</Style>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTemplateColumn>
|
||||||
</DataGridTextColumn>
|
<DataGridTextColumn x:Name="columnBeginn" Binding="{Binding Arbeitsbeginn, StringFormat=\{0:dd.MM.yy\}}" Header="A.Beginn" IsReadOnly="True" Visibility="Collapsed" Width="90" CanUserSort="True">
|
||||||
<DataGridTextColumn Header="BE-Fläche" Binding="{Binding BE}" Width="*" IsReadOnly="True">
|
<DataGridTextColumn.ElementStyle>
|
||||||
<DataGridTextColumn.ElementStyle>
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
<Setter Property="Margin" Value="4"/>
|
</Style>
|
||||||
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</Style>
|
<!--<DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTemplateColumn Header="Asp-Info" IsReadOnly="True">
|
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Button x:Name="btnInfo" Click="BtnInfo_Click" Content="Info"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
|
||||||
</DataGridTemplateColumn>
|
|
||||||
<DataGridTemplateColumn MinWidth="0.1" MaxWidth="0.5" CanUserResize="False" CanUserSort="False" CanUserReorder="False"/>
|
|
||||||
<DataGridTemplateColumn x:Name="columnFzg" Header="Fzg" IsReadOnly="True" Visibility="Collapsed" Width="30">
|
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Anzahl_Fzg}" FontSize="14" FontWeight="SemiBold" TextAlignment="Center" Padding="2"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
|
||||||
</DataGridTemplateColumn>
|
|
||||||
<DataGridTextColumn x:Name="columnBeginn" Binding="{Binding Arbeitsbeginn, StringFormat=\{0:dd.MM.yy\}}" Header="A.Beginn" IsReadOnly="True" Visibility="Collapsed" Width="90" CanUserSort="True">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
|
||||||
<Setter Property="TextAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
<!--<DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Arbeitsbeginn, StringFormat=\{0:dd.MM.yy\}}" FontSize="14" TextAlignment="Center" Padding="2"/>
|
<TextBlock Text="{Binding Arbeitsbeginn, StringFormat=\{0:dd.MM.yy\}}" FontSize="14" TextAlignment="Center" Padding="2"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>-->
|
</DataGridTemplateColumn.CellTemplate>-->
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn x:Name="columnEnde" Binding="{Binding Arbeitsende, StringFormat=\{0:dd.MM.yy\}}" Header="A.Ende" IsReadOnly="True" Visibility="Collapsed" Width="90" CanUserSort="True">
|
<DataGridTextColumn x:Name="columnEnde" Binding="{Binding Arbeitsende, StringFormat=\{0:dd.MM.yy\}}" Header="A.Ende" IsReadOnly="True" Visibility="Collapsed" Width="90" CanUserSort="True">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="TextAlignment" Value="Center"/>
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
<!--<DataGridTemplateColumn.CellTemplate>
|
<!--<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Arbeitsende, StringFormat=\{0:dd.MM.yy\}}" FontSize="14" TextAlignment="Center" Padding="2"/>
|
<TextBlock Text="{Binding Arbeitsende, StringFormat=\{0:dd.MM.yy\}}" FontSize="14" TextAlignment="Center" Padding="2"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>-->
|
</DataGridTemplateColumn.CellTemplate>-->
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
</Grid>
|
|
||||||
|
|
||||||
|
<Line x:Name="lineVertical" Grid.Column="1" Stroke="LightGray" StrokeThickness="5" Y1="0" Y2="4000" Margin="0,50,0,0"/>
|
||||||
|
|
||||||
|
<DataGrid Grid.Column="1" x:Name="dgTodayBesucher" RowHeaderWidth="0" HorizontalGridLinesBrush="Gray" GridLinesVisibility="Horizontal" KeyboardNavigation.TabNavigation="None" ItemsSource="{Binding ., UpdateSourceTrigger=PropertyChanged}" CanUserAddRows="False" CanUserDeleteRows="False" AutoGenerateColumns="False" Margin="10,35,10,10" IsReadOnly="True">
|
||||||
|
<DataGrid.Resources>
|
||||||
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
|
<EventSetter Event="Control.MouseDoubleClick" Handler="DataGridRow_MouseDoubleClick"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.Resources>
|
||||||
|
<DataGrid.RowStyle>
|
||||||
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
|
<EventSetter Event="Control.MouseDoubleClick" Handler="DataGridRow_MouseDoubleClick"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding Name, Converter={StaticResource ConvertToBackground2}}" Value="1">
|
||||||
|
<Setter Property="Background" Value="#3000FF00"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding Name, Converter={StaticResource ConvertToBackground2}}" Value="0">
|
||||||
|
<Setter Property="Background" Value="#30FF0000"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding Name, Converter={StaticResource ConvertToBackground2}}" Value="2">
|
||||||
|
<Setter Property="Background" Value="#80095feb"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.RowStyle>
|
||||||
|
<DataGrid.Columns>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="Besuchergruppe" Binding="{Binding Name}" Width="*" SortDirection="Ascending" IsReadOnly="True">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Margin" Value="4"/>
|
||||||
|
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="Asp. der Besuchergruppe" Binding="{Binding Verantwortlicher_MA_Firma}" Width="*" IsReadOnly="True">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Margin" Value="4"/>
|
||||||
|
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="Tel. Besucher" Binding="{Binding Tel_Nr_Verantwortlicher_Firma}" Width="0.7*" IsReadOnly="True">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Margin" Value="4"/>
|
||||||
|
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="Asp. DB Intern" Binding="{Binding Ansprechpartner_Intern}" Width="*" IsReadOnly="True">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Margin" Value="4"/>
|
||||||
|
<Setter Property="ToolTip" Value="{Binding NoToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}, Converter={StaticResource ReturnToolTip}}"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTemplateColumn Header="Asp-Info" IsReadOnly="True">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button x:Name="btnInfo" Click="BtnInfo_Click" Content="Info"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn MinWidth="0.1" MaxWidth="0.5" CanUserResize="False" CanUserSort="False" CanUserReorder="False"/>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
<TextBox x:Name="tbSearchArrived" Grid.Row="2" Width="180" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,-3,0,-20" Visibility="Collapsed" TextChanged="tbSearchArrived_TextChanged" PreviewGotKeyboardFocus="tbSearchArrived_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="tbSearchArrived_PreviewLostKeyboardFocus"/>
|
<TextBox x:Name="tbSearchArrived" Grid.Row="2" Width="180" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,-3,0,-20" Visibility="Collapsed" TextChanged="tbSearchArrived_TextChanged" PreviewGotKeyboardFocus="tbSearchArrived_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="tbSearchArrived_PreviewLostKeyboardFocus"/>
|
||||||
<TextBlock x:Name="lblSearchArrived" Text="Bereits bestätigt durchsuchen..." Grid.Row="2" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" IsHitTestVisible="False" Margin="11,-1,0,-20" Padding="3" Visibility="Collapsed" HorizontalAlignment="Left" Width="180"/>
|
<TextBlock x:Name="lblSearchArrived" Text="Bereits bestätigt durchsuchen..." Grid.Row="2" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" IsHitTestVisible="False" Margin="11,-1,0,-20" Padding="3" Visibility="Collapsed" HorizontalAlignment="Left" Width="180"/>
|
||||||
@ -617,7 +805,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid x:Name="UserCreate" Visibility="Collapsed" Grid.RowSpan="3">
|
<Grid x:Name="UserCreate" Visibility="Collapsed" Grid.RowSpan="3">
|
||||||
<Button x:Name="btnUserCreate" Content="Besucher erstellen" Click="btnUserCreate_Click" Margin="0" Width="500" Height="70" FontSize="20" Padding="5" Background="#FF85F7A4" BorderBrush="#FFCDCDCD" Foreground="Blue" FontWeight="Bold">
|
<!--<Button x:Name="btnUserCreate" Content="Besucher erstellen" Click="btnUserCreate_Click" Margin="0" Width="500" Height="70" FontSize="20" Padding="5" Background="#FF85F7A4" BorderBrush="#FFCDCDCD" Foreground="Blue" FontWeight="Bold">
|
||||||
<Button.Template>
|
<Button.Template>
|
||||||
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
||||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="10" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="10" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
@ -647,7 +835,7 @@
|
|||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Button.Template>
|
</Button.Template>
|
||||||
</Button>
|
</Button>-->
|
||||||
<Button x:Name="btnCreatePark" Content="Parkausweis beantragen" Click="btnCreateParkausweis_Click" Margin="100, 100, 100, 250" Width="500" Height="70" FontSize="20" Background="#FF85F7A4" BorderBrush="#FFCDCDCD" Foreground="Blue" FontWeight="Bold">
|
<Button x:Name="btnCreatePark" Content="Parkausweis beantragen" Click="btnCreateParkausweis_Click" Margin="100, 100, 100, 250" Width="500" Height="70" FontSize="20" Background="#FF85F7A4" BorderBrush="#FFCDCDCD" Foreground="Blue" FontWeight="Bold">
|
||||||
<Button.Template>
|
<Button.Template>
|
||||||
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
||||||
@ -750,7 +938,7 @@
|
|||||||
<Border BorderBrush="Gray" BorderThickness="2" Width="400" Height="364"/>
|
<Border BorderBrush="Gray" BorderThickness="2" Width="400" Height="364"/>
|
||||||
<TextBlock Canvas.Left="10" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Canvas.Top="10" Height="81" Width="380" TextAlignment="Center"><Run FontWeight="Bold" Text="Hilfe" TextDecorations="Underline"/><LineBreak/><Run/><LineBreak/><Run/><LineBreak/><Run Text="Bei Problemen bitte an Marcus Bachler wenden."/><LineBreak/><Run/><LineBreak/><Run/></TextBlock>
|
<TextBlock Canvas.Left="10" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Canvas.Top="10" Height="81" Width="380" TextAlignment="Center"><Run FontWeight="Bold" Text="Hilfe" TextDecorations="Underline"/><LineBreak/><Run/><LineBreak/><Run/><LineBreak/><Run Text="Bei Problemen bitte an Marcus Bachler wenden."/><LineBreak/><Run/><LineBreak/><Run/></TextBlock>
|
||||||
<TextBlock Canvas.Left="10" TextWrapping="Wrap" Text="marcus.bachler@deutschebahn.com" Canvas.Top="91" Width="380" TextDecorations="Underline" Foreground="#FF002AE6" TextAlignment="Center" Cursor="Hand" PreviewMouseLeftButtonUp="TextBlock_PreviewMouseLeftButtonUp"/>
|
<TextBlock Canvas.Left="10" TextWrapping="Wrap" Text="marcus.bachler@deutschebahn.com" Canvas.Top="91" Width="380" TextDecorations="Underline" Foreground="#FF002AE6" TextAlignment="Center" Cursor="Hand" PreviewMouseLeftButtonUp="TextBlock_PreviewMouseLeftButtonUp"/>
|
||||||
<TextBlock Canvas.Left="10" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Canvas.Top="130" Height="150" Width="380" TextAlignment="Center"><Run Text="ZKuP"/><LineBreak/><Run x:Name="lblVersion" Text="Version 4.4.9.0"/><LineBreak/><Run/><LineBreak/><Run FontSize="12" FontFamily="Segoe UI"/><LineBreak/><Run FontSize="12" FontFamily="Segoe UI" Text="© Marcus Bachler"/></TextBlock>
|
<TextBlock Canvas.Left="10" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Canvas.Top="130" Height="150" Width="380" TextAlignment="Center"><Run Text="ZKuP"/><LineBreak/><Run x:Name="lblVersion" Text="Version 4.5.0.3"/><LineBreak/><Run/><LineBreak/><Run FontSize="12" FontFamily="Segoe UI"/><LineBreak/><Run FontSize="12" FontFamily="Segoe UI" Text="© Marcus Bachler"/></TextBlock>
|
||||||
<Button x:Name="btnCloseHelp" Content="Schließen" Canvas.Left="10" Canvas.Top="325" Width="380" Height="29" Click="BtnCloseHelp_Click"/>
|
<Button x:Name="btnCloseHelp" Content="Schließen" Canvas.Left="10" Canvas.Top="325" Width="380" Height="29" Click="BtnCloseHelp_Click"/>
|
||||||
<Button x:Name="btnDebug" Content="Schließen" Canvas.Left="10" Canvas.Top="300" Width="380" Height="29" Click="btnDebug_Click" Visibility="Collapsed"/>
|
<Button x:Name="btnDebug" Content="Schließen" Canvas.Left="10" Canvas.Top="300" Width="380" Height="29" Click="btnDebug_Click" Visibility="Collapsed"/>
|
||||||
<TextBlock Text="Falls Fenster mal nicht mehr sichtbar oder außerhalb
des Bildschirms sein sollte mit Strg+R zurücksetzen" TextAlignment="Center" Foreground="Red" FontWeight="Bold" Canvas.Left="10" Canvas.Top="223" Width="380" Height="40"/>
|
<TextBlock Text="Falls Fenster mal nicht mehr sichtbar oder außerhalb
des Bildschirms sein sollte mit Strg+R zurücksetzen" TextAlignment="Center" Foreground="Red" FontWeight="Bold" Canvas.Left="10" Canvas.Top="223" Width="380" Height="40"/>
|
||||||
@ -801,5 +989,8 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<Image Source="/Resources/ConnBackground.png" Width="50" Height="30" Margin="0,-25,200,0" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="2" Stretch="Uniform"/>
|
||||||
|
<Image x:Name="imgConnection" Source="/Resources/Disconnected.png" Width="50" Height="30" Margin="0,-25,200,0" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="2" Stretch="Uniform"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</mah:MetroWindow>
|
</mah:MetroWindow>
|
||||||
|
|||||||
@ -40,7 +40,7 @@ namespace ZKuP
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
|
||||||
asp = SQL.ReadSQL("SELECT * FROM zkup.ansprechpartner", asp).Result;
|
asp = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.ansprechpartner", asp).Result;
|
||||||
aspView = Asp.DataTableToAsp(asp);
|
aspView = Asp.DataTableToAsp(asp);
|
||||||
dgAsp.DataContext = asp;
|
dgAsp.DataContext = asp;
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ namespace ZKuP
|
|||||||
tbVertreterTel.Text = "";
|
tbVertreterTel.Text = "";
|
||||||
tbVorgesetzterTel.Text = "";
|
tbVorgesetzterTel.Text = "";
|
||||||
|
|
||||||
asp = SQL.ReadSQL("SELECT * FROM zkup.ansprechpartner", asp).Result;
|
asp = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.ansprechpartner", asp).Result;
|
||||||
aspView = Asp.DataTableToAsp(asp);
|
aspView = Asp.DataTableToAsp(asp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,9 +83,9 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (e.Key == Key.Delete)
|
if (e.Key == Key.Delete)
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.ansprechpartner WHERE `Name` = '{arr[0]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.ansprechpartner WHERE `Name` = '{arr[0]}'");
|
||||||
|
|
||||||
asp = SQL.ReadSQL("Select * from zkup.ansprechpartner", asp).Result;
|
asp = SQL.ReadSQL($"Select * from {MainWindow.table}.ansprechpartner", asp).Result;
|
||||||
aspView = Asp.DataTableToAsp(asp);
|
aspView = Asp.DataTableToAsp(asp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ namespace ZKuP
|
|||||||
dgAsp.RowValidationErrorTemplate = new ControlTemplate();
|
dgAsp.RowValidationErrorTemplate = new ControlTemplate();
|
||||||
dgAsp.PreviewKeyDown += DgAsp_PreviewKeyDown;
|
dgAsp.PreviewKeyDown += DgAsp_PreviewKeyDown;
|
||||||
|
|
||||||
asp = SQL.ReadSQL("Select * from zkup.ansprechpartner", asp).Result;
|
asp = SQL.ReadSQL($"Select * from {MainWindow.table}.ansprechpartner", asp).Result;
|
||||||
aspView = Asp.DataTableToAsp(asp);
|
aspView = Asp.DataTableToAsp(asp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
lieferanten = SQL.ReadSQL("Select * from zkup.lieferanten", lieferanten).Result;
|
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
dgLieferanten.DataContext = lieferanten;
|
dgLieferanten.DataContext = lieferanten;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
await SQL.WriteSQL($"INSERT INTO lieferanten (Firma, Fahrer, Handynr, Kennzeichen) VALUES ('{tbFirma.Text}','{tbFahrer.Text}','{tbHandynr.Text}','{tbKennzeichen.Text}')");
|
await SQL.WriteSQL($"INSERT INTO lieferanten (Firma, Fahrer, Handynr, Kennzeichen) VALUES ('{tbFirma.Text}','{tbFahrer.Text}','{tbHandynr.Text}','{tbKennzeichen.Text}')");
|
||||||
|
|
||||||
lieferanten = SQL.ReadSQL("Select * from zkup.lieferanten", lieferanten).Result;
|
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
dgLieferanten.ScrollIntoView(dgLieferanten.Items[dgLieferanten.Items.Count - 1]); //scroll to last
|
dgLieferanten.ScrollIntoView(dgLieferanten.Items[dgLieferanten.Items.Count - 1]); //scroll to last
|
||||||
dgLieferanten.UpdateLayout();
|
dgLieferanten.UpdateLayout();
|
||||||
@ -107,7 +107,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
dgLieferanten.PreviewKeyDown += DgLieferanten_PreviewKeyDown;
|
dgLieferanten.PreviewKeyDown += DgLieferanten_PreviewKeyDown;
|
||||||
|
|
||||||
lieferanten = await SQL.ReadSQL("Select * from zkup.lieferanten", lieferanten);
|
lieferanten = await SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten);
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,9 +120,9 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (e.Key == Key.Delete)
|
if (e.Key == Key.Delete)
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.lieferanten WHERE `ID` = '{arr[4]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.lieferanten WHERE `ID` = '{arr[4]}'");
|
||||||
|
|
||||||
lieferanten = SQL.ReadSQL("Select * from zkup.lieferanten", lieferanten).Result;
|
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -141,9 +141,9 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (MessageBox.Show(this, $"Markierten Lieferanten wirklich entfernen?", "Lieferanten entfernen?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
if (MessageBox.Show(this, $"Markierten Lieferanten wirklich entfernen?", "Lieferanten entfernen?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.lieferanten WHERE `ID` = '{arr[4]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.lieferanten WHERE `ID` = '{arr[4]}'");
|
||||||
|
|
||||||
lieferanten = SQL.ReadSQL("Select * from zkup.lieferanten", lieferanten).Result;
|
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,16 +47,16 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</DataGridCheckBoxColumn.CellStyle>
|
</DataGridCheckBoxColumn.CellStyle>
|
||||||
</DataGridCheckBoxColumn>
|
</DataGridCheckBoxColumn>
|
||||||
<DataGridCheckBoxColumn Binding="{Binding Schicht}" ClipboardContentBinding="{x:Null}" Header="Schicht" IsReadOnly="False" Width="72">
|
<DataGridCheckBoxColumn Binding="{Binding Schicht}" ClipboardContentBinding="{x:Null}" Header="Schicht" IsReadOnly="False" MaxWidth="0">
|
||||||
<DataGridCheckBoxColumn.CellStyle>
|
<DataGridCheckBoxColumn.CellStyle>
|
||||||
<Style>
|
<Style>
|
||||||
<EventSetter Event="CheckBox.PreviewMouseLeftButtonDown" Handler="OnChecked"/>
|
<EventSetter Event="CheckBox.PreviewMouseLeftButtonDown" Handler="OnChecked"/>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGridCheckBoxColumn.CellStyle>
|
</DataGridCheckBoxColumn.CellStyle>
|
||||||
</DataGridCheckBoxColumn>
|
</DataGridCheckBoxColumn>
|
||||||
|
<DataGridCheckBoxColumn Binding="{Binding isKrad}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Fzg.-Typ" IsReadOnly="True" Width="80"/>
|
||||||
<DataGridTextColumn Binding="{Binding Bemerkung}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Bemerkung" IsReadOnly="True" Width="124"/>
|
<DataGridTextColumn Binding="{Binding Bemerkung}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Bemerkung" IsReadOnly="True" Width="124"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
|
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -24,7 +24,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
var list = SQL.ReadSQL($"SELECT * FROM zkup.parkausweise").Result;
|
var list = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.parkausweise").Result;
|
||||||
dgManage.DataContext = list;
|
dgManage.DataContext = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,9 +37,9 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (e.Key == Key.Delete)
|
if (e.Key == Key.Delete)
|
||||||
{
|
{
|
||||||
await SQL.WriteSQL($"DELETE FROM zkup.parkausweise WHERE `idparkausweise` = '{arr[0]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.parkausweise WHERE `idparkausweise` = '{arr[0]}'");
|
||||||
|
|
||||||
var list = SQL.ReadSQL($"SELECT * FROM zkup.parkausweise").Result;
|
var list = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.parkausweise").Result;
|
||||||
dgManage.DataContext = list;
|
dgManage.DataContext = list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,11 +52,11 @@ namespace ZKuP
|
|||||||
if (!((sender as DataGridCell).Content as CheckBox).IsChecked.Value)
|
if (!((sender as DataGridCell).Content as CheckBox).IsChecked.Value)
|
||||||
{
|
{
|
||||||
if (myDRV != null)
|
if (myDRV != null)
|
||||||
await SQL.WriteSQL($"UPDATE zkup.parkausweise SET `{columnToSet}` = '1' WHERE `idparkausweise` = '{myDRV.Row.ItemArray[0]}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.parkausweise SET `{columnToSet}` = '1' WHERE `idparkausweise` = '{myDRV.Row.ItemArray[0]}'");
|
||||||
}
|
}
|
||||||
else if (((sender as DataGridCell).Content as CheckBox).IsChecked.Value)
|
else if (((sender as DataGridCell).Content as CheckBox).IsChecked.Value)
|
||||||
if (myDRV != null)
|
if (myDRV != null)
|
||||||
await SQL.WriteSQL($"UPDATE zkup.parkausweise SET `{columnToSet}` = '0' WHERE `idparkausweise` = '{myDRV.Row.ItemArray[0]}'");
|
await SQL.WriteSQL($"UPDATE {MainWindow.table}.parkausweise SET `{columnToSet}` = '0' WHERE `idparkausweise` = '{myDRV.Row.ItemArray[0]}'");
|
||||||
|
|
||||||
|
|
||||||
//await Task.Run(() => QueryProjekte());
|
//await Task.Run(() => QueryProjekte());
|
||||||
|
|||||||