diff --git a/App.config b/App.config
index bc525b2..f713250 100644
--- a/App.config
+++ b/App.config
@@ -1,44 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -54,7 +56,7 @@
-
+
@@ -72,6 +74,10 @@
+
+
+
+
@@ -80,7 +86,7 @@
-
+ 1, 53, 101
@@ -132,4 +138,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Artikel.cs b/Artikel.cs
new file mode 100644
index 0000000..2c15f5a
--- /dev/null
+++ b/Artikel.cs
@@ -0,0 +1,187 @@
+using Npgsql;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using BrightIdeasSoftware;
+using System.Runtime.CompilerServices;
+using System.Windows.Forms;
+
+namespace DatenDB
+{
+ public enum ArtikelKategorie
+ {
+ Unbekannt = 0,
+ Frottee = 1,
+ Grossteile = 2,
+ Kleinteile = 3,
+ Spannleintuch = 4
+ }
+
+ public class Artikel
+ {
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
+ public const string COLUMNS = "artikel_id, nummer, bezeichnung, short, nachwaesche, muellwaesche, last_reset, kategorie";
+ private const string TABLE = "kundenverwaltung.artikel";
+
+ public Artikel() { }
+
+ public Artikel(string row, int nr)
+ {
+ if (nr == 0) return; //ERSTE ZEILE IGNORIEREN.
+ string[] zeileData = row.Split(';');
+
+ this.Nummer = Convert.ToInt32(zeileData[1]);
+ this.Bezeichnung = zeileData[3];
+ this.Short = zeileData[4];
+ }
+
+
+ public static Artikel GetArtikel(int? artikelNr)
+ {
+ DatenbankConnection.GetConnection().Open();
+ Artikel result = new Artikel();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select {COLUMNS} from {TABLE} where nummer = {artikelNr}";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) result = new Artikel(reader);
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+ public static List GetArtikelList()
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ command.CommandText = $"select {COLUMNS} from {TABLE}";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Artikel(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+ }
+
+
+ public static int SaveList(List artlist)
+ {
+ DatenbankConnection.GetConnection().Open();
+ int result = 0;
+ foreach (Artikel art in artlist)
+ {
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ if (art.ArtikelID.HasValue & art.ArtikelID != 0)
+ {
+ command.CommandText = $"update {TABLE} set nummer = :p1, bezeichnung = :p2, short = :p3, nachwaesche = :p4, muellwaesche = :p5, last_reset = :p6, kategorie = :p7 where artikel_id = :p0";
+ }
+ else
+ {
+ command.CommandText = "select nextval('kundenverwaltung.artikel_seq')";
+ art.ArtikelID = (int)(long)command.ExecuteScalar();
+ command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7)";
+ }
+ command.Parameters.AddWithValue("p0", art.ArtikelID);
+ command.Parameters.AddWithValue("p1", art.Nummer);
+ command.Parameters.AddWithValue("p2", string.IsNullOrEmpty(art.Bezeichnung) ? (object)DBNull.Value : art.Bezeichnung);
+ command.Parameters.AddWithValue("p3", string.IsNullOrEmpty(art.Short) ? (object)DBNull.Value : art.Short);
+ command.Parameters.AddWithValue("p4", art.Nachwaesche);
+ command.Parameters.AddWithValue("p5", art.Muellwaesche);
+ command.Parameters.AddWithValue("p6", art.LastReset.HasValue ? art.LastReset.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p7", (int)art.Kategorie);
+ command.ExecuteNonQuery();
+ result++;
+ }
+ //result = command.ExecuteNonQuery();
+ DatenbankConnection.GetConnection().Close();
+
+ return result;
+ }
+ public int Save()
+ {
+ DatenbankConnection.GetConnection().Open();
+ int result = 0;
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ if (this.ArtikelID.HasValue & this.ArtikelID != 0)
+ {
+ command.CommandText = $"update {TABLE} set nummer = :p1, bezeichnung = :p2, short = :p3, nachwaesche = :p4, muellwaesche = :p5, last_reset = :p6, kategorie = :p7 where artikel_id = :p0";
+ }
+ else
+ {
+ command.CommandText = "select nextval('kundenverwaltung.artikel_seq')";
+ this.ArtikelID = (int)(long)command.ExecuteScalar();
+ command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7)";
+ }
+ command.Parameters.AddWithValue("p0", this.ArtikelID);
+ command.Parameters.AddWithValue("p1", this.Nummer);
+ command.Parameters.AddWithValue("p2", string.IsNullOrEmpty(this.Bezeichnung) ? (object)DBNull.Value : this.Bezeichnung);
+ command.Parameters.AddWithValue("p3", string.IsNullOrEmpty(this.Short) ? (object)DBNull.Value : this.Short);
+ command.Parameters.AddWithValue("p4", this.Nachwaesche);
+ command.Parameters.AddWithValue("p5", this.Muellwaesche);
+ command.Parameters.AddWithValue("p6", this.LastReset.HasValue ? this.LastReset.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p7", (int)this.Kategorie);
+
+ result = command.ExecuteNonQuery();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+
+ public Artikel(NpgsqlDataReader reader)
+ {
+ this.ArtikelID = reader.GetInt32(0);
+ this.Nummer = reader.GetInt32(1);
+ this.Bezeichnung = reader.IsDBNull(2) ? string.Empty : reader.GetString(2);
+ this.Short = reader.IsDBNull(3) ? string.Empty : reader.GetString(3);
+ this.Nachwaesche = reader.GetInt32(4);
+ this.Muellwaesche = reader.GetInt32(5);
+ this.LastReset = reader.IsDBNull(6) ? null : (DateTime?)reader.GetDateTime(6);
+ this.Kategorie = (ArtikelKategorie)reader.GetInt16(7);
+ }
+
+
+ [OLVIgnore]
+ public int? ArtikelID { get; set; }
+
+ [OLVColumn("ArtNr.", DisplayIndex = 0, TextAlign = System.Windows.Forms.HorizontalAlignment.Right)]
+ public int Nummer { get; set; }
+
+ [OLVColumn("Bezeichnung", DisplayIndex = 1)]
+ public string Bezeichnung { get; set; }
+
+ [OLVColumn("Abkürzung", DisplayIndex = 2)]
+ public string Short { get; set; }
+
+ [OLVColumn("Nachwäsche", DisplayIndex = 3, TextAlign = System.Windows.Forms.HorizontalAlignment.Center)]
+ public int Nachwaesche { get; set; }
+
+ [OLVColumn("Müll", DisplayIndex = 4, TextAlign = System.Windows.Forms.HorizontalAlignment.Center)]
+ public int Muellwaesche { get; set; }
+
+ [OLVColumn("Letzter Reset", DisplayIndex = 5, AspectToStringFormat = "{0:d}", TextAlign = System.Windows.Forms.HorizontalAlignment.Right)]
+ public DateTime? LastReset { get; set; }
+
+ [OLVColumn("Kategorie", DisplayIndex = 6)]
+ public ArtikelKategorie Kategorie { get; set; }
+
+ private string _reset;
+ [OLVColumn("Reset", DisplayIndex = 7)]
+ public string Reset
+ {
+ get
+ {
+ if (Nachwaesche > 0)
+ return _reset = "Reset";
+ else
+ return _reset = string.Empty; // Alternativwert, wenn Bedingung nicht erfüllt
+ }
+ set { }
+ }
+ }
+}
diff --git a/Aufgabe.cs b/Aufgabe.cs
new file mode 100644
index 0000000..3aa173d
--- /dev/null
+++ b/Aufgabe.cs
@@ -0,0 +1,123 @@
+using Npgsql;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Web.Profile;
+using System.Windows.Forms.PropertyGridInternal;
+
+namespace DatenDB
+{
+ public enum Kategorie
+ {
+ Allgemein = 0,
+ Fahrer = 1,
+ Intern = 2,
+ Waschstrasse = 3
+ }
+ public class Aufgabe
+ {
+ //AUFGABE TABLE IN DB INTEGRIEREN
+ private static string TABLE = "kundenverwaltung.aufgabe";
+ public static string COLUMNS = "aufgabe_id, bezeichnung, beschreibung, kategorie, farbe";
+ public Aufgabe()
+ {
+ }
+ public static Aufgabe GetAufgabe(string bezeichnung, int? id)
+ {
+ DatenbankConnection.GetConnection().Open();
+ Aufgabe result = new Aufgabe();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ if (!string.IsNullOrEmpty(bezeichnung)) command.CommandText = $"select {COLUMNS} from {TABLE} where bezeichnung = '{bezeichnung}'";
+ if (id != null) command.CommandText = $"select {COLUMNS} from {TABLE} where aufgabe_id = {id}";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) result = new Aufgabe(reader);
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+ public static int GetAufgabeID(string text)
+ {
+ DatenbankConnection.GetConnection().Open();
+ int result = 0;
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select aufgabe_id from {TABLE} where bezeichnung = '{text}'";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) result = reader.GetInt32(0);
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+ public static List GetList(int? aufgabekat)
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ if(aufgabekat != null) command.CommandText = $"select {COLUMNS} from {TABLE} where kategorie = {aufgabekat} order by aufgabe_id";
+ else command.CommandText = $"select {COLUMNS} from {TABLE} order by aufgabe_id";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Aufgabe(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+
+ }
+ public int Save()
+ {
+ DatenbankConnection.GetConnection().Open();
+
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ if (this.AufgabeID.HasValue & this.AufgabeID != 0)
+ {
+ command.CommandText = $"update {TABLE} set bezeichnung = :p1, beschreibung = :p2, kategorie = :p3, farbe = :p4 WHERE aufgabe_id = :p0";
+ }
+ else
+ {
+ command.CommandText = "select nextval('kundenverwaltung.aufgabe_seq')";
+ this.AufgabeID = (int)(long)command.ExecuteScalar();
+ command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4)";
+ }
+
+ command.Parameters.AddWithValue("p0", this.AufgabeID);
+ command.Parameters.AddWithValue("p1", string.IsNullOrEmpty(this.Bezeichnung) ? (object)DBNull.Value : this.Bezeichnung);
+ command.Parameters.AddWithValue("p2", string.IsNullOrEmpty(this.Beschreibung) ? (object)DBNull.Value : this.Beschreibung);
+ command.Parameters.AddWithValue("p3", (int)this.Kategorie);
+ command.Parameters.AddWithValue("p4", (string)HexConverter(this.Farbe, string.Empty));
+
+
+
+ int result = command.ExecuteNonQuery();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+ public Aufgabe(NpgsqlDataReader reader)
+ {
+ this.AufgabeID = reader.GetInt32(0);
+ this.Bezeichnung = reader.IsDBNull(1) ? string.Empty : reader.GetString(1);
+ this.Beschreibung = reader.IsDBNull(2) ? string.Empty : reader.GetString(2);
+ this.Kategorie = reader.IsDBNull(3) ? Kategorie.Fahrer : (Kategorie)reader.GetInt16(3);
+ this.Farbe = reader.IsDBNull(4) ? Color.FromArgb(1, 53, 101) : (Color)HexConverter(Color.FromArgb(1, 53, 101), reader.GetString(4));
+ }
+ public int? AufgabeID { get; set; }
+ public string Bezeichnung { get; set; }
+ public string Beschreibung { get; set; }
+ public Kategorie Kategorie { get; set; }
+ public Color Farbe { get; set; }
+
+ private static object HexConverter(Color c, string s)
+ {
+ ColorConverter cc = new ColorConverter();
+ if (string.IsNullOrEmpty(s)) { s = "#" + c.R.ToString("X2") + c.G.ToString("X2") + c.B.ToString("X2"); return s; }
+ else { c = (Color)cc.ConvertFromString(s); return c; }
+
+
+ }
+ }
+}
diff --git a/Auftrag.cs b/Auftrag.cs
new file mode 100644
index 0000000..0e55478
--- /dev/null
+++ b/Auftrag.cs
@@ -0,0 +1,402 @@
+using BrightIdeasSoftware;
+using Npgsql;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DatenDB
+{
+ public enum AuftragStatus
+ {
+ Abgeholt = 0,
+ Aufgelegt = 1,
+ Finisching = 2,
+ Herrichten = 3,
+ Vorbereitet = 4,
+ Fertig = 7,
+ Ausgeliefert = 8,
+ AufAbruf = 9
+ }
+ public enum AuftragTyp
+ {
+ Unbekannt = 0,
+ Standart = 1,
+ Sonder = 2
+ }
+
+
+ public class Auftrag
+ {
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
+ public const string COLUMNS = "auftrag_id, benutzer_id, aufgabe_id, kunde_id, zusatz, liefertag, gedruckt, gedruckt_von, erledigt, erledigt_von, erstellt, erstellt_von, status, tour_id, container_dirt, maschine_id, container_clean, typ";
+ private const string TABLE = "kundenverwaltung.auftrag";
+ public const string ASPECTS = "FahrerID,AufgabeID,KundeID,ZusatzInfo,Wann,Gedruckt,Erledigt,Erstellt von,Erstellt Am";
+ public Auftrag()
+ {
+ }
+
+ public static List GetAuftragList(string s, Auftrag auftrag)
+ {
+ int? aID = null;
+ int? mID = null;
+ //Get MaschineID und AuftragID für Aufträge vor und nach Auftrag
+ if (auftrag != null)
+ {
+ mID = auftrag.MaschineID;
+ aID = auftrag.AuftragID;
+ }
+ //Get AufgabeID für Anzeige von Standerhöhungen
+ if (s == "STH") aID = (int)Aufgabe.GetAufgabe(s, null).AufgabeID;
+
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ if (s == "Expedit") command.CommandText = $"select {COLUMNS} from {TABLE} where status = 3 order by liefertag asc";
+ if (s == string.Empty) command.CommandText = $"select {COLUMNS} from {TABLE} where gedruckt is null and erledigt is null";
+ if (s == "davor") command.CommandText = $"select {COLUMNS} from {TABLE} where maschine_id = {mID} and auftrag_id < {aID} order by liefertag asc limit 3";
+ if (s == "danach") command.CommandText = $"select {COLUMNS} from {TABLE} where maschine_id = {mID} and auftrag_id > {aID} order by liefertag asc limit 3";
+ if (s == "STH") command.CommandText = $"select {COLUMNS} from {TABLE} where status = 3 and aufgabe_id = {aID} order by liefertag";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Auftrag(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+ }
+ public static List GetAuftragListToday(DateTime produktion)
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ command.CommandText = $"select {COLUMNS} from {TABLE} where typ = 1 and erstellt::date = '{produktion.Date}' or typ = 1 and status < 7 order by liefertag asc";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Auftrag(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+ }
+ public static List GetAuftragStatsListToday(DateTime produktion)
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ command.CommandText = $"select {COLUMNS} from {TABLE} where typ = 1 and erstellt::date = '{produktion.Date}' order by liefertag asc";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Auftrag(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+ }
+
+ public static List GetExpeditLists(int? typ)
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ if (typ == null) command.CommandText = $"select {COLUMNS} from {TABLE} where status <= 7 order by status desc, liefertag asc";
+ else if (typ <= 2) command.CommandText = $"select {COLUMNS} from {TABLE} where typ = {typ} and status < 7 order by status desc, liefertag asc";
+ else command.CommandText = $"select {COLUMNS} from {TABLE} where status = {typ} order by status desc, liefertag asc";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Auftrag(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+ }
+ public static Auftrag GetAuftrag(int? auftragID)
+ {
+ DatenbankConnection.GetConnection().Open();
+ Auftrag result = new Auftrag();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select {COLUMNS} from {TABLE} where auftrag_id = {auftragID}";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) result = new Auftrag(reader);
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+ public static Auftrag GetLastAuftrag(int? benutzerID)
+ {
+ DatenbankConnection.GetConnection().Open();
+ Auftrag result = new Auftrag();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select {COLUMNS} from {TABLE} where erstellt_von = {benutzerID} order by erstellt desc limit 1";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) result = new Auftrag(reader);
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+
+ }
+ public bool FindeAuftrag(Auftrag auftrag)
+ {
+ int result = 0;
+ DatenbankConnection.GetConnection().Open();
+ NpgsqlCommand command = new NpgsqlCommand();
+
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select auftrag_id from {TABLE} where kunde_id = {auftrag.KundeID} and erstellt::date = '{auftrag.Erstellt.Value.Date}' and liefertag = '{auftrag.Liefertag}'";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) result = reader.GetInt16(0);
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+
+
+ if(result > 0) return true;
+ else return false;
+ }
+
+ public Auftrag(NpgsqlDataReader reader)
+ {
+ this.AuftragID = reader.GetInt32(0);
+ this.ArbeiterID = reader.IsDBNull(1) ? null : (int?)reader.GetInt32(1);
+ this.AufgabeID = reader.IsDBNull(2) ? null : (int?)reader.GetInt32(2);
+ this.KundeID = reader.GetInt32(3);
+ this.ZusatzInfo = reader.IsDBNull(4) ? string.Empty : reader.GetString(4);
+ this.Liefertag = reader.GetDateTime(5);
+ this.Gedruckt = reader.IsDBNull(6) ? null : (DateTime?)reader.GetDateTime(6);
+ this.GedrucktVon = reader.IsDBNull(7) ? null : (int?)reader.GetInt32(7);
+ this.Erledigt = reader.IsDBNull(8) ? null : (DateTime?)reader.GetDateTime(8);
+ this.ErledigtVon = reader.IsDBNull(9) ? null : (int?)reader.GetInt32(9);
+ this.Erstellt = reader.IsDBNull(10) ? null : (DateTime?)reader.GetDateTime(10);
+ this.ErstelltVon = reader.GetInt32(11);
+ this.Status = (AuftragStatus)reader.GetInt32(12);
+ this.TourID = reader.IsDBNull(13) ? null : (int?)reader.GetInt32(13);
+ this.Container = reader.IsDBNull(14) ? 0 : reader.GetInt32(14);
+ this.MaschineID = reader.IsDBNull(15) ? null : (int?)reader.GetInt32(15);
+ this.ContainerClean = reader.IsDBNull(16) ? 0 : reader.GetInt32(16);
+ this.Typ =reader.IsDBNull(17) ? AuftragTyp.Unbekannt : (AuftragTyp)reader.GetInt32(17);
+
+
+ }
+
+
+ ///
+ /// CheckBoxen zur Auftragsauswahl als erste Spalte.
+ ///
+ [OLVColumn("Auswählen", CheckBoxes = true, DisplayIndex = 0)]
+ public bool IsChecked { get; set; }
+
+ ///
+ /// Liefertag mit ausgeschriebenen Tag als zweite Spalte.
+ ///
+ [OLVColumn("Liefertag", DisplayIndex = 2, AspectToStringFormat = "{0:ddd dd.MM.}")]
+ public DateTime Liefertag { get; set; }
+
+ ///
+ /// Die Aufgabe (STV, STH, INV) wird angezeigt wenn vorhanden.
+ ///
+ private string _auftragaufgabe;
+ [OLVColumn("Aufgabe", DisplayIndex = 6, TextAlign = System.Windows.Forms.HorizontalAlignment.Center)]
+ public string AuftragAufgabe
+ {
+ get
+ {
+ if (this.Typ == AuftragTyp.Sonder) return _auftragaufgabe = Aufgabe.GetAufgabe(null, AufgabeID).Bezeichnung;
+ else return null;
+
+ }
+
+ }
+
+ ///
+ /// Der Status wird angezeigt.
+ ///
+ [OLVColumn("Status", DisplayIndex = 5)]
+ public AuftragStatus Status { get; set; }
+
+ ///
+ /// Der Kundename wird angezeigt
+ ///
+ private string _kundename;
+ [OLVColumn("Kunde", DisplayIndex = 1)]
+ public string Kundename
+ {
+ get
+ {
+ if (string.IsNullOrWhiteSpace(Kunde.GetKunde(null, KundeID, null).Suchtext)) return _kundename = Kunde.GetKunde(null, KundeID, null).KundeName;
+ else return _kundename = Kunde.GetKunde(null, KundeID, null).Suchtext;
+ }
+ set { }
+ }
+
+ ///
+ /// Containeranzahl schmutzig
+ ///
+ [OLVColumn("schmutzig", DisplayIndex = 3, TextAlign = System.Windows.Forms.HorizontalAlignment.Center)]
+ public int Container { get; set; }
+
+ ///
+ /// Containeranzahl sauber
+ ///
+ [OLVColumn("sauber", DisplayIndex = 4, TextAlign = System.Windows.Forms.HorizontalAlignment.Center)]
+ public int ContainerClean { get; set; }
+
+ ///
+ /// Die "Erstellt von" Spalte mit Datum wird erstellt
+ ///
+ private string _auftragerstellt;
+ [OLVColumn("Erstellt", DisplayIndex = 7)]
+ public string AuftragErstellt
+ {
+ get
+ {
+ if (this.Erstellt != null) return _auftragerstellt = Benutzer.GetBenutzer(null, this.ErstelltVon).BenutzerName + " von " + this.Erstellt.ToString();
+ else return null;
+ }
+ }
+
+ ///
+ /// Die "Gedruckt von" Spalte mit Datum wird erstellt
+ ///
+ private string _auftraggedruckt;
+ [OLVColumn("Gedruckt", DisplayIndex = 8)]
+ public string AuftragGedruckt
+ {
+ get
+ {
+ if(this.Gedruckt != null) return _auftraggedruckt = Benutzer.GetBenutzer(null, this.GedrucktVon).BenutzerName + " von " + this.Gedruckt.ToString();
+ else return null;
+ }
+ }
+
+ ///
+ /// Die "Erledigt von" Spalte mit Datum wird erstellt
+ ///
+ private string _auftragerledigt;
+ [OLVColumn("Erledigt", DisplayIndex = 9)]
+ public string AuftragErledigt
+ {
+ get
+ {
+ if (this.Erledigt != null) return _auftragerledigt = Benutzer.GetBenutzer(null, this.ErledigtVon).BenutzerName + " von " + this.Erledigt.ToString();
+ else return null;
+
+ }
+ }
+
+ private string _fertig;
+ [OLVColumn("Abschließen", DisplayIndex = 10)]
+ public string Fertig
+ {
+ get
+ {
+ if(Typ == AuftragTyp.Sonder)
+ {
+ if (Status >= AuftragStatus.Fertig) return _fertig = string.Empty;
+ else return _fertig = "Auftrag abschließen";
+ }
+ else
+ {
+ if (Status == AuftragStatus.Vorbereitet) return _fertig = "Auftrag abschließen";
+ else
+ {
+ return _fertig = string.Empty; ;
+ }
+ }
+ }
+ }
+
+ ///
+ /// Zusatz und Typ Properties werden ausgeblendet.
+ ///
+ [OLVColumn("Zusatz", IsVisible = false)]
+ public string ZusatzInfo { get; set; }
+
+ [OLVColumn("Typ", IsVisible = false)]
+ public AuftragTyp Typ { get; set; }
+
+ ///
+ /// Properties von ObjectListView ignoriert.
+ ///
+ [OLVIgnore]
+ public int? AuftragID { get; set; }
+ [OLVIgnore]
+ public int? GedrucktVon { get; set; }
+ [OLVIgnore]
+ public DateTime? Gedruckt { get; set; }
+ [OLVIgnore]
+ public DateTime? Erledigt { get; set; }
+ [OLVIgnore]
+ public int? ErledigtVon { get; set; }
+ [OLVIgnore]
+ public DateTime? Erstellt { get; set; }
+ [OLVIgnore]
+ public int ErstelltVon { get; set; }
+ [OLVIgnore]
+ public int? MaschineID { get; set; }
+ [OLVIgnore]
+ public int KundeID { get; set; }
+ [OLVIgnore]
+ public int? TourID { get; set; }
+ ///
+ /// BenutzerID des ausführenden Users
+ ///
+ [OLVIgnore]
+ public int? ArbeiterID { get; set; }
+ [OLVIgnore]
+ public int? AufgabeID { get; set; }
+
+
+
+
+
+ public int[] Save()
+ {
+ DatenbankConnection.GetConnection().Open();
+ int[] result = new int[2];
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ if (this.AuftragID.HasValue & this.AuftragID != 0)
+ {
+ command.CommandText = $"update {TABLE} set benutzer_id = :p1, aufgabe_id = :p2, kunde_id = :p3, zusatz = :p4, liefertag = :p5, gedruckt = :p6, gedruckt_von = :p7, erledigt = :p8, erledigt_von = :p9, erstellt = :p10, erstellt_von = :p11, status = :p12, tour_id = :p13, container_dirt = :p14, maschine_id = :p15, container_clean = :p16, typ = :p17 WHERE auftrag_id = :p0";
+ }
+ else
+ {
+ command.CommandText = "select nextval('kundenverwaltung.auftrag_seq')";
+ this.AuftragID = result[1] = (int)(long)command.ExecuteScalar();
+ command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9, :p10, :p11, :p12, :p13, :p14, :p15, :p16, :p17)";
+ }
+
+ command.Parameters.AddWithValue("p0", this.AuftragID);
+ command.Parameters.AddWithValue("p1", this.ArbeiterID.HasValue ? this.ArbeiterID.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p2", this.AufgabeID.HasValue ? this.AufgabeID.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p3", this.KundeID);
+ command.Parameters.AddWithValue("p4", string.IsNullOrEmpty(this.ZusatzInfo) ? (object)DBNull.Value : this.ZusatzInfo);
+ command.Parameters.AddWithValue("p5", this.Liefertag);
+ command.Parameters.AddWithValue("p6", this.Gedruckt.HasValue ? this.Gedruckt.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p7", this.GedrucktVon.HasValue ? this.GedrucktVon.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p8", this.Erledigt.HasValue ? this.Erledigt.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p9", this.ErledigtVon.HasValue ? this.ErledigtVon.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p10", this.Erstellt);
+ command.Parameters.AddWithValue("p11", this.ErstelltVon);
+ command.Parameters.AddWithValue("p12", (int)this.Status);
+ command.Parameters.AddWithValue("p13", this.TourID.HasValue ? this.TourID.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p14", this.Container);
+ command.Parameters.AddWithValue("p15", this.MaschineID.HasValue ? this.MaschineID.Value : 0);
+ command.Parameters.AddWithValue("p16", this.ContainerClean);
+ command.Parameters.AddWithValue("p17", (int)this.Typ);
+
+ result[0] = command.ExecuteNonQuery();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+
+ }
+}
diff --git a/AuftragArtikel.cs b/AuftragArtikel.cs
new file mode 100644
index 0000000..bbdda21
--- /dev/null
+++ b/AuftragArtikel.cs
@@ -0,0 +1,111 @@
+using Npgsql;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace DatenDB
+{
+ public class AuftragArtikel
+ {
+ private static string TABLE = "kundenverwaltung.auftrag_artikel";
+ private static string COLUMNS = "auftrag_artikel_id, auftrag_id, artikel_nr, artikel_name, anzahl, erledigt";
+ public Kunde kunde;
+
+ public AuftragArtikel()
+ {
+ }
+
+ public static List GetList(string auftragnr)
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select {COLUMNS} from {TABLE} where auftrag_id = {auftragnr}";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new AuftragArtikel(reader, 1));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+ }
+
+ public static AuftragArtikel GetArtikel(int aufartid)
+ {
+ DatenbankConnection.GetConnection().Open();
+ AuftragArtikel result = new AuftragArtikel();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"SELECT * from {TABLE} where auftrag_artikel_id = {aufartid}";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) result = new AuftragArtikel(reader, 1);
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+
+ return result;
+ }
+
+ public int Save()
+ {
+ DatenbankConnection.GetConnection().Open();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ if(this.AuftragArtikelID.HasValue & this.AuftragArtikelID != 0)
+ {
+ command.CommandText = $"update {TABLE} set auftrag_id = :p1, artikel_nr = :p2, artikel_name = :p3, anzahl = :p4, erledigt = :p5 WHERE auftrag_artikel_id = :p0";
+ }
+ else
+ {
+ command.CommandText = "select nextval('kundenverwaltung.auftrag_artikel_seq')";
+ this.AuftragArtikelID = (int)(long)command.ExecuteScalar();
+ command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5)";
+ }
+
+ command.Parameters.AddWithValue("p0", this.AuftragArtikelID.Value);
+ command.Parameters.AddWithValue("p1", this.AuftragID);
+ command.Parameters.AddWithValue("p2", this.ArtikelNR);
+ command.Parameters.AddWithValue("p3", string.IsNullOrWhiteSpace(this.ArtikelName) ? (object)DBNull.Value : this.ArtikelName);
+ command.Parameters.AddWithValue("p4", this.Anzahl);
+ command.Parameters.AddWithValue("p5", this.Erledigt);
+
+ int result = command.ExecuteNonQuery();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+
+ }
+
+ public AuftragArtikel(NpgsqlDataReader reader, int i)
+ {
+ if (i == 1)
+ {
+ this.AuftragArtikelID = reader.GetInt32(0);
+ this.AuftragID = reader.GetInt32(1);
+ this.ArtikelNR = reader.GetInt32(2);
+ this.ArtikelName = reader.GetString(3);
+ this.Anzahl = reader.GetInt32(4);
+ this.Erledigt = reader.GetBoolean(5);
+ }
+ if (i == 2)
+ {
+ kunde = new Kunde();
+
+ this.ArtikelName = reader.GetString(0);
+ this.Anzahl = reader.GetInt32(1);
+ this.kunde.Suchtext = reader.GetString(2);
+ }
+
+ }
+
+ public int? AuftragArtikelID { get; set; }
+ public int? AuftragID { get; set; }
+ public int ArtikelNR { get; set; }
+ public string ArtikelName { get; set; }
+ public int Anzahl { get; set; }
+ public bool Erledigt { get; set; }
+
+
+ }
+}
diff --git a/Benutzer.cs b/Benutzer.cs
new file mode 100644
index 0000000..09b0909
--- /dev/null
+++ b/Benutzer.cs
@@ -0,0 +1,211 @@
+using BrightIdeasSoftware;
+using Npgsql;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace DatenDB
+{
+ public enum BenutzerRolle
+ {
+ Verwaltung = 0,
+ Fahrer = 1,
+ Admin = 2,
+ Waschstrasse = 3,
+ Master = 4,
+ Expedit = 5,
+ Frottee = 6,
+ Flach = 7
+ }
+
+ public class Benutzer
+ {
+ // 0 1 2 3 4 5 6 7 8
+ public const string COLUMNS = "benutzer_id, rolle, passwort, vorname, nachname, schein, gueltig_bis, ist_aktiv, benutzer_name";
+ private const string TABLE = "kundenverwaltung.benutzer";
+
+ public Benutzer()
+ {
+ }
+ public static List GetList()
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select {COLUMNS} from {TABLE}";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Benutzer(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+
+ }
+ public static List GetFahrerList()
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select {COLUMNS} from {TABLE} where rolle = 'Fahrer' and ist_aktiv is true order by benutzer_id asc";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Benutzer(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+ }
+ public static List GetArbeiterList()
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select {COLUMNS} from {TABLE} where ist_aktiv is true and rolle = 'Fahrer' or rolle = 'Verwaltung' or rolle = 'Expedit' order by benutzer_id asc";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Benutzer(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+ }
+
+ public static Benutzer GetBenutzer(string benutzerName, int? benID)
+ {
+ DatenbankConnection.GetConnection().Open();
+ Benutzer benutzer = new Benutzer();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ if(!string.IsNullOrEmpty(benutzerName)) command.CommandText = $"select {COLUMNS} from {TABLE} where benutzer_name = '{benutzerName}'";
+ if(benID != null) command.CommandText = $"select {COLUMNS} from {TABLE} where benutzer_id = {benID}";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) benutzer = new Benutzer(reader);
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return benutzer;
+ }
+
+ ///
+ /// Benutzer ID
+ ///
+
+ [OLVIgnore]
+ public int? BenutzerID { get; set; }
+
+ ///
+ /// Rolle des Benutzers
+ ///
+ [OLVColumn("Rolle", DisplayIndex = 4)]
+ public BenutzerRolle Rolle { get; set; } = BenutzerRolle.Waschstrasse;
+
+ ///
+ /// Passwort wird von OLV ignoriert
+ ///
+ [OLVIgnore]
+ public string Passwort { get; set; }
+
+ ///
+ /// Vorname & Nachname des Benutzers
+ ///
+ [OLVColumn("Vorname", DisplayIndex = 1)]
+ public string Vorname { get; set; }
+ [OLVColumn("Name", DisplayIndex = 2)]
+ public string Nachname { get; set; }
+
+ ///
+ /// Führerscheinnummer und Ablaufdatum
+ ///
+ [OLVColumn("FührerscheinNr", DisplayIndex = 6, IsVisible = false)]
+ public int? Schein { get; set; }
+ [OLVColumn("Ablaufdatum", DisplayIndex = 7, IsVisible = false)]
+ public DateTime? GueltigBis { get; set; }
+
+ ///
+ /// Status des Benutzers.
+ ///
+ [OLVColumn("Aktiv", DisplayIndex = 5, CheckBoxes = true)]
+ public bool Aktiv { get; set; } = true;
+
+ ///
+ /// Benutzername wird automatisch generiert (Vorname + Nachname in Kleinbuchstaben ohne Leerzeichen)
+ ///
+ [OLVColumn("Benutzername", DisplayIndex = 3)]
+ public string BenutzerName { get; set; }
+
+
+ public static Benutzer Get(string benutzerName, string passwort)
+ {
+ try
+ {
+ DatenbankConnection.GetConnection().Open();
+ }
+ catch (NpgsqlException)
+ {
+ throw new LoginException("Datenbank ist nicht verbunden", -4);
+ }
+
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select {COLUMNS} from {TABLE} where lower(benutzer_name) = :ben";
+ command.Parameters.AddWithValue(":ben", benutzerName.ToLower());
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ Benutzer person = null;
+ if (reader.Read()) person = new Benutzer(reader);
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+
+ if (person == null) throw new LoginException("Benutzer nicht gefunden!", -1);
+ else if (string.IsNullOrEmpty(person.Passwort)) throw new LoginException("Benutzer gefunden, Passwort bestätigen", -3);
+ if (person.Passwort != passwort) throw new LoginException("Passwort ist falsch!", -2);
+
+ return person;
+ } //FEHLERMELDUNG DYNAMISCH GENERIEREN...
+ public Benutzer(NpgsqlDataReader reader)
+ {
+ this.BenutzerID = reader.GetInt32(0);
+ this.Rolle = reader.IsDBNull(1) ? BenutzerRolle.Verwaltung : (BenutzerRolle)Enum.Parse(typeof(BenutzerRolle), reader.GetString(1));
+ this.Passwort = reader.IsDBNull(2) ? string.Empty : reader.GetString(2);
+ this.Vorname = reader.IsDBNull(3) ? string.Empty : reader.GetString(3);
+ this.Nachname = reader.IsDBNull(4) ? string.Empty : reader.GetString(4);
+ this.Schein = reader.IsDBNull(5) ? null : (int?)reader.GetInt32(5);
+ this.GueltigBis = reader.IsDBNull(6) ? null : (DateTime?)reader.GetDateTime(6);
+ this.Aktiv = reader.IsDBNull(7) ? true : reader.GetBoolean(7);
+ this.BenutzerName = reader.IsDBNull(8) ? string.Empty : reader.GetString(8);
+ }
+ public int Save()
+ {
+ DatenbankConnection.GetConnection().Open();
+
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ if (this.BenutzerID.HasValue & this.BenutzerID != 0)
+ {
+ command.CommandText = $"update {TABLE} set rolle = :p1, passwort = :p2, vorname = :p3, nachname = :p4, schein = :p5, gueltig_bis = :p6, ist_aktiv = :p7, benutzer_name = :p8 where benutzer_id = :p0";
+ }
+ else
+ {
+ command.CommandText = "select nextval('kundenverwaltung.benutzer_seq')";
+ this.BenutzerID = (int)(long)command.ExecuteScalar();
+ command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8)";
+ }
+
+ command.Parameters.AddWithValue("p0", this.BenutzerID);
+ command.Parameters.AddWithValue("p1", this.Rolle.ToString());
+ command.Parameters.AddWithValue("p2", string.IsNullOrEmpty(this.Passwort) ? (object)DBNull.Value : this.Passwort);
+ command.Parameters.AddWithValue("p3", string.IsNullOrEmpty(this.Vorname) ? (object)DBNull.Value : this.Vorname);
+ command.Parameters.AddWithValue("p4", string.IsNullOrEmpty(this.Nachname) ? (object)DBNull.Value : this.Nachname);
+ command.Parameters.AddWithValue("p5", this.Schein.HasValue ? this.Schein.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p6", this.Rolle == BenutzerRolle.Fahrer ? this.GueltigBis.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p7", this.Aktiv);
+ command.Parameters.AddWithValue("p8", string.IsNullOrEmpty(this.BenutzerName) ? (object)DBNull.Value : this.BenutzerName);
+
+
+ int result = command.ExecuteNonQuery();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+ }
+}
diff --git a/Berechnungen.cs b/Berechnungen.cs
new file mode 100644
index 0000000..b5fdcc6
--- /dev/null
+++ b/Berechnungen.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DatenDB
+{
+ public class Berechnungen
+ {
+ public Berechnungen()
+ {
+ }
+
+ public static double[] GetBewertung(double kndums, int betten, double gesamtumsatz, double variablekosten, double[] kosten, bool istmiete)
+ {
+ double[] bewertung = new double[5];
+
+ bewertung[0] = kndums / gesamtumsatz; //UMSATZANTEIL
+ bewertung[1] = variablekosten * -1 * bewertung[0] / betten; //KOSTENANTEIL
+ bewertung[2] = kndums / betten; //UMSATZ/GAST
+ bewertung[3] = bewertung[2] - bewertung[1]; //BEWERTUNG IN EURO
+
+ if (istmiete) bewertung[4] = bewertung[3] / kosten[2];
+ else bewertung[4] = bewertung[3] / kosten[1];
+
+ return bewertung;
+ }
+ public static double[] Differenz_berechnen(double zahl1, double zahl2)
+ {
+ double[] diff = new double[2];
+ diff[0] = zahl1 - zahl2; //DIFFERENZ IN EUR
+ if (zahl2 != 0) diff[1] = diff[0] / zahl2;
+ else diff[1] = 1.00; //DIFFERENZ IN %
+ return diff;
+ }
+ public static double[] Kostensummen(List kostenliste)
+ {
+ double[] results = new double[4];
+
+ foreach(Kosten kosten in kostenliste)
+ {
+ if (kosten.Kategorie == KostenKat.FixLohn) results[0] += (double)kosten.Betrag;
+ if (kosten.Kategorie == KostenKat.FixMiete) results[1] += (double)kosten.Betrag;
+ if (kosten.Kategorie == KostenKat.Variabel) results[2] += (double)kosten.Betrag;
+ if (kosten.Kategorie == KostenKat.Rest) results[3] += (double)kosten.Betrag;
+ }
+
+ for (int i = 0; i < results.Length; i++)
+ {
+ results[i] = results[i] * -1;
+ }
+
+ return results;
+ }
+
+ public static DateTime GetNextWeekday(int liefertag)
+ {
+ DateTime dt;
+ if ((int)DateTime.Today.DayOfWeek == liefertag) { dt = DateTime.Today.AddDays(1); }
+ else { dt = DateTime.Today; }
+ int daysUntilLiefertag = ((int)liefertag - (int)dt.DayOfWeek + 7) % 7;
+
+ return dt.AddDays(daysUntilLiefertag);
+ }
+ }
+}
diff --git a/ClassChart.cs b/ClassChart.cs
new file mode 100644
index 0000000..84169a9
--- /dev/null
+++ b/ClassChart.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Policy;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DatenDB
+{
+ public class ClassChart
+ {
+ public ClassChart()
+ {
+ }
+
+ public static ClassChart FillChart(int? kndid)
+ {
+ ClassChart chart = new ClassChart();
+
+ return chart;
+ }
+ }
+}
diff --git a/DatenbankConnection.cs b/DatenbankConnection.cs
new file mode 100644
index 0000000..a6080e1
--- /dev/null
+++ b/DatenbankConnection.cs
@@ -0,0 +1,27 @@
+using Npgsql;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Management;
+
+namespace DatenDB
+{
+ static class DatenbankConnection
+ {
+ private static NpgsqlConnection connection = null;
+
+ public static NpgsqlConnection GetConnection()
+ {
+ if (connection == null)
+ {
+ connection = new NpgsqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
+ }
+
+ return connection;
+ }
+
+ }
+}
diff --git a/Deckungsbeitrag.csproj b/Deckungsbeitrag.csproj
index e567df2..85d9d6d 100644
--- a/Deckungsbeitrag.csproj
+++ b/Deckungsbeitrag.csproj
@@ -12,6 +12,23 @@
512
true
true
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
+
+
AnyCPU
@@ -32,22 +49,87 @@
prompt
4
+
+ Deckungsbeitrag.Program
+
+
+ packages\AForge.2.2.5\lib\AForge.dll
+
+
+ packages\AForge.Video.2.2.5\lib\AForge.Video.dll
+
+
+ packages\AForge.Video.DirectShow.2.2.5\lib\AForge.Video.DirectShow.dll
+
+
+ packages\HarfBuzzSharp.8.3.0.1\lib\net462\HarfBuzzSharp.dll
+
False
bin\Debug\ListViewPrinter.dll
+
+ packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
+
+
+ packages\Microsoft.Bcl.HashCode.6.0.0\lib\net462\Microsoft.Bcl.HashCode.dll
+
+
+ packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll
+
+
+ packages\Npgsql.4.1.14\lib\net461\Npgsql.dll
+
packages\ObjectListView.Updated.2.9.3\lib\net40\ObjectListView.dll
-
- packages\Spire.Barcode.7.3.5\lib\net48\Spire.Barcode.dll
+
+ packages\Spire.Barcode.7.4.1\lib\net48\Spire.Barcode.dll
+
+ packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll
+
+
+ packages\System.Collections.Immutable.9.0.0\lib\net462\System.Collections.Immutable.dll
+
+
+ packages\System.Diagnostics.DiagnosticSource.9.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll
+
+
+ packages\System.IO.Pipelines.9.0.0\lib\net462\System.IO.Pipelines.dll
+
+
+ packages\System.Memory.4.6.3\lib\net462\System.Memory.dll
+
+
+
+ packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll
+
+
+ packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll
+
+
+ packages\System.Text.Encodings.Web.9.0.0\lib\net462\System.Text.Encodings.Web.dll
+
+
+ packages\System.Text.Json.9.0.0\lib\net462\System.Text.Json.dll
+
+
+ packages\System.Threading.Channels.9.0.0\lib\net462\System.Threading.Channels.dll
+
+
+ packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll
+
+
+ packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
+
+
@@ -62,20 +144,67 @@
..\..\..\Users\kilia\Downloads\USB-Barcode-Scanner.dll
-
- packages\ZXing.Net.0.16.9\lib\net48\zxing.dll
+
+ packages\ZXing.Net.0.16.11\lib\net48\zxing.dll
-
- packages\ZXing.Net.0.16.9\lib\net48\zxing.presentation.dll
+
+ packages\ZXing.Net.0.16.11\lib\net48\zxing.presentation.dll
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ FormArtikelVW.cs
+
+
+ Form
+
+
+ FormAufgabeVW.cs
+
Form
FormAuftragDetail.cs
+
+ Form
+
+
+ FormBenutzerVW.cs
+
+
+ Form
+
+
+ FormFehlmengeCount.cs
+
+
+ Form
+
+
+ FormHelp.cs
+
+
+ Form
+
+
+ FormKamera.cs
+
Form
@@ -160,13 +289,19 @@
FormProgrammauswahl.cs
-
+
Form
-
- FormWaschverlauf.cs
+
+ FromAuftragVW.cs
+
+
+
+
+
+
Form
@@ -180,21 +315,26 @@
FormNeuDeckungsbeitrag.cs
-
+
Form
-
- Import.cs
+
+ FormImport.cs
+
+
-
+
Form
-
- KundeDaten.cs
+
+ FormKundeVW.cs
+
+
+
UserControl
@@ -207,9 +347,30 @@
UCAuftrag.cs
+
+
+
+
+ FormArtikelVW.cs
+
+
+ FormAufgabeVW.cs
+
FormAuftragDetail.cs
+
+ FormBenutzerVW.cs
+
+
+ FormFehlmengeCount.cs
+
+
+ FormHelp.cs
+
+
+ FormKamera.cs
+
FormMSAuswahl.cs
@@ -258,11 +419,11 @@
FormProgrammauswahl.cs
-
- FormWaschverlauf.cs
+
+ FromAuftragVW.cs
-
- Import.cs
+
+ FormImport.cs
ResXFileCodeGenerator
@@ -274,8 +435,8 @@
Resources.resx
True
-
- KundeDaten.cs
+
+ FormKundeVW.cs
UCArtikel.cs
@@ -297,12 +458,6 @@
-
-
- {be2d4605-a60c-4cc5-a423-edd9cda63f2a}
- DatenDB
-
-
@@ -310,7 +465,29 @@
+
+
+
+
+
+
+ False
+ Microsoft .NET Framework 4.8 %28x86 und x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+
+
+ Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".
+
+
+
\ No newline at end of file
diff --git a/Deckungsbeitrag.sln b/Deckungsbeitrag.sln
index ed8cda2..33d1ca8 100644
--- a/Deckungsbeitrag.sln
+++ b/Deckungsbeitrag.sln
@@ -5,8 +5,6 @@ VisualStudioVersion = 17.3.32922.545
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deckungsbeitrag", "Deckungsbeitrag.csproj", "{1CDFBC6A-240A-4D59-9F9E-35041D9ACCC6}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatenDB", "..\DatenDB\DatenDB.csproj", "{BE2D4605-A60C-4CC5-A423-EDD9CDA63F2A}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -17,10 +15,6 @@ Global
{1CDFBC6A-240A-4D59-9F9E-35041D9ACCC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1CDFBC6A-240A-4D59-9F9E-35041D9ACCC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1CDFBC6A-240A-4D59-9F9E-35041D9ACCC6}.Release|Any CPU.Build.0 = Release|Any CPU
- {BE2D4605-A60C-4CC5-A423-EDD9CDA63F2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BE2D4605-A60C-4CC5-A423-EDD9CDA63F2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BE2D4605-A60C-4CC5-A423-EDD9CDA63F2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BE2D4605-A60C-4CC5-A423-EDD9CDA63F2A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Fach.cs b/Fach.cs
new file mode 100644
index 0000000..e711e2a
--- /dev/null
+++ b/Fach.cs
@@ -0,0 +1,166 @@
+using Npgsql;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DatenDB
+{
+
+ public enum Liefertag
+ {
+ SO = 0,
+ MO = 1,
+ DI = 2,
+ MI = 3,
+ DO = 4,
+ FR = 5,
+ SA = 6,
+ STV = 7
+ }
+ public class Fach
+ {
+ private const string COLUMNS = "fach_id, maschine_id, kunde_id, wprogramm_id, gewicht, extra, gewaschen, extrakunde_id, liefertag, auftrag_id, extraauftrag_id, tischsummary, containersummary";
+ private const string TABLE = "kundenverwaltung.fach";
+
+ public static List GetVerlauf(int? mID)
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultlist = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ command.CommandText = $"select {COLUMNS} from {TABLE} where maschine_id = {mID}";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultlist.Add(new Fach(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultlist;
+ }
+
+ public static List GetTischSummary(int? mID)
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultlist = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ command.CommandText = $"select distinct(auftrag_id) from {TABLE} where maschine_id = {mID} and fach_id > (select max(fach_id) from {TABLE} where tischsummary = true) order by auftrag_id asc";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultlist.Add(reader.GetInt32(0));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultlist;
+ }
+
+ public static List GetInhalt(int? mID, int fachzahl)
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultlist = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ command.CommandText = $"select {COLUMNS} from {TABLE} where maschine_id = {mID} order by gewaschen desc Limit {fachzahl}";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultlist.Add(new Fach(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultlist;
+ }
+ public static Fach GetFach(int? ms, int fach)
+ {
+ DatenbankConnection.GetConnection().Open();
+ Fach result = new Fach();
+ using (NpgsqlCommand command = new NpgsqlCommand())
+ {
+ command.Connection = DatenbankConnection.GetConnection();
+ if (ms == 1) command.CommandText = $"select fach_id, maschine_id, kunde_id, wprogramm_id, gewicht, extra, gewaschen, extrakunde_id, liefertag, auftrag_id, extraauftrag_id from kundenverwaltung.inhalt_ws1 where row_number = {fach}";
+ if (ms == 2) command.CommandText = $"select fach_id, maschine_id, kunde_id, wprogramm_id, gewicht, extra, gewaschen, extrakunde_id, liefertag, auftrag_id, extraauftrag_id from kundenverwaltung.inhalt_ws2 where row_number = {fach}";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) result = new Fach(reader);
+ reader.Close();
+ }
+ DatenbankConnection.GetConnection().Close();
+
+ return result;
+ }
+ public int? FachID { get; set; }
+ public int MaschineID { get; set; }
+ public int KundeID { get; set; }
+ public int WProgrammID { get; set; }
+ public double? Gewicht { get; set; }
+ public DateTime Gewaschen { get; set; }
+ public int? Extra { get; set; }
+ public Liefertag Liefertag { get; set; } = Liefertag.MO;
+ public int? ExtraKundeID { get; set; }
+ public DateTime? Lieferdatum { get; set; }
+ public int? AuftragID { get; set; }
+ public int? ExtraAuftragID { get; set; }
+ public bool TischSummary { get; set; }
+ public bool ContainerSummary { get; set; }
+
+
+ public Fach(NpgsqlDataReader reader)
+ {
+ this.FachID = reader.GetInt32(0);
+ this.MaschineID = reader.GetInt32(1);
+ this.KundeID = reader.GetInt32(2);
+ this.WProgrammID = reader.GetInt32(3);
+ this.Gewicht = reader.IsDBNull(4) ? null : (double?)reader.GetDouble(4);
+ this.Extra = reader.IsDBNull(5) ? null : (int?)reader.GetInt16(5);
+ this.Gewaschen = reader.GetDateTime(6);
+ this.ExtraKundeID = reader.IsDBNull(7) ? (int?)null : reader.GetInt32(7);
+ this.Lieferdatum = reader.IsDBNull(8) ? (DateTime?)null : reader.GetDateTime(8);
+ this.AuftragID = reader.IsDBNull(9) ? (int?)null : reader.GetInt32(9);
+ this.ExtraAuftragID = reader.IsDBNull(10) ? (int?)null : reader.GetInt32(10);
+ if(reader.FieldCount > 11)
+ {
+ this.TischSummary = reader.IsDBNull(11) ? false : reader.GetBoolean(11);
+ this.ContainerSummary = reader.IsDBNull(12) ? false : reader.GetBoolean(12);
+ }
+ }
+ public int Save()
+ {
+ DatenbankConnection.GetConnection().Open();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ if (this.FachID.HasValue & this.FachID != 0)
+ {
+ command.CommandText = $"update {TABLE} set maschine_id = :p1, kunde_id = :p2, wprogramm_id = :p3, gewicht = :p4, extra = :p5, gewaschen = :p6, extrakunde_id = :p7, liefertag = :p8, auftrag_id = :p9, extraauftrag_id = :p10, tischsummary = :p11, containersummary = :p12 where fach_id = :p0";
+ }
+ else
+ {
+ command.CommandText = "select nextval('kundenverwaltung.fach_seq')";
+ this.FachID = (int)(long)command.ExecuteScalar();
+ command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9, :p10, :p11, :p12)";
+ }
+ command.Parameters.AddWithValue("p0", this.FachID);
+ command.Parameters.AddWithValue("p1", this.MaschineID);
+ command.Parameters.AddWithValue("p2", this.KundeID);
+ command.Parameters.AddWithValue("p3", this.WProgrammID);
+ command.Parameters.AddWithValue("p4", this.Gewicht.HasValue ? this.Gewicht.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p5", this.Extra.HasValue ? this.Extra.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p6", this.Gewaschen);
+ command.Parameters.AddWithValue("p7", this.ExtraKundeID.HasValue ? this.ExtraKundeID : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p8", this.Lieferdatum.HasValue ? this.Lieferdatum : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p9", this.AuftragID.HasValue ? this.AuftragID.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p10", this.ExtraAuftragID.HasValue ? this.ExtraAuftragID.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p11", this.TischSummary);
+ command.Parameters.AddWithValue("p12", this.ContainerSummary);
+
+ int result = command.ExecuteNonQuery();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+
+ public Fach()
+ {
+ }
+
+ }
+}
diff --git a/FahrerAuftrag.cs b/FahrerAuftrag.cs
new file mode 100644
index 0000000..d169fa9
--- /dev/null
+++ b/FahrerAuftrag.cs
@@ -0,0 +1,81 @@
+using Npgsql;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DatenDB
+{
+ public class FahrerAuftrag
+ {
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
+ private const string COLUMNS = "auftrag_id, fahrer_id, wann, zusatz, kndnr, kndname, aufgabe, beschreibung, gedruckt, gedruckt_von, erledigt, erledigt_von, erstellt, erstellt_von";
+ private const string TABLE = "kundenverwaltung.fahrer_auftrag";
+ public const string ASPECTS = "AuftragID,Fahrer,Wann,KundeNummer,Kunde,Aufgabe,Zusatz,Beschreibung,Gedruckt,Erledigt,Erstellt,Am";
+
+ public FahrerAuftrag()
+ {
+ }
+ public static List GetAuftragList()
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ command.CommandText = $"select {COLUMNS} from {TABLE}";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new FahrerAuftrag(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+
+ foreach(FahrerAuftrag fahrerAuftrag in resultList)
+ {
+ fahrerAuftrag.Fahrer = get_fahrer(fahrerAuftrag.FahrerID);
+ }
+ return resultList;
+ }
+
+ public FahrerAuftrag(NpgsqlDataReader reader)
+ {
+ this.AuftragID = reader.GetInt32(0);
+ this.FahrerID = reader.IsDBNull(1) ? null : (int?)reader.GetInt32(1);
+ this.Wann = reader.GetDateTime(2);
+ this.Zusatz = reader.IsDBNull(3) ? string.Empty : reader.GetString(3);
+ this.KundeNummer = reader.GetString(4);
+ this.Kunde = reader.GetString(5);
+ this.Aufgabe = reader.GetString(6);
+ this.Beschreibung = reader.GetString(7);
+ this.Gedruckt = reader.IsDBNull(8) ? null : (DateTime?)reader.GetDateTime(8);
+ this.GedrucktVon = reader.IsDBNull(9) ? null : (int?)reader.GetInt32(9);
+ this.Erledigt = reader.IsDBNull(10) ? null : (DateTime?)reader.GetDateTime(10);
+ this.ErledigtVon = reader.IsDBNull(11) ? null : (int?)reader.GetInt32(11);
+ this.Erstellt = reader.IsDBNull(12) ? null : (DateTime?)reader.GetDateTime(12);
+ this.ErstelltVon = reader.GetInt32(13);
+
+ }
+ public int AuftragID { get; set; }
+ public string Fahrer { get; set; }
+ public int? FahrerID { get; set; }
+ public string KundeNummer { get; set; }
+ public string Kunde { get; set; }
+ public string Aufgabe { get; set; }
+ public string Beschreibung { get; set; }
+ public DateTime Wann { get; set; }
+ public string Zusatz { get; set; }
+ public DateTime? Gedruckt { get; set; }
+ public int? GedrucktVon { get; set; }
+ public DateTime? Erledigt { get; set; }
+ public int? ErledigtVon { get; set; }
+ public DateTime? Erstellt { get; set; }
+ public int ErstelltVon { get; set; }
+ private static string get_fahrer(int? fahrerid)
+ {
+ string fahrer = Benutzer.GetBenutzer(null, fahrerid).Vorname + " " + Benutzer.GetBenutzer(null, fahrerid).Nachname;
+
+ return fahrer;
+ }
+ }
+}
diff --git a/Fehlermeldungen.cs b/Fehlermeldungen.cs
new file mode 100644
index 0000000..253a8e2
--- /dev/null
+++ b/Fehlermeldungen.cs
@@ -0,0 +1,230 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using ZXing;
+
+namespace DatenDB
+{
+ public class Fehlermeldungen
+ {
+
+ public Fehlermeldungen()
+ {
+
+ }
+ public string NoExtraKunde()
+ {
+ string s = "Extra Kunde kann nicht gewählt werden. Um Extra Kunden hinzuzugüfen wähle im vorigen Fenster +Kunde.";
+ return s;
+ }
+ ///
+ /// FUNKTIONEN GEBEN DIALOG RESULT RETUR.
+ ///
+ /// DialogResult
+ public DialogResult NoCleanContainer()
+ {
+ DialogResult result = DialogResult.Cancel;
+
+ string s = $"Der Auftrag kann nicht abgeschlossen werden. Bitte korrigiere die Anzahl der sauberen Container.";
+ string caption = "ACHTUNG";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Warning;
+
+ result = MessageBox.Show(s, caption, buttons, icon);
+ return result;
+ }
+ public DialogResult DifferentCleanContainer()
+ {
+ DialogResult result = DialogResult.Cancel;
+
+ string s = $"Die Anzahl der sauberen Container wurde verändert. Möchtest du die Etiketten neu drucken?";
+ string caption = "FRAGE";
+ MessageBoxButtons buttons = MessageBoxButtons.YesNoCancel;
+ MessageBoxIcon icon = MessageBoxIcon.Question;
+
+ result = MessageBox.Show(s, caption, buttons, icon);
+ return result;
+ }
+ public DialogResult NoAufgabe()
+ {
+ DialogResult result = DialogResult.Cancel;
+
+ string s = $"Der Auftrag kann nicht gespeichert werden. Bitte wähl eine Aufgabe aus.";
+ string caption = "ACHTUNG";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Exclamation;
+
+ result = MessageBox.Show(s, caption, buttons, icon);
+ return result;
+
+ }
+ public DialogResult AuftragAusgeliefert()
+ {
+ DialogResult result = DialogResult.Cancel;
+
+ string s = $"Wurde der Auftrag erfolgreich ausgeliefert?";
+ string caption = "FRAGE";
+ MessageBoxButtons buttons = MessageBoxButtons.YesNo;
+ MessageBoxIcon icon = MessageBoxIcon.Question;
+
+ result = MessageBox.Show(s, caption, buttons, icon);
+ return result;
+ }
+ public DialogResult AuftragAufAbruf()
+ {
+ DialogResult result = DialogResult.Cancel;
+
+ string s = $"Ist der Auftrag wirklich Auf Abruf?";
+ string caption = "FRAGE";
+ MessageBoxButtons buttons = MessageBoxButtons.YesNo;
+ MessageBoxIcon icon = MessageBoxIcon.Question;
+
+ result = MessageBox.Show(s, caption, buttons, icon);
+ return result;
+ }
+ public DialogResult AuftragVorhanden(Auftrag auftrag)
+ {
+ DialogResult result = DialogResult.Cancel;
+
+ string s = $"Der Auftrag {Kunde.GetKunde(null, auftrag.KundeID, null).Suchtext} Liefertag {auftrag.Liefertag.ToShortDateString()} erstellt am {auftrag.Erstellt.Value.ToShortDateString()} ist bereits vorhanden. Trotzdem neu erstellen?";
+ string caption = "FRAGE";
+ MessageBoxButtons buttons = MessageBoxButtons.YesNo;
+ MessageBoxIcon icon = MessageBoxIcon.Question;
+
+ result = MessageBox.Show(s, caption, buttons, icon);
+ return result;
+ }
+
+ ///
+ /// Der Auftrag wurde bereits fertig gestellt. Kein Bearbeiten mehr möglich.
+ ///
+ public void AuftragFertig()
+ {
+ string s = $"Der Auftrag ist bereits fertig und kann nicht mehr bearbeitet werden.";
+ string caption = "HINWEIS";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Information;
+ MessageBox.Show(s, caption, buttons, icon);
+ }
+
+ ///
+ /// Keine Aufträge gefunden.
+ ///
+ public void KeineAufträge()
+ {
+ string s = $"KEINE Aufträge zum Anzeigen gefunden. Versuch es mit einem anderen Status.";
+ string caption = "HINWEIS";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Information;
+ MessageBox.Show(s, caption, buttons, icon);
+ }
+
+ ///
+ /// Es kann nur ein Auftrag verarbeitet werden.
+ ///
+ public void NurEinAuftrag()
+ {
+ string s = $"Es kann nur ein Auftrag verarbeitet werden.";
+ string caption = "HINWEIS";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Information;
+ MessageBox.Show(s, caption, buttons, icon);
+ }
+
+ ///
+ /// Speichern der Liste erfolgreich.
+ ///
+ public void Gespeichert()
+ {
+ string s = $"Es wurden alle Einträge gespeichert.";
+ string caption = "HINWEIS";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Information;
+ MessageBox.Show(s, caption, buttons, icon);
+ }
+
+ ///
+ /// Speichern der Liste fehlgeschlagen.
+ ///
+ public void Speicherfehler()
+ {
+ string s = $"Es konnten nicht alle Einträge gespeichert werden.";
+ string caption = "FEHLER";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Error;
+ MessageBox.Show(s, caption, buttons, icon);
+ }
+
+ public void FehlmengeCount()
+ {
+ string s = $"Fehlmenge konnte nicht gespeichert werden. VORARBEITER RUFEN!!";
+ string caption = "FEHLER";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Error;
+ MessageBox.Show(s, caption, buttons, icon);
+ }
+
+ ///
+ /// Updating der Artikel wird durchgeführt und die DB-Verbindung ist offen.
+ ///
+ ///
+ public void IsUpdating(Exception ex)
+ {
+ string s = $"Update wird gerade durchgeführt. Versuch es später nocheinmal. {Environment.NewLine} Fehler: {ex.Message}";
+ string caption = "FEHLER";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Error;
+ MessageBox.Show(s, caption, buttons, icon);
+
+ }
+
+ public void Eingabefehler()
+ {
+ string s = $"Die Eingabe war nicht korrekt. Bitte tragen sie hier nur Zahlen ein.";
+ string caption = "FEHLER";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Error;
+ MessageBox.Show(s, caption, buttons, icon);
+ }
+
+ public DialogResult SonderNoCleanContainer()
+ {
+ DialogResult result = DialogResult.Cancel;
+
+ string s = $"Sonderauftrag ohne sauberen Container abschließen? Es wird KEIN Etikett gedruckt.";
+ string caption = "INFO";
+ MessageBoxButtons buttons = MessageBoxButtons.YesNo;
+ MessageBoxIcon icon = MessageBoxIcon.Exclamation;
+
+ result = MessageBox.Show(s, caption, buttons, icon);
+ return result;
+
+ }
+
+ public void VerarbeiteteDaten(int saved, int anzahlkunden, int artvorhanden)
+ {
+ string s = $"Es wurden {anzahlkunden} Kunden gefunden und {saved} Artikel gespeichert. {artvorhanden} Artikel waren bereits vorhanden.";
+ string caption = "HINWEIS";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ MessageBoxIcon icon = MessageBoxIcon.Information;
+ MessageBox.Show(s, caption, buttons, icon);
+ }
+
+ public bool HandEingabe()
+ {
+ bool result;
+ string s = $"Kunde Handeingabe?";
+ string caption = "FRAGE";
+ MessageBoxButtons buttons = MessageBoxButtons.YesNo;
+ MessageBoxIcon icon = MessageBoxIcon.Question;
+
+ if (MessageBox.Show(s, caption, buttons, icon) == DialogResult.Yes) result = true;
+ else result = false;
+
+ return result;
+ }
+ }
+}
diff --git a/FormArtikelVW.Designer.cs b/FormArtikelVW.Designer.cs
new file mode 100644
index 0000000..ced8d80
--- /dev/null
+++ b/FormArtikelVW.Designer.cs
@@ -0,0 +1,79 @@
+namespace Deckungsbeitrag
+{
+ partial class FormArtikelVW
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormArtikelVW));
+ this.objectListViewArtikel = new BrightIdeasSoftware.ObjectListView();
+ ((System.ComponentModel.ISupportInitialize)(this.objectListViewArtikel)).BeginInit();
+ this.SuspendLayout();
+ //
+ // objectListViewArtikel
+ //
+ this.objectListViewArtikel.AlternateRowBackColor = System.Drawing.Color.LightSteelBlue;
+ this.objectListViewArtikel.CellEditUseWholeCell = false;
+ this.objectListViewArtikel.Cursor = System.Windows.Forms.Cursors.Default;
+ this.objectListViewArtikel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.objectListViewArtikel.FullRowSelect = true;
+ this.objectListViewArtikel.GridLines = true;
+ this.objectListViewArtikel.HideSelection = false;
+ this.objectListViewArtikel.Location = new System.Drawing.Point(0, 0);
+ this.objectListViewArtikel.MultiSelect = false;
+ this.objectListViewArtikel.Name = "objectListViewArtikel";
+ this.objectListViewArtikel.SelectColumnsOnRightClick = false;
+ this.objectListViewArtikel.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.None;
+ this.objectListViewArtikel.Size = new System.Drawing.Size(860, 496);
+ this.objectListViewArtikel.TabIndex = 0;
+ this.objectListViewArtikel.UseAlternatingBackColors = true;
+ this.objectListViewArtikel.UseCompatibleStateImageBehavior = false;
+ this.objectListViewArtikel.UseFiltering = true;
+ this.objectListViewArtikel.View = System.Windows.Forms.View.Details;
+ this.objectListViewArtikel.AfterCreatingGroups += new System.EventHandler(this.objectListViewArtikel_AfterCreatingGroups);
+ this.objectListViewArtikel.ButtonClick += new System.EventHandler(this.objectListViewArtikel_ButtonClick);
+ //
+ // FormArtikelVW
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.ClientSize = new System.Drawing.Size(860, 496);
+ this.Controls.Add(this.objectListViewArtikel);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Name = "FormArtikelVW";
+ this.Text = "ARTIKELVERWALTUNG";
+ this.Load += new System.EventHandler(this.FormArtikelVW_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.objectListViewArtikel)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private BrightIdeasSoftware.ObjectListView objectListViewArtikel;
+ }
+}
\ No newline at end of file
diff --git a/FormArtikelVW.cs b/FormArtikelVW.cs
new file mode 100644
index 0000000..232ee08
--- /dev/null
+++ b/FormArtikelVW.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using BrightIdeasSoftware;
+using DatenDB;
+
+namespace Deckungsbeitrag
+{
+ public partial class FormArtikelVW : Form
+ {
+ public FormArtikelVW()
+ {
+ InitializeComponent();
+ }
+
+ private void FormArtikelVW_Load(object sender, EventArgs e)
+ {
+ OLV_Load();
+
+ }
+
+ private void OLV_GroupCount()
+ {
+ foreach (OLVGroup group in this.objectListViewArtikel.OLVGroups)
+ {
+ int sum = 0;
+
+ foreach (OLVListItem item in group.Items)
+ {
+ Artikel art = (Artikel)item.RowObject;
+ sum += art.Nachwaesche;
+ }
+ group.Header = $"{group.Header} (Anzahl: {sum.ToString()})";
+ }
+
+ }
+
+ private void OLV_Load()
+ {
+ Generator.GenerateColumns(this.objectListViewArtikel, typeof(Artikel), true);
+ this.objectListViewArtikel.SetObjects(Artikel.GetArtikelList());
+ OLVColumn sortColumn = new OLVColumn();
+ sortColumn = (OLVColumn)this.objectListViewArtikel.Columns[6];
+ this.objectListViewArtikel.Sort(sortColumn);
+ OLV_GroupCount();
+ OLVColumn buttonColumn = new OLVColumn();
+ buttonColumn = (OLVColumn)this.objectListViewArtikel.Columns[7];
+ buttonColumn.IsButton = true;
+ buttonColumn.ButtonSizing = OLVColumn.ButtonSizingMode.CellBounds;
+ Funktionen.Columns_Resize(this.objectListViewArtikel);
+
+ this.objectListViewArtikel.FilterMenuBuildStrategy = new MeinFilterMenu();
+
+ }
+
+ private void objectListViewArtikel_ButtonClick(object sender, CellClickEventArgs e)
+ {
+ Artikel artikel = (Artikel)e.Model;
+ artikel.Nachwaesche = 0;
+ artikel.LastReset = DateTime.Now;
+ if(artikel.Save() == 1) this.objectListViewArtikel.RefreshObject(e.Model);
+ }
+
+ private void objectListViewArtikel_AfterCreatingGroups(object sender, CreateGroupsEventArgs e)
+ {
+ foreach (OLVGroup group in this.objectListViewArtikel.OLVGroups)
+ {
+ int sum = 0;
+
+ foreach (OLVListItem item in group.Items)
+ {
+ Artikel art = (Artikel)item.RowObject;
+ sum += art.Nachwaesche;
+ }
+ group.Header = $"{group.Header} (Anzahl: {sum.ToString()})";
+ }
+
+ }
+ }
+}
diff --git a/FormArtikelVW.resx b/FormArtikelVW.resx
new file mode 100644
index 0000000..4b0fe78
--- /dev/null
+++ b/FormArtikelVW.resx
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ AAABAAEAAAAAAAEAIAC5FQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAAAFv
+ ck5UAc+id5oAABVzSURBVHja7Z0LuFVVtcfPOqCg4gMFVDQhsHyics4GfBUIPsMywULt4Ytz4CqSWV5R
+ UwnsZpaZ0c23XtNKI/JVGT5BTbtqiqX5SMRXGnI1LdBjiNwx9h57sfY6a5+91jl77b3WXr/f9/0//Pz4
+ Ps4Zc8wx5xpzzDmamgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgTpxRbYECgIxNeoJBQgcBsGFM9tpEtKdo
+ quhc0VzRaaJPiwZjw9oNxEDRSNF40SdFO4k2ZABC26+faGezndpwD9EW2K+svdQ2x4vuEv2faI1orUfv
+ ih4XzRBtjP/FNxDqtOeJHhG9Keow4/9NdJvoy35Hxn4l2ko03Rz5NbNdh9nyQdHpoo9l2X4+e20kOkJ0
+ r+jfvkkfpNWiy0Sb4X/VddyhonNESysMgA7S7aJWnLhEm1lwfEj0QQUbPiWaImrOiv0C7NVbNE40X7Qy
+ xMT3SncHZ4scgkDPB2KQbaueiDgI+vdbsjYAAfbbQPQZ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KfYZ0QbMPGh1g6s28xTu/FmgJ5FzxeNz+qK5fl99xO9
+ 1I3XjB6yZCzNM6GuDtw3/yxUuEcwtf3znaJJWT+L9v3uh0XoLfik1WJsxcSHpDhwb7uBt7DM2wEr7Tbc
+ caL+OG6gDfXNgivtk2pNwJGoHunNtuQh9oPEOXDxwstY+yzQBiM/sKz+QdY1B8ft2ob6mvDuonZrOT7P
+ jgunuM+YYT9IQSCgx3uMNgRInTMD9gMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJD8PyK+P6C0d3u7AAAAAElFTkSu
+ QmCC
+
+
+
\ No newline at end of file
diff --git a/FormAufgabeVW.Designer.cs b/FormAufgabeVW.Designer.cs
new file mode 100644
index 0000000..3b92f16
--- /dev/null
+++ b/FormAufgabeVW.Designer.cs
@@ -0,0 +1,252 @@
+namespace Deckungsbeitrag
+{
+ partial class FormAufgabeVW
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormAufgabeVW));
+ this.listViewAufgabeVW = new System.Windows.Forms.ListView();
+ this.groupBoxNeueAufgabe = new System.Windows.Forms.GroupBox();
+ this.buttonFarbe = new System.Windows.Forms.Button();
+ this.label11 = new System.Windows.Forms.Label();
+ this.comboBoxAufgabeKat = new System.Windows.Forms.ComboBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.textBoxBeschreibung = new System.Windows.Forms.TextBox();
+ this.textBoxBezeichnung = new System.Windows.Forms.TextBox();
+ this.buttonAbbrechenAufgabe = new System.Windows.Forms.Button();
+ this.buttonSpeichernAufgabe = new System.Windows.Forms.Button();
+ this.buttonNewUser = new System.Windows.Forms.Button();
+ this.groupBoxNeueAufgabe.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // listViewAufgabeVW
+ //
+ this.listViewAufgabeVW.AllowColumnReorder = true;
+ this.listViewAufgabeVW.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.listViewAufgabeVW.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.listViewAufgabeVW.FullRowSelect = true;
+ this.listViewAufgabeVW.GridLines = true;
+ this.listViewAufgabeVW.HideSelection = false;
+ this.listViewAufgabeVW.Location = new System.Drawing.Point(11, 11);
+ this.listViewAufgabeVW.Margin = new System.Windows.Forms.Padding(2);
+ this.listViewAufgabeVW.Name = "listViewAufgabeVW";
+ this.listViewAufgabeVW.Size = new System.Drawing.Size(778, 314);
+ this.listViewAufgabeVW.TabIndex = 34;
+ this.listViewAufgabeVW.UseCompatibleStateImageBehavior = false;
+ this.listViewAufgabeVW.View = System.Windows.Forms.View.Details;
+ this.listViewAufgabeVW.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listViewAufgabeVW_MouseClick);
+ //
+ // groupBoxNeueAufgabe
+ //
+ this.groupBoxNeueAufgabe.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxNeueAufgabe.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.groupBoxNeueAufgabe.Controls.Add(this.buttonFarbe);
+ this.groupBoxNeueAufgabe.Controls.Add(this.label11);
+ this.groupBoxNeueAufgabe.Controls.Add(this.comboBoxAufgabeKat);
+ this.groupBoxNeueAufgabe.Controls.Add(this.label2);
+ this.groupBoxNeueAufgabe.Controls.Add(this.label1);
+ this.groupBoxNeueAufgabe.Controls.Add(this.textBoxBeschreibung);
+ this.groupBoxNeueAufgabe.Controls.Add(this.textBoxBezeichnung);
+ this.groupBoxNeueAufgabe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.groupBoxNeueAufgabe.ForeColor = System.Drawing.Color.White;
+ this.groupBoxNeueAufgabe.Location = new System.Drawing.Point(11, 333);
+ this.groupBoxNeueAufgabe.Margin = new System.Windows.Forms.Padding(2);
+ this.groupBoxNeueAufgabe.Name = "groupBoxNeueAufgabe";
+ this.groupBoxNeueAufgabe.Padding = new System.Windows.Forms.Padding(2);
+ this.groupBoxNeueAufgabe.Size = new System.Drawing.Size(778, 87);
+ this.groupBoxNeueAufgabe.TabIndex = 35;
+ this.groupBoxNeueAufgabe.TabStop = false;
+ this.groupBoxNeueAufgabe.Text = "Aufgabe";
+ //
+ // buttonFarbe
+ //
+ this.buttonFarbe.FlatAppearance.BorderColor = System.Drawing.Color.White;
+ this.buttonFarbe.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.buttonFarbe.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.buttonFarbe.ForeColor = System.Drawing.Color.White;
+ this.buttonFarbe.Location = new System.Drawing.Point(694, 45);
+ this.buttonFarbe.Margin = new System.Windows.Forms.Padding(2);
+ this.buttonFarbe.Name = "buttonFarbe";
+ this.buttonFarbe.Size = new System.Drawing.Size(72, 22);
+ this.buttonFarbe.TabIndex = 47;
+ this.buttonFarbe.Text = "Farbe";
+ this.buttonFarbe.UseVisualStyleBackColor = true;
+ this.buttonFarbe.Visible = false;
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label11.Location = new System.Drawing.Point(554, 28);
+ this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(52, 13);
+ this.label11.TabIndex = 46;
+ this.label11.Text = "Kategorie";
+ //
+ // comboBoxAufgabeKat
+ //
+ this.comboBoxAufgabeKat.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.comboBoxAufgabeKat.FormattingEnabled = true;
+ this.comboBoxAufgabeKat.Location = new System.Drawing.Point(557, 43);
+ this.comboBoxAufgabeKat.Margin = new System.Windows.Forms.Padding(2);
+ this.comboBoxAufgabeKat.Name = "comboBoxAufgabeKat";
+ this.comboBoxAufgabeKat.Size = new System.Drawing.Size(133, 25);
+ this.comboBoxAufgabeKat.TabIndex = 45;
+ this.comboBoxAufgabeKat.SelectedValueChanged += new System.EventHandler(this.comboBoxAufgabeKat_SelectedValueChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label2.Location = new System.Drawing.Point(279, 30);
+ this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(72, 13);
+ this.label2.TabIndex = 23;
+ this.label2.Text = "Beschreibung";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.Location = new System.Drawing.Point(6, 28);
+ this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(47, 13);
+ this.label1.TabIndex = 22;
+ this.label1.Text = "Aufgabe";
+ //
+ // textBoxBeschreibung
+ //
+ this.textBoxBeschreibung.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.textBoxBeschreibung.Location = new System.Drawing.Point(281, 45);
+ this.textBoxBeschreibung.Margin = new System.Windows.Forms.Padding(2);
+ this.textBoxBeschreibung.Name = "textBoxBeschreibung";
+ this.textBoxBeschreibung.Size = new System.Drawing.Size(272, 23);
+ this.textBoxBeschreibung.TabIndex = 19;
+ //
+ // textBoxBezeichnung
+ //
+ this.textBoxBezeichnung.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append;
+ this.textBoxBezeichnung.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
+ this.textBoxBezeichnung.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.textBoxBezeichnung.Location = new System.Drawing.Point(9, 45);
+ this.textBoxBezeichnung.Margin = new System.Windows.Forms.Padding(2);
+ this.textBoxBezeichnung.Name = "textBoxBezeichnung";
+ this.textBoxBezeichnung.Size = new System.Drawing.Size(269, 23);
+ this.textBoxBezeichnung.TabIndex = 18;
+ //
+ // buttonAbbrechenAufgabe
+ //
+ this.buttonAbbrechenAufgabe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonAbbrechenAufgabe.BackColor = System.Drawing.Color.Red;
+ this.buttonAbbrechenAufgabe.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.buttonAbbrechenAufgabe.Image = ((System.Drawing.Image)(resources.GetObject("buttonAbbrechenAufgabe.Image")));
+ this.buttonAbbrechenAufgabe.Location = new System.Drawing.Point(759, 430);
+ this.buttonAbbrechenAufgabe.Margin = new System.Windows.Forms.Padding(2);
+ this.buttonAbbrechenAufgabe.Name = "buttonAbbrechenAufgabe";
+ this.buttonAbbrechenAufgabe.Size = new System.Drawing.Size(30, 32);
+ this.buttonAbbrechenAufgabe.TabIndex = 41;
+ this.buttonAbbrechenAufgabe.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
+ this.buttonAbbrechenAufgabe.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+ this.buttonAbbrechenAufgabe.UseVisualStyleBackColor = false;
+ this.buttonAbbrechenAufgabe.Click += new System.EventHandler(this.buttonAbbrechenAufgabe_Click);
+ //
+ // buttonSpeichernAufgabe
+ //
+ this.buttonSpeichernAufgabe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonSpeichernAufgabe.BackColor = System.Drawing.Color.Lime;
+ this.buttonSpeichernAufgabe.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.buttonSpeichernAufgabe.Image = ((System.Drawing.Image)(resources.GetObject("buttonSpeichernAufgabe.Image")));
+ this.buttonSpeichernAufgabe.Location = new System.Drawing.Point(725, 430);
+ this.buttonSpeichernAufgabe.Margin = new System.Windows.Forms.Padding(2);
+ this.buttonSpeichernAufgabe.Name = "buttonSpeichernAufgabe";
+ this.buttonSpeichernAufgabe.Size = new System.Drawing.Size(30, 32);
+ this.buttonSpeichernAufgabe.TabIndex = 40;
+ this.buttonSpeichernAufgabe.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
+ this.buttonSpeichernAufgabe.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+ this.buttonSpeichernAufgabe.UseVisualStyleBackColor = false;
+ this.buttonSpeichernAufgabe.Click += new System.EventHandler(this.buttonSpeichern_Click);
+ //
+ // buttonNewUser
+ //
+ this.buttonNewUser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.buttonNewUser.BackColor = System.Drawing.Color.Yellow;
+ this.buttonNewUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.buttonNewUser.Image = ((System.Drawing.Image)(resources.GetObject("buttonNewUser.Image")));
+ this.buttonNewUser.Location = new System.Drawing.Point(11, 430);
+ this.buttonNewUser.Margin = new System.Windows.Forms.Padding(2);
+ this.buttonNewUser.Name = "buttonNewUser";
+ this.buttonNewUser.Size = new System.Drawing.Size(135, 32);
+ this.buttonNewUser.TabIndex = 46;
+ this.buttonNewUser.Text = "Neue Aufgabe";
+ this.buttonNewUser.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+ this.buttonNewUser.UseVisualStyleBackColor = false;
+ this.buttonNewUser.Click += new System.EventHandler(this.buttonNewUser_Click);
+ //
+ // FormAufgabeVW
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.ClientSize = new System.Drawing.Size(800, 473);
+ this.Controls.Add(this.buttonNewUser);
+ this.Controls.Add(this.groupBoxNeueAufgabe);
+ this.Controls.Add(this.listViewAufgabeVW);
+ this.Controls.Add(this.buttonAbbrechenAufgabe);
+ this.Controls.Add(this.buttonSpeichernAufgabe);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Name = "FormAufgabeVW";
+ this.Text = "Aufgabeverwaltung";
+ this.Load += new System.EventHandler(this.FormAufgabeVW_Load);
+ this.groupBoxNeueAufgabe.ResumeLayout(false);
+ this.groupBoxNeueAufgabe.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListView listViewAufgabeVW;
+ private System.Windows.Forms.GroupBox groupBoxNeueAufgabe;
+ private System.Windows.Forms.Button buttonFarbe;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Button buttonAbbrechenAufgabe;
+ private System.Windows.Forms.ComboBox comboBoxAufgabeKat;
+ private System.Windows.Forms.Button buttonSpeichernAufgabe;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox textBoxBeschreibung;
+ private System.Windows.Forms.TextBox textBoxBezeichnung;
+ private System.Windows.Forms.Button buttonNewUser;
+ }
+}
\ No newline at end of file
diff --git a/FormAufgabeVW.cs b/FormAufgabeVW.cs
new file mode 100644
index 0000000..6a93f3a
--- /dev/null
+++ b/FormAufgabeVW.cs
@@ -0,0 +1,114 @@
+using DatenDB;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Xml.Serialization;
+
+namespace Deckungsbeitrag
+{
+ public partial class FormAufgabeVW : Form
+ {
+ Aufgabe aufgabe;
+ public FormAufgabeVW()
+ {
+ InitializeComponent();
+ }
+
+ private void FormAufgabeVW_Load(object sender, EventArgs e)
+ {
+ GroupBox_Visibility_State(this.groupBoxNeueAufgabe);
+ List