From b8f7c7bf6e9758eb8d8788c401fefb5da5edb264 Mon Sep 17 00:00:00 2001 From: Marcus Date: Tue, 29 Jul 2025 11:57:02 +0200 Subject: [PATCH] =?UTF-8?q?Umstellung=20auf=20SSL=20Neue=20Icons=20f=C3=BC?= =?UTF-8?q?r=20Konnektivit=C3=A4t=20Warnings=20beseitigt=20PreUpgrade=20vo?= =?UTF-8?q?n=20BouncyCastle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZKuP/AddCardUser.xaml.cs | 2 +- ZKuP/AddFirmenList.xaml.cs | 6 +- ZKuP/App.xaml | 2 + ZKuP/Arrivals.xaml.cs | 6 +- ZKuP/Belegung.xaml.cs | 2 +- ZKuP/CreateFirma.xaml.cs | 72 +++++------ ZKuP/CreateVisitor_List.xaml.cs | 18 +-- ZKuP/Delivery.xaml.cs | 2 +- ZKuP/Family.xaml.cs | 2 +- ZKuP/GrantParkausweis.xaml.cs | 80 ++++++------ ZKuP/Helper.cs | 5 +- ZKuP/KartenTausch.xaml.cs | 1 - ZKuP/MainWindow.xaml | 192 ++++++++++++++++++++++++++++- ZKuP/MainWindow.xaml.cs | 56 ++++++--- ZKuP/ManageAsp.xaml.cs | 66 +++++----- ZKuP/ManageDeliveries.xaml.cs | 66 +++++----- ZKuP/ManageEntstoerdienste.xaml.cs | 68 +++++----- ZKuP/ManageUsers.xaml.cs | 58 ++++----- ZKuP/ManageVisitor.xaml.cs | 84 ++++++------- ZKuP/Resources/ConnectedSecure.png | Bin 0 -> 5818 bytes ZKuP/Resources/Lock.png | Bin 0 -> 1636 bytes ZKuP/SQL.cs | 58 +++++---- ZKuP/Signature.xaml.cs | 16 +-- ZKuP/ZKuP.csproj | 7 ++ 24 files changed, 547 insertions(+), 322 deletions(-) create mode 100644 ZKuP/Resources/ConnectedSecure.png create mode 100644 ZKuP/Resources/Lock.png diff --git a/ZKuP/AddCardUser.xaml.cs b/ZKuP/AddCardUser.xaml.cs index 56ad7dd..20b8819 100644 --- a/ZKuP/AddCardUser.xaml.cs +++ b/ZKuP/AddCardUser.xaml.cs @@ -22,7 +22,7 @@ namespace ZKuP public partial class AddCardUser : MetroWindow { string _user = ""; - string _ansprechpartnerFirma = ""; + //string _ansprechpartnerFirma = ""; bool _isBesucher = false; List comboList = new List() { "Grün", "Rot", "Gerätewagen" }; List comboListNurRot = new List() { "Rot" }; diff --git a/ZKuP/AddFirmenList.xaml.cs b/ZKuP/AddFirmenList.xaml.cs index 80a9646..738c8f6 100644 --- a/ZKuP/AddFirmenList.xaml.cs +++ b/ZKuP/AddFirmenList.xaml.cs @@ -53,7 +53,7 @@ namespace ZKuP { if (list.Length > i && !string.IsNullOrWhiteSpace(list[i])) { - if (boxes[i].Tag == "Name") + if (boxes[i].Tag.ToString() == "Name") boxes[i].Text = list[i]; } } @@ -66,7 +66,7 @@ namespace ZKuP { if (list.Length > i && !string.IsNullOrWhiteSpace(list[i])) { - if (boxes[i].Tag == "Tel") + if (boxes[i].Tag.ToString() == "Tel") boxes[i].Text = list[i]; } } @@ -84,7 +84,7 @@ namespace ZKuP 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 spGroupPers.Children.Clear(); // Vorherige Panels entfernen (falls schon welche existieren) diff --git a/ZKuP/App.xaml b/ZKuP/App.xaml index f646394..d8ff4e3 100644 --- a/ZKuP/App.xaml +++ b/ZKuP/App.xaml @@ -20,6 +20,8 @@ + + diff --git a/ZKuP/Arrivals.xaml.cs b/ZKuP/Arrivals.xaml.cs index ce89f15..8e52671 100644 --- a/ZKuP/Arrivals.xaml.cs +++ b/ZKuP/Arrivals.xaml.cs @@ -32,7 +32,7 @@ namespace ZKuP int firmenCount = 0; int besucherCount = 0; bool arrivalClicked = false; - bool kl_EinweisungClicked = false; + //bool kl_EinweisungClicked = false; //string query = ""; MySqlCommand query = new MySqlCommand(); byte[] _signature = null; @@ -1073,8 +1073,8 @@ namespace ZKuP private async void btnSignature_Click(object sender, RoutedEventArgs e) { - string kat = "1"; - string firmaBesucher = ""; + //string kat = "1"; + //string firmaBesucher = ""; string name = ""; var kennzeichenTextboxes = spKennzeichen.Children.OfType().ToList(); diff --git a/ZKuP/Belegung.xaml.cs b/ZKuP/Belegung.xaml.cs index 3b8d50d..4e8f005 100644 --- a/ZKuP/Belegung.xaml.cs +++ b/ZKuP/Belegung.xaml.cs @@ -616,7 +616,7 @@ namespace ZKuP 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; dgBelegung.DataContext = be; diff --git a/ZKuP/CreateFirma.xaml.cs b/ZKuP/CreateFirma.xaml.cs index f966e08..6d9c7a9 100644 --- a/ZKuP/CreateFirma.xaml.cs +++ b/ZKuP/CreateFirma.xaml.cs @@ -2197,46 +2197,46 @@ namespace ZKuP } } - public class Firma - { - public string Name; - string Verantwortlicher_MA_Firma; - string Tel_Nr_Verantwortlicher_Firma; - string Anzahl_Begleiter; - string Anzahl_Fzg; - string Beauftragte_Leistung; - string Arbeitsbeginn; - string Arbeitsende; - string Örtliche_Einweisung_bis; - string Ansprechpartner_Intern; - string Tel_Nr_Ansprechpartner_Intern; + //public class Firma + //{ + // public string Name; + // string Verantwortlicher_MA_Firma; + // string Tel_Nr_Verantwortlicher_Firma; + // string Anzahl_Begleiter; + // string Anzahl_Fzg; + // string Beauftragte_Leistung; + // string Arbeitsbeginn; + // string Arbeitsende; + // string Örtliche_Einweisung_bis; + // string Ansprechpartner_Intern; + // string Tel_Nr_Ansprechpartner_Intern; - public static List DataTableToFirma(System.Data.DataTable dataTable) - { - List x = new List(); + // public static List DataTableToFirma(System.Data.DataTable dataTable) + // { + // List x = new List(); - foreach (DataRow dr in dataTable.Rows) - { - x.Add(new Firma() - { - Name = dr[1].ToString(), - Verantwortlicher_MA_Firma = dr[2].ToString(), - Tel_Nr_Verantwortlicher_Firma = dr[3].ToString(), - Anzahl_Begleiter = dr[4].ToString(), - Anzahl_Fzg = dr[5].ToString(), - Beauftragte_Leistung = dr[6].ToString(), - Arbeitsbeginn = dr[7].ToString(), - Arbeitsende = dr[8].ToString(), - Örtliche_Einweisung_bis = dr[9].ToString(), - Ansprechpartner_Intern = dr[10].ToString(), - Tel_Nr_Ansprechpartner_Intern = dr[11].ToString() - }); - } + // foreach (DataRow dr in dataTable.Rows) + // { + // x.Add(new Firma() + // { + // Name = dr[1].ToString(), + // Verantwortlicher_MA_Firma = dr[2].ToString(), + // Tel_Nr_Verantwortlicher_Firma = dr[3].ToString(), + // Anzahl_Begleiter = dr[4].ToString(), + // Anzahl_Fzg = dr[5].ToString(), + // Beauftragte_Leistung = dr[6].ToString(), + // Arbeitsbeginn = dr[7].ToString(), + // Arbeitsende = dr[8].ToString(), + // Örtliche_Einweisung_bis = dr[9].ToString(), + // Ansprechpartner_Intern = dr[10].ToString(), + // Tel_Nr_Ansprechpartner_Intern = dr[11].ToString() + // }); + // } - return x; - } - } + // return x; + // } + //} } diff --git a/ZKuP/CreateVisitor_List.xaml.cs b/ZKuP/CreateVisitor_List.xaml.cs index 76a0bc1..06d47f7 100644 --- a/ZKuP/CreateVisitor_List.xaml.cs +++ b/ZKuP/CreateVisitor_List.xaml.cs @@ -23,12 +23,12 @@ namespace ZKuP /// public partial class CreateVisitor_List : MetroWindow { - private List myVar; - public List VisitorView - { - get { return myVar; } - set { myVar = value; } - } + //private List myVar; + //public List VisitorView + //{ + // get { return myVar; } + // set { myVar = value; } + //} DataTable visitors = new DataTable("Visitors"); @@ -44,7 +44,7 @@ namespace ZKuP this.Title = "Besucherliste von: " + Helper.InsertSpaceBeforeUpperCase(Environment.UserName); 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.Items.SortDescriptions.Clear(); @@ -115,7 +115,7 @@ namespace ZKuP dgVisitors.PreviewKeyDown += DgVisitors_PreviewKeyDown; 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(); @@ -192,7 +192,7 @@ namespace ZKuP 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; - VisitorView = Visitor.DataTableToVisitor(visitors); + //VisitorView = Visitor.DataTableToVisitor(visitors); } diff --git a/ZKuP/Delivery.xaml.cs b/ZKuP/Delivery.xaml.cs index c550a7a..38d5067 100644 --- a/ZKuP/Delivery.xaml.cs +++ b/ZKuP/Delivery.xaml.cs @@ -51,7 +51,7 @@ namespace ZKuP }; - string query = ""; + //string query = ""; byte[] _signature = null; bool _emergency = false; diff --git a/ZKuP/Family.xaml.cs b/ZKuP/Family.xaml.cs index c852ed5..d90d12a 100644 --- a/ZKuP/Family.xaml.cs +++ b/ZKuP/Family.xaml.cs @@ -23,7 +23,7 @@ namespace ZKuP public partial class Family : MetroWindow { DataTable dtOwn; - DataTable dtAll; + //DataTable dtAll; public Family() { diff --git a/ZKuP/GrantParkausweis.xaml.cs b/ZKuP/GrantParkausweis.xaml.cs index 93cd724..ac3bc87 100644 --- a/ZKuP/GrantParkausweis.xaml.cs +++ b/ZKuP/GrantParkausweis.xaml.cs @@ -104,48 +104,48 @@ namespace ZKuP } } - public class Grant - { - int idparkausweise; - string MA_Vorname; - string MA_Name; - string Kennzeichen; - string Email; - string Telefon; - string Abteilung; - string Firma; - string Adresse; - string PLZ; - string Vorgesetzter; - int Schicht; - int isKrad; + //public class Grant + //{ + // int idparkausweise; + // string MA_Vorname; + // string MA_Name; + // string Kennzeichen; + // string Email; + // string Telefon; + // string Abteilung; + // string Firma; + // string Adresse; + // string PLZ; + // string Vorgesetzter; + // int Schicht; + // int isKrad; - public static List DataTableToGrant(System.Data.DataTable dataTable) - { - List x = new List(); + // public static List DataTableToGrant(System.Data.DataTable dataTable) + // { + // List x = new List(); - foreach (System.Data.DataRow dr in dataTable.Rows) - { - x.Add(new Grant() - { - idparkausweise = (int)dr[0], - MA_Vorname = dr[1].ToString(), - MA_Name = dr[2].ToString(), - Kennzeichen = dr[3].ToString(), - Email = dr[4].ToString(), - Telefon = dr[5].ToString(), - Abteilung = dr[6].ToString(), - Firma = dr[7].ToString(), - Adresse = dr[8].ToString(), - PLZ = dr[9].ToString(), - Vorgesetzter = dr[10].ToString(), - Schicht = (int)dr[11], - isKrad = (int)dr[12] - }); - } + // foreach (System.Data.DataRow dr in dataTable.Rows) + // { + // x.Add(new Grant() + // { + // idparkausweise = (int)dr[0], + // MA_Vorname = dr[1].ToString(), + // MA_Name = dr[2].ToString(), + // Kennzeichen = dr[3].ToString(), + // Email = dr[4].ToString(), + // Telefon = dr[5].ToString(), + // Abteilung = dr[6].ToString(), + // Firma = dr[7].ToString(), + // Adresse = dr[8].ToString(), + // PLZ = dr[9].ToString(), + // Vorgesetzter = dr[10].ToString(), + // Schicht = (int)dr[11], + // isKrad = (int)dr[12] + // }); + // } - return x; - } - } + // return x; + // } + //} } diff --git a/ZKuP/Helper.cs b/ZKuP/Helper.cs index 304fe49..aed1517 100644 --- a/ZKuP/Helper.cs +++ b/ZKuP/Helper.cs @@ -285,10 +285,10 @@ namespace ZKuP { case 1: return (from System.Data.DataRow dr in dataTable.Rows select dr[startColumn + 0].ToString()).ToList(); - break; + //break; case 2: return (from System.Data.DataRow dr in dataTable.Rows select dr[startColumn + 0].ToString() + " " + dr[startColumn + 1].ToString()).ToList(); - break; + //break; default: @@ -992,7 +992,6 @@ namespace ZKuP { case MessageBoxResult.Yes: return; - break; case MessageBoxResult.No: App.BringOtherInstanceToFront(); Application.Current.Shutdown(); diff --git a/ZKuP/KartenTausch.xaml.cs b/ZKuP/KartenTausch.xaml.cs index c0ca5c7..25c5c0e 100644 --- a/ZKuP/KartenTausch.xaml.cs +++ b/ZKuP/KartenTausch.xaml.cs @@ -44,7 +44,6 @@ namespace ZKuP private void Helper_DataReceived(object sender, string e) { - var text = ""; Dispatcher.Invoke(() => { if (cbRot.ItemsSource.Cast().ToList().Contains(e.Split('=')[0].ToString())) diff --git a/ZKuP/MainWindow.xaml b/ZKuP/MainWindow.xaml index f76b67f..ef8c86f 100644 --- a/ZKuP/MainWindow.xaml +++ b/ZKuP/MainWindow.xaml @@ -48,6 +48,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1071,9 +1251,15 @@ - - - + + + + + + + + +