diff --git a/AA-Forms/FormAusschlager.cs b/AA-Forms/FormAusschlager.cs
index 6e53507..23d6829 100644
--- a/AA-Forms/FormAusschlager.cs
+++ b/AA-Forms/FormAusschlager.cs
@@ -305,8 +305,8 @@ namespace Deckungsbeitrag
Fach_Laden();
}
}
- //TODO: Wenn NeuerAuftrag gewählt wie gehts weiter?
}
}
//DONE: Bei Transport wir ein Fach mit Aktuellem Auftrag erstellt. Das Alte wird bei Transport gespeichert.
//DONE: Wenn NeuerAuftrag gewählt Fach ändern nicht vergessen.
+//DONE: Wenn NeuerAuftrag gewählt wie gehts weiter?
diff --git a/AA-Forms/FormExpedit.Designer.cs b/AA-Forms/FormExpedit.Designer.cs
index a7f0e21..5d76939 100644
--- a/AA-Forms/FormExpedit.Designer.cs
+++ b/AA-Forms/FormExpedit.Designer.cs
@@ -71,7 +71,23 @@
this.tabPageAll = new System.Windows.Forms.TabPage();
this.objectListViewAuftrag = new BrightIdeasSoftware.ObjectListView();
this.tabControlAuftragList = new System.Windows.Forms.TabControl();
+ this.buttonStats = new System.Windows.Forms.Button();
this.buttonEinstellung = new System.Windows.Forms.Button();
+ this.groupBoxStatistik = new System.Windows.Forms.GroupBox();
+ this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.tableLayoutPanelStatistik = new System.Windows.Forms.TableLayoutPanel();
+ this.labelZahl6 = new System.Windows.Forms.Label();
+ this.labelStatistik6 = new System.Windows.Forms.Label();
+ this.labelZahl5 = new System.Windows.Forms.Label();
+ this.labelStatistik5 = new System.Windows.Forms.Label();
+ this.labelZahl4 = new System.Windows.Forms.Label();
+ this.labelStatistik4 = new System.Windows.Forms.Label();
+ this.labelZahl3 = new System.Windows.Forms.Label();
+ this.labelStatistik3 = new System.Windows.Forms.Label();
+ this.labelZahl2 = new System.Windows.Forms.Label();
+ this.labelStatistik2 = new System.Windows.Forms.Label();
+ this.labelZahl1 = new System.Windows.Forms.Label();
+ this.labelStatistik1 = new System.Windows.Forms.Label();
this.groupBoxEtikett.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).BeginInit();
@@ -82,6 +98,8 @@
this.tabPageAll.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).BeginInit();
this.tabControlAuftragList.SuspendLayout();
+ this.groupBoxStatistik.SuspendLayout();
+ this.tableLayoutPanelStatistik.SuspendLayout();
this.SuspendLayout();
//
// label10
@@ -382,7 +400,7 @@
this.buttonSWS_Drucken.FlatAppearance.BorderSize = 0;
this.buttonSWS_Drucken.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonSWS_Drucken.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.buttonSWS_Drucken.Location = new System.Drawing.Point(1226, 727);
+ this.buttonSWS_Drucken.Location = new System.Drawing.Point(1179, 727);
this.buttonSWS_Drucken.Margin = new System.Windows.Forms.Padding(2);
this.buttonSWS_Drucken.Name = "buttonSWS_Drucken";
this.buttonSWS_Drucken.Size = new System.Drawing.Size(200, 41);
@@ -461,7 +479,7 @@
this.buttonNeuerAuftrag.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonNeuerAuftrag.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonNeuerAuftrag.ForeColor = System.Drawing.Color.Black;
- this.buttonNeuerAuftrag.Location = new System.Drawing.Point(1022, 727);
+ this.buttonNeuerAuftrag.Location = new System.Drawing.Point(975, 727);
this.buttonNeuerAuftrag.Margin = new System.Windows.Forms.Padding(2);
this.buttonNeuerAuftrag.Name = "buttonNeuerAuftrag";
this.buttonNeuerAuftrag.Size = new System.Drawing.Size(200, 41);
@@ -667,6 +685,20 @@
this.tabControlAuftragList.SelectedIndexChanged += new System.EventHandler(this.tabControlAuftragList_SelectedIndexChanged);
this.tabControlAuftragList.Selected += new System.Windows.Forms.TabControlEventHandler(this.tabControlAuftragList_Selected);
//
+ // buttonStats
+ //
+ this.buttonStats.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonStats.FlatAppearance.BorderColor = System.Drawing.Color.White;
+ this.buttonStats.FlatAppearance.BorderSize = 3;
+ this.buttonStats.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.buttonStats.Image = global::Deckungsbeitrag.Properties.Resources.StatisticsWarning_16x;
+ this.buttonStats.Location = new System.Drawing.Point(1384, 727);
+ this.buttonStats.Name = "buttonStats";
+ this.buttonStats.Size = new System.Drawing.Size(41, 41);
+ this.buttonStats.TabIndex = 46;
+ this.buttonStats.UseVisualStyleBackColor = true;
+ this.buttonStats.Click += new System.EventHandler(this.buttonStats_Click);
+ //
// buttonEinstellung
//
this.buttonEinstellung.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -681,12 +713,225 @@
this.buttonEinstellung.UseVisualStyleBackColor = true;
this.buttonEinstellung.Click += new System.EventHandler(this.buttonEinstellung_Click);
//
+ // groupBoxStatistik
+ //
+ this.groupBoxStatistik.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxStatistik.Controls.Add(this.dateTimePicker1);
+ this.groupBoxStatistik.Controls.Add(this.tableLayoutPanelStatistik);
+ this.groupBoxStatistik.ForeColor = System.Drawing.Color.White;
+ this.groupBoxStatistik.Location = new System.Drawing.Point(1171, 12);
+ this.groupBoxStatistik.Name = "groupBoxStatistik";
+ this.groupBoxStatistik.Size = new System.Drawing.Size(301, 197);
+ this.groupBoxStatistik.TabIndex = 62;
+ this.groupBoxStatistik.TabStop = false;
+ this.groupBoxStatistik.Text = "STATISTIK";
+ this.groupBoxStatistik.Visible = false;
+ //
+ // dateTimePicker1
+ //
+ this.dateTimePicker1.CustomFormat = "dddd dd.MM.yyyy";
+ this.dateTimePicker1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.dateTimePicker1.Location = new System.Drawing.Point(10, 19);
+ this.dateTimePicker1.Name = "dateTimePicker1";
+ this.dateTimePicker1.Size = new System.Drawing.Size(224, 26);
+ this.dateTimePicker1.TabIndex = 1;
+ this.dateTimePicker1.CloseUp += new System.EventHandler(this.dateTimePicker1_CloseUp);
+ //
+ // tableLayoutPanelStatistik
+ //
+ this.tableLayoutPanelStatistik.ColumnCount = 2;
+ this.tableLayoutPanelStatistik.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+ this.tableLayoutPanelStatistik.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl6, 1, 5);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik6, 0, 5);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl5, 1, 4);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik5, 0, 4);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl4, 1, 3);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik4, 0, 3);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl3, 1, 2);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik3, 0, 2);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl2, 1, 1);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik2, 0, 1);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl1, 1, 0);
+ this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik1, 0, 0);
+ this.tableLayoutPanelStatistik.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.tableLayoutPanelStatistik.Location = new System.Drawing.Point(3, 51);
+ this.tableLayoutPanelStatistik.Name = "tableLayoutPanelStatistik";
+ this.tableLayoutPanelStatistik.RowCount = 6;
+ this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
+ this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
+ this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
+ this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
+ this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
+ this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
+ this.tableLayoutPanelStatistik.Size = new System.Drawing.Size(295, 143);
+ this.tableLayoutPanelStatistik.TabIndex = 0;
+ //
+ // labelZahl6
+ //
+ this.labelZahl6.AutoSize = true;
+ this.labelZahl6.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelZahl6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelZahl6.ForeColor = System.Drawing.Color.White;
+ this.labelZahl6.Location = new System.Drawing.Point(99, 115);
+ this.labelZahl6.Name = "labelZahl6";
+ this.labelZahl6.Size = new System.Drawing.Size(53, 28);
+ this.labelZahl6.TabIndex = 11;
+ this.labelZahl6.Text = "Zahl 6";
+ this.labelZahl6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelStatistik6
+ //
+ this.labelStatistik6.AutoSize = true;
+ this.labelStatistik6.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelStatistik6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelStatistik6.ForeColor = System.Drawing.Color.White;
+ this.labelStatistik6.Location = new System.Drawing.Point(3, 115);
+ this.labelStatistik6.Name = "labelStatistik6";
+ this.labelStatistik6.Size = new System.Drawing.Size(90, 28);
+ this.labelStatistik6.TabIndex = 10;
+ this.labelStatistik6.Text = "Statistik 6";
+ this.labelStatistik6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelZahl5
+ //
+ this.labelZahl5.AutoSize = true;
+ this.labelZahl5.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelZahl5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelZahl5.ForeColor = System.Drawing.Color.White;
+ this.labelZahl5.Location = new System.Drawing.Point(99, 92);
+ this.labelZahl5.Name = "labelZahl5";
+ this.labelZahl5.Size = new System.Drawing.Size(53, 23);
+ this.labelZahl5.TabIndex = 9;
+ this.labelZahl5.Text = "Zahl 5";
+ this.labelZahl5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelStatistik5
+ //
+ this.labelStatistik5.AutoSize = true;
+ this.labelStatistik5.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelStatistik5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelStatistik5.ForeColor = System.Drawing.Color.White;
+ this.labelStatistik5.Location = new System.Drawing.Point(3, 92);
+ this.labelStatistik5.Name = "labelStatistik5";
+ this.labelStatistik5.Size = new System.Drawing.Size(90, 23);
+ this.labelStatistik5.TabIndex = 8;
+ this.labelStatistik5.Text = "Statistik 5";
+ this.labelStatistik5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelZahl4
+ //
+ this.labelZahl4.AutoSize = true;
+ this.labelZahl4.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelZahl4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelZahl4.ForeColor = System.Drawing.Color.White;
+ this.labelZahl4.Location = new System.Drawing.Point(99, 69);
+ this.labelZahl4.Name = "labelZahl4";
+ this.labelZahl4.Size = new System.Drawing.Size(53, 23);
+ this.labelZahl4.TabIndex = 7;
+ this.labelZahl4.Text = "Zahl 4";
+ this.labelZahl4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelStatistik4
+ //
+ this.labelStatistik4.AutoSize = true;
+ this.labelStatistik4.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelStatistik4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelStatistik4.ForeColor = System.Drawing.Color.White;
+ this.labelStatistik4.Location = new System.Drawing.Point(3, 69);
+ this.labelStatistik4.Name = "labelStatistik4";
+ this.labelStatistik4.Size = new System.Drawing.Size(90, 23);
+ this.labelStatistik4.TabIndex = 6;
+ this.labelStatistik4.Text = "Statistik 4";
+ this.labelStatistik4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelZahl3
+ //
+ this.labelZahl3.AutoSize = true;
+ this.labelZahl3.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelZahl3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelZahl3.ForeColor = System.Drawing.Color.White;
+ this.labelZahl3.Location = new System.Drawing.Point(99, 46);
+ this.labelZahl3.Name = "labelZahl3";
+ this.labelZahl3.Size = new System.Drawing.Size(53, 23);
+ this.labelZahl3.TabIndex = 5;
+ this.labelZahl3.Text = "Zahl 3";
+ this.labelZahl3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelStatistik3
+ //
+ this.labelStatistik3.AutoSize = true;
+ this.labelStatistik3.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelStatistik3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelStatistik3.ForeColor = System.Drawing.Color.White;
+ this.labelStatistik3.Location = new System.Drawing.Point(3, 46);
+ this.labelStatistik3.Name = "labelStatistik3";
+ this.labelStatistik3.Size = new System.Drawing.Size(90, 23);
+ this.labelStatistik3.TabIndex = 4;
+ this.labelStatistik3.Text = "Statistik 3";
+ this.labelStatistik3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelZahl2
+ //
+ this.labelZahl2.AutoSize = true;
+ this.labelZahl2.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelZahl2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelZahl2.ForeColor = System.Drawing.Color.White;
+ this.labelZahl2.Location = new System.Drawing.Point(99, 23);
+ this.labelZahl2.Name = "labelZahl2";
+ this.labelZahl2.Size = new System.Drawing.Size(53, 23);
+ this.labelZahl2.TabIndex = 3;
+ this.labelZahl2.Text = "Zahl 2";
+ this.labelZahl2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelStatistik2
+ //
+ this.labelStatistik2.AutoSize = true;
+ this.labelStatistik2.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelStatistik2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelStatistik2.ForeColor = System.Drawing.Color.White;
+ this.labelStatistik2.Location = new System.Drawing.Point(3, 23);
+ this.labelStatistik2.Name = "labelStatistik2";
+ this.labelStatistik2.Size = new System.Drawing.Size(90, 23);
+ this.labelStatistik2.TabIndex = 2;
+ this.labelStatistik2.Text = "Statistik 2";
+ this.labelStatistik2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelZahl1
+ //
+ this.labelZahl1.AutoSize = true;
+ this.labelZahl1.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelZahl1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelZahl1.ForeColor = System.Drawing.Color.White;
+ this.labelZahl1.Location = new System.Drawing.Point(99, 0);
+ this.labelZahl1.Name = "labelZahl1";
+ this.labelZahl1.Size = new System.Drawing.Size(53, 23);
+ this.labelZahl1.TabIndex = 1;
+ this.labelZahl1.Text = "Zahl 1";
+ this.labelZahl1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelStatistik1
+ //
+ this.labelStatistik1.AutoSize = true;
+ this.labelStatistik1.Dock = System.Windows.Forms.DockStyle.Left;
+ this.labelStatistik1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelStatistik1.ForeColor = System.Drawing.Color.White;
+ this.labelStatistik1.Location = new System.Drawing.Point(3, 0);
+ this.labelStatistik1.Name = "labelStatistik1";
+ this.labelStatistik1.Size = new System.Drawing.Size(90, 23);
+ this.labelStatistik1.TabIndex = 0;
+ this.labelStatistik1.Text = "Statistik 1";
+ this.labelStatistik1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
// FormExpedit
//
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(1481, 777);
+ this.Controls.Add(this.groupBoxStatistik);
+ this.Controls.Add(this.buttonStats);
this.Controls.Add(this.buttonEinstellung);
this.Controls.Add(this.dGArtikel);
this.Controls.Add(this.buttonNeuerAuftrag);
@@ -719,6 +964,9 @@
this.tabPageAll.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).EndInit();
this.tabControlAuftragList.ResumeLayout(false);
+ this.groupBoxStatistik.ResumeLayout(false);
+ this.tableLayoutPanelStatistik.ResumeLayout(false);
+ this.tableLayoutPanelStatistik.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -766,5 +1014,21 @@
private BrightIdeasSoftware.ObjectListView objectListViewAuftrag;
private System.Windows.Forms.TabControl tabControlAuftragList;
private System.Windows.Forms.Button buttonEinstellung;
+ private System.Windows.Forms.Button buttonStats;
+ private System.Windows.Forms.GroupBox groupBoxStatistik;
+ private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanelStatistik;
+ private System.Windows.Forms.Label labelZahl6;
+ private System.Windows.Forms.Label labelStatistik6;
+ private System.Windows.Forms.Label labelZahl5;
+ private System.Windows.Forms.Label labelStatistik5;
+ private System.Windows.Forms.Label labelZahl4;
+ private System.Windows.Forms.Label labelStatistik4;
+ private System.Windows.Forms.Label labelZahl3;
+ private System.Windows.Forms.Label labelStatistik3;
+ private System.Windows.Forms.Label labelZahl2;
+ private System.Windows.Forms.Label labelStatistik2;
+ private System.Windows.Forms.Label labelZahl1;
+ private System.Windows.Forms.Label labelStatistik1;
}
}
\ No newline at end of file
diff --git a/AA-Forms/FormExpedit.cs b/AA-Forms/FormExpedit.cs
index e15ed1e..2202bc5 100644
--- a/AA-Forms/FormExpedit.cs
+++ b/AA-Forms/FormExpedit.cs
@@ -1,10 +1,13 @@
using BrightIdeasSoftware;
using DatenDB;
using Deckungsbeitrag.Properties;
+using Npgsql;
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Drawing;
using System.Linq;
+using System.Net.Sockets;
using System.Windows.Forms;
using System.Xml.Resolvers;
@@ -34,7 +37,9 @@ namespace Deckungsbeitrag
private Screen[] screens;
private Point itemlocation;
private ImageList imagelist = new ImageList();
-
+ private volatile bool _isProcessing = false; // Thread-sicherer Flag gegen Überlappung
+ private int _consecutiveFailures = 0;
+ private const int MAX_FAILURES = 3;
public FormExpedit(Benutzer benutzer)
{
@@ -164,15 +169,62 @@ namespace Deckungsbeitrag
///
private void Timer1_Tick(object sender, EventArgs e)
{
+ // Vermeide Überlappung (wenn vorheriger Tick noch läuft)
+ if (_isProcessing) return;
+
Cursor.Current = Cursors.WaitCursor;
+ _isProcessing = true;
- if(auftrag != null)
+ try
{
- Auftrag _auftrag = Auftrag.GetAuftrag(auftrag.AuftragID);
- if(dGArtikel.Visible) Load_Gridview(_auftrag);
- }
+ if (auftrag != null)
+ {
+ const int maxRetries = 3;
+ Auftrag _auftrag = null;
- Cursor.Current = Cursors.Default;
+ for (int retry = 0; retry < maxRetries; retry++)
+ {
+ try
+ {
+ _auftrag = Auftrag.GetAuftrag(auftrag.AuftragID);
+ if (dGArtikel.Visible) Load_Gridview(_auftrag);
+
+ _consecutiveFailures = 0; // Erfolg -> Zähler reset
+ break;
+ }
+ catch (NpgsqlException ex) when ((ex.InnerException is SocketException || ex.InnerException is System.IO.IOException) && retry < maxRetries - 1)
+ {
+ _consecutiveFailures++;
+ Debug.WriteLine($"Retry {retry + 1}/{maxRetries}: {ex.Message}"); // Logging
+
+ System.Threading.Thread.Sleep(1000 * (int)Math.Pow(2, retry)); // Backoff: 1s, 2s, 4s
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine($"Unexpected error: {ex.Message}"); // Logging
+ break;
+ }
+ }
+
+ // Timer stoppen bei zu vielen aufeinanderfolgenden Fehlern
+ if (_consecutiveFailures >= MAX_FAILURES)
+ {
+ timer1.Enabled = false;
+ Debug.WriteLine("Timer gestoppt nach " + MAX_FAILURES + " Fehlern. Bitte manuell neu starten.");
+ // Optional: Status-Label setzen oder MessageBox
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine($"Timer1_Tick globaler Fehler: {ex}");
+ _consecutiveFailures++;
+ }
+ finally
+ {
+ _isProcessing = false;
+ Cursor.Current = Cursors.Default;
+ }
}
///
@@ -379,9 +431,7 @@ namespace Deckungsbeitrag
if(knd != null) Funktionen.SWS_Drucken(null, knd, this);
}
- ///
- /// ObjectListView Funktionen
- ///
+ #region ObjectListView-Events
private void objectListViewAuftrag_CellClick(object sender, CellClickEventArgs e)
{
itemlocation = new Point(e.Location.X, e.Location.Y);
@@ -682,7 +732,9 @@ namespace Deckungsbeitrag
// Cursor zurücksetzen
Cursor.Current = Cursors.Default;
}
-
+ #endregion
+
+
///
/// Liefertag wird ermittelt und in Day of Week umgerechnet. RadioButtons werden Checked oder Unchecked und Click wird registriert.
///
@@ -808,8 +860,71 @@ namespace Deckungsbeitrag
einstellung.ShowDialog();
}
+ #region Statistik
+ private void buttonStats_Click(object sender, EventArgs e)
+ {
+ if (this.groupBoxStatistik.Visible) this.groupBoxStatistik.Visible = false;
+ else this.groupBoxStatistik.Visible = true;
+ }
+ private void GetStatistik()
+ {
+ string[] statistik = { "Container gewaschen:", "Container hergerichtet:", "Container fertig:", "Kunden gewaschen:", "Kunden hergerichtet:", "Kunden abgeschlossen:" };
+ List auftraglist = Auftrag.GetAuftragStatsListToday(this.dateTimePicker1.Value.Date);
+
+ for (int i = 1; i <= statistik.Length; i++)
+ {
+ foreach (Control ctr in this.tableLayoutPanelStatistik.Controls)
+ {
+ Label lbl;
+ if (ctr.GetType() == typeof(Label))
+ {
+ lbl = (Label)ctr;
+ if (lbl.Text.Contains("Statistik") && lbl.Text.Contains($"{i.ToString()}")) lbl.Text = statistik[i - 1].ToString();
+ if (lbl.Name.Contains("Zahl"))
+ {
+
+ int j = 0;
+ switch (lbl.Name)
+ {
+ case var s when s.Contains($"1"):
+ foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Aufgelegt) j += a.Container;
+ lbl.Text = j.ToString();
+ break;
+ case var s when s.Contains($"2"):
+ foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Vorbereitet) j += a.ContainerClean;
+ lbl.Text = j.ToString();
+ break;
+ case var s when s.Contains($"3"):
+ foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Fertig) j += a.ContainerClean;
+ lbl.Text = j.ToString();
+ break;
+ case var s when s.Contains($"4"):
+ foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Aufgelegt) j++;
+ lbl.Text = j.ToString();
+ break;
+ case var s when s.Contains($"5"):
+ foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Vorbereitet) j++;
+ lbl.Text = j.ToString();
+ break;
+ case var s when s.Contains($"{i}"):
+ foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Fertig) j++;
+ lbl.Text = j.ToString();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ }
+ //this.groupBoxStatistik.Width = this.tableLayoutPanelStatistik.Right;
+
+ }
+ private void dateTimePicker1_CloseUp(object sender, EventArgs e)
+ {
+ GetStatistik();
+ }
+ #endregion
}
}
-//DONE: Breite der GridView festlegen.
-//DONE: OLV-Item refresh. Neuer Liefertag speichern.
-//DONE: Testen ob ausblenden der Button Column funktioniert. Benutzer-Verwaltung oder Frottee oder Flach notwendig.
+//CHANGES: Statistik für Expedit. (Same as in Main)
\ No newline at end of file
diff --git a/AA-Forms/FormFehlmengeCount.cs b/AA-Forms/FormFehlmengeCount.cs
index d29b823..c4797cf 100644
--- a/AA-Forms/FormFehlmengeCount.cs
+++ b/AA-Forms/FormFehlmengeCount.cs
@@ -21,7 +21,8 @@ namespace Deckungsbeitrag
Kunde kunde;
List artikelListe;
Meldungen meldung = new Meldungen();
- //Benutzer benutzer;
+ private List auftragsliste;
+
string userid;
public FormFehlmengeCount()
{
@@ -45,7 +46,8 @@ namespace Deckungsbeitrag
//Kunde wird durch Scan oder Handeingabe Ausgewählt.
- this.kunde = Funktionen.KundenAuswahl();
+ //this.kunde = Funktionen.KundenAuswahl();
+ Open_Liste();
ControlLaden();
CloseKeyboard();
@@ -305,9 +307,30 @@ namespace Deckungsbeitrag
}
//Kunde wird durch Scan oder Handeingabe Ausgewählt.
- this.kunde = Funktionen.KundenAuswahl();
+ Open_Liste();
ControlLaden();
}
+ ///
+ /// Auftragliste aufrufen.
+ ///
+ /// Wenn Extrakunde dann true
+ private void Open_Liste()
+ {
+ auftragsliste = Auftrag.GetFinishingList();
+ List