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"/>
|
||||
<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"/>
|
||||
<ComboBox x:Name="cbColor" Margin="10,0,10,10" Grid.Row="1" Height="22" VerticalAlignment="Bottom">
|
||||
<ComboBoxItem Content="Grün"/>
|
||||
<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"/>
|
||||
<ComboBox x:Name="cbColor" Margin="10,0,10,10" Grid.Row="1" Height="22" VerticalAlignment="Bottom" SelectedIndex="0"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -19,16 +20,35 @@ namespace ZKuP
|
||||
/// </summary>
|
||||
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();
|
||||
|
||||
this.Title = "Karten ausgeben - " + nr;
|
||||
|
||||
//cbColor.ItemsSource = isBesucher ? comboListNurRot : comboList;
|
||||
cbColor.ItemsSource = comboListNurRot;
|
||||
|
||||
if (!user.Contains("["))
|
||||
{
|
||||
tbUser.Text = user;
|
||||
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)
|
||||
{
|
||||
@ -37,7 +57,7 @@ namespace ZKuP
|
||||
else
|
||||
{
|
||||
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;
|
||||
tbNummer.Focus();
|
||||
}
|
||||
@ -50,19 +70,31 @@ namespace ZKuP
|
||||
else if (cbColor.SelectedIndex == -1)
|
||||
MessageBox.Show(this, "Kartenfarbe auswählen!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
else if (tbUser.Text == "")
|
||||
MessageBox.Show(this, "Firma / Benutzer angeben!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
else if (tbTelnr.Text == "")
|
||||
MessageBox.Show(this, "Benutzer angeben!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
else if (_needTel && tbTelnr.Text == "")
|
||||
MessageBox.Show(this, "Telefonnummer angeben!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
else
|
||||
{
|
||||
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);
|
||||
|
||||
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();
|
||||
this.Close();
|
||||
}
|
||||
else MessageBox.Show("Unterschrift nicht gefunden\nVorgang bitte wiederholen");
|
||||
}
|
||||
|
||||
}
|
||||
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: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"
|
||||
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" x:Class="ZKuP.Arrivals"
|
||||
mc:Ignorable="d"
|
||||
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 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"/>
|
||||
</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.RenderTransform>
|
||||
<TransformGroup>
|
||||
@ -26,22 +27,70 @@
|
||||
</Grid>
|
||||
|
||||
<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"/>
|
||||
<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"/>
|
||||
<TextBox x:Name="tbVerantwortlPerson" Height="23" Margin="45,83,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="1"/>
|
||||
<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>
|
||||
<RowDefinition/>
|
||||
<RowDefinition x:Name="GParkTop" Height="480"/>
|
||||
</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="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,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"/>
|
||||
<TextBlock x:Name="lblAngemeldeteFzg" Margin="290,171,46,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#CCFF0000" Padding="0,0,5,0" TextAlignment="Right"/>
|
||||
<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"/>
|
||||
<!--<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"/>-->
|
||||
|
||||
<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 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"/>-->
|
||||
<StackPanel x:Name="spKennzeichen" Margin="45,192,46,557"/>
|
||||
<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">
|
||||
<StackPanel x:Name="spKennzeichen" Margin="45,200,46,0" Grid.Row="0"/>
|
||||
|
||||
|
||||
<Grid Margin="10,0,10,35" Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition x:Name="GParkRow" Height="0*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<Grid x:Name="gridBesucherPark" Visibility="Collapsed" Grid.Row="1">
|
||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Gästeparkplatz zuweisen:" VerticalAlignment="Top" Width="170"/>
|
||||
<Grid x:Name="BesuchP" Margin="0, 25, 0, 0" HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||
<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"/>
|
||||
@ -59,31 +108,61 @@
|
||||
</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>
|
||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="28,230,0,0" TextWrapping="Wrap" Text="Anmeldung:" VerticalAlignment="Top" Width="190"/>
|
||||
<TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="28,330,0,0" TextWrapping="Wrap" Text="Einweisung:" VerticalAlignment="Top" Width="190"/>
|
||||
</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>
|
||||
<!--<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"/>
|
||||
<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_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"/>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</Window>
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
using System;
|
||||
using MahApps.Metro.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
@ -36,6 +39,7 @@ namespace ZKuP
|
||||
|
||||
int fzgCount = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@ -52,11 +56,33 @@ namespace ZKuP
|
||||
selectedID = id == -1 ? name : id.ToString();
|
||||
isBesucher = IsBesucher;
|
||||
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()
|
||||
{
|
||||
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();
|
||||
|
||||
NamesList.Add(0, "Firmen:");
|
||||
@ -72,7 +98,7 @@ namespace ZKuP
|
||||
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();
|
||||
|
||||
NamesList.Add(999994, "Besucher:");
|
||||
@ -89,7 +115,7 @@ namespace ZKuP
|
||||
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();
|
||||
|
||||
NamesList.Add(999999, "Führung:");
|
||||
@ -127,19 +153,19 @@ namespace ZKuP
|
||||
|
||||
if (isBesucher == 0)
|
||||
{
|
||||
tbVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Verantwortlicher_MA_Firma FROM zkup.firmen WHERE `idFirmen` = '{selectedID}' LIMIT 1");
|
||||
tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Tel_Nr_Verantwortlicher_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 {MainWindow.table}.firmen WHERE `idFirmen` = '{selectedID}' LIMIT 1");
|
||||
}
|
||||
else if (isBesucher == 1)
|
||||
{
|
||||
tbVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Name FROM zkup.besucher WHERE `idbesucher` = '{selectedID}' LIMIT 1");
|
||||
tbNrVerantwortlPerson.Text = await SQL.ReadSingleValueAsync($"SELECT Tel_Nr_Besucher 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 {MainWindow.table}.besucher WHERE `idbesucher` = '{selectedID}' LIMIT 1");
|
||||
}
|
||||
else if (isBesucher == 2)
|
||||
{
|
||||
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");
|
||||
tbAnzahlPersonen.Text = await SQL.ReadSingleValueAsync($"SELECT AnzBegleiter 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 {MainWindow.table}.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
||||
}
|
||||
}
|
||||
//else if (isBesucher == 2)
|
||||
@ -152,8 +178,8 @@ namespace ZKuP
|
||||
// //cbName.SelectedItem = cbName.Items.IndexOf(cbName.ItemsSource as )
|
||||
// //cbName.SelectedValue = 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");
|
||||
// tbAnzahlPersonen.Text = await SQL.ReadSingleValueAsync($"SELECT AnzBegleiter 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 {MainWindow.table}.family WHERE `Name` = '{Name}' AND `Date` = '{DateTime.Now.Date.ToString("yyyy-MM-dd")}' LIMIT 1");
|
||||
//}
|
||||
else
|
||||
{
|
||||
@ -169,15 +195,53 @@ namespace ZKuP
|
||||
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)
|
||||
{
|
||||
var zutritt = "";
|
||||
string kat = "1";
|
||||
|
||||
var einweis = "";
|
||||
var kl_einweis = "";
|
||||
string kat = "1";
|
||||
string asp = "";
|
||||
string anzFzg = "";
|
||||
int klUnterweis = 0;
|
||||
@ -187,17 +251,17 @@ namespace ZKuP
|
||||
|
||||
if (cbName.SelectedIndex < firmenCount)
|
||||
{
|
||||
table = await SQL.ReadSQL("Select * FROM zkup.firmen");
|
||||
table = await SQL.ReadSQL($"Select * FROM {MainWindow.table}.firmen");
|
||||
kat = "1";
|
||||
}
|
||||
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";
|
||||
}
|
||||
else
|
||||
{
|
||||
table = await SQL.ReadSQL("Select * FROM zkup.besucher");
|
||||
table = await SQL.ReadSQL($"Select * FROM {MainWindow.table}.besucher");
|
||||
kat = "2";
|
||||
}
|
||||
|
||||
@ -291,6 +355,7 @@ namespace ZKuP
|
||||
|
||||
if (kat == "2")
|
||||
{
|
||||
|
||||
if (DateTime.TryParse(row.ItemArray[5].ToString(), out beginnDT))
|
||||
{
|
||||
if (DateTime.Now.Date == beginnDT)
|
||||
@ -421,7 +486,12 @@ namespace ZKuP
|
||||
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";
|
||||
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";
|
||||
}
|
||||
else
|
||||
@ -527,7 +597,7 @@ namespace ZKuP
|
||||
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)
|
||||
{
|
||||
string kat = "1";
|
||||
@ -559,12 +676,12 @@ namespace ZKuP
|
||||
//if (cbName.SelectedIndex < firmenCount)
|
||||
//{
|
||||
// //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
|
||||
//{
|
||||
// //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;
|
||||
@ -593,9 +710,9 @@ namespace ZKuP
|
||||
else { btnSignature.IsEnabled = true; btnSignature.Content = "Unterschrift einholen!"; }
|
||||
|
||||
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
|
||||
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,10 +728,39 @@ namespace ZKuP
|
||||
|
||||
private void btnKarte_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
AddCardUser aI = new AddCardUser(cbName.SelectedItem.ToString());
|
||||
if (!string.IsNullOrWhiteSpace(tbAnzahlPersonen.Text))
|
||||
{
|
||||
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)
|
||||
{
|
||||
@ -658,6 +804,12 @@ namespace ZKuP
|
||||
|
||||
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]"))
|
||||
{
|
||||
e.Handled = true;
|
||||
@ -668,5 +820,15 @@ namespace ZKuP
|
||||
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>
|
||||
</DataGrid.Columns>
|
||||
</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>
|
||||
<Style TargetType="DatePickerTextBox">
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
@ -94,7 +94,7 @@
|
||||
</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="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>
|
||||
<Style TargetType="DatePickerTextBox">
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
|
||||
@ -42,20 +42,20 @@ namespace ZKuP
|
||||
|
||||
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);
|
||||
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);
|
||||
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 {MainWindow.table}.besucher WHERE (Besuchstag >= '{von.ToString("yyyy-MM-dd")}' AND Besuchstag <= '{bis.ToString("yyyy-MM-dd")}')", todayBesuch);
|
||||
}
|
||||
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 = '{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);
|
||||
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 = '{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);
|
||||
}
|
||||
|
||||
|
||||
@ -59,11 +59,11 @@ namespace ZKuP
|
||||
string aspName = "";
|
||||
|
||||
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
|
||||
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)
|
||||
{
|
||||
@ -75,7 +75,7 @@ namespace ZKuP
|
||||
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;
|
||||
}
|
||||
@ -105,7 +105,7 @@ namespace ZKuP
|
||||
lblTelAsp.Text = "Telefonnummer Fahrer:";
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
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 1 (ICE-West/Containerburg)"/>
|
||||
<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 5 (Stellwerk)"/>
|
||||
<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 9 (Kantine)"/>
|
||||
<ComboBoxItem Content="BE-Fläche 10 (Gebäude G)"/>
|
||||
<ComboBoxItem Content="BE-Fläche 11 (Gaslager)"/>
|
||||
<ComboBoxItem Content="BE-Fläche 12 (Feuerwehrzufahrt Süd)"/>
|
||||
<ComboBoxItem Content="BE-Fläche 13 (Feuerwehrzufahrt Süd)"/>
|
||||
</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"/>
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ namespace ZKuP
|
||||
private void cbBE_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
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)
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<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"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
@ -184,7 +184,7 @@
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<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"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
@ -236,7 +236,7 @@
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<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"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
@ -258,7 +258,7 @@
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<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"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
@ -303,7 +303,7 @@
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<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"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
@ -319,7 +319,7 @@
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<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"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
@ -29,7 +29,7 @@ namespace ZKuP
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ namespace ZKuP
|
||||
|
||||
//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++)
|
||||
{
|
||||
@ -136,39 +136,39 @@ namespace ZKuP
|
||||
{
|
||||
case "B1 Projekt":
|
||||
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
|
||||
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;
|
||||
case "B1 Projektleiter":
|
||||
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
|
||||
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;
|
||||
case "B2 Projekt":
|
||||
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
|
||||
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;
|
||||
case "B2 Projektleiter":
|
||||
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
|
||||
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;
|
||||
case "B3 Projekt":
|
||||
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
|
||||
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;
|
||||
case "B3 Projektleiter":
|
||||
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
|
||||
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;
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ namespace ZKuP
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||
<TextBox Width="150" Height="45" TextWrapping="Wrap" LostKeyboardFocus="TextBox_LostKeyboardFocus" IsEnabled="False"/>
|
||||
</StackPanel>
|
||||
<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="ICE (West)" Width="120" Padding="0,8" Height="45" 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)" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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="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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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"/>
|
||||
<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"/>
|
||||
<TextBox Width="180" 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()
|
||||
{
|
||||
belegung = await SQL.ReadSQL($"SELECT * FROM zkup.`be-belegung`", belegung);
|
||||
belegung = await SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.`be-belegung`", belegung);
|
||||
|
||||
FillRows();
|
||||
DisableFields();
|
||||
@ -89,7 +89,7 @@ namespace ZKuP
|
||||
{
|
||||
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++)
|
||||
{
|
||||
@ -152,9 +152,9 @@ namespace ZKuP
|
||||
ProjektOderLeiter = boxOneTwo == 1 ? "Projekt" : "Projektleiter";
|
||||
|
||||
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
|
||||
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)
|
||||
@ -242,7 +242,7 @@ namespace ZKuP
|
||||
|
||||
if (hasChanged)
|
||||
{
|
||||
belegung = SQL.ReadSQL($"SELECT * FROM zkup.`be-belegung`", belegung).Result;
|
||||
belegung = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.`be-belegung`", belegung).Result;
|
||||
|
||||
FillRows();
|
||||
DisableFields();
|
||||
|
||||
104
ZKuP/Cards.xaml
@ -5,30 +5,110 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ZKuP"
|
||||
mc:Ignorable="d"
|
||||
Title="Karten" Height="530" Width="943.5" ResizeMode="NoResize">
|
||||
Title="Karten" Height="530" Width="943.5">
|
||||
<Grid>
|
||||
<TabControl>
|
||||
<TabItem Header="Grün/Rot Karten" Margin="6,0,-6,0" Width="460" HorizontalAlignment="Left" Padding="0" Background="#252F3B">
|
||||
<Grid>
|
||||
<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>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition/>
|
||||
</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>
|
||||
<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 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 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>
|
||||
<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="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 x:Name="btnAdd" Grid.Row="0" Grid.Column="0" Margin="0,10,10,0" VerticalAlignment="Stretch" Click="btnAdd_Click" HorizontalAlignment="Stretch">
|
||||
<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>
|
||||
</TabItem>
|
||||
|
||||
|
||||
|
||||
<TabItem Margin="0,0,0,0" HorizontalAlignment="Right" Width="460" Background="#252F3B">
|
||||
<TabItem.Header>
|
||||
<Image Source="/Resources/mcfit.png" Height="39" Width="265"/>
|
||||
</TabItem.Header>
|
||||
<TabItem>
|
||||
<Grid>
|
||||
|
||||
<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.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -33,10 +35,10 @@ namespace ZKuP
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
karten = SQL.ReadSQL("Select * from zkup.karten", karten).Result;
|
||||
karten = SQL.ReadSQL($"Select * from {MainWindow.table}.karten", karten).Result;
|
||||
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;
|
||||
|
||||
textInputTimer.Interval = TimeSpan.FromSeconds(0.5);
|
||||
@ -45,20 +47,7 @@ namespace ZKuP
|
||||
|
||||
private async void dgCards_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
var dg = sender as DataGrid;
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (e.Key == Key.Delete) await DeleteCard();
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||
@ -67,7 +56,7 @@ namespace ZKuP
|
||||
addCardUser.Owner = this;
|
||||
addCardUser.ShowDialog();
|
||||
|
||||
karten = SQL.ReadSQL("Select * from zkup.karten", karten).Result;
|
||||
karten = SQL.ReadSQL($"Select * from {MainWindow.table}.karten", karten).Result;
|
||||
dgCards.DataContext = karten;
|
||||
}
|
||||
|
||||
@ -81,18 +70,101 @@ namespace ZKuP
|
||||
else btnDelete.IsEnabled = false;
|
||||
}
|
||||
private async void btnDelete_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await DeleteCard();
|
||||
}
|
||||
|
||||
private async Task DeleteCard()
|
||||
{
|
||||
var dg = dgCards;
|
||||
var row = dg.SelectedItem as System.Data.DataRowView;
|
||||
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 == "")
|
||||
{
|
||||
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();
|
||||
|
||||
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>();
|
||||
|
||||
foreach (var line in cBItemSource)
|
||||
@ -139,7 +211,7 @@ namespace ZKuP
|
||||
{
|
||||
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;
|
||||
|
||||
@ -157,7 +229,7 @@ namespace ZKuP
|
||||
{
|
||||
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];
|
||||
tbZurVorname.Text = result.First().Split(';')[1];
|
||||
@ -190,9 +262,9 @@ namespace ZKuP
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -212,9 +284,9 @@ namespace ZKuP
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -222,7 +294,7 @@ namespace ZKuP
|
||||
{
|
||||
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;
|
||||
|
||||
if (i != null)
|
||||
@ -234,5 +306,15 @@ namespace ZKuP
|
||||
iv.Owner = this;
|
||||
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))
|
||||
{
|
||||
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)
|
||||
list.Rows.Add("Keine Ergebnisse...");
|
||||
|
||||
@ -23,14 +23,14 @@ namespace ZKuP
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ namespace ZKuP
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -60,7 +60,7 @@ namespace ZKuP
|
||||
|
||||
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();
|
||||
ex.Export(res);
|
||||
});
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" x:Class="ZKuP.CreateFirma"
|
||||
mc:Ignorable="d"
|
||||
Title="Firmen verwalten" Height="682" Width="1378"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
WindowStartupLocation="CenterOwner" Closing="Window_Closing">
|
||||
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
@ -191,7 +191,7 @@
|
||||
|
||||
|
||||
<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>
|
||||
<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>
|
||||
@ -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"/>
|
||||
<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"/>
|
||||
<DatePicker 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="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="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>
|
||||
<Style x:Key="dpEinweisungStyle" TargetType="{x:Type DatePickerTextBox}">
|
||||
<Setter Property="Text" Value="Datum auswählen →"/>
|
||||
@ -219,16 +219,14 @@
|
||||
<ComboBoxItem Content=""/>
|
||||
<ComboBoxItem Content="BE-Fläche 1 (ICE-West/Containerburg)"/>
|
||||
<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 5 (Stellwerk)"/>
|
||||
<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 9 (Kantine)"/>
|
||||
<ComboBoxItem Content="BE-Fläche 10 (Gebäude G)"/>
|
||||
<ComboBoxItem Content="BE-Fläche 11 (Gaslager)"/>
|
||||
<ComboBoxItem Content="BE-Fläche 12 (Feuerwehrzufahrt Süd)"/>
|
||||
<ComboBoxItem Content="BE-Fläche 13 (Feuerwehrzufahrt Süd)"/>
|
||||
</ComboBox>
|
||||
<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.CellTemplate>
|
||||
<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>
|
||||
<Style TargetType="{x:Type DatePickerTextBox}">
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
@ -340,7 +338,7 @@
|
||||
<DataGridTemplateColumn ClipboardContentBinding="{x:Null}" Header="Arbeitsende" Width="100">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<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>
|
||||
<Style TargetType="{x:Type DatePickerTextBox}">
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
@ -370,7 +368,7 @@
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<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>
|
||||
<Style TargetType="{x:Type DatePickerTextBox}">
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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_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"/>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using FuzzySharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@ -34,6 +35,7 @@ namespace ZKuP
|
||||
}
|
||||
|
||||
DataTable firmen = new DataTable("Firmen");
|
||||
private Dictionary<string, List<string>> firmenSearchList = new Dictionary<string, List<string>>();
|
||||
|
||||
private List<string> aspVar;
|
||||
public List<string> asp
|
||||
@ -62,11 +64,11 @@ namespace ZKuP
|
||||
|
||||
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();
|
||||
|
||||
|
||||
searchTimer.Interval = TimeSpan.FromSeconds(0.5);
|
||||
searchTimer.Interval = TimeSpan.FromSeconds(0.0005);
|
||||
searchTimer.Tick += SearchTimer_Tick;
|
||||
|
||||
cbAnsprechpartner_Intern.ItemsSource = asp;
|
||||
@ -79,7 +81,7 @@ namespace ZKuP
|
||||
|
||||
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();
|
||||
}
|
||||
@ -91,23 +93,51 @@ namespace ZKuP
|
||||
|
||||
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 = '{SQL.ReadSingleValue($"SELECT Vertreter FROM zkup.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 = '{SQL.ReadSingleValue($"SELECT Name FROM zkup.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 = '{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 {MainWindow.table}.ansprechpartner WHERE Name = '{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 {MainWindow.table}.ansprechpartner WHERE Vertreter = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}'").Replace("-", "").Replace(" ", "")}' " +
|
||||
$"OR Ansprechpartner_Intern = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}' ORDER BY Name ASC"
|
||||
, firmen).Result;
|
||||
FirmaView = Firma.DataTableToFirma(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()
|
||||
{
|
||||
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);
|
||||
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)
|
||||
{
|
||||
tt.IsOpen = false;
|
||||
|
||||
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))
|
||||
{
|
||||
MessageBox.Show("Namen eintragen!", "Fehler");
|
||||
@ -342,7 +417,7 @@ namespace ZKuP
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -447,7 +522,7 @@ namespace ZKuP
|
||||
break;
|
||||
case "Arbeitsbeginn":
|
||||
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);
|
||||
await SQL.WriteSQL($"UPDATE firmen SET Arbeitsende = '{newValue}', Bearbeiter = '{Environment.UserName}' WHERE idFirmen = '{id}'");
|
||||
@ -455,7 +530,7 @@ namespace ZKuP
|
||||
break;
|
||||
case "Arbeitsende":
|
||||
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);
|
||||
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 " +
|
||||
$"('{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();
|
||||
}
|
||||
@ -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)
|
||||
{
|
||||
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();
|
||||
|
||||
@ -893,12 +968,12 @@ namespace ZKuP
|
||||
int index = dataGridRow.GetIndex();
|
||||
|
||||
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);
|
||||
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();
|
||||
@ -926,12 +1001,12 @@ namespace ZKuP
|
||||
int index = dataGridRow.GetIndex();
|
||||
|
||||
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);
|
||||
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();
|
||||
@ -967,7 +1042,7 @@ namespace ZKuP
|
||||
int index = dataGridRow.GetIndex();
|
||||
|
||||
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();
|
||||
|
||||
@ -1049,6 +1124,7 @@ namespace ZKuP
|
||||
|
||||
searchTerm = (sender as TextBox).Text;
|
||||
searchTimer.Start();
|
||||
//SearchTimer_Tick(null, null);
|
||||
}
|
||||
private void SearchTimer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
@ -1056,15 +1132,72 @@ namespace ZKuP
|
||||
{
|
||||
firmen.DefaultView.RowFilter = $"";
|
||||
|
||||
Task.Run(() => FirmaView = Firma.DataTableToFirma(firmen));
|
||||
dgFirmen.DataContext = firmen;
|
||||
//Task.Run(() => FirmaView = Firma.DataTableToFirma(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
|
||||
{
|
||||
firmen.DefaultView.RowFilter = $"Name LIKE '%{searchTerm}%' OR Verantwortlicher_MA_Firma LIKE '%{searchTerm}%'";
|
||||
List<string> similarities = new List<string>();
|
||||
|
||||
Task.Run(() => FirmaView = Firma.DataTableToFirma(firmen));
|
||||
dgFirmen.DataContext = firmen;
|
||||
foreach (var item in firmen.Rows)
|
||||
{
|
||||
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;
|
||||
@ -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 };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
|
||||
@ -43,7 +43,7 @@ namespace ZKuP
|
||||
tbHandynr.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);
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ZKuP"
|
||||
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.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
@ -16,12 +16,12 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="1.2*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition x:Name="CommentRow" Height="2*" />
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition x:Name="CommentRow" Height="1*" />
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<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"/>
|
||||
@ -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}"/>
|
||||
<!---->
|
||||
|
||||
<TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Kennzeichen*" VerticalAlignment="Top" Grid.Row="8"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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 Text="Fahrzeugtyp" Grid.Row="8" Margin="10,5,10,10" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="8" VerticalAlignment="Center" Margin="10,30,10,10" HorizontalAlignment="Left" Height="24" Width="292">
|
||||
<RadioButton x:Name="rbPKW" Content="PKW" HorizontalAlignment="Center" Width="100" Margin="50,0,0,0" IsChecked="True"/>
|
||||
<RadioButton x:Name="rbKrad" Content="Kraftrad" HorizontalAlignment="Left"/>
|
||||
</StackPanel>
|
||||
|
||||
<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"/>
|
||||
|
||||
<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"/>
|
||||
|
||||
|
||||
@ -72,47 +72,52 @@ namespace ZKuP
|
||||
InitializeComponent();
|
||||
special = Special;
|
||||
|
||||
if(special)
|
||||
{
|
||||
CommentRow.Height = new GridLength(2, GridUnitType.Star);
|
||||
MinWidth = 330;
|
||||
MinHeight = 800;
|
||||
Width = 330;
|
||||
Height = 800;
|
||||
}
|
||||
else
|
||||
{
|
||||
CommentRow.Height = new GridLength(0, GridUnitType.Star);
|
||||
MinWidth = 330;
|
||||
MinHeight = 707;
|
||||
Width = 330;
|
||||
Height = 707;
|
||||
}
|
||||
//if(special)
|
||||
//{
|
||||
// CommentRow.Height = new GridLength(2, GridUnitType.Star);
|
||||
// MinWidth = 360;
|
||||
// MinHeight = 850;
|
||||
// Width = 360;
|
||||
// Height = 850;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// CommentRow.Height = new GridLength(0, GridUnitType.Star);
|
||||
// MinWidth = 330;
|
||||
// MinHeight = 707;
|
||||
// Width = 330;
|
||||
// Height = 707;
|
||||
//}
|
||||
|
||||
rbDKennzeichen.Checked += rbDKennzeichen_Checked;
|
||||
|
||||
//var uri = new Uri("pack://application:,,,/Resources/PLZ_MUC.txt");
|
||||
//var resourceStream = Application.GetResourceStream(uri);
|
||||
|
||||
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();
|
||||
}
|
||||
//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();
|
||||
//}
|
||||
}
|
||||
|
||||
private void Textboxes_Changed(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
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-.]+$"))
|
||||
{
|
||||
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)
|
||||
{
|
||||
tbTelefon.Foreground = new SolidColorBrush(Colors.Black);
|
||||
tbTelefon.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||
//tbTelefon.Foreground = new SolidColorBrush(Colors.Black);
|
||||
}
|
||||
|
||||
checkButton();
|
||||
@ -142,6 +147,10 @@ namespace ZKuP
|
||||
||
|
||||
(rbOtherKennzeichen.IsChecked.Value &&
|
||||
!string.IsNullOrWhiteSpace(tbOtherKennzeichen.Text)))
|
||||
||
|
||||
(rbVersKennzeichen.IsChecked.Value &&
|
||||
!string.IsNullOrWhiteSpace(tbVersKennzeichen1.Text) &&
|
||||
!string.IsNullOrWhiteSpace(tbVersKennzeichen2.Text))
|
||||
)
|
||||
btnCreate.IsEnabled = true;
|
||||
else btnCreate.IsEnabled = false;
|
||||
@ -202,6 +211,14 @@ namespace ZKuP
|
||||
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-.]+$"))
|
||||
{
|
||||
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(tbPLZ.Text) &&
|
||||
string.IsNullOrWhiteSpace(tbVorgesetzter.Text) &&
|
||||
!cBSchicht.IsChecked.Value &&
|
||||
//!cBSchicht.IsChecked.Value &&
|
||||
!cBCorrectness.IsChecked.Value)
|
||||
|| special)
|
||||
{
|
||||
@ -230,15 +247,17 @@ namespace ZKuP
|
||||
int _schicht = 0, _correctness = 0;
|
||||
string _bemerkung = "Erstellt durch ZKuP";
|
||||
|
||||
if (cBSchicht.IsChecked.Value) _schicht = 1;
|
||||
//if (cBSchicht.IsChecked.Value) _schicht = 1;
|
||||
if (cBCorrectness.IsChecked.Value) _correctness = 1;
|
||||
if (!string.IsNullOrWhiteSpace(tbBemerkung.Text)) _bemerkung = tbBemerkung.Text;
|
||||
|
||||
var isKrad = rbPKW.IsChecked.Value ? 0 : 1;
|
||||
|
||||
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}')");
|
||||
var id = SQL.ReadSingleValue($"SELECT idparkausweise FROM zkup.parkausweise ORDER BY idparkausweise DESC LIMIT 1");
|
||||
var name = SQL.ReadSingleValue($"SELECT MA_Name FROM zkup.parkausweise WHERE idparkausweise={id}");
|
||||
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 {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)
|
||||
{
|
||||
@ -254,9 +273,27 @@ namespace ZKuP
|
||||
}
|
||||
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}')");
|
||||
var id = SQL.ReadSingleValue($"SELECT idparkausweise FROM zkup.parkausweise ORDER BY idparkausweise DESC LIMIT 1");
|
||||
var name = SQL.ReadSingleValue($"SELECT MA_Name FROM zkup.parkausweise WHERE idparkausweise={id}");
|
||||
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 {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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
@ -355,20 +392,18 @@ namespace ZKuP
|
||||
|
||||
private void rbDKennzeichen_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
tbOtherKennzeichen.Visibility = Visibility.Hidden;
|
||||
tbOtherKennzeichen.Visibility = Visibility.Collapsed;
|
||||
spVersKennzeichen.Visibility = Visibility.Collapsed;
|
||||
|
||||
tbDTownKennzeichen.Visibility = Visibility.Visible;
|
||||
tbDCharsKennzeichen.Visibility = Visibility.Visible;
|
||||
tbDDigitsKennzeichen.Visibility = Visibility.Visible;
|
||||
spDKennzeichen.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
tbDTownKennzeichen.Visibility = Visibility.Collapsed;
|
||||
tbDCharsKennzeichen.Visibility = Visibility.Collapsed;
|
||||
tbDDigitsKennzeichen.Visibility = Visibility.Collapsed;
|
||||
spDKennzeichen.Visibility = Visibility.Collapsed;
|
||||
spVersKennzeichen.Visibility = Visibility.Collapsed;
|
||||
|
||||
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)
|
||||
{
|
||||
if ((sender as TextBox).Text.Length >= 3)
|
||||
@ -432,7 +476,8 @@ namespace ZKuP
|
||||
}
|
||||
else
|
||||
{
|
||||
tbAdresse.Foreground = new SolidColorBrush(Colors.Black);
|
||||
tbAdresse.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||
//tbAdresse.Foreground = new SolidColorBrush(Colors.Black);
|
||||
tbAdresse.ToolTip = "";
|
||||
}
|
||||
}
|
||||
@ -446,7 +491,8 @@ namespace ZKuP
|
||||
}
|
||||
else
|
||||
{
|
||||
tbEmail.Foreground = new SolidColorBrush(Colors.Black);
|
||||
tbEmail.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||
//tbEmail.Foreground = new SolidColorBrush(Colors.Black);
|
||||
tbEmail.ToolTip = "";
|
||||
}
|
||||
|
||||
@ -462,7 +508,8 @@ namespace ZKuP
|
||||
}
|
||||
else
|
||||
{
|
||||
tbTelefon.Foreground = new SolidColorBrush(Colors.Black);
|
||||
tbTelefon.SetResourceReference(Control.ForegroundProperty, SystemColors.ControlTextBrushKey);
|
||||
//tbTelefon.Foreground = new SolidColorBrush(Colors.Black);
|
||||
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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
|
||||
<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">
|
||||
<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 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>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@ -41,7 +41,7 @@ namespace ZKuP
|
||||
|
||||
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);
|
||||
dgVisitors.DataContext = visitors;
|
||||
|
||||
@ -112,7 +112,7 @@ namespace ZKuP
|
||||
index = e.Row.GetIndex();
|
||||
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);
|
||||
|
||||
|
||||
@ -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 " +
|
||||
$"('{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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ZKuP"
|
||||
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.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
@ -14,32 +14,79 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="1.4*"/>
|
||||
</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"/>
|
||||
<Button x:Name="btnFiltern" Content="Filtern" FontSize="12" Padding="-2" Height="26" Margin="270,31,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>
|
||||
<Button x:Name="btnFiltern" Content="Filtern" FontSize="12" Padding="-2" Height="26" Margin="270,35,10,0" Click="btnFiltern_Click"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<TextBox x:Name="tbBemerkung" Margin="10,35,10,10" Grid.Row="7" TextWrapping="Wrap" 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"/>
|
||||
<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="6" TextWrapping="Wrap" Text="Bemerkung:" VerticalAlignment="Top"/>
|
||||
<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="btnAdd" Content="Hinzufügen" HorizontalAlignment="Stretch" Margin="10,5" Grid.Row="9" Click="btnAdd_Click"/>
|
||||
<Button x:Name="btnSignature" Content="Unterschrift" Margin="5,5" Grid.Row="7" Click="btnSignature_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>
|
||||
</Window>
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using FuzzySharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -19,10 +22,31 @@ namespace ZKuP
|
||||
/// </summary>
|
||||
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 = "";
|
||||
|
||||
byte[] _signature = null;
|
||||
bool _emergency = false;
|
||||
bool noMoreDeliveries = false;
|
||||
|
||||
const string zuViele = "Es sind bereits zu viele Fahrzeuge im Werk";
|
||||
|
||||
public Delivery(bool Emergency = false)
|
||||
{
|
||||
@ -33,59 +57,147 @@ namespace ZKuP
|
||||
|
||||
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();
|
||||
//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();
|
||||
cBLieferfirma.ItemsSource = list;
|
||||
}
|
||||
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();
|
||||
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)
|
||||
{
|
||||
//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();
|
||||
//cBLieferfirma.ItemsSource = list;
|
||||
|
||||
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();
|
||||
Filter();
|
||||
}
|
||||
|
||||
private void tbFilter_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if(e.Key == Key.Enter)
|
||||
{
|
||||
Filter();
|
||||
}
|
||||
}
|
||||
|
||||
private void Filter()
|
||||
{
|
||||
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();
|
||||
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;
|
||||
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();
|
||||
cBLieferfirma.ItemsSource = list;
|
||||
}
|
||||
@ -93,8 +205,6 @@ namespace ZKuP
|
||||
cBLieferfirma.IsDropDownOpen = true;
|
||||
cBLieferfirma.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async void btnSignature_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@ -127,27 +237,80 @@ namespace ZKuP
|
||||
private async void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
int Kategorie = 3;
|
||||
bool trotzdemAnlegen = true;
|
||||
|
||||
if (_emergency)
|
||||
Kategorie = 4;
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
{
|
||||
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
|
||||
|
||||
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)
|
||||
{
|
||||
@ -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(' ');
|
||||
|
||||
//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
|
||||
// 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() : "";
|
||||
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() : "";
|
||||
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)
|
||||
{
|
||||
if (e.Key != Key.OemComma)
|
||||
@ -186,5 +383,10 @@ namespace ZKuP
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
private void tbFirma_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
CheckParkplatz();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<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 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()
|
||||
{
|
||||
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`");
|
||||
|
||||
dgOwn.ItemsSource = dtOwn.DefaultView;
|
||||
@ -125,7 +125,7 @@ namespace ZKuP
|
||||
|
||||
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;
|
||||
btnSatSlot2.IsEnabled = true;
|
||||
@ -137,7 +137,7 @@ namespace ZKuP
|
||||
|
||||
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"))
|
||||
{
|
||||
@ -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);
|
||||
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();
|
||||
}
|
||||
|
||||
@ -55,13 +55,13 @@ namespace ZKuP
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
@ -32,7 +32,8 @@
|
||||
<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 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.CellTemplate>
|
||||
<DataTemplate>
|
||||
@ -40,7 +41,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Ablehnen" Width="80">
|
||||
<DataGridTemplateColumn CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Ablehnen" Width="90">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button x:Name="btnDecline" Content="Ablehnen" FontSize="12" Padding="-2" Height="25" Click="btnDecline_Click"/>
|
||||
|
||||
@ -23,7 +23,7 @@ namespace ZKuP
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -35,9 +35,9 @@ namespace ZKuP
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -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)
|
||||
{
|
||||
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);
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
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 krad = isKrad == 1 ? "Kraftrad-" : "";
|
||||
|
||||
switch (Genehmigt)
|
||||
{
|
||||
case true:
|
||||
System.Diagnostics.Process.Start($"mailto:{Email}?subject=Neue Parkkarte&body=" +
|
||||
"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" +
|
||||
$"Name: {Name}%0D%0A" +
|
||||
$"Kennzeichen: {Kennzeichen}%0D%0A" +
|
||||
@ -106,6 +107,7 @@ namespace ZKuP
|
||||
string PLZ;
|
||||
string Vorgesetzter;
|
||||
int Schicht;
|
||||
int isKrad;
|
||||
|
||||
|
||||
public static List<Grant> DataTableToGrant(System.Data.DataTable dataTable)
|
||||
@ -127,7 +129,8 @@ namespace ZKuP
|
||||
Adresse = dr[8].ToString(),
|
||||
PLZ = dr[9].ToString(),
|
||||
Vorgesetzter = dr[10].ToString(),
|
||||
Schicht = (int)dr[11]
|
||||
Schicht = (int)dr[11],
|
||||
isKrad = (int)dr[12]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
220
ZKuP/Helper.cs
@ -1,17 +1,22 @@
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Excel = Microsoft.Office.Interop.Excel;
|
||||
//using Word = Microsoft.Office.Interop.Word;
|
||||
|
||||
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)));
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
@ -281,6 +286,8 @@ namespace ZKuP
|
||||
/// <param name="src">A bitmap image</param>
|
||||
/// <returns>The image as a BitmapImage for WPF</returns>
|
||||
public static BitmapImage ConvertBitmapToImage(System.Drawing.Bitmap src)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.IO.MemoryStream ms = new System.IO.MemoryStream();
|
||||
src.Save(ms, System.Drawing.Imaging.ImageFormat.Tiff);
|
||||
@ -291,6 +298,13 @@ namespace ZKuP
|
||||
image.EndInit();
|
||||
return image;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteLog(ex.ToString());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static BitmapImage ConvertByteArrayToBitmapImage(Byte[] bytes)
|
||||
@ -303,9 +317,13 @@ namespace ZKuP
|
||||
image.EndInit();
|
||||
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)
|
||||
public static bool OpenAndEditWord(string Name, string Kennzeichen, string Firma, string Nr, int isKrad = 0, string OE = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -326,8 +344,12 @@ namespace ZKuP
|
||||
|
||||
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 = wordApp.Documents.OpenNoRepairDialog("https://dbsw.sharepoint.com/:w:/r/sites/PfoertnerWerkMuenche/Freigegebene%20Dokumente/DBSecurity/Parkkarte_Template_ab_2020.dotx");
|
||||
dynamic document;
|
||||
if (isKrad == 0)
|
||||
{
|
||||
document = wordApp.Documents.OpenNoRepairDialog("https://dbsw.sharepoint.com/:w:/r/sites/PfoertnerWerkMuenche/Freigegebene%20Dokumente/Zutrittskontrolle/Parkkarte_Template_ab_2020.dotx");
|
||||
|
||||
|
||||
|
||||
document.Activate();
|
||||
|
||||
@ -355,6 +377,41 @@ namespace ZKuP
|
||||
wordApp.Quit();
|
||||
}
|
||||
}
|
||||
else if (isKrad == 1)
|
||||
{
|
||||
document = wordApp.Documents.OpenNoRepairDialog("https://dbsw.sharepoint.com/:w:/r/sites/PfoertnerWerkMuenche/Freigegebene%20Dokumente/Zutrittskontrolle/Parkausweis_Kraftrad_DinA5.docx");
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -367,6 +424,21 @@ namespace ZKuP
|
||||
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 = "")
|
||||
{
|
||||
@ -743,7 +815,7 @@ namespace ZKuP
|
||||
{
|
||||
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
|
||||
{
|
||||
@ -778,4 +850,136 @@ namespace ZKuP
|
||||
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,10 +5,18 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ZKuP"
|
||||
mc:Ignorable="d"
|
||||
Title="Unterschriftenanzeige" Height="342" Width="419">
|
||||
Title="Unterschriftenanzeige" Height="370" Width="419" Loaded="Window_Loaded">
|
||||
<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">
|
||||
<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"/>
|
||||
<Image x:Name="imageSignature" Margin="10,95,10,10" Source="Resources/NoSignature.png"/>
|
||||
<ComboBox x:Name="cBSignature" Margin="10,68,10,0" VerticalAlignment="Top" SelectionChanged="cBSignature_SelectionChanged"/>
|
||||
<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"/>
|
||||
@ -18,7 +26,7 @@
|
||||
<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"/>
|
||||
<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">
|
||||
<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>
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@ -44,13 +63,13 @@ namespace ZKuP
|
||||
}));
|
||||
else
|
||||
{
|
||||
var list = await SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM zkup.zutritteLog");
|
||||
list = list.OrderByDescending(p => p).ToList();
|
||||
//var list = await SQL.ReadDateTimeAndStringList($"SELECT Zutritt,Name FROM {MainWindow.table}.zutritteLog");
|
||||
//list = list.OrderByDescending(p => p).ToList();
|
||||
|
||||
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
cBSignature.ItemsSource = list;
|
||||
//cBSignature.ItemsSource = list;
|
||||
|
||||
gridSpinner.Visibility = Visibility.Collapsed;
|
||||
}));
|
||||
@ -59,9 +78,12 @@ namespace ZKuP
|
||||
|
||||
private void cBSignature_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
switch (category)
|
||||
{
|
||||
case Categories.Zutritte:
|
||||
if (cBSignature.SelectedItem != null && cBSignature.SelectedIndex != -1)
|
||||
{
|
||||
var i = SQL.ReadSingleByteArr($"SELECT signature_blob FROM zkup.zutritteLog WHERE Name = '{cBSignature.SelectedItem.ToString().Split(';')[1]}' AND Zutritt = '{cBSignature.SelectedItem.ToString().Split(';')[0]}'");
|
||||
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)
|
||||
@ -70,6 +92,35 @@ namespace ZKuP
|
||||
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.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)
|
||||
@ -122,25 +173,46 @@ namespace ZKuP
|
||||
}
|
||||
|
||||
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 = "";
|
||||
if (cbOnlyWithSignature.IsChecked.Value) withSign = " AND signature_blob IS NOT NULL";
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@ -148,15 +220,78 @@ namespace ZKuP
|
||||
{
|
||||
if (cbOnlyWithSignature.IsChecked.Value) withSign = " WHERE signature_blob IS NOT NULL";
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
cBSignature.IsDropDownOpen = true;
|
||||
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")}%' 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)
|
||||
@ -173,5 +308,43 @@ namespace ZKuP
|
||||
{
|
||||
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}"
|
||||
|
||||
MinHeight="610"
|
||||
MinWidth="1360"
|
||||
MinWidth="1660"
|
||||
Closing="Window_Closing"
|
||||
PreviewKeyDown="Window_PreviewKeyDown" Loaded="Window_Loaded" ContentRendered="Window_ContentRendered" SizeChanged="Window_SizeChanged"
|
||||
>
|
||||
@ -36,13 +36,21 @@
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
<Grid x:Name="gridBackground">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="120"/>
|
||||
<RowDefinition Height="135"/>
|
||||
<RowDefinition Height="{Binding gridOverviewHeight, Source={x:Static p:Settings.Default}, Mode=TwoWay}" MinHeight="300"/>
|
||||
<RowDefinition Height="10" MinHeight="10"/>
|
||||
<RowDefinition Height="1*" MinHeight="100"/>
|
||||
@ -54,7 +62,7 @@
|
||||
</Canvas.Background>
|
||||
</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">
|
||||
<local:ucSpinnerPiston RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Canvas.Left="46" Canvas.Top="46" Height="25" Width="25" >
|
||||
<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"/>
|
||||
|
||||
<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">
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<StackPanel Orientation="Vertical" Margin="2">
|
||||
@ -148,8 +156,27 @@
|
||||
</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">
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<StackPanel Orientation="Vertical" 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"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="2">
|
||||
<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 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"/>
|
||||
@ -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">
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<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="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 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"/>
|
||||
@ -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="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="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="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" 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" 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">
|
||||
|
||||
<Image Visibility="Visible"
|
||||
@ -204,14 +231,14 @@
|
||||
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" />
|
||||
<!--Background="#32FF5D00"-->
|
||||
--><!--Background="#32FF5D00"--><!--
|
||||
|
||||
</Grid>
|
||||
</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="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"/>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu>
|
||||
@ -233,9 +260,10 @@
|
||||
</Button.ToolTip>
|
||||
</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"/>
|
||||
<Grid x:Name="BE" Margin="210, 13, 0, 0" Width="350" HorizontalAlignment="Left" ToolTip="Rote Parkplätze sind belegt, Grüne frei">
|
||||
<TextBlock Text="Parkplätze im Werk:" Margin="0, -20, 0, 0" Height="20" Width="150" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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,25 +349,107 @@
|
||||
<TextBlock x:Name="lblRedCounter" Text="23" TextAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="148, 78, 0, 0"/>
|
||||
</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 x:Name="gridToday" Grid.Row="1" Visibility="Collapsed" VerticalAlignment="Stretch" MinHeight="100" Margin="0,5,0,0">
|
||||
<!--<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>-->
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<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="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"/>
|
||||
<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="lblAnkunftHeuteFirmen" Grid.Row="0" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Ankunft heute Firmen:" VerticalAlignment="Top" Margin="10,15,0,0"/>
|
||||
<TextBlock Grid.Column="1" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Ankunft heute Besucher und Werksführungen:" VerticalAlignment="Top" Margin="10,15,0,0"/>
|
||||
|
||||
<TextBlock x:Name="lblmcfit" Text="Aktuell verfügbare McFit Karten: " HorizontalAlignment="Right" Margin="0,5,405,0" Visibility="Collapsed"/>
|
||||
<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"/>-->
|
||||
|
||||
<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">
|
||||
<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">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<EventSetter Event="Control.MouseDoubleClick" Handler="DataGridRow_MouseDoubleClick"/>
|
||||
@ -356,7 +473,7 @@
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.Columns>
|
||||
|
||||
<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*" SortDirection="Ascending" IsReadOnly="True">
|
||||
<DataGridTextColumn Header="Firma" Binding="{Binding Name}" Width="*" SortDirection="Ascending" IsReadOnly="True">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Margin" Value="4"/>
|
||||
@ -364,7 +481,7 @@
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="Verantwortlicher Firma / Besucher" Binding="{Binding Verantwortlicher_MA_Firma}" Width="*" IsReadOnly="True">
|
||||
<DataGridTextColumn Header="Ansprechpartner der Firma" Binding="{Binding Verantwortlicher_MA_Firma}" Width="*" IsReadOnly="True">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Margin" Value="4"/>
|
||||
@ -372,7 +489,7 @@
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="Tel. Verantwortlicher Firma / Tel. Besucher" Binding="{Binding Tel_Nr_Verantwortlicher_Firma}" Width="*" IsReadOnly="True">
|
||||
<DataGridTextColumn Header="Tel. Ansprechpartner Firma" Binding="{Binding Tel_Nr_Verantwortlicher_Firma}" Width="*" IsReadOnly="True">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Margin" Value="4"/>
|
||||
@ -380,15 +497,7 @@
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="Ansprechpartner 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>
|
||||
<DataGridTextColumn Header="BE-Fläche" Binding="{Binding BE}" Width="*" IsReadOnly="True">
|
||||
<DataGridTextColumn Header="Fremdfirmenkoordinator DB" Binding="{Binding Ansprechpartner_Intern}" Width="*" IsReadOnly="True">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Margin" Value="4"/>
|
||||
@ -403,6 +512,14 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="BE-Fläche" Binding="{Binding BE}" 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 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>
|
||||
@ -437,8 +554,79 @@
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
<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"/>
|
||||
<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"/>
|
||||
<Button x:Name="btnClearSearchArrived" HorizontalAlignment="Left" Grid.Row="2" Content="X" Padding="0" VerticalAlignment="Top" Margin="190,-3,0,-20" Height="26" Width="14" Foreground="Red" Visibility="Collapsed" FontWeight="Bold" ToolTip="Suchfeld leeren" Click="btnClearSearchArrived_Click"/>
|
||||
@ -617,7 +805,7 @@
|
||||
</Grid>
|
||||
|
||||
<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>
|
||||
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="10" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
@ -647,7 +835,7 @@
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</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.Template>
|
||||
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
||||
@ -750,7 +938,7 @@
|
||||
<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" 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="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"/>
|
||||
@ -801,5 +989,8 @@
|
||||
</Grid>
|
||||
</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>
|
||||
</mah:MetroWindow>
|
||||
|
||||
@ -40,7 +40,7 @@ namespace ZKuP
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
asp = SQL.ReadSQL("SELECT * FROM zkup.ansprechpartner", asp).Result;
|
||||
asp = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.ansprechpartner", asp).Result;
|
||||
aspView = Asp.DataTableToAsp(asp);
|
||||
dgAsp.DataContext = asp;
|
||||
}
|
||||
@ -71,7 +71,7 @@ namespace ZKuP
|
||||
tbVertreterTel.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);
|
||||
}
|
||||
}
|
||||
@ -83,9 +83,9 @@ namespace ZKuP
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -128,7 +128,7 @@ namespace ZKuP
|
||||
dgAsp.RowValidationErrorTemplate = new ControlTemplate();
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ namespace ZKuP
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
lieferanten = SQL.ReadSQL("Select * from zkup.lieferanten", lieferanten).Result;
|
||||
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||
DeliveriesView = Deliver.DataTableToDeliver(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}')");
|
||||
|
||||
lieferanten = SQL.ReadSQL("Select * from zkup.lieferanten", lieferanten).Result;
|
||||
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||
dgLieferanten.ScrollIntoView(dgLieferanten.Items[dgLieferanten.Items.Count - 1]); //scroll to last
|
||||
dgLieferanten.UpdateLayout();
|
||||
@ -107,7 +107,7 @@ namespace ZKuP
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -120,9 +120,9 @@ namespace ZKuP
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -141,9 +141,9 @@ namespace ZKuP
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,16 +47,16 @@
|
||||
</Style>
|
||||
</DataGridCheckBoxColumn.CellStyle>
|
||||
</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>
|
||||
<Style>
|
||||
<EventSetter Event="CheckBox.PreviewMouseLeftButtonDown" Handler="OnChecked"/>
|
||||
</Style>
|
||||
</DataGridCheckBoxColumn.CellStyle>
|
||||
</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"/>
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@ -24,7 +24,7 @@ namespace ZKuP
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var list = SQL.ReadSQL($"SELECT * FROM zkup.parkausweise").Result;
|
||||
var list = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.parkausweise").Result;
|
||||
dgManage.DataContext = list;
|
||||
}
|
||||
|
||||
@ -37,9 +37,9 @@ namespace ZKuP
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -52,11 +52,11 @@ namespace ZKuP
|
||||
if (!((sender as DataGridCell).Content as CheckBox).IsChecked.Value)
|
||||
{
|
||||
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)
|
||||
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());
|
||||
|
||||