Umstellung auf SSL
Neue Icons für Konnektivität Warnings beseitigt PreUpgrade von BouncyCastle
This commit is contained in:
parent
a67950371c
commit
b8f7c7bf6e
@ -22,7 +22,7 @@ namespace ZKuP
|
|||||||
public partial class AddCardUser : MetroWindow
|
public partial class AddCardUser : MetroWindow
|
||||||
{
|
{
|
||||||
string _user = "";
|
string _user = "";
|
||||||
string _ansprechpartnerFirma = "";
|
//string _ansprechpartnerFirma = "";
|
||||||
bool _isBesucher = false;
|
bool _isBesucher = false;
|
||||||
List<string> comboList = new List<string>() { "Grün", "Rot", "Gerätewagen" };
|
List<string> comboList = new List<string>() { "Grün", "Rot", "Gerätewagen" };
|
||||||
List<string> comboListNurRot = new List<string>() { "Rot" };
|
List<string> comboListNurRot = new List<string>() { "Rot" };
|
||||||
|
|||||||
@ -53,7 +53,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
if (list.Length > i && !string.IsNullOrWhiteSpace(list[i]))
|
if (list.Length > i && !string.IsNullOrWhiteSpace(list[i]))
|
||||||
{
|
{
|
||||||
if (boxes[i].Tag == "Name")
|
if (boxes[i].Tag.ToString() == "Name")
|
||||||
boxes[i].Text = list[i];
|
boxes[i].Text = list[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
if (list.Length > i && !string.IsNullOrWhiteSpace(list[i]))
|
if (list.Length > i && !string.IsNullOrWhiteSpace(list[i]))
|
||||||
{
|
{
|
||||||
if (boxes[i].Tag == "Tel")
|
if (boxes[i].Tag.ToString() == "Tel")
|
||||||
boxes[i].Text = list[i];
|
boxes[i].Text = list[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void BuildWindow(int besucherAnzahl)
|
private void BuildWindow(int besucherAnzahl)
|
||||||
{
|
{
|
||||||
int maxProSpalte = 10; // Maximale Anzahl an Textfeldern pro Spalte
|
//int maxProSpalte = 10; // Maximale Anzahl an Textfeldern pro Spalte
|
||||||
|
|
||||||
// PanelsContainer soll die WrapPanels halten
|
// PanelsContainer soll die WrapPanels halten
|
||||||
spGroupPers.Children.Clear(); // Vorherige Panels entfernen (falls schon welche existieren)
|
spGroupPers.Children.Clear(); // Vorherige Panels entfernen (falls schon welche existieren)
|
||||||
|
|||||||
@ -20,6 +20,8 @@
|
|||||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource MahApps.Styles.Button.Flat}">
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource MahApps.Styles.Button.Flat}">
|
||||||
<Setter Property="mah:ControlsHelper.CornerRadius" Value="4"/>
|
<Setter Property="mah:ControlsHelper.CornerRadius" Value="4"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ namespace ZKuP
|
|||||||
int firmenCount = 0;
|
int firmenCount = 0;
|
||||||
int besucherCount = 0;
|
int besucherCount = 0;
|
||||||
bool arrivalClicked = false;
|
bool arrivalClicked = false;
|
||||||
bool kl_EinweisungClicked = false;
|
//bool kl_EinweisungClicked = false;
|
||||||
//string query = "";
|
//string query = "";
|
||||||
MySqlCommand query = new MySqlCommand();
|
MySqlCommand query = new MySqlCommand();
|
||||||
byte[] _signature = null;
|
byte[] _signature = null;
|
||||||
@ -1073,8 +1073,8 @@ namespace ZKuP
|
|||||||
|
|
||||||
private async void btnSignature_Click(object sender, RoutedEventArgs e)
|
private async void btnSignature_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
string kat = "1";
|
//string kat = "1";
|
||||||
string firmaBesucher = "";
|
//string firmaBesucher = "";
|
||||||
string name = "";
|
string name = "";
|
||||||
|
|
||||||
var kennzeichenTextboxes = spKennzeichen.Children.OfType<TextBox>().ToList();
|
var kennzeichenTextboxes = spKennzeichen.Children.OfType<TextBox>().ToList();
|
||||||
|
|||||||
@ -616,7 +616,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void btnCurrentlyBooked_Click(object sender, RoutedEventArgs e)
|
private void btnCurrentlyBooked_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (btnCurrentlyBooked.Content == "Alle gebuchten Flächen anzeigen")
|
if (btnCurrentlyBooked.Content.ToString() == "Alle gebuchten Flächen anzeigen")
|
||||||
{
|
{
|
||||||
be = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.beBelegung WHERE bis >= curdate() ORDER BY beNr ASC, bis ASC").Result;
|
be = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.beBelegung WHERE bis >= curdate() ORDER BY beNr ASC, bis ASC").Result;
|
||||||
dgBelegung.DataContext = be;
|
dgBelegung.DataContext = be;
|
||||||
|
|||||||
@ -2197,46 +2197,46 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Firma
|
//public class Firma
|
||||||
{
|
//{
|
||||||
public string Name;
|
// public string Name;
|
||||||
string Verantwortlicher_MA_Firma;
|
// string Verantwortlicher_MA_Firma;
|
||||||
string Tel_Nr_Verantwortlicher_Firma;
|
// string Tel_Nr_Verantwortlicher_Firma;
|
||||||
string Anzahl_Begleiter;
|
// string Anzahl_Begleiter;
|
||||||
string Anzahl_Fzg;
|
// string Anzahl_Fzg;
|
||||||
string Beauftragte_Leistung;
|
// string Beauftragte_Leistung;
|
||||||
string Arbeitsbeginn;
|
// string Arbeitsbeginn;
|
||||||
string Arbeitsende;
|
// string Arbeitsende;
|
||||||
string Örtliche_Einweisung_bis;
|
// string Örtliche_Einweisung_bis;
|
||||||
string Ansprechpartner_Intern;
|
// string Ansprechpartner_Intern;
|
||||||
string Tel_Nr_Ansprechpartner_Intern;
|
// string Tel_Nr_Ansprechpartner_Intern;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static List<Firma> DataTableToFirma(System.Data.DataTable dataTable)
|
// public static List<Firma> DataTableToFirma(System.Data.DataTable dataTable)
|
||||||
{
|
// {
|
||||||
List<Firma> x = new List<Firma>();
|
// List<Firma> x = new List<Firma>();
|
||||||
|
|
||||||
foreach (DataRow dr in dataTable.Rows)
|
// foreach (DataRow dr in dataTable.Rows)
|
||||||
{
|
// {
|
||||||
x.Add(new Firma()
|
// x.Add(new Firma()
|
||||||
{
|
// {
|
||||||
Name = dr[1].ToString(),
|
// Name = dr[1].ToString(),
|
||||||
Verantwortlicher_MA_Firma = dr[2].ToString(),
|
// Verantwortlicher_MA_Firma = dr[2].ToString(),
|
||||||
Tel_Nr_Verantwortlicher_Firma = dr[3].ToString(),
|
// Tel_Nr_Verantwortlicher_Firma = dr[3].ToString(),
|
||||||
Anzahl_Begleiter = dr[4].ToString(),
|
// Anzahl_Begleiter = dr[4].ToString(),
|
||||||
Anzahl_Fzg = dr[5].ToString(),
|
// Anzahl_Fzg = dr[5].ToString(),
|
||||||
Beauftragte_Leistung = dr[6].ToString(),
|
// Beauftragte_Leistung = dr[6].ToString(),
|
||||||
Arbeitsbeginn = dr[7].ToString(),
|
// Arbeitsbeginn = dr[7].ToString(),
|
||||||
Arbeitsende = dr[8].ToString(),
|
// Arbeitsende = dr[8].ToString(),
|
||||||
Örtliche_Einweisung_bis = dr[9].ToString(),
|
// Örtliche_Einweisung_bis = dr[9].ToString(),
|
||||||
Ansprechpartner_Intern = dr[10].ToString(),
|
// Ansprechpartner_Intern = dr[10].ToString(),
|
||||||
Tel_Nr_Ansprechpartner_Intern = dr[11].ToString()
|
// Tel_Nr_Ansprechpartner_Intern = dr[11].ToString()
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
return x;
|
// return x;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,12 +23,12 @@ namespace ZKuP
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class CreateVisitor_List : MetroWindow
|
public partial class CreateVisitor_List : MetroWindow
|
||||||
{
|
{
|
||||||
private List<Visitor> myVar;
|
//private List<Visitor> myVar;
|
||||||
public List<Visitor> VisitorView
|
//public List<Visitor> VisitorView
|
||||||
{
|
//{
|
||||||
get { return myVar; }
|
// get { return myVar; }
|
||||||
set { myVar = value; }
|
// set { myVar = value; }
|
||||||
}
|
//}
|
||||||
|
|
||||||
DataTable visitors = new DataTable("Visitors");
|
DataTable visitors = new DataTable("Visitors");
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ namespace ZKuP
|
|||||||
this.Title = "Besucherliste von: " + Helper.InsertSpaceBeforeUpperCase(Environment.UserName);
|
this.Title = "Besucherliste von: " + Helper.InsertSpaceBeforeUpperCase(Environment.UserName);
|
||||||
|
|
||||||
visitors = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
visitors = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
||||||
VisitorView = Visitor.DataTableToVisitor(visitors);
|
//VisitorView = Visitor.DataTableToVisitor(visitors);
|
||||||
dgVisitors.DataContext = visitors;
|
dgVisitors.DataContext = visitors;
|
||||||
|
|
||||||
dgVisitors.Items.SortDescriptions.Clear();
|
dgVisitors.Items.SortDescriptions.Clear();
|
||||||
@ -115,7 +115,7 @@ namespace ZKuP
|
|||||||
dgVisitors.PreviewKeyDown += DgVisitors_PreviewKeyDown;
|
dgVisitors.PreviewKeyDown += DgVisitors_PreviewKeyDown;
|
||||||
|
|
||||||
visitors = SQL.ReadSQL($"Select * from {MainWindow.table}.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
visitors = SQL.ReadSQL($"Select * from {MainWindow.table}.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
||||||
VisitorView = Visitor.DataTableToVisitor(visitors);
|
//VisitorView = Visitor.DataTableToVisitor(visitors);
|
||||||
|
|
||||||
|
|
||||||
dgVisitors.RowValidationErrorTemplate = new ControlTemplate();
|
dgVisitors.RowValidationErrorTemplate = new ControlTemplate();
|
||||||
@ -192,7 +192,7 @@ namespace ZKuP
|
|||||||
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.besucher WHERE `idbesucher` = '{arr[0]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.besucher WHERE `idbesucher` = '{arr[0]}'");
|
||||||
|
|
||||||
visitors = SQL.ReadSQL($"Select * from {MainWindow.table}.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
visitors = SQL.ReadSQL($"Select * from {MainWindow.table}.besucher WHERE Ersteller = '{Environment.UserName}'", visitors).Result;
|
||||||
VisitorView = Visitor.DataTableToVisitor(visitors);
|
//VisitorView = Visitor.DataTableToVisitor(visitors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ namespace ZKuP
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
string query = "";
|
//string query = "";
|
||||||
|
|
||||||
byte[] _signature = null;
|
byte[] _signature = null;
|
||||||
bool _emergency = false;
|
bool _emergency = false;
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace ZKuP
|
|||||||
public partial class Family : MetroWindow
|
public partial class Family : MetroWindow
|
||||||
{
|
{
|
||||||
DataTable dtOwn;
|
DataTable dtOwn;
|
||||||
DataTable dtAll;
|
//DataTable dtAll;
|
||||||
|
|
||||||
public Family()
|
public Family()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -104,48 +104,48 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Grant
|
//public class Grant
|
||||||
{
|
//{
|
||||||
int idparkausweise;
|
// int idparkausweise;
|
||||||
string MA_Vorname;
|
// string MA_Vorname;
|
||||||
string MA_Name;
|
// string MA_Name;
|
||||||
string Kennzeichen;
|
// string Kennzeichen;
|
||||||
string Email;
|
// string Email;
|
||||||
string Telefon;
|
// string Telefon;
|
||||||
string Abteilung;
|
// string Abteilung;
|
||||||
string Firma;
|
// string Firma;
|
||||||
string Adresse;
|
// string Adresse;
|
||||||
string PLZ;
|
// string PLZ;
|
||||||
string Vorgesetzter;
|
// string Vorgesetzter;
|
||||||
int Schicht;
|
// int Schicht;
|
||||||
int isKrad;
|
// int isKrad;
|
||||||
|
|
||||||
|
|
||||||
public static List<Grant> DataTableToGrant(System.Data.DataTable dataTable)
|
// public static List<Grant> DataTableToGrant(System.Data.DataTable dataTable)
|
||||||
{
|
// {
|
||||||
List<Grant> x = new List<Grant>();
|
// List<Grant> x = new List<Grant>();
|
||||||
|
|
||||||
foreach (System.Data.DataRow dr in dataTable.Rows)
|
// foreach (System.Data.DataRow dr in dataTable.Rows)
|
||||||
{
|
// {
|
||||||
x.Add(new Grant()
|
// x.Add(new Grant()
|
||||||
{
|
// {
|
||||||
idparkausweise = (int)dr[0],
|
// idparkausweise = (int)dr[0],
|
||||||
MA_Vorname = dr[1].ToString(),
|
// MA_Vorname = dr[1].ToString(),
|
||||||
MA_Name = dr[2].ToString(),
|
// MA_Name = dr[2].ToString(),
|
||||||
Kennzeichen = dr[3].ToString(),
|
// Kennzeichen = dr[3].ToString(),
|
||||||
Email = dr[4].ToString(),
|
// Email = dr[4].ToString(),
|
||||||
Telefon = dr[5].ToString(),
|
// Telefon = dr[5].ToString(),
|
||||||
Abteilung = dr[6].ToString(),
|
// Abteilung = dr[6].ToString(),
|
||||||
Firma = dr[7].ToString(),
|
// Firma = dr[7].ToString(),
|
||||||
Adresse = dr[8].ToString(),
|
// Adresse = dr[8].ToString(),
|
||||||
PLZ = dr[9].ToString(),
|
// PLZ = dr[9].ToString(),
|
||||||
Vorgesetzter = dr[10].ToString(),
|
// Vorgesetzter = dr[10].ToString(),
|
||||||
Schicht = (int)dr[11],
|
// Schicht = (int)dr[11],
|
||||||
isKrad = (int)dr[12]
|
// isKrad = (int)dr[12]
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
return x;
|
// return x;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -285,10 +285,10 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
return (from System.Data.DataRow dr in dataTable.Rows select dr[startColumn + 0].ToString()).ToList();
|
return (from System.Data.DataRow dr in dataTable.Rows select dr[startColumn + 0].ToString()).ToList();
|
||||||
break;
|
//break;
|
||||||
case 2:
|
case 2:
|
||||||
return (from System.Data.DataRow dr in dataTable.Rows select dr[startColumn + 0].ToString() + " " + dr[startColumn + 1].ToString()).ToList();
|
return (from System.Data.DataRow dr in dataTable.Rows select dr[startColumn + 0].ToString() + " " + dr[startColumn + 1].ToString()).ToList();
|
||||||
break;
|
//break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -992,7 +992,6 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
case MessageBoxResult.Yes:
|
case MessageBoxResult.Yes:
|
||||||
return;
|
return;
|
||||||
break;
|
|
||||||
case MessageBoxResult.No:
|
case MessageBoxResult.No:
|
||||||
App.BringOtherInstanceToFront();
|
App.BringOtherInstanceToFront();
|
||||||
Application.Current.Shutdown();
|
Application.Current.Shutdown();
|
||||||
|
|||||||
@ -44,7 +44,6 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void Helper_DataReceived(object sender, string e)
|
private void Helper_DataReceived(object sender, string e)
|
||||||
{
|
{
|
||||||
var text = "";
|
|
||||||
Dispatcher.Invoke(() =>
|
Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
if (cbRot.ItemsSource.Cast<string>().ToList().Contains(e.Split('=')[0].ToString()))
|
if (cbRot.ItemsSource.Cast<string>().ToList().Contains(e.Split('=')[0].ToString()))
|
||||||
|
|||||||
@ -48,6 +48,186 @@
|
|||||||
<EasingDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
|
<EasingDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
|
||||||
</DoubleAnimationUsingKeyFrames>
|
</DoubleAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Connected Icon -->
|
||||||
|
<DrawingImage x:Key="ConnectedIcon">
|
||||||
|
<DrawingImage.Drawing>
|
||||||
|
<DrawingGroup ClipGeometry="M0,0 V100 H300 V0 H0 Z">
|
||||||
|
<DrawingGroup.Transform>
|
||||||
|
<TranslateTransform X="25" Y="8" />
|
||||||
|
</DrawingGroup.Transform>
|
||||||
|
<DrawingGroup Opacity="1" Transform="1,0,0,1,50,50">
|
||||||
|
<GeometryDrawing Brush="#FF22C55E">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#FF16A34A" Thickness="2" StartLineCap="Flat" EndLineCap="Flat" LineJoin="Miter" />
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry RadiusX="8" RadiusY="8" Rect="-25,-8,20,16" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
<GeometryDrawing Brush="#FF22C55E">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#FF16A34A" Thickness="2" StartLineCap="Flat" EndLineCap="Flat" LineJoin="Miter" />
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry RadiusX="8" RadiusY="8" Rect="5,-8,20,16" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
<GeometryDrawing Brush="#FFFFFFFF">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry RadiusX="1" RadiusY="1" Rect="-8,-3,6,6" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
<GeometryDrawing Brush="#FFFFFFFF">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry RadiusX="1" RadiusY="1" Rect="2,-3,6,6" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
<GeometryDrawing Brush="#FF000000">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#FF16A34A" Thickness="3" StartLineCap="Flat" EndLineCap="Flat" LineJoin="Miter" />
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<LineGeometry StartPoint="-5,0" EndPoint="5,0" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingImage.Drawing>
|
||||||
|
</DrawingImage>
|
||||||
|
<!--<DrawingImage x:Key="ConnectedIcon">
|
||||||
|
<DrawingImage.Drawing>
|
||||||
|
<DrawingGroup>
|
||||||
|
--><!-- Left connector part --><!--
|
||||||
|
<GeometryDrawing Brush="#22c55e"
|
||||||
|
Geometry="M0,8 L20,8 A8,8 0 0,1 20,24 L0,24 A8,8 0 0,1 0,8 Z">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#16a34a" Thickness="2"/>
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
</GeometryDrawing>
|
||||||
|
|
||||||
|
--><!-- Right connector part --><!--
|
||||||
|
<GeometryDrawing Brush="#22c55e"
|
||||||
|
Geometry="M30,8 L50,8 A8,8 0 0,1 50,24 L30,24 A8,8 0 0,1 30,8 Z">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#16a34a" Thickness="2"/>
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
</GeometryDrawing>
|
||||||
|
|
||||||
|
--><!-- Left pin --><!--
|
||||||
|
<GeometryDrawing Brush="White"
|
||||||
|
Geometry="M17,13 L23,13 A1,1 0 0,1 23,19 L17,19 A1,1 0 0,1 17,13 Z"/>
|
||||||
|
|
||||||
|
--><!-- Right pin --><!--
|
||||||
|
<GeometryDrawing Brush="White"
|
||||||
|
Geometry="M27,13 L33,13 A1,1 0 0,1 33,19 L27,19 A1,1 0 0,1 27,13 Z"/>
|
||||||
|
|
||||||
|
--><!-- Connection line --><!--
|
||||||
|
<GeometryDrawing>
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#16a34a" Thickness="3"/>
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<LineGeometry StartPoint="20,16" EndPoint="30,16"/>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingImage.Drawing>
|
||||||
|
</DrawingImage>-->
|
||||||
|
|
||||||
|
<!-- Not Connected Icon -->
|
||||||
|
<DrawingImage x:Key="NotConnectedIcon">
|
||||||
|
<DrawingImage.Drawing>
|
||||||
|
<DrawingGroup ClipGeometry="M0,0 V100 H300 V0 H0 Z">
|
||||||
|
<DrawingGroup.Transform>
|
||||||
|
<TranslateTransform X="30" Y="8" />
|
||||||
|
</DrawingGroup.Transform>
|
||||||
|
<DrawingGroup Opacity="1" Transform="1,0,0,1,150,50">
|
||||||
|
<GeometryDrawing Brush="#FFEF4444">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#FFDC2626" Thickness="2" StartLineCap="Flat" EndLineCap="Flat" LineJoin="Miter" />
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry RadiusX="8" RadiusY="8" Rect="-30,-8,20,16" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
<GeometryDrawing Brush="#FFEF4444">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#FFDC2626" Thickness="2" StartLineCap="Flat" EndLineCap="Flat" LineJoin="Miter" />
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry RadiusX="8" RadiusY="8" Rect="15,-8,20,16" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
<GeometryDrawing Brush="#FFFFFFFF">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry RadiusX="1" RadiusY="1" Rect="-13,-3,6,6" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
<GeometryDrawing Brush="#FFFFFFFF">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry RadiusX="1" RadiusY="1" Rect="18,-3,6,6" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
<GeometryDrawing Geometry="F1 M300,100z M0,0z M-5,-2L0,0 -5,2 M5,-2L10,0 5,2">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#FFEF4444" Thickness="2" StartLineCap="Flat" EndLineCap="Flat" LineJoin="Miter" />
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingImage.Drawing>
|
||||||
|
</DrawingImage>
|
||||||
|
<!--<DrawingImage x:Key="NotConnectedIcon">
|
||||||
|
<DrawingImage.Drawing>
|
||||||
|
<DrawingGroup>
|
||||||
|
--><!-- Left connector part --><!--
|
||||||
|
<GeometryDrawing Brush="#ef4444"
|
||||||
|
Geometry="M0,8 L20,8 A8,8 0 0,1 20,24 L0,24 A8,8 0 0,1 0,8 Z">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#dc2626" Thickness="2"/>
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
</GeometryDrawing>
|
||||||
|
|
||||||
|
--><!-- Right connector part (separated) --><!--
|
||||||
|
<GeometryDrawing Brush="#ef4444"
|
||||||
|
Geometry="M35,8 L55,8 A8,8 0 0,1 55,24 L35,24 A8,8 0 0,1 35,8 Z">
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#dc2626" Thickness="2"/>
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
</GeometryDrawing>
|
||||||
|
|
||||||
|
--><!-- Left pin --><!--
|
||||||
|
<GeometryDrawing Brush="White"
|
||||||
|
Geometry="M17,13 L23,13 A1,1 0 0,1 23,19 L17,19 A1,1 0 0,1 17,13 Z"/>
|
||||||
|
|
||||||
|
--><!-- Right pin --><!--
|
||||||
|
<GeometryDrawing Brush="White"
|
||||||
|
Geometry="M38,13 L44,13 A1,1 0 0,1 44,19 L38,19 A1,1 0 0,1 38,13 Z"/>
|
||||||
|
|
||||||
|
--><!-- Spark/gap indication --><!--
|
||||||
|
<GeometryDrawing>
|
||||||
|
<GeometryDrawing.Pen>
|
||||||
|
<Pen Brush="#ef4444" Thickness="2"/>
|
||||||
|
</GeometryDrawing.Pen>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<PathGeometry>
|
||||||
|
<PathFigure StartPoint="25,14">
|
||||||
|
<LineSegment Point="30,16"/>
|
||||||
|
<LineSegment Point="25,18"/>
|
||||||
|
</PathFigure>
|
||||||
|
<PathFigure StartPoint="30,14">
|
||||||
|
<LineSegment Point="35,16"/>
|
||||||
|
<LineSegment Point="30,18"/>
|
||||||
|
</PathFigure>
|
||||||
|
</PathGeometry>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingImage.Drawing>
|
||||||
|
</DrawingImage>-->
|
||||||
|
|
||||||
</mah:MetroWindow.Resources>
|
</mah:MetroWindow.Resources>
|
||||||
|
|
||||||
|
|
||||||
@ -1071,9 +1251,15 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Margin="0,-25,200,0" HorizontalAlignment="Right" VerticalAlignment="Top">
|
<Grid Margin="0,-25,200,0" HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||||
|
|
||||||
<Image Source="/Resources/ConnBackground.png" Width="50" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform"/>
|
<Border>
|
||||||
<Image x:Name="imgConnection" Source="/Resources/Disconnected.png" Width="50" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform"/>
|
<Grid Width="50" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top">
|
||||||
|
<Image Source="/Resources/ConnBackground.png" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform"/>
|
||||||
|
<!--<Image x:Name="imgConnection" Source="/Resources/Disconnected.png" Width="50" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform"/>-->
|
||||||
|
<Image x:Name="imgConnection" Source="{StaticResource NotConnectedIcon}" Width="38" Height="30" Margin="2,0,2,4" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform"/>
|
||||||
|
<Image x:Name="imgSecureConn" Source="/Resources/Lock.png" ToolTip="Verbindung OK und gesichert" Visibility="Collapsed" Width="16" Margin="26,2,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<Button x:Name="btnDarkMode" Click="btnDarkMode_Click" Padding="2,3,2,0" FontWeight="Regular" Visibility="Visible" Panel.ZIndex="100" Margin="50,0,0,0" HorizontalAlignment="Left" Width="35" Height="25" VerticalAlignment="Top">
|
<Button x:Name="btnDarkMode" Click="btnDarkMode_Click" Padding="2,3,2,0" FontWeight="Regular" Visibility="Visible" Panel.ZIndex="100" Margin="50,0,0,0" HorizontalAlignment="Left" Width="35" Height="25" VerticalAlignment="Top">
|
||||||
<Image x:Name="imgDarkModeButton" Source="/Resources/Moon.png"/>
|
<Image x:Name="imgDarkModeButton" Source="/Resources/Moon.png"/>
|
||||||
|
|||||||
@ -43,7 +43,7 @@ namespace ZKuP
|
|||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
}
|
}
|
||||||
|
|
||||||
public const string Version = "5.1.0.0";
|
public const string Version = "5.1.0.1";
|
||||||
public static Roles LoggedInRole { get; private set; } = Roles.None;
|
public static Roles LoggedInRole { get; private set; } = Roles.None;
|
||||||
|
|
||||||
|
|
||||||
@ -91,10 +91,11 @@ namespace ZKuP
|
|||||||
DispatcherTimer ausfahrtTimer = new DispatcherTimer();
|
DispatcherTimer ausfahrtTimer = new DispatcherTimer();
|
||||||
|
|
||||||
RoutedCommand resetWindow;
|
RoutedCommand resetWindow;
|
||||||
RoutedCommand skullWindow;
|
//RoutedCommand skullWindow;
|
||||||
|
|
||||||
int maxBikes = 24;
|
int maxBikes = 24;
|
||||||
bool ReadyToSavePosition = false;
|
bool ReadyToSavePosition = false;
|
||||||
|
bool isSecureConn = false;
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
@ -280,7 +281,7 @@ namespace ZKuP
|
|||||||
await Task.Run(() => AuthenticateUser());
|
await Task.Run(() => AuthenticateUser());
|
||||||
|
|
||||||
|
|
||||||
SQL.GetCipher();
|
isSecureConn = SQL.IsSecureConnection();
|
||||||
//#if !DEBUG
|
//#if !DEBUG
|
||||||
Helper.CheckIfMultipleInstances();
|
Helper.CheckIfMultipleInstances();
|
||||||
//#endif
|
//#endif
|
||||||
@ -528,8 +529,9 @@ namespace ZKuP
|
|||||||
this.Top = Settings.GetSettingDouble("Top");
|
this.Top = Settings.GetSettingDouble("Top");
|
||||||
|
|
||||||
var ws = Settings.GetSetting("WindowState");
|
var ws = Settings.GetSetting("WindowState");
|
||||||
|
#pragma warning disable CS0252
|
||||||
this.WindowState = ws == "" ? WindowState.Normal : (WindowState)ws;
|
this.WindowState = ws == "" ? WindowState.Normal : (WindowState)ws;
|
||||||
|
#pragma warning restore CS0252
|
||||||
//double ratio = Settings.GetSettingDouble("ColumnRatio");
|
//double ratio = Settings.GetSettingDouble("ColumnRatio");
|
||||||
|
|
||||||
// Gespeicherte Werte laden
|
// Gespeicherte Werte laden
|
||||||
@ -1394,6 +1396,7 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool lastConn = false;
|
bool lastConn = false;
|
||||||
|
bool lastConnSecure = false;
|
||||||
bool connMsg = true;
|
bool connMsg = true;
|
||||||
private async Task CheckConnection(bool first = false)
|
private async Task CheckConnection(bool first = false)
|
||||||
{
|
{
|
||||||
@ -1406,18 +1409,33 @@ namespace ZKuP
|
|||||||
|
|
||||||
if (conn.IsConnected)
|
if (conn.IsConnected)
|
||||||
{
|
{
|
||||||
if (conn.IsConnected != lastConn)
|
if (conn.IsConnected != lastConn || isSecureConn != lastConnSecure)
|
||||||
{
|
{
|
||||||
imgConnection.Source = new BitmapImage(new Uri(@"pack://application:,,,/"
|
//imgConnection.Source = new BitmapImage(new Uri(@"pack://application:,,,/"
|
||||||
+ System.Reflection.Assembly.GetExecutingAssembly().GetName().Name
|
// + System.Reflection.Assembly.GetExecutingAssembly().GetName().Name
|
||||||
+ ";component/"
|
// + ";component/"
|
||||||
+ $"Resources/Connected.png", UriKind.Absolute));
|
// + $"Resources/ConnectedSecure.png", UriKind.Absolute));
|
||||||
|
imgConnection.Source = (ImageSource)this.FindResource("ConnectedIcon");
|
||||||
|
|
||||||
imgConnection.ToolTip = $"Verbindung OK";
|
imgConnection.ToolTip = $"Verbindung OK";
|
||||||
|
|
||||||
(this.Resources["sbConnection"] as System.Windows.Media.Animation.Storyboard).Begin();
|
(this.Resources["sbConnection"] as System.Windows.Media.Animation.Storyboard).Begin();
|
||||||
(this.Resources["sbConnection"] as System.Windows.Media.Animation.Storyboard).Stop();
|
(this.Resources["sbConnection"] as System.Windows.Media.Animation.Storyboard).Stop();
|
||||||
lastConn = conn.IsConnected;
|
lastConn = conn.IsConnected;
|
||||||
|
|
||||||
|
|
||||||
|
if (isSecureConn)
|
||||||
|
{
|
||||||
|
lastConnSecure = isSecureConn;
|
||||||
|
imgConnection.ToolTip += $" und gesichert";
|
||||||
|
imgSecureConn.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lastConnSecure = isSecureConn;
|
||||||
|
imgConnection.ToolTip = $"Verbindung OK";
|
||||||
|
imgSecureConn.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1432,21 +1450,22 @@ namespace ZKuP
|
|||||||
|
|
||||||
MessageBox.Show("Sie haben keine Verbindung zur Datenbank und das DB VPN 'Ivanti Secure Access (ehem. Pulse Secure)' ist nicht verbunden\n\n" +
|
MessageBox.Show("Sie haben keine Verbindung zur Datenbank und das DB VPN 'Ivanti Secure Access (ehem. Pulse Secure)' ist nicht verbunden\n\n" +
|
||||||
"Befinden Sie sich außerhalb des BKU Netzes, bitte die Verbindung zum VPN sicherstellen\n\n" +
|
"Befinden Sie sich außerhalb des BKU Netzes, bitte die Verbindung zum VPN sicherstellen\n\n" +
|
||||||
"Nach Herstellen der Verbindung erneut starten\n" +
|
"Nach Herstellen der Verbindung erneut starten\n", "VPN verbunden?", MessageBoxButton.OK, MessageBoxImage.Information);/*"Die Anwendung wird jetzt geschlossen"*/
|
||||||
"Die Anwendung wird jetzt geschlossen", "VPN verbunden?", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Application.Current.Shutdown();
|
//Application.Current.Shutdown();
|
||||||
Environment.Exit(0);
|
//Environment.Exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!conn.IsConnected && conn.IsConnected != lastConn)
|
if (!conn.IsConnected && conn.IsConnected != lastConn)
|
||||||
{
|
{
|
||||||
imgConnection.Source = new BitmapImage(new Uri(@"pack://application:,,,/"
|
//imgConnection.Source = new BitmapImage(new Uri(@"pack://application:,,,/"
|
||||||
+ System.Reflection.Assembly.GetExecutingAssembly().GetName().Name
|
// + System.Reflection.Assembly.GetExecutingAssembly().GetName().Name
|
||||||
+ ";component/"
|
// + ";component/"
|
||||||
+ $"Resources/Disconnected.png", UriKind.Absolute));
|
// + $"Resources/Disconnected.png", UriKind.Absolute));
|
||||||
|
imgConnection.Source = (ImageSource)this.FindResource("NotConnectedIcon");
|
||||||
|
imgSecureConn.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
imgConnection.ToolTip = $"Verbindung zum Server unterbrochen\n\nEs sind keine Änderungen oder Abfragen möglich";
|
imgConnection.ToolTip = $"Verbindung zum Server unterbrochen\n\nEs sind keine Änderungen oder Abfragen möglich";
|
||||||
|
|
||||||
@ -2493,7 +2512,7 @@ namespace ZKuP
|
|||||||
idFirma_Besucher = (int)(dc).Row.ItemArray[14];
|
idFirma_Besucher = (int)(dc).Row.ItemArray[14];
|
||||||
kat = "2";
|
kat = "2";
|
||||||
}
|
}
|
||||||
|
#pragma warning disable CS0472
|
||||||
if (idFirma_Besucher != null && idFirma_Besucher != -1)
|
if (idFirma_Besucher != null && idFirma_Besucher != -1)
|
||||||
{
|
{
|
||||||
AspInfo aI = new AspInfo(idFirma_Besucher, kat, 2, (dc).Row.ItemArray[0].ToString());
|
AspInfo aI = new AspInfo(idFirma_Besucher, kat, 2, (dc).Row.ItemArray[0].ToString());
|
||||||
@ -2503,6 +2522,7 @@ namespace ZKuP
|
|||||||
else
|
else
|
||||||
MessageBox.Show("Keine gültigen Informationen vorhanden", "Fehler", MessageBoxButton.OK, MessageBoxImage.Information);
|
MessageBox.Show("Keine gültigen Informationen vorhanden", "Fehler", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
}
|
}
|
||||||
|
#pragma warning restore CS0472
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,12 +25,12 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
private List<Asp> myVar;
|
//private List<Asp> myVar;
|
||||||
public List<Asp> aspView
|
//public List<Asp> aspView
|
||||||
{
|
//{
|
||||||
get { return myVar; }
|
// get { return myVar; }
|
||||||
set { myVar = value; }
|
// set { myVar = value; }
|
||||||
}
|
//}
|
||||||
|
|
||||||
DataTable asp = new DataTable("Asp");
|
DataTable asp = new DataTable("Asp");
|
||||||
string UserID = "0";
|
string UserID = "0";
|
||||||
@ -57,7 +57,7 @@ namespace ZKuP
|
|||||||
asp = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.ansprechpartner WHERE Name LIKE '%{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}%' OR Vertreter LIKE '%{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}%' OR Vorgesetzter LIKE '%{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}%' OR CreatorID = '{UserID}' ORDER BY Name ASC", asp).Result;
|
asp = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.ansprechpartner WHERE Name LIKE '%{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}%' OR Vertreter LIKE '%{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}%' OR Vorgesetzter LIKE '%{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}%' OR CreatorID = '{UserID}' ORDER BY Name ASC", asp).Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
aspView = Asp.DataTableToAsp(asp);
|
//aspView = Asp.DataTableToAsp(asp);
|
||||||
dgAsp.DataContext = asp;
|
dgAsp.DataContext = asp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,34 +217,34 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Asp
|
//public class Asp
|
||||||
{
|
//{
|
||||||
string Name;
|
// string Name;
|
||||||
string Vertreter;
|
// string Vertreter;
|
||||||
string Tel_Nr;
|
// string Tel_Nr;
|
||||||
string Vorgesetzter;
|
// string Vorgesetzter;
|
||||||
string Tel_Vertreter;
|
// string Tel_Vertreter;
|
||||||
string Tel_Vorgesetzter;
|
// string Tel_Vorgesetzter;
|
||||||
|
|
||||||
|
|
||||||
public static List<Asp> DataTableToAsp(System.Data.DataTable dataTable)
|
// public static List<Asp> DataTableToAsp(System.Data.DataTable dataTable)
|
||||||
{
|
// {
|
||||||
List<Asp> x = new List<Asp>();
|
// List<Asp> x = new List<Asp>();
|
||||||
|
|
||||||
foreach (DataRow dr in dataTable.Rows)
|
// foreach (DataRow dr in dataTable.Rows)
|
||||||
{
|
// {
|
||||||
x.Add(new Asp()
|
// x.Add(new Asp()
|
||||||
{
|
// {
|
||||||
Name = dr[0].ToString(),
|
// Name = dr[0].ToString(),
|
||||||
Vertreter = dr[1].ToString(),
|
// Vertreter = dr[1].ToString(),
|
||||||
Tel_Nr = dr[2].ToString(),
|
// Tel_Nr = dr[2].ToString(),
|
||||||
Vorgesetzter = dr[3].ToString(),
|
// Vorgesetzter = dr[3].ToString(),
|
||||||
Tel_Vertreter = dr[4].ToString(),
|
// Tel_Vertreter = dr[4].ToString(),
|
||||||
Tel_Vorgesetzter = dr[5].ToString()
|
// Tel_Vorgesetzter = dr[5].ToString()
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
return x;
|
// return x;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,12 +28,12 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
private List<Deliver> myVar;
|
//private List<Deliver> myVar;
|
||||||
public List<Deliver> DeliveriesView
|
//public List<Deliver> DeliveriesView
|
||||||
{
|
//{
|
||||||
get { return myVar; }
|
// get { return myVar; }
|
||||||
set { myVar = value; OnPropertyChanged(); }
|
// set { myVar = value; OnPropertyChanged(); }
|
||||||
}
|
//}
|
||||||
System.Data.DataTable lieferanten = new System.Data.DataTable("lieferanten");
|
System.Data.DataTable lieferanten = new System.Data.DataTable("lieferanten");
|
||||||
|
|
||||||
public ManageDeliveries()
|
public ManageDeliveries()
|
||||||
@ -41,7 +41,7 @@ namespace ZKuP
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
//DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
dgLieferanten.DataContext = lieferanten;
|
dgLieferanten.DataContext = lieferanten;
|
||||||
|
|
||||||
dgLieferanten.Items.SortDescriptions.Clear();
|
dgLieferanten.Items.SortDescriptions.Clear();
|
||||||
@ -70,7 +70,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
|
|
||||||
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
//DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
dgLieferanten.ScrollIntoView(dgLieferanten.Items[dgLieferanten.Items.Count - 1]); //scroll to last
|
dgLieferanten.ScrollIntoView(dgLieferanten.Items[dgLieferanten.Items.Count - 1]); //scroll to last
|
||||||
dgLieferanten.UpdateLayout();
|
dgLieferanten.UpdateLayout();
|
||||||
ResetInput();
|
ResetInput();
|
||||||
@ -124,7 +124,7 @@ namespace ZKuP
|
|||||||
dgLieferanten.PreviewKeyDown += DgLieferanten_PreviewKeyDown;
|
dgLieferanten.PreviewKeyDown += DgLieferanten_PreviewKeyDown;
|
||||||
|
|
||||||
lieferanten = await SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten);
|
lieferanten = await SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten);
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
//DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ namespace ZKuP
|
|||||||
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.lieferanten WHERE `ID` = '{arr[4]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.lieferanten WHERE `ID` = '{arr[4]}'");
|
||||||
|
|
||||||
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
//DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ namespace ZKuP
|
|||||||
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.lieferanten WHERE `ID` = '{arr[4]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.lieferanten WHERE `ID` = '{arr[4]}'");
|
||||||
|
|
||||||
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
lieferanten = SQL.ReadSQL($"Select * from {MainWindow.table}.lieferanten", lieferanten).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
//DeliveriesView = Deliver.DataTableToDeliver(lieferanten);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,32 +231,32 @@ namespace ZKuP
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Deliver
|
//public class Deliver
|
||||||
{
|
//{
|
||||||
public string Firma;
|
// public string Firma;
|
||||||
string Fahrer;
|
// string Fahrer;
|
||||||
string Handynr;
|
// string Handynr;
|
||||||
string Kennzeichen;
|
// string Kennzeichen;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static List<Deliver> DataTableToDeliver(System.Data.DataTable dataTable)
|
// public static List<Deliver> DataTableToDeliver(System.Data.DataTable dataTable)
|
||||||
{
|
// {
|
||||||
List<Deliver> x = new List<Deliver>();
|
// List<Deliver> x = new List<Deliver>();
|
||||||
|
|
||||||
foreach (System.Data.DataRow dr in dataTable.Rows)
|
// foreach (System.Data.DataRow dr in dataTable.Rows)
|
||||||
{
|
// {
|
||||||
x.Add(new Deliver()
|
// x.Add(new Deliver()
|
||||||
{
|
// {
|
||||||
Firma = dr[0].ToString(),
|
// Firma = dr[0].ToString(),
|
||||||
Fahrer = dr[1].ToString(),
|
// Fahrer = dr[1].ToString(),
|
||||||
Handynr = dr[2].ToString(),
|
// Handynr = dr[2].ToString(),
|
||||||
Kennzeichen = dr[3].ToString()
|
// Kennzeichen = dr[3].ToString()
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
return x;
|
// return x;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,12 +25,12 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
private List<Deliver> myVar;
|
//private List<Deliver> myVar;
|
||||||
public List<Deliver> DeliveriesView
|
//public List<Deliver> DeliveriesView
|
||||||
{
|
//{
|
||||||
get { return myVar; }
|
// get { return myVar; }
|
||||||
set { myVar = value; OnPropertyChanged(); }
|
// set { myVar = value; OnPropertyChanged(); }
|
||||||
}
|
//}
|
||||||
System.Data.DataTable entstoerdienste = new System.Data.DataTable("entstoerdienste");
|
System.Data.DataTable entstoerdienste = new System.Data.DataTable("entstoerdienste");
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ namespace ZKuP
|
|||||||
cbFirma.ItemsSource = list;
|
cbFirma.ItemsSource = list;
|
||||||
|
|
||||||
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
//DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
||||||
dgEntstoerdienste.DataContext = entstoerdienste;
|
dgEntstoerdienste.DataContext = entstoerdienste;
|
||||||
|
|
||||||
dgEntstoerdienste.Items.SortDescriptions.Clear();
|
dgEntstoerdienste.Items.SortDescriptions.Clear();
|
||||||
@ -91,7 +91,7 @@ namespace ZKuP
|
|||||||
dgEntstoerdienste.PreviewKeyDown += DgEntstoerdienste_PreviewKeyDown;
|
dgEntstoerdienste.PreviewKeyDown += DgEntstoerdienste_PreviewKeyDown;
|
||||||
|
|
||||||
entstoerdienste = await SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste);
|
entstoerdienste = await SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste);
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
//DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void DgEntstoerdienste_PreviewKeyDown(object sender, KeyEventArgs e)
|
private async void DgEntstoerdienste_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||||
@ -105,7 +105,7 @@ namespace ZKuP
|
|||||||
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.entstoerdienste WHERE `identstoerdienste` = '{arr[0]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.entstoerdienste WHERE `identstoerdienste` = '{arr[0]}'");
|
||||||
|
|
||||||
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
//DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ namespace ZKuP
|
|||||||
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.entstoerdienste WHERE `identstoerdienste` = '{arr[0]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.entstoerdienste WHERE `identstoerdienste` = '{arr[0]}'");
|
||||||
|
|
||||||
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
//DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ namespace ZKuP
|
|||||||
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.entstoerdienste WHERE `identstoerdienste` = '{arr[0]}'");
|
await SQL.WriteSQL($"DELETE FROM {MainWindow.table}.entstoerdienste WHERE `identstoerdienste` = '{arr[0]}'");
|
||||||
|
|
||||||
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
//DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
|
|
||||||
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
entstoerdienste = SQL.ReadSQL($"Select * from {MainWindow.table}.entstoerdienste", entstoerdienste).Result;
|
||||||
DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
//DeliveriesView = Deliver.DataTableToDeliver(entstoerdienste);
|
||||||
dgEntstoerdienste.ScrollIntoView(dgEntstoerdienste.Items[dgEntstoerdienste.Items.Count - 1]); //scroll to last
|
dgEntstoerdienste.ScrollIntoView(dgEntstoerdienste.Items[dgEntstoerdienste.Items.Count - 1]); //scroll to last
|
||||||
dgEntstoerdienste.UpdateLayout();
|
dgEntstoerdienste.UpdateLayout();
|
||||||
ResetInput();
|
ResetInput();
|
||||||
@ -222,31 +222,31 @@ namespace ZKuP
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Deliver
|
//public class Deliver
|
||||||
{
|
//{
|
||||||
public string Firma;
|
// public string Firma;
|
||||||
string Fahrer;
|
// string Fahrer;
|
||||||
string Handynr;
|
// string Handynr;
|
||||||
string Kennzeichen;
|
// string Kennzeichen;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static List<Deliver> DataTableToDeliver(System.Data.DataTable dataTable)
|
// public static List<Deliver> DataTableToDeliver(System.Data.DataTable dataTable)
|
||||||
{
|
// {
|
||||||
List<Deliver> x = new List<Deliver>();
|
// List<Deliver> x = new List<Deliver>();
|
||||||
|
|
||||||
foreach (System.Data.DataRow dr in dataTable.Rows)
|
// foreach (System.Data.DataRow dr in dataTable.Rows)
|
||||||
{
|
// {
|
||||||
x.Add(new Deliver()
|
// x.Add(new Deliver()
|
||||||
{
|
// {
|
||||||
Firma = dr[0].ToString(),
|
// Firma = dr[0].ToString(),
|
||||||
Fahrer = dr[1].ToString(),
|
// Fahrer = dr[1].ToString(),
|
||||||
Handynr = dr[2].ToString(),
|
// Handynr = dr[2].ToString(),
|
||||||
Kennzeichen = dr[3].ToString()
|
// Kennzeichen = dr[3].ToString()
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
return x;
|
// return x;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@ -37,12 +37,12 @@ namespace ZKuP
|
|||||||
"M2 AM"
|
"M2 AM"
|
||||||
};
|
};
|
||||||
|
|
||||||
private List<Users> myVar;
|
//private List<Users> myVar;
|
||||||
public List<Users> UserView
|
//public List<Users> UserView
|
||||||
{
|
//{
|
||||||
get { return myVar; }
|
// get { return myVar; }
|
||||||
set { myVar = value; OnPropertyChanged(); }
|
// set { myVar = value; OnPropertyChanged(); }
|
||||||
}
|
//}
|
||||||
|
|
||||||
DataTable userList = new DataTable("userList");
|
DataTable userList = new DataTable("userList");
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ namespace ZKuP
|
|||||||
userList = SQL.ReadSQL($"Select * from {MainWindow.table}.users", userList).Result;
|
userList = SQL.ReadSQL($"Select * from {MainWindow.table}.users", userList).Result;
|
||||||
userList.DefaultView.Sort = "Username";
|
userList.DefaultView.Sort = "Username";
|
||||||
userList = userList.DefaultView.ToTable();
|
userList = userList.DefaultView.ToTable();
|
||||||
UserView = Users.DataTableToUserList(userList);
|
//UserView = Users.DataTableToUserList(userList);
|
||||||
dgUsers.DataContext = userList;
|
dgUsers.DataContext = userList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,10 +87,10 @@ namespace ZKuP
|
|||||||
userList = SQL.ReadSQL($"Select * from {MainWindow.table}.users", userList).Result;
|
userList = SQL.ReadSQL($"Select * from {MainWindow.table}.users", userList).Result;
|
||||||
userList.DefaultView.Sort = "Username";
|
userList.DefaultView.Sort = "Username";
|
||||||
userList = userList.DefaultView.ToTable();
|
userList = userList.DefaultView.ToTable();
|
||||||
UserView = Users.DataTableToUserList(userList);
|
//UserView = Users.DataTableToUserList(userList);
|
||||||
dgUsers.DataContext = userList;
|
dgUsers.DataContext = userList;
|
||||||
|
|
||||||
dgUsers.ScrollIntoView(UserView.Last());
|
//dgUsers.ScrollIntoView(UserView.Last());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MessageBox.Show("Der angegebene User existiert bereits!", "User bereits vorhanden", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show("Der angegebene User existiert bereits!", "User bereits vorhanden", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
@ -136,7 +136,7 @@ namespace ZKuP
|
|||||||
userList = SQL.ReadSQL($"Select * from {MainWindow.table}.users", userList).Result;
|
userList = SQL.ReadSQL($"Select * from {MainWindow.table}.users", userList).Result;
|
||||||
userList.DefaultView.Sort = "Username asc";
|
userList.DefaultView.Sort = "Username asc";
|
||||||
userList = userList.DefaultView.ToTable();
|
userList = userList.DefaultView.ToTable();
|
||||||
UserView = Users.DataTableToUserList(userList);
|
//UserView = Users.DataTableToUserList(userList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ namespace ZKuP
|
|||||||
userList = SQL.ReadSQL($"Select * from {MainWindow.table}.users", userList).Result;
|
userList = SQL.ReadSQL($"Select * from {MainWindow.table}.users", userList).Result;
|
||||||
userList.DefaultView.Sort = "Username";
|
userList.DefaultView.Sort = "Username";
|
||||||
userList = userList.DefaultView.ToTable();
|
userList = userList.DefaultView.ToTable();
|
||||||
UserView = Users.DataTableToUserList(userList);
|
//UserView = Users.DataTableToUserList(userList);
|
||||||
dgUsers.DataContext = userList;
|
dgUsers.DataContext = userList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -188,26 +188,26 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class Users
|
//public class Users
|
||||||
{
|
//{
|
||||||
string Username;
|
// string Username;
|
||||||
string Role;
|
// string Role;
|
||||||
|
|
||||||
|
|
||||||
public static List<Users> DataTableToUserList(System.Data.DataTable dataTable)
|
// public static List<Users> DataTableToUserList(System.Data.DataTable dataTable)
|
||||||
{
|
// {
|
||||||
List<Users> x = new List<Users>();
|
// List<Users> x = new List<Users>();
|
||||||
|
|
||||||
foreach (DataRow dr in dataTable.Rows)
|
// foreach (DataRow dr in dataTable.Rows)
|
||||||
{
|
// {
|
||||||
x.Add(new Users()
|
// x.Add(new Users()
|
||||||
{
|
// {
|
||||||
Username = dr[1].ToString(),
|
// Username = dr[1].ToString(),
|
||||||
Role = dr[2].ToString()
|
// Role = dr[2].ToString()
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
return x;
|
// return x;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,12 +28,12 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
private List<Visitor> myVar;
|
//private List<Visitor> myVar;
|
||||||
public List<Visitor> VisitorView
|
//public List<Visitor> VisitorView
|
||||||
{
|
//{
|
||||||
get { return myVar; }
|
// get { return myVar; }
|
||||||
set { myVar = value; OnPropertyChanged(); }
|
// set { myVar = value; OnPropertyChanged(); }
|
||||||
}
|
//}
|
||||||
|
|
||||||
DataTable visitors = new DataTable("Visitors");
|
DataTable visitors = new DataTable("Visitors");
|
||||||
private Dictionary<string, List<string>> visitorSearchList = new Dictionary<string, List<string>>();
|
private Dictionary<string, List<string>> visitorSearchList = new Dictionary<string, List<string>>();
|
||||||
@ -96,7 +96,7 @@ namespace ZKuP
|
|||||||
$"OR Ansprechpartner_Intern = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}' ORDER BY Name ASC"
|
$"OR Ansprechpartner_Intern = '{Helper.InsertSpaceBeforeUpperCase(Environment.UserName)}' ORDER BY Name ASC"
|
||||||
, visitors).Result;
|
, visitors).Result;
|
||||||
|
|
||||||
VisitorView = Visitor.DataTableToVisitor(visitors);
|
//VisitorView = Visitor.DataTableToVisitor(visitors);
|
||||||
dgVisitors.DataContext = visitors;
|
dgVisitors.DataContext = visitors;
|
||||||
|
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ namespace ZKuP
|
|||||||
private void requestListAdmin()
|
private void requestListAdmin()
|
||||||
{
|
{
|
||||||
visitors = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.besucher ORDER BY Name ASC", visitors).Result;
|
visitors = SQL.ReadSQL($"SELECT * FROM {MainWindow.table}.besucher ORDER BY Name ASC", visitors).Result;
|
||||||
VisitorView = Visitor.DataTableToVisitor(visitors);
|
//VisitorView = Visitor.DataTableToVisitor(visitors);
|
||||||
dgVisitors.DataContext = visitors;
|
dgVisitors.DataContext = visitors;
|
||||||
|
|
||||||
visitorSearchList.Clear();
|
visitorSearchList.Clear();
|
||||||
@ -693,7 +693,7 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
visitors.DefaultView.RowFilter = $"";
|
visitors.DefaultView.RowFilter = $"";
|
||||||
|
|
||||||
Task.Run(() => VisitorView = Visitor.DataTableToVisitor(visitors));
|
//Task.Run(() => VisitorView = Visitor.DataTableToVisitor(visitors));
|
||||||
dgVisitors.DataContext = visitors;
|
dgVisitors.DataContext = visitors;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -875,42 +875,42 @@ namespace ZKuP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class Visitor
|
//public class Visitor
|
||||||
{
|
//{
|
||||||
public string Name;
|
// public string Name;
|
||||||
string Verantwortlicher_MA;
|
// string Verantwortlicher_MA;
|
||||||
string Tel_Nr_Besucher;
|
// string Tel_Nr_Besucher;
|
||||||
string Anzahl_Begleitpersonen;
|
// string Anzahl_Begleitpersonen;
|
||||||
string Besuchstag;
|
// string Besuchstag;
|
||||||
string Grund_des_Besuchs;
|
// string Grund_des_Besuchs;
|
||||||
string Oertlichkeit;
|
// string Oertlichkeit;
|
||||||
string Ansprechpartner_Intern;
|
// string Ansprechpartner_Intern;
|
||||||
string Tel_Nr_Ansprechpartner_Intern;
|
// string Tel_Nr_Ansprechpartner_Intern;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static List<Visitor> DataTableToVisitor(System.Data.DataTable dataTable)
|
// public static List<Visitor> DataTableToVisitor(System.Data.DataTable dataTable)
|
||||||
{
|
// {
|
||||||
List<Visitor> x = new List<Visitor>();
|
// List<Visitor> x = new List<Visitor>();
|
||||||
|
|
||||||
foreach (DataRow dr in dataTable.Rows)
|
// foreach (DataRow dr in dataTable.Rows)
|
||||||
{
|
// {
|
||||||
x.Add(new Visitor()
|
// x.Add(new Visitor()
|
||||||
{
|
// {
|
||||||
Name = dr[1].ToString(),
|
// Name = dr[1].ToString(),
|
||||||
Verantwortlicher_MA = dr[2].ToString(),
|
// Verantwortlicher_MA = dr[2].ToString(),
|
||||||
Tel_Nr_Besucher = dr[3].ToString(),
|
// Tel_Nr_Besucher = dr[3].ToString(),
|
||||||
Anzahl_Begleitpersonen = dr[4].ToString(),
|
// Anzahl_Begleitpersonen = dr[4].ToString(),
|
||||||
Besuchstag = dr[5].ToString(),
|
// Besuchstag = dr[5].ToString(),
|
||||||
Grund_des_Besuchs = dr[6].ToString(),
|
// Grund_des_Besuchs = dr[6].ToString(),
|
||||||
Ansprechpartner_Intern = dr[7].ToString(),
|
// Ansprechpartner_Intern = dr[7].ToString(),
|
||||||
Tel_Nr_Ansprechpartner_Intern = dr[8].ToString(),
|
// Tel_Nr_Ansprechpartner_Intern = dr[8].ToString(),
|
||||||
Oertlichkeit = dr[9].ToString()
|
// Oertlichkeit = dr[9].ToString()
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
return x;
|
// return x;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
ZKuP/Resources/ConnectedSecure.png
Normal file
BIN
ZKuP/Resources/ConnectedSecure.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
BIN
ZKuP/Resources/Lock.png
Normal file
BIN
ZKuP/Resources/Lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
58
ZKuP/SQL.cs
58
ZKuP/SQL.cs
@ -19,10 +19,12 @@ namespace ZKuP
|
|||||||
{
|
{
|
||||||
private static string p = "fNZG8bO+b8lbajxNUCPCIRNBap4/T5N5Qoa0Rec3P9b2EiwC5eNIwfEMjR5Fvc/W";
|
private static string p = "fNZG8bO+b8lbajxNUCPCIRNBap4/T5N5Qoa0Rec3P9b2EiwC5eNIwfEMjR5Fvc/W";
|
||||||
private static string s = "KYgjkRVn0edFDca2GbZq/A==";
|
private static string s = "KYgjkRVn0edFDca2GbZq/A==";
|
||||||
private static string u = "F/u2njMf6aE4krZGTjzgZw==";
|
|
||||||
private static string uSSL = "miSRZrFLxAAWlzRLx9B6Ww==";
|
private static string uSSL = "miSRZrFLxAAWlzRLx9B6Ww==";
|
||||||
private static string d = "xWb4X9gPEzwe76zqpysF3w==";
|
private static string d = "xWb4X9gPEzwe76zqpysF3w==";
|
||||||
|
#if DEBUG
|
||||||
|
private static string u = "F/u2njMf6aE4krZGTjzgZw==";
|
||||||
private static string dTest = "e+tv3ZaP+cewOJgE7jNNlA==";
|
private static string dTest = "e+tv3ZaP+cewOJgE7jNNlA==";
|
||||||
|
#endif
|
||||||
//static MySqlConnection conn = new MySqlConnection(GetConnstr());
|
//static MySqlConnection conn = new MySqlConnection(GetConnstr());
|
||||||
//private static MySqlConnection _conn;
|
//private static MySqlConnection _conn;
|
||||||
//public static MySqlConnection conn
|
//public static MySqlConnection conn
|
||||||
@ -61,8 +63,6 @@ namespace ZKuP
|
|||||||
isOnline = false;
|
isOnline = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
isOnline = false;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,6 @@ namespace ZKuP
|
|||||||
System.Windows.Application.Current.Shutdown();
|
System.Windows.Application.Current.Shutdown();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +112,7 @@ namespace ZKuP
|
|||||||
return $"Server={GetIP()};" +
|
return $"Server={GetIP()};" +
|
||||||
$"Uid={Crypto.Decrypt(Crypto.GetHashKey("8734FCD0D69756D3AE7154E69F8042CA"), uSSL)};" +
|
$"Uid={Crypto.Decrypt(Crypto.GetHashKey("8734FCD0D69756D3AE7154E69F8042CA"), uSSL)};" +
|
||||||
$"Pwd={Crypto.Decrypt(Crypto.GetHashKey("71A209CC81FDB2F458C4EC8DF7090154"), p)};" +
|
$"Pwd={Crypto.Decrypt(Crypto.GetHashKey("71A209CC81FDB2F458C4EC8DF7090154"), p)};" +
|
||||||
$"database={Crypto.Decrypt(Crypto.GetHashKey("B79DE37BC846D9B1054EE837AAA45D83"), dTest)}" +
|
$"database={Crypto.Decrypt(Crypto.GetHashKey("8EB0CC56E502BFC5C19F6A0A0A53D543"), d)}" +
|
||||||
$";SslMode=Required;{(withTimeout ? "Connection Timeout = 10" : "")}";
|
$";SslMode=Required;{(withTimeout ? "Connection Timeout = 10" : "")}";
|
||||||
|
|
||||||
//Ohne SSL
|
//Ohne SSL
|
||||||
@ -124,12 +123,12 @@ namespace ZKuP
|
|||||||
// $";{(withTimeout ? "Connection Timeout = 10" : "")}";
|
// $";{(withTimeout ? "Connection Timeout = 10" : "")}";
|
||||||
|
|
||||||
#elif DEBUG
|
#elif DEBUG
|
||||||
//Ohne SSL
|
////Ohne SSL
|
||||||
//return $"Server={GetIP()};" +
|
//return $"Server={GetIP()};" +
|
||||||
// $"Uid={Crypto.Decrypt(Crypto.GetHashKey("990C535389C3A18FFD44951DAA291161"), u)};" +
|
// $"Uid={Crypto.Decrypt(Crypto.GetHashKey("990C535389C3A18FFD44951DAA291161"), u)};" +
|
||||||
// $"Pwd={Crypto.Decrypt(Crypto.GetHashKey("71A209CC81FDB2F458C4EC8DF7090154"), p)};" +
|
// $"Pwd={Crypto.Decrypt(Crypto.GetHashKey("71A209CC81FDB2F458C4EC8DF7090154"), p)};" +
|
||||||
// $"database={Crypto.Decrypt(Crypto.GetHashKey("B79DE37BC846D9B1054EE837AAA45D83"), dTest)}" +
|
// $"database={Crypto.Decrypt(Crypto.GetHashKey("B79DE37BC846D9B1054EE837AAA45D83"), dTest)}" +
|
||||||
// $";{(withTimeout ? "Connection Timeout = 10" : "")}";
|
// $";SslMode=none;{(withTimeout ? "Connection Timeout = 10" : "")}";
|
||||||
|
|
||||||
|
|
||||||
//Mit SSL
|
//Mit SSL
|
||||||
@ -152,27 +151,40 @@ namespace ZKuP
|
|||||||
return new MySqlConnection(GetConnstr());
|
return new MySqlConnection(GetConnstr());
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void GetCipher()
|
internal static bool IsSecureConnection()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
//#if DEBUG
|
||||||
using (var conn = GetConnection())
|
using (var conn = GetConnection())
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
|
|
||||||
var cmd = new MySqlCommand("SHOW STATUS LIKE 'Ssl_cipher'", conn);
|
var cmd = new MySqlCommand("SHOW STATUS LIKE 'Ssl_cipher'", conn);
|
||||||
using (var reader = cmd.ExecuteReader())
|
using (var reader = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
string varName = "";
|
||||||
|
string varValue = "";
|
||||||
|
|
||||||
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
while (reader.Read())
|
varName = reader.GetString(0); // Variable_name
|
||||||
{
|
varValue = reader.GetString(1); // Value
|
||||||
string varName = reader.GetString(0); // Variable_name
|
Console.WriteLine($"{varName}: {varValue}");
|
||||||
string varValue = reader.GetString(1); // Value
|
|
||||||
Console.WriteLine($"{varName}: {varValue}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
conn.Close();
|
conn.Close();
|
||||||
|
|
||||||
|
if (varValue == "ECDHE-RSA-AES256-GCM-SHA384")
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool TestConnection()
|
public static bool TestConnection()
|
||||||
@ -627,8 +639,8 @@ namespace ZKuP
|
|||||||
var conn = GetConnection();
|
var conn = GetConnection();
|
||||||
|
|
||||||
MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(SQLCommand, conn);
|
MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(SQLCommand, conn);
|
||||||
UInt32 FileSize;
|
//UInt32 FileSize;
|
||||||
byte[] rawData;
|
//byte[] rawData;
|
||||||
System.Drawing.Bitmap image = null;
|
System.Drawing.Bitmap image = null;
|
||||||
|
|
||||||
using (conn)
|
using (conn)
|
||||||
|
|||||||
@ -40,7 +40,7 @@ namespace ZKuP
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var dev = 1;
|
//var dev = 1;
|
||||||
if (signoPad._stPad.DeviceGetCount() <= 0)
|
if (signoPad._stPad.DeviceGetCount() <= 0)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Kein Unterschriftenpad gefunden\nMeldung 0x04", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show("Kein Unterschriftenpad gefunden\nMeldung 0x04", "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
@ -109,15 +109,15 @@ namespace ZKuP
|
|||||||
|
|
||||||
private void btnConfirm_Click(object sender, RoutedEventArgs e)
|
private void btnConfirm_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
System.Drawing.Imaging.ImageFormat format = System.Drawing.Imaging.ImageFormat.Tiff;
|
//System.Drawing.Imaging.ImageFormat format = System.Drawing.Imaging.ImageFormat.Tiff;
|
||||||
SignatureImageFlag options = signotec.STPadLibNet.SignatureImageFlag.Timestamp | signotec.STPadLibNet.SignatureImageFlag.TimestampRelToImage | signotec.STPadLibNet.SignatureImageFlag.DontSmooth; ;
|
//SignatureImageFlag options = signotec.STPadLibNet.SignatureImageFlag.Timestamp | signotec.STPadLibNet.SignatureImageFlag.TimestampRelToImage | signotec.STPadLibNet.SignatureImageFlag.DontSmooth; ;
|
||||||
|
|
||||||
|
|
||||||
int resolution = 300;
|
//int resolution = 300;
|
||||||
int width = 0;
|
//int width = 0;
|
||||||
int height = 0;
|
//int height = 0;
|
||||||
int penWidth = 0;
|
//int penWidth = 0;
|
||||||
System.Drawing.Color penColor = System.Drawing.Color.FromArgb(255, 0, 0, 0);
|
//System.Drawing.Color penColor = System.Drawing.Color.FromArgb(255, 0, 0, 0);
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
@ -88,6 +88,7 @@
|
|||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<WarningsAsErrors>1030</WarningsAsErrors>
|
<WarningsAsErrors>1030</WarningsAsErrors>
|
||||||
|
<NoWarn>4014,1998,0108</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ManifestCertificateThumbprint>3C16B2C32C7121098E02D5B8C9B97FB987E781D1</ManifestCertificateThumbprint>
|
<ManifestCertificateThumbprint>3C16B2C32C7121098E02D5B8C9B97FB987E781D1</ManifestCertificateThumbprint>
|
||||||
@ -861,5 +862,11 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\ConnBackground.png" />
|
<Resource Include="Resources\ConnBackground.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ConnectedSecure.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Lock.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
Loading…
x
Reference in New Issue
Block a user