diff --git a/AA-Forms/FehlmengeChart.Designer.cs b/AA-Forms/FehlmengeChart.Designer.cs
new file mode 100644
index 0000000..0bc1777
--- /dev/null
+++ b/AA-Forms/FehlmengeChart.Designer.cs
@@ -0,0 +1,73 @@
+namespace Deckungsbeitrag.AA_Forms
+{
+ partial class FehlmengeChart
+ {
+ ///
+ /// 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.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
+ ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // chart1
+ //
+ chartArea1.Name = "ChartArea1";
+ this.chart1.ChartAreas.Add(chartArea1);
+ this.chart1.Dock = System.Windows.Forms.DockStyle.Fill;
+ legend1.Name = "Legend1";
+ this.chart1.Legends.Add(legend1);
+ this.chart1.Location = new System.Drawing.Point(0, 0);
+ this.chart1.Name = "chart1";
+ series1.ChartArea = "ChartArea1";
+ series1.Legend = "Legend1";
+ series1.Name = "Series1";
+ this.chart1.Series.Add(series1);
+ this.chart1.Size = new System.Drawing.Size(585, 450);
+ this.chart1.TabIndex = 0;
+ this.chart1.Text = "chart1";
+ //
+ // FehlmengeChart
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(585, 450);
+ this.Controls.Add(this.chart1);
+ this.Name = "FehlmengeChart";
+ this.Text = "FehlmengeChart";
+ this.Load += new System.EventHandler(this.FehlmengeChart_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.DataVisualization.Charting.Chart chart1;
+ }
+}
\ No newline at end of file
diff --git a/AA-Forms/FehlmengeChart.cs b/AA-Forms/FehlmengeChart.cs
new file mode 100644
index 0000000..a246cff
--- /dev/null
+++ b/AA-Forms/FehlmengeChart.cs
@@ -0,0 +1,33 @@
+using DatenDB;
+using Deckungsbeitrag.AA_Klassen;
+using Npgsql;
+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.Windows.Forms.DataVisualization.Charting;
+
+
+namespace Deckungsbeitrag.AA_Forms
+{
+ public partial class FehlmengeChart : Form
+ {
+ public FehlmengeChart()
+ {
+ InitializeComponent();
+ }
+
+ private async void FehlmengeChart_Load(object sender, EventArgs e)
+ {
+ Kunde kunde = Funktionen.KundenAuswahl();
+ var daten = await KundeArtikel.LoadArtikelDatenAsync(kunde);
+ chart1 = Funktionen.Load_FehlmengeChart(daten, chart1);
+ }
+
+ }
+}
diff --git a/AA-Forms/FehlmengeChart.resx b/AA-Forms/FehlmengeChart.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/AA-Forms/FehlmengeChart.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
\ No newline at end of file
diff --git a/AA-Forms/FormExpedit.Designer.cs b/AA-Forms/FormExpedit.Designer.cs
index a778b1f..34bb7c7 100644
--- a/AA-Forms/FormExpedit.Designer.cs
+++ b/AA-Forms/FormExpedit.Designer.cs
@@ -29,8 +29,10 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormExpedit));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
this.label10 = new System.Windows.Forms.Label();
this.buttonDrucken = new System.Windows.Forms.Button();
this.groupBoxEtikett = new System.Windows.Forms.GroupBox();
@@ -84,9 +86,14 @@
this.labelStatistik1 = new System.Windows.Forms.Label();
this.buttonSuchen = new System.Windows.Forms.Button();
this.buttonNW = new System.Windows.Forms.Button();
+ this.buttonSWS_Drucken = new System.Windows.Forms.Button();
this.buttonStats = new System.Windows.Forms.Button();
this.buttonEinstellung = new System.Windows.Forms.Button();
- this.buttonSWS_Drucken = new System.Windows.Forms.Button();
+ this.chartFehlmenge = new System.Windows.Forms.DataVisualization.Charting.Chart();
+ this.groupBoxKndInfo = new System.Windows.Forms.GroupBox();
+ this.tableLayoutPanelInfo = new System.Windows.Forms.TableLayoutPanel();
+ this.labelAnmerkung = new System.Windows.Forms.Label();
+ this.labelAufgabe = new System.Windows.Forms.Label();
this.groupBoxEtikett.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).BeginInit();
@@ -101,6 +108,9 @@
((System.ComponentModel.ISupportInitialize)(this.objectListViewGeschaeft)).BeginInit();
this.groupBoxStatistik.SuspendLayout();
this.tableLayoutPanelStatistik.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).BeginInit();
+ this.groupBoxKndInfo.SuspendLayout();
+ this.tableLayoutPanelInfo.SuspendLayout();
this.SuspendLayout();
//
// label10
@@ -151,7 +161,7 @@
this.groupBoxEtikett.Controls.Add(this.label10);
this.groupBoxEtikett.Controls.Add(this.buttonKundeNr);
this.groupBoxEtikett.ForeColor = System.Drawing.Color.White;
- this.groupBoxEtikett.Location = new System.Drawing.Point(907, 222);
+ this.groupBoxEtikett.Location = new System.Drawing.Point(292, 650);
this.groupBoxEtikett.Margin = new System.Windows.Forms.Padding(2);
this.groupBoxEtikett.Name = "groupBoxEtikett";
this.groupBoxEtikett.Padding = new System.Windows.Forms.Padding(2);
@@ -159,6 +169,7 @@
this.groupBoxEtikett.TabIndex = 2;
this.groupBoxEtikett.TabStop = false;
this.groupBoxEtikett.Text = "Etikett-Druck";
+ this.groupBoxEtikett.Visible = false;
//
// textBoxCont
//
@@ -415,14 +426,6 @@
// dGArtikel
//
this.dGArtikel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.dGArtikel.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dGArtikel.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dGArtikel.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.KundeArtikelID,
@@ -435,15 +438,7 @@
this.StandBearbeitet,
this.FehlmengeBearbeitet,
this.KorrekturBearbeitet});
- dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
- dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
- dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.dGArtikel.DefaultCellStyle = dataGridViewCellStyle2;
- this.dGArtikel.Location = new System.Drawing.Point(576, 42);
+ this.dGArtikel.Location = new System.Drawing.Point(385, 43);
this.dGArtikel.Name = "dGArtikel";
this.dGArtikel.RowHeadersVisible = false;
this.dGArtikel.RowHeadersWidth = 62;
@@ -538,7 +533,7 @@
this.tabPageSonder.Location = new System.Drawing.Point(4, 34);
this.tabPageSonder.Name = "tabPageSonder";
this.tabPageSonder.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageSonder.Size = new System.Drawing.Size(1205, 587);
+ this.tabPageSonder.Size = new System.Drawing.Size(890, 587);
this.tabPageSonder.TabIndex = 1;
this.tabPageSonder.Text = "Sonderaufträge";
this.tabPageSonder.UseVisualStyleBackColor = true;
@@ -553,7 +548,7 @@
this.objectListViewSonder.HideSelection = false;
this.objectListViewSonder.Location = new System.Drawing.Point(3, 3);
this.objectListViewSonder.Name = "objectListViewSonder";
- this.objectListViewSonder.Size = new System.Drawing.Size(1199, 581);
+ this.objectListViewSonder.Size = new System.Drawing.Size(884, 581);
this.objectListViewSonder.TabIndex = 2;
this.objectListViewSonder.UseCompatibleStateImageBehavior = false;
this.objectListViewSonder.UseHotControls = false;
@@ -567,7 +562,7 @@
this.tabPageAll.Location = new System.Drawing.Point(4, 34);
this.tabPageAll.Name = "tabPageAll";
this.tabPageAll.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageAll.Size = new System.Drawing.Size(1205, 587);
+ this.tabPageAll.Size = new System.Drawing.Size(890, 587);
this.tabPageAll.TabIndex = 0;
this.tabPageAll.Text = "Aufträge heute";
this.tabPageAll.UseVisualStyleBackColor = true;
@@ -586,7 +581,7 @@
this.objectListViewAuftrag.Location = new System.Drawing.Point(3, 3);
this.objectListViewAuftrag.Name = "objectListViewAuftrag";
this.objectListViewAuftrag.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu;
- this.objectListViewAuftrag.Size = new System.Drawing.Size(1199, 581);
+ this.objectListViewAuftrag.Size = new System.Drawing.Size(884, 581);
this.objectListViewAuftrag.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.objectListViewAuftrag.TabIndex = 1;
this.objectListViewAuftrag.TintSortColumn = true;
@@ -618,7 +613,7 @@
this.tabControlAuftragList.Location = new System.Drawing.Point(4, 9);
this.tabControlAuftragList.Name = "tabControlAuftragList";
this.tabControlAuftragList.SelectedIndex = 0;
- this.tabControlAuftragList.Size = new System.Drawing.Size(1213, 625);
+ this.tabControlAuftragList.Size = new System.Drawing.Size(898, 625);
this.tabControlAuftragList.TabIndex = 0;
this.tabControlAuftragList.Visible = false;
this.tabControlAuftragList.SelectedIndexChanged += new System.EventHandler(this.tabControlAuftragList_SelectedIndexChanged);
@@ -630,7 +625,7 @@
this.tabPageGeschaeft.Location = new System.Drawing.Point(4, 34);
this.tabPageGeschaeft.Name = "tabPageGeschaeft";
this.tabPageGeschaeft.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageGeschaeft.Size = new System.Drawing.Size(1205, 587);
+ this.tabPageGeschaeft.Size = new System.Drawing.Size(890, 587);
this.tabPageGeschaeft.TabIndex = 2;
this.tabPageGeschaeft.Text = "Geschäft";
this.tabPageGeschaeft.UseVisualStyleBackColor = true;
@@ -649,7 +644,7 @@
this.objectListViewGeschaeft.Location = new System.Drawing.Point(3, 3);
this.objectListViewGeschaeft.Name = "objectListViewGeschaeft";
this.objectListViewGeschaeft.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu;
- this.objectListViewGeschaeft.Size = new System.Drawing.Size(1199, 581);
+ this.objectListViewGeschaeft.Size = new System.Drawing.Size(884, 581);
this.objectListViewGeschaeft.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.objectListViewGeschaeft.TabIndex = 2;
this.objectListViewGeschaeft.TintSortColumn = true;
@@ -914,6 +909,22 @@
this.buttonNW.UseVisualStyleBackColor = true;
this.buttonNW.Click += new System.EventHandler(this.buttonNW_Click);
//
+ // buttonSWS_Drucken
+ //
+ this.buttonSWS_Drucken.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonSWS_Drucken.BackColor = System.Drawing.Color.Yellow;
+ 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(916, 650);
+ 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);
+ this.buttonSWS_Drucken.TabIndex = 35;
+ this.buttonSWS_Drucken.Text = "SWS-Drucken";
+ this.buttonSWS_Drucken.UseVisualStyleBackColor = false;
+ this.buttonSWS_Drucken.Click += new System.EventHandler(this.buttonSWS_Drucken_Click);
+ //
// buttonStats
//
this.buttonStats.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -942,37 +953,102 @@
this.buttonEinstellung.UseVisualStyleBackColor = true;
this.buttonEinstellung.Click += new System.EventHandler(this.buttonEinstellung_Click);
//
- // buttonSWS_Drucken
+ // chartFehlmenge
//
- this.buttonSWS_Drucken.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonSWS_Drucken.BackColor = System.Drawing.Color.Yellow;
- 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(916, 650);
- 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);
- this.buttonSWS_Drucken.TabIndex = 35;
- this.buttonSWS_Drucken.Text = "SWS-Drucken";
- this.buttonSWS_Drucken.UseVisualStyleBackColor = false;
- this.buttonSWS_Drucken.Click += new System.EventHandler(this.buttonSWS_Drucken_Click);
+ this.chartFehlmenge.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.chartFehlmenge.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.chartFehlmenge.BorderSkin.PageColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ chartArea1.InnerPlotPosition.Auto = false;
+ chartArea1.InnerPlotPosition.Height = 92.2266F;
+ chartArea1.InnerPlotPosition.Width = 76.05405F;
+ chartArea1.InnerPlotPosition.X = 20.54054F;
+ chartArea1.Name = "ChartArea1";
+ this.chartFehlmenge.ChartAreas.Add(chartArea1);
+ legend1.Name = "Legend1";
+ this.chartFehlmenge.Legends.Add(legend1);
+ this.chartFehlmenge.Location = new System.Drawing.Point(908, 12);
+ this.chartFehlmenge.Name = "chartFehlmenge";
+ series1.ChartArea = "ChartArea1";
+ series1.Legend = "Legend1";
+ series1.Name = "Series1";
+ this.chartFehlmenge.Series.Add(series1);
+ this.chartFehlmenge.Size = new System.Drawing.Size(301, 434);
+ this.chartFehlmenge.TabIndex = 2;
+ this.chartFehlmenge.Text = "chart1";
+ title1.Name = "Title1";
+ title1.Text = "Hallo Test";
+ this.chartFehlmenge.Titles.Add(title1);
+ this.chartFehlmenge.Visible = false;
+ //
+ // groupBoxKndInfo
+ //
+ this.groupBoxKndInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxKndInfo.Controls.Add(this.tableLayoutPanelInfo);
+ this.groupBoxKndInfo.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.groupBoxKndInfo.ForeColor = System.Drawing.Color.Red;
+ this.groupBoxKndInfo.Location = new System.Drawing.Point(916, 452);
+ this.groupBoxKndInfo.Name = "groupBoxKndInfo";
+ this.groupBoxKndInfo.Size = new System.Drawing.Size(293, 183);
+ this.groupBoxKndInfo.TabIndex = 65;
+ this.groupBoxKndInfo.TabStop = false;
+ this.groupBoxKndInfo.Text = "INFOS";
+ this.groupBoxKndInfo.Visible = false;
+ this.groupBoxKndInfo.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBoxKndInfo_Paint);
+ //
+ // tableLayoutPanelInfo
+ //
+ this.tableLayoutPanelInfo.ColumnCount = 1;
+ this.tableLayoutPanelInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanelInfo.Controls.Add(this.labelAnmerkung, 0, 0);
+ this.tableLayoutPanelInfo.Controls.Add(this.labelAufgabe, 0, 1);
+ this.tableLayoutPanelInfo.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanelInfo.Location = new System.Drawing.Point(3, 22);
+ this.tableLayoutPanelInfo.Name = "tableLayoutPanelInfo";
+ this.tableLayoutPanelInfo.RowCount = 2;
+ this.tableLayoutPanelInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanelInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanelInfo.Size = new System.Drawing.Size(287, 158);
+ this.tableLayoutPanelInfo.TabIndex = 0;
+ //
+ // labelAnmerkung
+ //
+ this.labelAnmerkung.AutoSize = true;
+ this.labelAnmerkung.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.labelAnmerkung.ForeColor = System.Drawing.Color.Red;
+ this.labelAnmerkung.Location = new System.Drawing.Point(3, 0);
+ this.labelAnmerkung.Name = "labelAnmerkung";
+ this.labelAnmerkung.Size = new System.Drawing.Size(281, 79);
+ this.labelAnmerkung.TabIndex = 0;
+ this.labelAnmerkung.Text = "label2";
+ //
+ // labelAufgabe
+ //
+ this.labelAufgabe.AutoSize = true;
+ this.labelAufgabe.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.labelAufgabe.Location = new System.Drawing.Point(3, 79);
+ this.labelAufgabe.Name = "labelAufgabe";
+ this.labelAufgabe.Size = new System.Drawing.Size(281, 79);
+ this.labelAufgabe.TabIndex = 1;
+ this.labelAufgabe.Text = "label3";
//
// FormExpedit
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.ClientSize = new System.Drawing.Size(1221, 703);
+ this.Controls.Add(this.groupBoxKndInfo);
+ this.Controls.Add(this.chartFehlmenge);
this.Controls.Add(this.buttonNW);
this.Controls.Add(this.buttonSuchen);
- this.Controls.Add(this.dGArtikel);
- this.Controls.Add(this.groupBoxStatistik);
this.Controls.Add(this.buttonStats);
this.Controls.Add(this.buttonEinstellung);
this.Controls.Add(this.buttonNeuerAuftrag);
this.Controls.Add(this.buttonSWS_Drucken);
this.Controls.Add(this.tabControlAuftragList);
this.Controls.Add(this.groupBoxEtikett);
+ this.Controls.Add(this.dGArtikel);
+ this.Controls.Add(this.groupBoxStatistik);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.HelpButton = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@@ -984,6 +1060,7 @@
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormExpedit_FormClosing);
this.Load += new System.EventHandler(this.FormExpedit_Load);
+ this.Resize += new System.EventHandler(this.FormExpedit_Resize);
this.groupBoxEtikett.ResumeLayout(false);
this.groupBoxEtikett.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).EndInit();
@@ -1000,6 +1077,10 @@
this.groupBoxStatistik.ResumeLayout(false);
this.tableLayoutPanelStatistik.ResumeLayout(false);
this.tableLayoutPanelStatistik.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).EndInit();
+ this.groupBoxKndInfo.ResumeLayout(false);
+ this.tableLayoutPanelInfo.ResumeLayout(false);
+ this.tableLayoutPanelInfo.PerformLayout();
this.ResumeLayout(false);
}
@@ -1061,5 +1142,10 @@
private System.Windows.Forms.Button buttonNW;
private System.Windows.Forms.TabPage tabPageGeschaeft;
private BrightIdeasSoftware.ObjectListView objectListViewGeschaeft;
+ private System.Windows.Forms.DataVisualization.Charting.Chart chartFehlmenge;
+ private System.Windows.Forms.GroupBox groupBoxKndInfo;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanelInfo;
+ private System.Windows.Forms.Label labelAnmerkung;
+ private System.Windows.Forms.Label labelAufgabe;
}
}
\ No newline at end of file
diff --git a/AA-Forms/FormExpedit.cs b/AA-Forms/FormExpedit.cs
index b5f9e6e..8efa94f 100644
--- a/AA-Forms/FormExpedit.cs
+++ b/AA-Forms/FormExpedit.cs
@@ -49,6 +49,8 @@ namespace Deckungsbeitrag
private int _consecutiveFailures = 0;
private const int MAX_FAILURES = 3;
private bool aufgabeDone = false;
+ private bool isttest = true;
+ private bool _doubleClickPending = false;
#endregion
public FormExpedit(Benutzer benutzer)
{
@@ -121,7 +123,6 @@ namespace Deckungsbeitrag
// Controls aktivieren und deaktivieren nach BenutzerRolle
Enable_Controls();
-
//TODO: Wenn GroupBox nicht notwendig, dann löschen.
//Load_Etikett_GroupBox();
this.groupBoxEtikett.Visible = false;
@@ -520,13 +521,13 @@ namespace Deckungsbeitrag
}
}
}
- private void objectListViewAuftrag_CellClick(object sender, CellClickEventArgs e)
+ private async void objectListViewAuftrag_CellClick(object sender, CellClickEventArgs e)
{
itemlocation = new Point(e.Location.X, e.Location.Y);
ObjectListView olv = (ObjectListView)sender;
Auftrag _auftrag = (Auftrag)e.Model;
- if (e.Model == null) { dGArtikel.Visible = false; return; }
+ if (e.Model == null) { dGArtikel.Visible = false; chartFehlmenge.Visible = false; groupBoxKndInfo.Visible = false; return; }
if (_auftrag.Status != AuftragStatus.Fertig)
{
this.auftrag = _auftrag;
@@ -534,7 +535,24 @@ namespace Deckungsbeitrag
this.neuecontclean = null;
Load_Etikett_GroupBox();
this.artikelListe = KundeArtikel.GetList(kunde.KundeID.ToString());
- Load_Gridview(this.auftrag);
+
+ // Chart wird eingeblendet statt Gridview. NUR wenn isttest = true.
+ var chartliste = await KundeArtikel.LoadArtikelDatenAsync(kunde);
+ if (isttest) { this.chartFehlmenge = Funktionen.Load_FehlmengeChart(chartliste, chartFehlmenge); this.chartFehlmenge.Visible = true; }
+ else Load_Gridview(this.auftrag);
+ if (this.chartFehlmenge.Visible)
+ {
+ this.groupBoxKndInfo.Visible = true;
+ if (!string.IsNullOrWhiteSpace(this.kunde.Anmerkung)) { labelAnmerkung.Visible = true; labelAnmerkung.Text = this.kunde.Anmerkung; }
+ else labelAnmerkung.Visible = false;
+ if (auftrag.AufgabeID != null)
+ {
+
+ labelAufgabe.Text = Aufgabe.GetAufgabe(null, auftrag.AufgabeID).Bezeichnung.ToString();
+ labelAufgabe.Visible = true;
+ }
+ else labelAufgabe.Visible = false;
+ }
}
else
{
@@ -967,9 +985,30 @@ namespace Deckungsbeitrag
if (e.Column.Text == "sauber") altecontclean = (int?)e.Value;
if (!string.IsNullOrWhiteSpace(e.NewValue.ToString())) Save_Auftrag(auftrag, false);
}
+
+ ///
+ /// Ausgelöst durch DoppelClick
+ ///
+ ///
+ ///
private void objectListViewAuftrag_CellEditStarting(object sender, CellEditEventArgs e)
{
- if(meldung.GetFrage(this, $"Möchtest du die gewählte Zelle wirklich bearbeiten?", false) == DialogResult.No) e.Cancel = true;
+ if (e.Column.AspectName == "Kundename")
+ {
+ ObjectListView olv = (ObjectListView)sender;
+ Auftrag _auftrag = e.RowObject as Auftrag;
+
+ if (_auftrag == null) return;
+ Kunde _kunde = Kunde.GetKunde(null, _auftrag.KundeID, null);
+
+ FormKundeVW kndVW = new FormKundeVW(_kunde, this.benutzer);
+ kndVW.ShowDialog();
+
+ olv.RefreshObject(olv.SelectedObject);
+ e.Cancel = true;
+ }
+ else if (meldung.GetFrage(this, $"Möchtest du die gewählte Zelle wirklich bearbeiten?", false) == DialogResult.No) e.Cancel = true;
+
//TODO: Soll hier ebenfalls der nächste Liefertag laut Rhythmus vorgeschlagen werden?
}
@@ -1063,7 +1102,7 @@ namespace Deckungsbeitrag
private void tabControlAuftragList_Selected(object sender, TabControlEventArgs e)
{
TabControl tabControl = (TabControl)sender;
- if(tabControl.SelectedIndex < 3) { this.groupBoxEtikett.Visible = true; }
+ if(tabControl.SelectedIndex < 3) { this.groupBoxEtikett.Visible = false; }
if(tabControl.SelectedIndex == 3) { this.groupBoxEtikett.Visible = false; }
}
@@ -1082,6 +1121,7 @@ namespace Deckungsbeitrag
#region DataGridView-Events
private void Load_Gridview(Auftrag auftrag)
{
+
//Alle Einträge der DataGridView entfernen. Davor muss die DataSource entfernt werden.
this.dGArtikel.DataSource = null;
this.dGArtikel.Rows.Clear();
@@ -1262,9 +1302,27 @@ namespace Deckungsbeitrag
_settings.Save();
}
+ private void FormExpedit_Resize(object sender, EventArgs e)
+ {
+ int chartHeight = (int)(this.tabControlAuftragList.Height * 0.75);
+ int gbHeight = (int)(this.tabControlAuftragList.Height * 0.25);
+
+ chartFehlmenge.Location = new Point(this.tabControlAuftragList.Right + 10, this.tabControlAuftragList.Top);
+ chartFehlmenge.Size = new Size(groupBoxKndInfo.Width, chartHeight);
+ groupBoxKndInfo.Height = gbHeight;
+ groupBoxKndInfo.Location = new Point(chartFehlmenge.Left, chartHeight + 10);
+ }
+
+ private void groupBoxKndInfo_Paint(object sender, PaintEventArgs e)
+ {
+ Funktionen.GetGroupBoxBoarder(groupBoxKndInfo, e);
+ }
+
}
}
//INSTALL-REMINDER: Spalte Abteilungen in Auftrag muss in Wirl_DB_17012023 eingefügt werden.
+//CHANGES: Chart statt GridView für Fehlmengen.
+//CHANGES: Bei DoppelClick auf Kundename wird KundenVW geöffnet.
//CHANGES: Es wird der zuständige Fahrer angezeigt. ToolTip zeigt den Grund falls vorhanden(Bei Sonderzuteilung).
//CHANGES: Geschäftaufträge werden in neuem Tab angezeigt.
//CHANGES: Kundeneingabe mit ? fügt einmaligen Kundenname als ZusatzInfo hinzu und wählt Kunde BAR DIVERSE 2320000
@@ -1286,5 +1344,4 @@ namespace Deckungsbeitrag
//DONE: Etikett GroupBox entfernen. Änderungen direkt in ObjectListView vornehmen PrintPreview für Etikett.
//DONE: Etikett Drucken als Button in Row. Dann Vorschau anzeigen und Drucken.
//DONE: StartUp von Expedit verfeinern.
-//TODO: Datum HEUTE auch bei NeuerAuftrag??
//DONE: Einmalige Kunden für Geschäft ermöglichen
\ No newline at end of file
diff --git a/AA-Forms/FormKundeVW.cs b/AA-Forms/FormKundeVW.cs
index 3d64b6e..3fa4561 100644
--- a/AA-Forms/FormKundeVW.cs
+++ b/AA-Forms/FormKundeVW.cs
@@ -54,6 +54,12 @@ namespace Deckungsbeitrag
{
this.benutzer = benutzer;
}
+
+ public FormKundeVW(Kunde kunde, Benutzer benutzer) : this(kunde)
+ {
+ this.benutzer = benutzer;
+ }
+
private void KundeDaten_Load(object sender, EventArgs e)
{
formloading = true;
@@ -72,8 +78,8 @@ namespace Deckungsbeitrag
ComboBox_Laden();
- this.kunde = Funktionen.KundenAuswahl();
if (this.kunde != null) DatenLesen();
+ else this.kunde = Funktionen.KundenAuswahl();
formloading = false;
@@ -93,10 +99,15 @@ namespace Deckungsbeitrag
this.comboBoxAufgabe.SelectedIndex = -1;
this.comboBoxAufgabe.Enabled = false;
- // Lieferrhythmus Liste mit ComboBox verknüpfen.
- this.comboBoxLieferrhythmus.DataSource = new BindingSource(Lieferrhythmen.AnzeigeNamen, null);
- this.comboBoxLieferrhythmus.DisplayMember = "Key";
- this.comboBoxLieferrhythmus.ValueMember = "Value";
+ // Sommer-Lieferrhythmus Liste mit ComboBox verknüpfen.
+ this.comboBoxLRSommer.DataSource = new BindingSource(Lieferrhythmen.AnzeigeNamen, null);
+ this.comboBoxLRSommer.DisplayMember = "Key";
+ this.comboBoxLRSommer.ValueMember = "Value";
+
+ // WinterLieferrhythmus Liste mit ComboBox verknüpfen.
+ this.comboBoxLRWinter.DataSource = new BindingSource(Lieferrhythmen.AnzeigeNamen, null);
+ this.comboBoxLRWinter.DisplayMember = "Key";
+ this.comboBoxLRWinter.ValueMember = "Value";
}
private void DatenLesen()
@@ -178,7 +189,8 @@ namespace Deckungsbeitrag
}
// ComboBox-Item für Lieferrhythmus wird gewählt
- this.comboBoxLieferrhythmus.SelectedValue = (Liefertage)this.kunde.LieferRhythmus;
+ this.comboBoxLRSommer.SelectedValue = (Liefertage)this.kunde.SommerLieferRhythmus;
+ this.comboBoxLRWinter.SelectedValue = (Liefertage)this.kunde.WinterLieferRhythmus;
// numericUpDown für AufgabeCount befüllen
this.numericUpDownAufgabeCount.Value = (decimal)this.kunde.AufgabeCount;
@@ -545,7 +557,11 @@ namespace Deckungsbeitrag
if (this.comboBoxAufgabe.SelectedItem != null && this.numericUpDownAufgabeCount.Value == 0) { meldung.GetFehler(this, $"Du hast für deine Aufgabe noch keine Auftraganzahl eingegeben. Hole das bitte jetzt nach."); e.Cancel = true; return; }
if (aufgabeChanged) { numericUpDownAufgabeCount_Leave(this, null); }
if (serviceChanged) { if (this.comboBoxService.Enabled == true) this.kunde.Service = this.comboBoxService.SelectedValue.ToString(); }
- if (lieferrhythmusChanged) this.kunde.LieferRhythmus = (int)this.comboBoxLieferrhythmus.SelectedValue;
+ if (lieferrhythmusChanged)
+ {
+ this.kunde.SommerLieferRhythmus = (int)this.comboBoxLRSommer.SelectedValue;
+ this.kunde.WinterLieferRhythmus = (int)this.comboBoxLRWinter.SelectedValue;
+ }
this.kunde.Save();
}
diff --git a/AA-Forms/FormKundeVW.designer.cs b/AA-Forms/FormKundeVW.designer.cs
index 165fa37..8febfe2 100644
--- a/AA-Forms/FormKundeVW.designer.cs
+++ b/AA-Forms/FormKundeVW.designer.cs
@@ -97,8 +97,11 @@ namespace Deckungsbeitrag
this.label4 = new System.Windows.Forms.Label();
this.labelAnzahlChars = new System.Windows.Forms.Label();
this.numericUpDownAufgabeCount = new System.Windows.Forms.NumericUpDown();
- this.comboBoxLieferrhythmus = new System.Windows.Forms.ComboBox();
+ this.comboBoxLRSommer = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
+ this.comboBoxLRWinter = new System.Windows.Forms.ComboBox();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
this.contextMenuStrip1.SuspendLayout();
this.tabControlKunde.SuspendLayout();
this.tabPageVorschau.SuspendLayout();
@@ -288,7 +291,7 @@ namespace Deckungsbeitrag
this.comboBoxAufgabe.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxAufgabe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.comboBoxAufgabe.FormattingEnabled = true;
- this.comboBoxAufgabe.Location = new System.Drawing.Point(13, 479);
+ this.comboBoxAufgabe.Location = new System.Drawing.Point(13, 498);
this.comboBoxAufgabe.Name = "comboBoxAufgabe";
this.comboBoxAufgabe.Size = new System.Drawing.Size(263, 28);
this.comboBoxAufgabe.TabIndex = 41;
@@ -300,7 +303,7 @@ namespace Deckungsbeitrag
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.Color.White;
- this.label2.Location = new System.Drawing.Point(9, 456);
+ this.label2.Location = new System.Drawing.Point(9, 475);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(123, 20);
this.label2.TabIndex = 42;
@@ -723,7 +726,7 @@ namespace Deckungsbeitrag
// buttonAufgEnt
//
this.buttonAufgEnt.Image = global::Deckungsbeitrag.Properties.Resources.Close_red_16x;
- this.buttonAufgEnt.Location = new System.Drawing.Point(337, 479);
+ this.buttonAufgEnt.Location = new System.Drawing.Point(337, 498);
this.buttonAufgEnt.Name = "buttonAufgEnt";
this.buttonAufgEnt.Size = new System.Drawing.Size(28, 28);
this.buttonAufgEnt.TabIndex = 43;
@@ -744,11 +747,11 @@ namespace Deckungsbeitrag
//
this.textBoxAnmerkung.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
- this.textBoxAnmerkung.Location = new System.Drawing.Point(13, 533);
+ this.textBoxAnmerkung.Location = new System.Drawing.Point(13, 552);
this.textBoxAnmerkung.MaxLength = 200;
this.textBoxAnmerkung.Multiline = true;
this.textBoxAnmerkung.Name = "textBoxAnmerkung";
- this.textBoxAnmerkung.Size = new System.Drawing.Size(352, 160);
+ this.textBoxAnmerkung.Size = new System.Drawing.Size(352, 141);
this.textBoxAnmerkung.TabIndex = 50;
this.textBoxAnmerkung.TextChanged += new System.EventHandler(this.textBoxAnmerkung_TextChanged);
this.textBoxAnmerkung.Leave += new System.EventHandler(this.textBoxAnmerkung_Leave);
@@ -758,7 +761,7 @@ namespace Deckungsbeitrag
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.ForeColor = System.Drawing.Color.White;
- this.label4.Location = new System.Drawing.Point(9, 510);
+ this.label4.Location = new System.Drawing.Point(9, 529);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(109, 20);
this.label4.TabIndex = 51;
@@ -769,7 +772,7 @@ namespace Deckungsbeitrag
this.labelAnzahlChars.AutoSize = true;
this.labelAnzahlChars.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelAnzahlChars.ForeColor = System.Drawing.Color.White;
- this.labelAnzahlChars.Location = new System.Drawing.Point(312, 513);
+ this.labelAnzahlChars.Location = new System.Drawing.Point(312, 532);
this.labelAnzahlChars.Name = "labelAnzahlChars";
this.labelAnzahlChars.Size = new System.Drawing.Size(53, 16);
this.labelAnzahlChars.TabIndex = 52;
@@ -778,7 +781,7 @@ namespace Deckungsbeitrag
// numericUpDownAufgabeCount
//
this.numericUpDownAufgabeCount.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.numericUpDownAufgabeCount.Location = new System.Drawing.Point(282, 479);
+ this.numericUpDownAufgabeCount.Location = new System.Drawing.Point(282, 498);
this.numericUpDownAufgabeCount.Maximum = new decimal(new int[] {
99,
0,
@@ -790,16 +793,16 @@ namespace Deckungsbeitrag
this.numericUpDownAufgabeCount.ValueChanged += new System.EventHandler(this.numericUpDownAufgabeCount_ValueChanged);
this.numericUpDownAufgabeCount.Leave += new System.EventHandler(this.numericUpDownAufgabeCount_Leave);
//
- // comboBoxLieferrhythmus
+ // comboBoxLRSommer
//
- this.comboBoxLieferrhythmus.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.comboBoxLieferrhythmus.FormattingEnabled = true;
- this.comboBoxLieferrhythmus.Location = new System.Drawing.Point(13, 422);
- this.comboBoxLieferrhythmus.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.comboBoxLieferrhythmus.Name = "comboBoxLieferrhythmus";
- this.comboBoxLieferrhythmus.Size = new System.Drawing.Size(352, 28);
- this.comboBoxLieferrhythmus.TabIndex = 55;
- this.comboBoxLieferrhythmus.SelectedIndexChanged += new System.EventHandler(this.comboBoxLieferrhythmus_SelectedIndexChanged);
+ this.comboBoxLRSommer.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.comboBoxLRSommer.FormattingEnabled = true;
+ this.comboBoxLRSommer.Location = new System.Drawing.Point(13, 435);
+ this.comboBoxLRSommer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.comboBoxLRSommer.Name = "comboBoxLRSommer";
+ this.comboBoxLRSommer.Size = new System.Drawing.Size(170, 28);
+ this.comboBoxLRSommer.TabIndex = 55;
+ this.comboBoxLRSommer.SelectedIndexChanged += new System.EventHandler(this.comboBoxLieferrhythmus_SelectedIndexChanged);
//
// label5
//
@@ -812,13 +815,49 @@ namespace Deckungsbeitrag
this.label5.TabIndex = 54;
this.label5.Text = "Lieferrhythmus";
//
+ // comboBoxLRWinter
+ //
+ this.comboBoxLRWinter.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.comboBoxLRWinter.FormattingEnabled = true;
+ this.comboBoxLRWinter.Location = new System.Drawing.Point(195, 435);
+ this.comboBoxLRWinter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.comboBoxLRWinter.Name = "comboBoxLRWinter";
+ this.comboBoxLRWinter.Size = new System.Drawing.Size(170, 28);
+ this.comboBoxLRWinter.TabIndex = 56;
+ this.comboBoxLRWinter.SelectedIndexChanged += new System.EventHandler(this.comboBoxLieferrhythmus_SelectedIndexChanged);
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label6.ForeColor = System.Drawing.Color.White;
+ this.label6.Location = new System.Drawing.Point(10, 417);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(45, 13);
+ this.label6.TabIndex = 57;
+ this.label6.Text = "Sommer";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label7.ForeColor = System.Drawing.Color.White;
+ this.label7.Location = new System.Drawing.Point(192, 417);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(38, 13);
+ this.label7.TabIndex = 58;
+ this.label7.Text = "Winter";
+ //
// FormKundeVW
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.ClientSize = new System.Drawing.Size(1318, 761);
- this.Controls.Add(this.comboBoxLieferrhythmus);
+ this.Controls.Add(this.label7);
+ this.Controls.Add(this.label6);
+ this.Controls.Add(this.comboBoxLRWinter);
+ this.Controls.Add(this.comboBoxLRSommer);
this.Controls.Add(this.label5);
this.Controls.Add(this.numericUpDownAufgabeCount);
this.Controls.Add(this.labelAnzahlChars);
@@ -937,8 +976,11 @@ namespace Deckungsbeitrag
private BrightIdeasSoftware.ObjectListView olvJahresumsatz;
private System.Windows.Forms.Label labelAnzahlChars;
private System.Windows.Forms.NumericUpDown numericUpDownAufgabeCount;
- private System.Windows.Forms.ComboBox comboBoxLieferrhythmus;
+ private System.Windows.Forms.ComboBox comboBoxLRSommer;
private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.ComboBox comboBoxLRWinter;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.Label label7;
}
}
diff --git a/AA-Forms/FormMain.Designer.cs b/AA-Forms/FormMain.Designer.cs
index 2349863..9ff14d1 100644
--- a/AA-Forms/FormMain.Designer.cs
+++ b/AA-Forms/FormMain.Designer.cs
@@ -31,6 +31,21 @@ namespace Deckungsbeitrag
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
this.toolStripMenu = new System.Windows.Forms.ToolStrip();
+ this.tSBBenutzerVW = new System.Windows.Forms.ToolStripButton();
+ this.tSBAuftragVW = new System.Windows.Forms.ToolStripButton();
+ this.tSBAufgabeVW = new System.Windows.Forms.ToolStripButton();
+ this.tSBArtikelVW = new System.Windows.Forms.ToolStripButton();
+ this.toolStripZaehlscheine = new System.Windows.Forms.ToolStripButton();
+ this.tSBExpedit = new System.Windows.Forms.ToolStripButton();
+ this.toolStripDB = new System.Windows.Forms.ToolStripButton();
+ this.tSBKosten = new System.Windows.Forms.ToolStripButton();
+ this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
+ this.tSBScannTest = new System.Windows.Forms.ToolStripButton();
+ this.tSBHilfe = new System.Windows.Forms.ToolStripButton();
+ this.toolStripButtonImport = new System.Windows.Forms.ToolStripButton();
+ this.tSBEinstellung = new System.Windows.Forms.ToolStripButton();
+ this.tSBTourenplanung = new System.Windows.Forms.ToolStripButton();
+ this.toolStripBeenden = new System.Windows.Forms.ToolStripButton();
this.panelMain = new System.Windows.Forms.Panel();
this.buttonNeuerStand = new System.Windows.Forms.Button();
this.buttonNeueInventur = new System.Windows.Forms.Button();
@@ -66,28 +81,16 @@ namespace Deckungsbeitrag
this.rBFertig = new System.Windows.Forms.RadioButton();
this.rBVorbereitet = new System.Windows.Forms.RadioButton();
this.rBAlle = new System.Windows.Forms.RadioButton();
+ this.buttonAufAbruf = new System.Windows.Forms.Button();
this.buttonAusgeliefert = new System.Windows.Forms.Button();
this.groupBoxScannTest = new System.Windows.Forms.GroupBox();
+ this.pictureBoxScannTest = new System.Windows.Forms.PictureBox();
this.textBoxScannTest = new System.Windows.Forms.TextBox();
this.buttonScannTest = new System.Windows.Forms.Button();
this.labelScannTest = new System.Windows.Forms.Label();
- this.tSBBenutzerVW = new System.Windows.Forms.ToolStripButton();
- this.tSBAuftragVW = new System.Windows.Forms.ToolStripButton();
- this.tSBAufgabeVW = new System.Windows.Forms.ToolStripButton();
- this.tSBArtikelVW = new System.Windows.Forms.ToolStripButton();
- this.toolStripZaehlscheine = new System.Windows.Forms.ToolStripButton();
- this.tSBExpedit = new System.Windows.Forms.ToolStripButton();
- this.toolStripDB = new System.Windows.Forms.ToolStripButton();
- this.tSBKosten = new System.Windows.Forms.ToolStripButton();
- this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
- this.tSBScannTest = new System.Windows.Forms.ToolStripButton();
- this.tSBHilfe = new System.Windows.Forms.ToolStripButton();
- this.toolStripButtonImport = new System.Windows.Forms.ToolStripButton();
- this.tSBEinstellung = new System.Windows.Forms.ToolStripButton();
- this.tSBTourenplanung = new System.Windows.Forms.ToolStripButton();
- this.toolStripBeenden = new System.Windows.Forms.ToolStripButton();
- this.buttonAufAbruf = new System.Windows.Forms.Button();
- this.pictureBoxScannTest = new System.Windows.Forms.PictureBox();
+ this.comboBoxSaison = new System.Windows.Forms.ComboBox();
+ this.groupBoxSaison = new System.Windows.Forms.GroupBox();
+ this.buttonTestChart = new System.Windows.Forms.Button();
this.toolStripMenu.SuspendLayout();
this.panelMain.SuspendLayout();
this.groupBoxStatistik.SuspendLayout();
@@ -98,6 +101,7 @@ namespace Deckungsbeitrag
((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).BeginInit();
this.groupBoxScannTest.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxScannTest)).BeginInit();
+ this.groupBoxSaison.SuspendLayout();
this.SuspendLayout();
//
// toolStripMenu
@@ -130,10 +134,302 @@ namespace Deckungsbeitrag
this.toolStripMenu.TabIndex = 0;
this.toolStripMenu.Text = "toolStripMenu";
//
+ // tSBBenutzerVW
+ //
+ this.tSBBenutzerVW.AutoSize = false;
+ this.tSBBenutzerVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.tSBBenutzerVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBBenutzerVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBBenutzerVW.ForeColor = System.Drawing.Color.White;
+ this.tSBBenutzerVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBBenutzerVW.Image")));
+ this.tSBBenutzerVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBBenutzerVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tSBBenutzerVW.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBBenutzerVW.Name = "tSBBenutzerVW";
+ this.tSBBenutzerVW.Size = new System.Drawing.Size(180, 40);
+ this.tSBBenutzerVW.Text = "BENUTZERVERWALTUNG";
+ this.tSBBenutzerVW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBBenutzerVW.Click += new System.EventHandler(this.tSBBenutzerVW_Click);
+ this.tSBBenutzerVW.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.tSBBenutzerVW.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.tSBBenutzerVW.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // tSBAuftragVW
+ //
+ this.tSBAuftragVW.AutoSize = false;
+ this.tSBAuftragVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.tSBAuftragVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBAuftragVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBAuftragVW.ForeColor = System.Drawing.Color.White;
+ this.tSBAuftragVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBAuftragVW.Image")));
+ this.tSBAuftragVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBAuftragVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tSBAuftragVW.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBAuftragVW.Name = "tSBAuftragVW";
+ this.tSBAuftragVW.Size = new System.Drawing.Size(180, 40);
+ this.tSBAuftragVW.Text = "AUFTRAGVERWALTUNG";
+ this.tSBAuftragVW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBAuftragVW.ToolTipText = "Auftragkontrolle und -bearbeitung";
+ this.tSBAuftragVW.Click += new System.EventHandler(this.tSBAuftragVW_Click);
+ this.tSBAuftragVW.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.tSBAuftragVW.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.tSBAuftragVW.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // tSBAufgabeVW
+ //
+ this.tSBAufgabeVW.AutoSize = false;
+ this.tSBAufgabeVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.tSBAufgabeVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBAufgabeVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBAufgabeVW.ForeColor = System.Drawing.Color.White;
+ this.tSBAufgabeVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBAufgabeVW.Image")));
+ this.tSBAufgabeVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBAufgabeVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tSBAufgabeVW.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBAufgabeVW.Name = "tSBAufgabeVW";
+ this.tSBAufgabeVW.Size = new System.Drawing.Size(180, 40);
+ this.tSBAufgabeVW.Text = "AUFGABENVERWALTUNG";
+ this.tSBAufgabeVW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBAufgabeVW.Click += new System.EventHandler(this.tSBAufgabeVW_Click);
+ this.tSBAufgabeVW.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.tSBAufgabeVW.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.tSBAufgabeVW.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // tSBArtikelVW
+ //
+ this.tSBArtikelVW.AutoSize = false;
+ this.tSBArtikelVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.tSBArtikelVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBArtikelVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBArtikelVW.ForeColor = System.Drawing.Color.White;
+ this.tSBArtikelVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBArtikelVW.Image")));
+ this.tSBArtikelVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBArtikelVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tSBArtikelVW.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBArtikelVW.Name = "tSBArtikelVW";
+ this.tSBArtikelVW.Size = new System.Drawing.Size(180, 40);
+ this.tSBArtikelVW.Text = "ARTIKELVERWALTUNG";
+ this.tSBArtikelVW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBArtikelVW.ToolTipText = "Artikel bearbeiten";
+ this.tSBArtikelVW.Click += new System.EventHandler(this.tSBArtikelVW_Click);
+ this.tSBArtikelVW.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.tSBArtikelVW.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.tSBArtikelVW.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // toolStripZaehlscheine
+ //
+ this.toolStripZaehlscheine.AutoSize = false;
+ this.toolStripZaehlscheine.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.toolStripZaehlscheine.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripZaehlscheine.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.toolStripZaehlscheine.ForeColor = System.Drawing.Color.White;
+ this.toolStripZaehlscheine.Image = ((System.Drawing.Image)(resources.GetObject("toolStripZaehlscheine.Image")));
+ this.toolStripZaehlscheine.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.toolStripZaehlscheine.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.toolStripZaehlscheine.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripZaehlscheine.Name = "toolStripZaehlscheine";
+ this.toolStripZaehlscheine.Size = new System.Drawing.Size(180, 40);
+ this.toolStripZaehlscheine.Text = "KUNDENVERWALTUNG";
+ this.toolStripZaehlscheine.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.toolStripZaehlscheine.ToolTipText = "Kunde bearbeiten";
+ this.toolStripZaehlscheine.Click += new System.EventHandler(this.toolStripZaehlscheine_Click);
+ this.toolStripZaehlscheine.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.toolStripZaehlscheine.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.toolStripZaehlscheine.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // tSBExpedit
+ //
+ this.tSBExpedit.AutoSize = false;
+ this.tSBExpedit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.tSBExpedit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBExpedit.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBExpedit.ForeColor = System.Drawing.Color.White;
+ this.tSBExpedit.Image = ((System.Drawing.Image)(resources.GetObject("tSBExpedit.Image")));
+ this.tSBExpedit.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBExpedit.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tSBExpedit.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBExpedit.Name = "tSBExpedit";
+ this.tSBExpedit.Size = new System.Drawing.Size(180, 40);
+ this.tSBExpedit.Text = "EXPEDIT";
+ this.tSBExpedit.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBExpedit.Click += new System.EventHandler(this.tSBExpedit_Click);
+ this.tSBExpedit.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.tSBExpedit.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.tSBExpedit.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // toolStripDB
+ //
+ this.toolStripDB.AutoSize = false;
+ this.toolStripDB.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.toolStripDB.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripDB.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.toolStripDB.ForeColor = System.Drawing.Color.White;
+ this.toolStripDB.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDB.Image")));
+ this.toolStripDB.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.toolStripDB.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.toolStripDB.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDB.Name = "toolStripDB";
+ this.toolStripDB.Size = new System.Drawing.Size(180, 40);
+ this.toolStripDB.Text = "DECKUNGSBEITRAG";
+ this.toolStripDB.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.toolStripDB.Click += new System.EventHandler(this.toolStripDB_Click);
+ this.toolStripDB.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.toolStripDB.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.toolStripDB.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // tSBKosten
+ //
+ this.tSBKosten.AutoSize = false;
+ this.tSBKosten.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.tSBKosten.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBKosten.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBKosten.ForeColor = System.Drawing.Color.White;
+ this.tSBKosten.Image = ((System.Drawing.Image)(resources.GetObject("tSBKosten.Image")));
+ this.tSBKosten.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBKosten.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tSBKosten.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBKosten.Name = "tSBKosten";
+ this.tSBKosten.Size = new System.Drawing.Size(180, 40);
+ this.tSBKosten.Text = "KOSTENLISTE";
+ this.tSBKosten.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBKosten.Click += new System.EventHandler(this.tSBKosten_Click);
+ this.tSBKosten.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.tSBKosten.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.tSBKosten.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // toolStripButton1
+ //
+ this.toolStripButton1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+ this.toolStripButton1.AutoSize = false;
+ this.toolStripButton1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.BackgroundImage")));
+ this.toolStripButton1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.toolStripButton1.Enabled = false;
+ this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButton1.Name = "toolStripButton1";
+ this.toolStripButton1.Size = new System.Drawing.Size(180, 70);
+ this.toolStripButton1.Text = "toolStripButton1";
+ //
+ // tSBScannTest
+ //
+ this.tSBScannTest.AutoSize = false;
+ this.tSBScannTest.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.tSBScannTest.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBScannTest.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBScannTest.ForeColor = System.Drawing.Color.White;
+ this.tSBScannTest.Image = ((System.Drawing.Image)(resources.GetObject("tSBScannTest.Image")));
+ this.tSBScannTest.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBScannTest.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tSBScannTest.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBScannTest.Name = "tSBScannTest";
+ this.tSBScannTest.Size = new System.Drawing.Size(180, 40);
+ this.tSBScannTest.Text = "SCANN TEST";
+ this.tSBScannTest.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBScannTest.Click += new System.EventHandler(this.tSBScannTest_Click);
+ this.tSBScannTest.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.tSBScannTest.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.tSBScannTest.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // tSBHilfe
+ //
+ this.tSBHilfe.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+ this.tSBHilfe.AutoSize = false;
+ this.tSBHilfe.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.tSBHilfe.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBHilfe.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBHilfe.ForeColor = System.Drawing.Color.White;
+ this.tSBHilfe.Image = ((System.Drawing.Image)(resources.GetObject("tSBHilfe.Image")));
+ this.tSBHilfe.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBHilfe.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tSBHilfe.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBHilfe.Name = "tSBHilfe";
+ this.tSBHilfe.Size = new System.Drawing.Size(180, 40);
+ this.tSBHilfe.Text = "HILFE";
+ this.tSBHilfe.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBHilfe.Click += new System.EventHandler(this.tSBHilfe_Click);
+ //
+ // toolStripButtonImport
+ //
+ this.toolStripButtonImport.AutoSize = false;
+ this.toolStripButtonImport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.toolStripButtonImport.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripButtonImport.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.toolStripButtonImport.ForeColor = System.Drawing.Color.White;
+ this.toolStripButtonImport.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonImport.Image")));
+ this.toolStripButtonImport.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.toolStripButtonImport.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.toolStripButtonImport.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonImport.Name = "toolStripButtonImport";
+ this.toolStripButtonImport.Size = new System.Drawing.Size(180, 40);
+ this.toolStripButtonImport.Text = "IMPORT";
+ this.toolStripButtonImport.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.toolStripButtonImport.Click += new System.EventHandler(this.toolStripButtonImport_Click);
+ this.toolStripButtonImport.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.toolStripButtonImport.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.toolStripButtonImport.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // tSBEinstellung
+ //
+ this.tSBEinstellung.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+ this.tSBEinstellung.AutoSize = false;
+ this.tSBEinstellung.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBEinstellung.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBEinstellung.ForeColor = System.Drawing.Color.White;
+ this.tSBEinstellung.Image = ((System.Drawing.Image)(resources.GetObject("tSBEinstellung.Image")));
+ this.tSBEinstellung.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBEinstellung.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBEinstellung.Name = "tSBEinstellung";
+ this.tSBEinstellung.Size = new System.Drawing.Size(180, 40);
+ this.tSBEinstellung.Text = "EINSTELLUNG";
+ this.tSBEinstellung.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBEinstellung.Click += new System.EventHandler(this.tSBEinstellung_Click);
+ //
+ // tSBTourenplanung
+ //
+ this.tSBTourenplanung.AutoSize = false;
+ this.tSBTourenplanung.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.tSBTourenplanung.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.tSBTourenplanung.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tSBTourenplanung.ForeColor = System.Drawing.Color.White;
+ this.tSBTourenplanung.Image = ((System.Drawing.Image)(resources.GetObject("tSBTourenplanung.Image")));
+ this.tSBTourenplanung.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBTourenplanung.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tSBTourenplanung.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tSBTourenplanung.Name = "tSBTourenplanung";
+ this.tSBTourenplanung.Size = new System.Drawing.Size(180, 40);
+ this.tSBTourenplanung.Text = "TOURENPLANUNG";
+ this.tSBTourenplanung.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.tSBTourenplanung.Click += new System.EventHandler(this.tSBTourenplanung_Click);
+ this.tSBTourenplanung.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.tSBTourenplanung.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.tSBTourenplanung.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
+ // toolStripBeenden
+ //
+ this.toolStripBeenden.AutoSize = false;
+ this.toolStripBeenden.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.toolStripBeenden.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripBeenden.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.toolStripBeenden.ForeColor = System.Drawing.Color.White;
+ this.toolStripBeenden.Image = ((System.Drawing.Image)(resources.GetObject("toolStripBeenden.Image")));
+ this.toolStripBeenden.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.toolStripBeenden.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.toolStripBeenden.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripBeenden.Name = "toolStripBeenden";
+ this.toolStripBeenden.Size = new System.Drawing.Size(180, 40);
+ this.toolStripBeenden.Text = "BEENDEN";
+ this.toolStripBeenden.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.toolStripBeenden.Click += new System.EventHandler(this.toolStripBeenden_Click);
+ this.toolStripBeenden.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
+ this.toolStripBeenden.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
+ this.toolStripBeenden.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ //
// panelMain
//
this.panelMain.AllowDrop = true;
this.panelMain.BackColor = System.Drawing.Color.White;
+ this.panelMain.Controls.Add(this.buttonTestChart);
+ this.panelMain.Controls.Add(this.groupBoxSaison);
this.panelMain.Controls.Add(this.buttonNeuerStand);
this.panelMain.Controls.Add(this.buttonNeueInventur);
this.panelMain.Controls.Add(this.buttonNeueAufgabe);
@@ -276,9 +572,9 @@ namespace Deckungsbeitrag
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.Location = new System.Drawing.Point(4, 19);
this.dateTimePicker1.Name = "dateTimePicker1";
- this.dateTimePicker1.Size = new System.Drawing.Size(224, 26);
+ this.dateTimePicker1.Size = new System.Drawing.Size(270, 26);
this.dateTimePicker1.TabIndex = 1;
this.dateTimePicker1.CloseUp += new System.EventHandler(this.dateTimePicker1_CloseUp);
//
@@ -676,6 +972,26 @@ namespace Deckungsbeitrag
this.rBAlle.UseVisualStyleBackColor = true;
this.rBAlle.CheckedChanged += new System.EventHandler(this.RadioButton_CheckedChanged);
//
+ // buttonAufAbruf
+ //
+ this.buttonAufAbruf.BackColor = System.Drawing.Color.Red;
+ this.buttonAufAbruf.FlatAppearance.BorderColor = System.Drawing.Color.Red;
+ this.buttonAufAbruf.FlatAppearance.BorderSize = 0;
+ this.buttonAufAbruf.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.buttonAufAbruf.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.buttonAufAbruf.ForeColor = System.Drawing.Color.White;
+ this.buttonAufAbruf.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.buttonAufAbruf.Location = new System.Drawing.Point(10, 215);
+ this.buttonAufAbruf.Margin = new System.Windows.Forms.Padding(2);
+ this.buttonAufAbruf.Name = "buttonAufAbruf";
+ this.buttonAufAbruf.Size = new System.Drawing.Size(150, 41);
+ this.buttonAufAbruf.TabIndex = 56;
+ this.buttonAufAbruf.Text = "AufAbruf";
+ this.buttonAufAbruf.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+ this.buttonAufAbruf.UseVisualStyleBackColor = false;
+ this.buttonAufAbruf.Visible = false;
+ this.buttonAufAbruf.Click += new System.EventHandler(this.buttonAufAbruf_Click);
+ //
// buttonAusgeliefert
//
this.buttonAusgeliefert.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
@@ -711,6 +1027,16 @@ namespace Deckungsbeitrag
this.groupBoxScannTest.TabStop = false;
this.groupBoxScannTest.Visible = false;
//
+ // pictureBoxScannTest
+ //
+ this.pictureBoxScannTest.Location = new System.Drawing.Point(6, 10);
+ this.pictureBoxScannTest.Name = "pictureBoxScannTest";
+ this.pictureBoxScannTest.Size = new System.Drawing.Size(179, 160);
+ this.pictureBoxScannTest.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+ this.pictureBoxScannTest.TabIndex = 14;
+ this.pictureBoxScannTest.TabStop = false;
+ this.pictureBoxScannTest.Visible = false;
+ //
// textBoxScannTest
//
this.textBoxScannTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -743,325 +1069,38 @@ namespace Deckungsbeitrag
this.labelScannTest.Text = "label1";
this.labelScannTest.Visible = false;
//
- // tSBBenutzerVW
+ // comboBoxSaison
//
- this.tSBBenutzerVW.AutoSize = false;
- this.tSBBenutzerVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.tSBBenutzerVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBBenutzerVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBBenutzerVW.ForeColor = System.Drawing.Color.White;
- this.tSBBenutzerVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBBenutzerVW.Image")));
- this.tSBBenutzerVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBBenutzerVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tSBBenutzerVW.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBBenutzerVW.Name = "tSBBenutzerVW";
- this.tSBBenutzerVW.Size = new System.Drawing.Size(180, 40);
- this.tSBBenutzerVW.Text = "BENUTZERVERWALTUNG";
- this.tSBBenutzerVW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBBenutzerVW.Click += new System.EventHandler(this.tSBBenutzerVW_Click);
- this.tSBBenutzerVW.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.tSBBenutzerVW.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.tSBBenutzerVW.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ this.comboBoxSaison.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxSaison.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.comboBoxSaison.FormattingEnabled = true;
+ this.comboBoxSaison.Location = new System.Drawing.Point(8, 19);
+ this.comboBoxSaison.Name = "comboBoxSaison";
+ this.comboBoxSaison.Size = new System.Drawing.Size(265, 28);
+ this.comboBoxSaison.TabIndex = 66;
+ this.comboBoxSaison.SelectedIndexChanged += new System.EventHandler(this.comboBoxSaison_SelectedIndexChanged);
//
- // tSBAuftragVW
+ // groupBoxSaison
//
- this.tSBAuftragVW.AutoSize = false;
- this.tSBAuftragVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.tSBAuftragVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBAuftragVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBAuftragVW.ForeColor = System.Drawing.Color.White;
- this.tSBAuftragVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBAuftragVW.Image")));
- this.tSBAuftragVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBAuftragVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tSBAuftragVW.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBAuftragVW.Name = "tSBAuftragVW";
- this.tSBAuftragVW.Size = new System.Drawing.Size(180, 40);
- this.tSBAuftragVW.Text = "AUFTRAGVERWALTUNG";
- this.tSBAuftragVW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBAuftragVW.ToolTipText = "Auftragkontrolle und -bearbeitung";
- this.tSBAuftragVW.Click += new System.EventHandler(this.tSBAuftragVW_Click);
- this.tSBAuftragVW.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.tSBAuftragVW.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.tSBAuftragVW.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
+ this.groupBoxSaison.Controls.Add(this.comboBoxSaison);
+ this.groupBoxSaison.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.groupBoxSaison.Location = new System.Drawing.Point(8, 251);
+ this.groupBoxSaison.Name = "groupBoxSaison";
+ this.groupBoxSaison.Size = new System.Drawing.Size(279, 59);
+ this.groupBoxSaison.TabIndex = 62;
+ this.groupBoxSaison.TabStop = false;
+ this.groupBoxSaison.Text = "AKTIVE SAISON";
+ this.groupBoxSaison.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox_Paint);
//
- // tSBAufgabeVW
+ // buttonTestChart
//
- this.tSBAufgabeVW.AutoSize = false;
- this.tSBAufgabeVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.tSBAufgabeVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBAufgabeVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBAufgabeVW.ForeColor = System.Drawing.Color.White;
- this.tSBAufgabeVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBAufgabeVW.Image")));
- this.tSBAufgabeVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBAufgabeVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tSBAufgabeVW.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBAufgabeVW.Name = "tSBAufgabeVW";
- this.tSBAufgabeVW.Size = new System.Drawing.Size(180, 40);
- this.tSBAufgabeVW.Text = "AUFGABENVERWALTUNG";
- this.tSBAufgabeVW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBAufgabeVW.Click += new System.EventHandler(this.tSBAufgabeVW_Click);
- this.tSBAufgabeVW.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.tSBAufgabeVW.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.tSBAufgabeVW.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // tSBArtikelVW
- //
- this.tSBArtikelVW.AutoSize = false;
- this.tSBArtikelVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.tSBArtikelVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBArtikelVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBArtikelVW.ForeColor = System.Drawing.Color.White;
- this.tSBArtikelVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBArtikelVW.Image")));
- this.tSBArtikelVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBArtikelVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tSBArtikelVW.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBArtikelVW.Name = "tSBArtikelVW";
- this.tSBArtikelVW.Size = new System.Drawing.Size(180, 40);
- this.tSBArtikelVW.Text = "ARTIKELVERWALTUNG";
- this.tSBArtikelVW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBArtikelVW.ToolTipText = "Artikel bearbeiten";
- this.tSBArtikelVW.Click += new System.EventHandler(this.tSBArtikelVW_Click);
- this.tSBArtikelVW.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.tSBArtikelVW.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.tSBArtikelVW.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // toolStripZaehlscheine
- //
- this.toolStripZaehlscheine.AutoSize = false;
- this.toolStripZaehlscheine.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.toolStripZaehlscheine.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripZaehlscheine.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.toolStripZaehlscheine.ForeColor = System.Drawing.Color.White;
- this.toolStripZaehlscheine.Image = ((System.Drawing.Image)(resources.GetObject("toolStripZaehlscheine.Image")));
- this.toolStripZaehlscheine.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.toolStripZaehlscheine.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.toolStripZaehlscheine.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripZaehlscheine.Name = "toolStripZaehlscheine";
- this.toolStripZaehlscheine.Size = new System.Drawing.Size(180, 40);
- this.toolStripZaehlscheine.Text = "KUNDENVERWALTUNG";
- this.toolStripZaehlscheine.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.toolStripZaehlscheine.ToolTipText = "Kunde bearbeiten";
- this.toolStripZaehlscheine.Click += new System.EventHandler(this.toolStripZaehlscheine_Click);
- this.toolStripZaehlscheine.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.toolStripZaehlscheine.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.toolStripZaehlscheine.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // tSBExpedit
- //
- this.tSBExpedit.AutoSize = false;
- this.tSBExpedit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.tSBExpedit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBExpedit.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBExpedit.ForeColor = System.Drawing.Color.White;
- this.tSBExpedit.Image = ((System.Drawing.Image)(resources.GetObject("tSBExpedit.Image")));
- this.tSBExpedit.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBExpedit.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tSBExpedit.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBExpedit.Name = "tSBExpedit";
- this.tSBExpedit.Size = new System.Drawing.Size(180, 40);
- this.tSBExpedit.Text = "EXPEDIT";
- this.tSBExpedit.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBExpedit.Click += new System.EventHandler(this.tSBExpedit_Click);
- this.tSBExpedit.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.tSBExpedit.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.tSBExpedit.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // toolStripDB
- //
- this.toolStripDB.AutoSize = false;
- this.toolStripDB.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.toolStripDB.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripDB.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.toolStripDB.ForeColor = System.Drawing.Color.White;
- this.toolStripDB.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDB.Image")));
- this.toolStripDB.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.toolStripDB.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.toolStripDB.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDB.Name = "toolStripDB";
- this.toolStripDB.Size = new System.Drawing.Size(180, 40);
- this.toolStripDB.Text = "DECKUNGSBEITRAG";
- this.toolStripDB.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.toolStripDB.Click += new System.EventHandler(this.toolStripDB_Click);
- this.toolStripDB.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.toolStripDB.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.toolStripDB.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // tSBKosten
- //
- this.tSBKosten.AutoSize = false;
- this.tSBKosten.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.tSBKosten.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBKosten.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBKosten.ForeColor = System.Drawing.Color.White;
- this.tSBKosten.Image = ((System.Drawing.Image)(resources.GetObject("tSBKosten.Image")));
- this.tSBKosten.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBKosten.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tSBKosten.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBKosten.Name = "tSBKosten";
- this.tSBKosten.Size = new System.Drawing.Size(180, 40);
- this.tSBKosten.Text = "KOSTENLISTE";
- this.tSBKosten.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBKosten.Click += new System.EventHandler(this.tSBKosten_Click);
- this.tSBKosten.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.tSBKosten.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.tSBKosten.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // toolStripButton1
- //
- this.toolStripButton1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
- this.toolStripButton1.AutoSize = false;
- this.toolStripButton1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.BackgroundImage")));
- this.toolStripButton1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
- this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.toolStripButton1.Enabled = false;
- this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripButton1.Name = "toolStripButton1";
- this.toolStripButton1.Size = new System.Drawing.Size(180, 70);
- this.toolStripButton1.Text = "toolStripButton1";
- //
- // tSBScannTest
- //
- this.tSBScannTest.AutoSize = false;
- this.tSBScannTest.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.tSBScannTest.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBScannTest.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBScannTest.ForeColor = System.Drawing.Color.White;
- this.tSBScannTest.Image = ((System.Drawing.Image)(resources.GetObject("tSBScannTest.Image")));
- this.tSBScannTest.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBScannTest.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tSBScannTest.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBScannTest.Name = "tSBScannTest";
- this.tSBScannTest.Size = new System.Drawing.Size(180, 40);
- this.tSBScannTest.Text = "SCANN TEST";
- this.tSBScannTest.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBScannTest.Click += new System.EventHandler(this.tSBScannTest_Click);
- this.tSBScannTest.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.tSBScannTest.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.tSBScannTest.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // tSBHilfe
- //
- this.tSBHilfe.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
- this.tSBHilfe.AutoSize = false;
- this.tSBHilfe.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.tSBHilfe.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBHilfe.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBHilfe.ForeColor = System.Drawing.Color.White;
- this.tSBHilfe.Image = ((System.Drawing.Image)(resources.GetObject("tSBHilfe.Image")));
- this.tSBHilfe.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBHilfe.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tSBHilfe.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBHilfe.Name = "tSBHilfe";
- this.tSBHilfe.Size = new System.Drawing.Size(180, 40);
- this.tSBHilfe.Text = "HILFE";
- this.tSBHilfe.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBHilfe.Click += new System.EventHandler(this.tSBHilfe_Click);
- //
- // toolStripButtonImport
- //
- this.toolStripButtonImport.AutoSize = false;
- this.toolStripButtonImport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.toolStripButtonImport.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripButtonImport.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.toolStripButtonImport.ForeColor = System.Drawing.Color.White;
- this.toolStripButtonImport.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonImport.Image")));
- this.toolStripButtonImport.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.toolStripButtonImport.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.toolStripButtonImport.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripButtonImport.Name = "toolStripButtonImport";
- this.toolStripButtonImport.Size = new System.Drawing.Size(180, 40);
- this.toolStripButtonImport.Text = "IMPORT";
- this.toolStripButtonImport.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.toolStripButtonImport.Click += new System.EventHandler(this.toolStripButtonImport_Click);
- this.toolStripButtonImport.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.toolStripButtonImport.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.toolStripButtonImport.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // tSBEinstellung
- //
- this.tSBEinstellung.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
- this.tSBEinstellung.AutoSize = false;
- this.tSBEinstellung.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBEinstellung.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBEinstellung.ForeColor = System.Drawing.Color.White;
- this.tSBEinstellung.Image = ((System.Drawing.Image)(resources.GetObject("tSBEinstellung.Image")));
- this.tSBEinstellung.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBEinstellung.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBEinstellung.Name = "tSBEinstellung";
- this.tSBEinstellung.Size = new System.Drawing.Size(180, 40);
- this.tSBEinstellung.Text = "EINSTELLUNG";
- this.tSBEinstellung.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBEinstellung.Click += new System.EventHandler(this.tSBEinstellung_Click);
- //
- // tSBTourenplanung
- //
- this.tSBTourenplanung.AutoSize = false;
- this.tSBTourenplanung.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.tSBTourenplanung.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.tSBTourenplanung.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tSBTourenplanung.ForeColor = System.Drawing.Color.White;
- this.tSBTourenplanung.Image = ((System.Drawing.Image)(resources.GetObject("tSBTourenplanung.Image")));
- this.tSBTourenplanung.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBTourenplanung.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tSBTourenplanung.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tSBTourenplanung.Name = "tSBTourenplanung";
- this.tSBTourenplanung.Size = new System.Drawing.Size(180, 40);
- this.tSBTourenplanung.Text = "TOURENPLANUNG";
- this.tSBTourenplanung.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.tSBTourenplanung.Click += new System.EventHandler(this.tSBTourenplanung_Click);
- this.tSBTourenplanung.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.tSBTourenplanung.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.tSBTourenplanung.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // toolStripBeenden
- //
- this.toolStripBeenden.AutoSize = false;
- this.toolStripBeenden.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.toolStripBeenden.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripBeenden.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.toolStripBeenden.ForeColor = System.Drawing.Color.White;
- this.toolStripBeenden.Image = ((System.Drawing.Image)(resources.GetObject("toolStripBeenden.Image")));
- this.toolStripBeenden.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.toolStripBeenden.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.toolStripBeenden.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripBeenden.Name = "toolStripBeenden";
- this.toolStripBeenden.Size = new System.Drawing.Size(180, 40);
- this.toolStripBeenden.Text = "BEENDEN";
- this.toolStripBeenden.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.toolStripBeenden.Click += new System.EventHandler(this.toolStripBeenden_Click);
- this.toolStripBeenden.MouseEnter += new System.EventHandler(this.toolStrip_MouseEnter);
- this.toolStripBeenden.MouseLeave += new System.EventHandler(this.toolStrip_MouseLeave);
- this.toolStripBeenden.Paint += new System.Windows.Forms.PaintEventHandler(this.get_Border_Paint);
- //
- // buttonAufAbruf
- //
- this.buttonAufAbruf.BackColor = System.Drawing.Color.Red;
- this.buttonAufAbruf.FlatAppearance.BorderColor = System.Drawing.Color.Red;
- this.buttonAufAbruf.FlatAppearance.BorderSize = 0;
- this.buttonAufAbruf.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.buttonAufAbruf.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.buttonAufAbruf.ForeColor = System.Drawing.Color.White;
- this.buttonAufAbruf.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.buttonAufAbruf.Location = new System.Drawing.Point(10, 215);
- this.buttonAufAbruf.Margin = new System.Windows.Forms.Padding(2);
- this.buttonAufAbruf.Name = "buttonAufAbruf";
- this.buttonAufAbruf.Size = new System.Drawing.Size(150, 41);
- this.buttonAufAbruf.TabIndex = 56;
- this.buttonAufAbruf.Text = "AufAbruf";
- this.buttonAufAbruf.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
- this.buttonAufAbruf.UseVisualStyleBackColor = false;
- this.buttonAufAbruf.Visible = false;
- this.buttonAufAbruf.Click += new System.EventHandler(this.buttonAufAbruf_Click);
- //
- // pictureBoxScannTest
- //
- this.pictureBoxScannTest.Location = new System.Drawing.Point(6, 10);
- this.pictureBoxScannTest.Name = "pictureBoxScannTest";
- this.pictureBoxScannTest.Size = new System.Drawing.Size(179, 160);
- this.pictureBoxScannTest.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
- this.pictureBoxScannTest.TabIndex = 14;
- this.pictureBoxScannTest.TabStop = false;
- this.pictureBoxScannTest.Visible = false;
+ this.buttonTestChart.Location = new System.Drawing.Point(8, 168);
+ this.buttonTestChart.Name = "buttonTestChart";
+ this.buttonTestChart.Size = new System.Drawing.Size(75, 23);
+ this.buttonTestChart.TabIndex = 66;
+ this.buttonTestChart.Text = "TestChart";
+ this.buttonTestChart.UseVisualStyleBackColor = true;
+ this.buttonTestChart.Click += new System.EventHandler(this.buttonTestChart_Click);
//
// FormMain
//
@@ -1097,6 +1136,7 @@ namespace Deckungsbeitrag
this.groupBoxScannTest.ResumeLayout(false);
this.groupBoxScannTest.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxScannTest)).EndInit();
+ this.groupBoxSaison.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -1161,6 +1201,9 @@ namespace Deckungsbeitrag
private System.Windows.Forms.Button buttonNeueInventur;
private System.Windows.Forms.Button buttonNeuerStand;
private System.Windows.Forms.ToolStripButton tSBTourenplanung;
+ private System.Windows.Forms.ComboBox comboBoxSaison;
+ private System.Windows.Forms.GroupBox groupBoxSaison;
+ private System.Windows.Forms.Button buttonTestChart;
}
}
diff --git a/AA-Forms/FormMain.cs b/AA-Forms/FormMain.cs
index ce4e78c..7564b97 100644
--- a/AA-Forms/FormMain.cs
+++ b/AA-Forms/FormMain.cs
@@ -1,6 +1,7 @@
using BrightIdeasSoftware;
using DatenDB;
using Deckungsbeitrag.AA_Forms;
+using Deckungsbeitrag.AA_Klassen;
using Deckungsbeitrag.Properties;
using Npgsql;
using System;
@@ -33,6 +34,7 @@ namespace Deckungsbeitrag
private Size _fixedSize;
private bool _handlingResize;
private readonly UserSettingsManager _settings = new UserSettingsManager();
+ private bool formloading = false;
public FormMain()
@@ -94,6 +96,7 @@ namespace Deckungsbeitrag
private void FormMain_Load(object sender, EventArgs e)
{
+ formloading = true;
_settings.Load();
@@ -102,25 +105,42 @@ namespace Deckungsbeitrag
this.panelMain.Width = this.Width - this.toolStripMenu.Right - 20;
this.panelMain.Location = new Point(this.toolStripMenu.Right, 0);
GetStatistik();
+ GetSaison();
// GroupBoxen im PanelMain werden ausgeblendet
- foreach (Control ctr in this.panelMain.Controls)
+ foreach (GroupBox gb in this.panelMain.Controls.OfType())
{
- if (ctr.GetType() == typeof(GroupBox))
- {
- GroupBox gb = (GroupBox)ctr;
- if(!gb.Name.Contains("Update") & !gb.Name.Contains("Statistik") & !gb.Name.Contains("Neuer"))
- {
- gb.Visible = false;
- gb.Location = new Point(0, 0);
- gb.Size = new Size(this.panelMain.Width, this.panelMain.Height);
+ if (!gb.Name.Contains("Update") & !gb.Name.Contains("Statistik") & !gb.Name.Contains("Neuer") & !gb.Name.Contains("Saison"))
+ {
+ gb.Visible = false;
+ gb.Location = new Point(0, 0);
+ gb.Size = new Size(this.panelMain.Width, this.panelMain.Height);
- }
}
- }
- this.Activate();
+
+ }
+ this.Activate();
_fixedSize = this.Size;
+ formloading = false;
}
+ private void GetSaison()
+ {
+ var listenQuelle = Saison.LadeSaisons(); // Liste
+
+ comboBoxSaison.DataSource = listenQuelle;
+ comboBoxSaison.DisplayMember = nameof(Saison.Bezeichnung);
+ comboBoxSaison.ValueMember = nameof(Saison.SaisonId);
+
+ // aktiven Eintrag suchen (falls genau einer aktiv ist)
+ var aktiveSaison = listenQuelle
+ .FirstOrDefault(s => s.Aktiv); // LINQ FirstOrDefault [web:13][web:16][web:19]
+
+ if (aktiveSaison != null)
+ {
+ comboBoxSaison.SelectedValue = aktiveSaison.SaisonId; // per ValueMember setzen [web:11][web:20]
+ }
+ }
+
private void Paint_Boarder(Size size, Point location, PaintEventArgs e)
{
Pen pen = new Pen(Color.FromArgb(1, 53, 101), 4);
@@ -966,6 +986,7 @@ namespace Deckungsbeitrag
gb.MouseUp += groupBox_MouseUp;
foreach(Control ctr in gb.Controls)
{
+ if (ctr.GetType() == typeof(ComboBox) || ctr.GetType() == typeof(DateTimePicker)) return;
ctr.MouseDown += groupBox_MouseDown;
ctr.MouseMove += groupBox_MouseMove;
ctr.MouseUp += groupBox_MouseUp;
@@ -974,19 +995,23 @@ namespace Deckungsbeitrag
private void groupBox_MouseDown(object sender, MouseEventArgs e)
{
GroupBox gb;
+ Control ctr = null;
+ //if(hit == null && e.Button == MouseButtons.Left) {
if (sender.GetType() == typeof(GroupBox)) gb = (GroupBox)sender;
else
{
- var ctr = (Control)sender;
+ ctr = (Control)sender;
gb = (GroupBox)ctr.Parent;
}
+
if (e.Button == MouseButtons.Left)
{
isDragging = true;
dragStartPoint = new Point(e.X, e.Y);
-
+
}
+ else isDragging = false;
}
private void groupBox_MouseMove(object sender, MouseEventArgs e)
{
@@ -1143,6 +1168,46 @@ namespace Deckungsbeitrag
tourenplanung.ShowDialog();
this.Cursor = Cursors.Default;
}
+
+ private void comboBoxSaison_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (formloading) { return; }
+ if (meldung.GetFrage(this, "Bist du dir sicher, dass du die Aktive Saison ändern möchtest?", false) == DialogResult.No)
+ {
+ formloading = true;
+ try
+ {
+ foreach (Saison saison in comboBoxSaison.Items)
+ {
+ if (saison.Aktiv)
+ {
+ comboBoxSaison.SelectedItem = saison; // Event wird aktuell unterdrückt
+ break;
+ }
+ }
+ }
+ finally
+ {
+ formloading = false;
+ }
+
+ return;
+ }
+
+ foreach (Saison saison in comboBoxSaison.Items)
+ {
+ if (saison == comboBoxSaison.SelectedItem) saison.Aktiv = true;
+ else saison.Aktiv = false;
+
+ saison.Save();
+ }
+ }
+
+ private void buttonTestChart_Click(object sender, EventArgs e)
+ {
+ FehlmengeChart chart = new FehlmengeChart();
+ chart.Show();
+ }
}
}
//CHANGES: Fahrer können abgeholte Aufträge erstellen und ausgelieferte Aufträge markieren.
diff --git a/AA-Forms/FormNeuerAuftrag.cs b/AA-Forms/FormNeuerAuftrag.cs
index 743896a..bce336e 100644
--- a/AA-Forms/FormNeuerAuftrag.cs
+++ b/AA-Forms/FormNeuerAuftrag.cs
@@ -16,7 +16,8 @@ using System.Threading.Tasks;
using System.Web.Caching;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
-using static System.Net.Mime.MediaTypeNames;
+using System.Text.Json;
+
namespace Deckungsbeitrag
{
@@ -108,9 +109,26 @@ namespace Deckungsbeitrag
else this.textBoxKundeName.Text = kunde.Suchtext;
//if (letzterLiefertag.HasValue) this.dTPLiefertag.Value = letzterLiefertag.Value;
//else this.dTPLiefertag.Value = DateTime.Today.AddDays(1);
+ Saison Saison = Saison.GetAktivSaison();
+ if (Saison.Bezeichnung == "Sommer") this.dTPLiefertag.Value = Funktionen.GetNextLiefertag((Liefertage)this.kunde.SommerLieferRhythmus);
+ if (Saison.Bezeichnung == "Winter") this.dTPLiefertag.Value = Funktionen.GetNextLiefertag((Liefertage)this.kunde.WinterLieferRhythmus);
+ if (Saison.Bezeichnung == "Zwischensaison")
+ {
+ meldung.GetInfo(this, "Achtung Liefertag kann falsch sein, da Zwischensaison ist.", false);
+ DateTime datum = DateTime.Today;
+ int tage = 2;
+ while (tage > 0)
+ {
+ datum = datum.AddDays(1);
+ if (datum.DayOfWeek != DayOfWeek.Saturday && datum.DayOfWeek != DayOfWeek.Sunday)
+ {
+ tage--;
+ }
+ }
+ this.dTPLiefertag.Value = datum;
+
+ }
- this.dTPLiefertag.Value = Funktionen.GetNextLiefertag((Liefertage)this.kunde.LieferRhythmus);
-
dTPLiefertag_Leave(this.dTPLiefertag, EventArgs.Empty);
textBoxCont_TextChanged(this.textBoxCont, EventArgs.Empty);
}
@@ -158,8 +176,16 @@ namespace Deckungsbeitrag
}
if (col.Name == "Korrektur")
{
- if(auftragTyp >= AuftragTyp.Standerhöhung) col.Visible = true;
- else col.Visible = false;
+ if (auftragTyp >= AuftragTyp.Standerhöhung) col.Visible = true;
+ else
+ {
+ if (auftragTyp == AuftragTyp.Inventur)
+ {
+ col.Visible = true;
+ col.Name = "Inventurausgleich";
+ }
+ else col.Visible = false;
+ }
}
}
@@ -232,7 +258,7 @@ namespace Deckungsbeitrag
Auftrag.Erstellt = DateTime.Now;
Auftrag.Container = int.Parse(this.textBoxCont.Text);
Auftrag.Typ = (AuftragTyp)comboBoxTyp.SelectedItem;
- Auftrag.ArbeiterID = ((Benutzer)this.comboBoxFahrer.SelectedItem).BenutzerID;
+ Auftrag.ArbeiterID = this.comboBoxFahrer.SelectedIndex == -1 ? this.benutzer.BenutzerID : ((Benutzer)this.comboBoxFahrer.SelectedItem).BenutzerID;
if (maschine != null) Auftrag.MaschineID = (int)maschine.MaschineID;
else Auftrag.MaschineID = null;
@@ -249,6 +275,7 @@ namespace Deckungsbeitrag
{
int tosave = 0;
int saved = 0;
+ bool negieren = false;
foreach (DataGridViewRow artikel in this.dGArtikel.Rows)
{
tosave++;
@@ -263,8 +290,13 @@ namespace Deckungsbeitrag
}
if (artikel.Cells[6].Visible == true)
{
- stand.Korrektur = int.Parse(artikel.Cells[6].Value.ToString());
- stand.KorrekturBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
+ if (int.TryParse(artikel.Cells[6].Value.ToString(), out int result))
+ {
+ if (Auftrag.Typ == AuftragTyp.Standverminderung) negieren = true;
+ stand.Korrektur = (negieren && stand.Korrektur > 0) ? -result : result;
+ stand.KorrekturBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
+ }
+ else { meldung.Eingabefehler(); return; }
}
if (stand.Save() == 1) saved++;
}
@@ -275,6 +307,7 @@ namespace Deckungsbeitrag
{
//Speichern von AUFTRAG
save = Auftrag.Save();
+ GetInventurCSV();
}
}
else
@@ -355,6 +388,8 @@ namespace Deckungsbeitrag
{
//Speichern von AUFTRAG
save = Auftrag.Save();
+ GetInventurCSV();
+
}
}
else
@@ -396,6 +431,58 @@ namespace Deckungsbeitrag
this.textBoxCont.Text = cont.ToString();
}
+ ///
+ /// CSV-Liste für Inventur erstellen.
+ /// Wenn Liste vorhanden werden Inventuren unten angehängt sonst wird Datei erstellt.
+ ///
+ private void GetInventurCSV()
+ {
+ Kunde _knd = Kunde.GetKunde(null, Auftrag.KundeID, null);
+ Benutzer _user = Benutzer.GetBenutzer(null, Auftrag.ErstelltVon);
+
+ string fileName = $"{_knd.KundeNummer}.csv"; // Immer gleiche Datei!
+ string inventurOrdner = ConfigurationManager.AppSettings["InventurPfad"] ?? "Inventur";
+ string csvPath = Path.Combine(Application.StartupPath, inventurOrdner, fileName);
+
+ // Prüfen ob Header schon existiert
+ bool headerExists = File.Exists(csvPath);
+
+ // Nur Header bei NEUER Datei
+ if (!headerExists)
+ {
+ var csv = new StringBuilder();
+ csv.AppendLine("=== INVENTUR INFO ===");
+ csv.AppendLine($"KundeNr: {_knd.KundeNummer}");
+ csv.AppendLine($"Kunde: {_knd.KundeName}");
+ csv.AppendLine(new string('=', 30));
+ csv.AppendLine();
+ csv.AppendLine("Erstellt am;Erstellt von;Liefertag;ArtikelNr;Bezeichnung;Stand;Fehlmenge;Korrektur;InventurDatum");
+ File.WriteAllText(csvPath, csv.ToString(), Encoding.UTF8);
+ }
+
+ // NEUE Artikel ANHÄNGEN (ohne Header)
+ var appendCsv = new StringBuilder();
+
+ foreach (DataGridViewRow row in this.dGArtikel.Rows.Cast()
+ .Where(row => row.Cells[0].Value != null))
+ {
+ appendCsv.AppendLine(string.Join(";", new object[]
+ {
+ Auftrag.Erstellt.Value.Date.ToString("yyyy-MM-dd"),
+ _user.Vorname + " " + _user.Nachname,
+ Auftrag.Liefertag.Date.ToString("yyyy-MM-dd"),
+ row.Cells[2].Value?.ToString().Replace(";", " ") ?? "",
+ row.Cells[3].Value?.ToString().Replace(";", " ") ?? "",
+ row.Cells[4].Value?.ToString() ?? "0",
+ row.Cells[5].Visible ? (row.Cells[5].Value?.ToString() ?? "0") : "",
+ row.Cells[6].Visible ? (row.Cells[6].Value?.ToString() ?? "0") : "",
+ }));
+ }
+
+ // ANHÄNGEN statt überschreiben
+ File.AppendAllText(csvPath, appendCsv.ToString(), Encoding.UTF8);
+ }
+
///
/// TextBox Events
///
@@ -522,32 +609,12 @@ namespace Deckungsbeitrag
default:
break;
}
-
- //if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Inventur)
- //{
- // if (this.kunde != null) Load_Gridview(this.kunde.KundeID.ToString(), (AuftragTyp)comboBoxTyp.SelectedValue);
- // this.dGArtikel.Enabled = this.dGArtikel.Visible = true;
- // this.Width = this.dGArtikel.Right + 25;
- // this.Height = this.dGArtikel.Bottom + this.buttonSpeichern.Height + 60;
- //}
- //if ((AuftragTyp)comboBoxTyp.SelectedValue >= AuftragTyp.Standerhöhung)
- //{
- // if (this.kunde != null) Load_Gridview(this.kunde.KundeID.ToString(), (AuftragTyp)comboBoxTyp.SelectedValue);
- // this.dGArtikel.Enabled = this.dGArtikel.Visible = true;
- // this.Width = this.dGArtikel.Right + 25;
- // this.Height = this.dGArtikel.Bottom + this.buttonSpeichern.Height + 60;
- //}
- //if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Standart)
- //{
- // this.dGArtikel.Enabled = this.dGArtikel.Visible = false;
- // this.Width = textBoxKundeName.Right + 30;
- // this.Height = 405;
- //}
}
private void comboBoxFahrer_Validating(object sender, CancelEventArgs e)
{
if (((ComboBox)sender).SelectedIndex == -1) return;
+ if (((Benutzer)((ComboBox)sender).SelectedItem).BenutzerID == this.benutzer.BenutzerID) return;
if (meldung.GetFrage(this, "Möchtest du den Auftrag wirklich einem anderen Fahrer zuteilen?", false) == DialogResult.No) { ((ComboBox)sender).SelectedIndex = -1; e.Cancel = true; }
else
{
@@ -557,6 +624,7 @@ namespace Deckungsbeitrag
}
}
+//CHANGES: CSV Datei wird erstellt oder bei jeder Inventur erweitert. (Einfach in Excel importieren und auswerten.)
//CHANGES: Liefertag errechnet sich jetzt aus dem Lieferrhythmus. Funktion wählt nächstmöglichen Liefertermin im Rhythmus. Bei Klick auf Tag bleibt alles gleich. (Auch mit Heute liefern?)
//CHANGES: Wenn Fahrer Auftrag erstellt wird beim Speichern standardmäßig seine ID als ArbeiterID gespeichert. Bedeutet ausführender = Fahrer selber.
//CHANGES: NeuerAuftrag wird jetzt mit Propertie AuftragTyp aufgerufen. Dadurch ist die Auswahl des AuftragTyp konstanter.
diff --git a/AA-Forms/FormTourenplanung.Designer.cs b/AA-Forms/FormTourenplanung.Designer.cs
index 127653f..2e81e1d 100644
--- a/AA-Forms/FormTourenplanung.Designer.cs
+++ b/AA-Forms/FormTourenplanung.Designer.cs
@@ -33,6 +33,8 @@
this.flowLayoutPanelKunden = new System.Windows.Forms.FlowLayoutPanel();
this.comboBoxFilter = new System.Windows.Forms.ComboBox();
this.buttonAddPage = new System.Windows.Forms.Button();
+ this.radioButtonSommer = new System.Windows.Forms.RadioButton();
+ this.radioButtonWinter = new System.Windows.Forms.RadioButton();
this.SuspendLayout();
//
// tabControlLKW
@@ -54,19 +56,22 @@
| System.Windows.Forms.AnchorStyles.Left)));
this.flowLayoutPanelKunden.AutoScroll = true;
this.flowLayoutPanelKunden.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
- this.flowLayoutPanelKunden.Location = new System.Drawing.Point(0, 36);
+ this.flowLayoutPanelKunden.ForeColor = System.Drawing.Color.Black;
+ this.flowLayoutPanelKunden.Location = new System.Drawing.Point(0, 43);
this.flowLayoutPanelKunden.Name = "flowLayoutPanelKunden";
- this.flowLayoutPanelKunden.Size = new System.Drawing.Size(204, 414);
+ this.flowLayoutPanelKunden.Size = new System.Drawing.Size(204, 407);
this.flowLayoutPanelKunden.TabIndex = 1;
//
// comboBoxFilter
//
+ this.comboBoxFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxFilter.FormattingEnabled = true;
- this.comboBoxFilter.Location = new System.Drawing.Point(0, 0);
+ this.comboBoxFilter.Location = new System.Drawing.Point(5, 7);
this.comboBoxFilter.Margin = new System.Windows.Forms.Padding(5);
this.comboBoxFilter.Name = "comboBoxFilter";
- this.comboBoxFilter.Size = new System.Drawing.Size(204, 28);
+ this.comboBoxFilter.Size = new System.Drawing.Size(199, 28);
this.comboBoxFilter.TabIndex = 2;
+ this.comboBoxFilter.SelectedIndexChanged += new System.EventHandler(this.comboBoxFilter_SelectedIndexChanged);
//
// buttonAddPage
//
@@ -78,7 +83,7 @@
this.buttonAddPage.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAddPage.ForeColor = System.Drawing.Color.Black;
this.buttonAddPage.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.buttonAddPage.Location = new System.Drawing.Point(647, 3);
+ this.buttonAddPage.Location = new System.Drawing.Point(647, 4);
this.buttonAddPage.Margin = new System.Windows.Forms.Padding(5);
this.buttonAddPage.Name = "buttonAddPage";
this.buttonAddPage.Size = new System.Drawing.Size(150, 28);
@@ -88,11 +93,49 @@
this.buttonAddPage.UseVisualStyleBackColor = false;
this.buttonAddPage.Click += new System.EventHandler(this.buttonAddPage_Click);
//
+ // radioButtonSommer
+ //
+ this.radioButtonSommer.Appearance = System.Windows.Forms.Appearance.Button;
+ this.radioButtonSommer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
+ this.radioButtonSommer.FlatAppearance.BorderSize = 0;
+ this.radioButtonSommer.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
+ this.radioButtonSommer.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.radioButtonSommer.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.radioButtonSommer.Location = new System.Drawing.Point(212, 5);
+ this.radioButtonSommer.Name = "radioButtonSommer";
+ this.radioButtonSommer.Size = new System.Drawing.Size(100, 30);
+ this.radioButtonSommer.TabIndex = 58;
+ this.radioButtonSommer.TabStop = true;
+ this.radioButtonSommer.Text = "Sommer";
+ this.radioButtonSommer.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.radioButtonSommer.UseVisualStyleBackColor = false;
+ this.radioButtonSommer.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+ //
+ // radioButtonWinter
+ //
+ this.radioButtonWinter.Appearance = System.Windows.Forms.Appearance.Button;
+ this.radioButtonWinter.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
+ this.radioButtonWinter.FlatAppearance.BorderSize = 0;
+ this.radioButtonWinter.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
+ this.radioButtonWinter.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.radioButtonWinter.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.radioButtonWinter.Location = new System.Drawing.Point(318, 5);
+ this.radioButtonWinter.Name = "radioButtonWinter";
+ this.radioButtonWinter.Size = new System.Drawing.Size(100, 30);
+ this.radioButtonWinter.TabIndex = 59;
+ this.radioButtonWinter.TabStop = true;
+ this.radioButtonWinter.Text = "Winter";
+ this.radioButtonWinter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.radioButtonWinter.UseVisualStyleBackColor = false;
+ this.radioButtonWinter.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+ //
// FormTourenplanung
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Controls.Add(this.radioButtonWinter);
+ this.Controls.Add(this.radioButtonSommer);
this.Controls.Add(this.buttonAddPage);
this.Controls.Add(this.comboBoxFilter);
this.Controls.Add(this.flowLayoutPanelKunden);
@@ -111,9 +154,11 @@
#endregion
- private System.Windows.Forms.TabControl tabControlLKW;
+ public System.Windows.Forms.TabControl tabControlLKW;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelKunden;
private System.Windows.Forms.ComboBox comboBoxFilter;
private System.Windows.Forms.Button buttonAddPage;
+ private System.Windows.Forms.RadioButton radioButtonSommer;
+ private System.Windows.Forms.RadioButton radioButtonWinter;
}
}
\ No newline at end of file
diff --git a/AA-Forms/FormTourenplanung.cs b/AA-Forms/FormTourenplanung.cs
index a1809a1..32e4a35 100644
--- a/AA-Forms/FormTourenplanung.cs
+++ b/AA-Forms/FormTourenplanung.cs
@@ -7,8 +7,10 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
+using System.Globalization;
using System.IO;
using System.Linq;
+using System.Runtime.CompilerServices;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
@@ -18,7 +20,10 @@ namespace Deckungsbeitrag.AA_Forms
{
public partial class FormTourenplanung : Form
{
+ private List kundenliste;
private Benutzer Benutzer;
+ Meldungen meldung = new Meldungen();
+
#region Form-Konstruktor
public FormTourenplanung()
@@ -31,7 +36,6 @@ namespace Deckungsbeitrag.AA_Forms
this.Cursor = Cursors.WaitCursor;
this.Benutzer = benutzer;
- LadeAlleTabs();
// Controls steuern nach BenutzerRolle
switch (this.Benutzer.Rolle)
@@ -65,23 +69,42 @@ namespace Deckungsbeitrag.AA_Forms
#endregion
private void FormTourenplanung_Load(object sender, EventArgs e)
{
- List kundenliste = Kunde.GetKundenTourenListe();
+ List list = Kunde.GetRegionDistinct();
+ this.comboBoxFilter.DataSource = list;
+ this.comboBoxFilter.SelectedIndex = -1;
- // Kunden hinzufügen
- foreach (Kunde kunde in kundenliste)
- {
- // Wenn kein Suchtext vorhanden, dann KundeName verwenden.
- KundenControl control = new KundenControl(kunde.Suchtext == string.Empty ? kunde.KundeName : kunde.Suchtext, kunde.Region);
- control.Tag = kunde;
- flowLayoutPanelKunden.Controls.Add(control);
- }
+ GetList(string.Empty);
// Breite des Panels anpassen damit die kompletten KundenControls sichtbar sind. +25 = ScrollBar Breite.
this.flowLayoutPanelKunden.Width = flowLayoutPanelKunden.Controls[0].Width + 25;
this.tabControlLKW.Location = new Point(this.flowLayoutPanelKunden.Right, this.tabControlLKW.Location.Y);
}
+ private void GetList(string region)
+ {
+ this.Cursor = Cursors.WaitCursor;
+ this.SuspendLayout();
+ this.kundenliste = Kunde.GetKundenTourenListe(region);
+
+ Load_flowlayoutpanelKunden();
+
+ this.ResumeLayout();
+ this.Cursor = Cursors.Default;
+ }
+ private void Load_flowlayoutpanelKunden()
+ {
+ this.flowLayoutPanelKunden.Controls.Clear();
+
+ // Kunden hinzufügen
+ foreach (Kunde kunde in kundenliste)
+ {
+ // Wenn kein Suchtext vorhanden, dann KundeName verwenden.
+ KundenControl control = new KundenControl(kunde);
+ control.Tag = kunde;
+ flowLayoutPanelKunden.Controls.Add(control);
+ }
+ }
#region TabControl-Funktionen
// 1. TabPage wird hinzugefügt.
@@ -96,7 +119,7 @@ namespace Deckungsbeitrag.AA_Forms
// 2. Umbennen mit DoppelClick starten
private void tabControlLKW_MouseDoubleClick(object sender, MouseEventArgs e)
{
- if(this.Benutzer.Rolle == BenutzerRolle.Admin || this.Benutzer.Rolle == BenutzerRolle.Verwaltung)
+ if (this.Benutzer.Rolle == BenutzerRolle.Admin || this.Benutzer.Rolle == BenutzerRolle.Verwaltung)
{
for (int i = 0; i < tabControlLKW.TabCount; i++)
{
@@ -119,6 +142,7 @@ namespace Deckungsbeitrag.AA_Forms
}
private void tabControlLKW_SelectedIndexChanged(object sender, EventArgs e)
{
+ if (tabControlLKW.SelectedTab == null) return;
if (tabControlLKW.SelectedTab.Controls.Count == 0)
{
UCTabPageLKW uc = new UCTabPageLKW();
@@ -126,7 +150,7 @@ namespace Deckungsbeitrag.AA_Forms
tabControlLKW.SelectedTab.Controls.Add(uc);
}
}
- private void SpeichereAlleTabs()
+ private void SpeichereAlleTabs(RadioButton rb)
{
var alleTabs = new List();
@@ -142,15 +166,27 @@ namespace Deckungsbeitrag.AA_Forms
{
WriteIndented = true
});
- File.WriteAllText("lkw-touren.json", json);
+
+ if (rb.Text == "Sommer") File.WriteAllText("lkw-touren-sommer.json", json);
+ else File.WriteAllText("lkw-touren-winter.json", json);
}
private void LadeAlleTabs()
{
- if (!File.Exists("lkw-touren.json")) return;
+ string json = string.Empty;
+
+ if (this.radioButtonSommer.Checked)
+ {
+ if (!File.Exists("lkw-touren-sommer.json")) return;
+ else json = File.ReadAllText("lkw-touren-sommer.json");
+ }
+ else
+ {
+ if (!File.Exists("lkw-touren-winter.json")) return;
+ else json = File.ReadAllText("lkw-touren-winter.json");
+ }
try
{
- string json = File.ReadAllText("lkw-touren.json");
var tabDaten = JsonSerializer.Deserialize>(json);
// Bestehende Tabs löschen
@@ -187,18 +223,149 @@ namespace Deckungsbeitrag.AA_Forms
private void FormTourenplanung_FormClosing(object sender, FormClosingEventArgs e)
{
- SpeichereAlleTabs();
-
+ foreach (RadioButton rb in this.Controls.OfType()) if (rb.Checked) SpeichereAlleTabs(rb);
}
private void FormTourenplanung_Shown(object sender, EventArgs e)
{
+ this.tabControlLKW.Width = this.Width - flowLayoutPanelKunden.Right - 20;
this.Cursor = Cursors.Default;
}
+
+ ///
+ /// Hier werden die KundenControl-Clone gezählt und kontrolliert ob die maximale Cloneanzahl bereits existiert.
+ /// Max. Cloneanzahl ist abhängig vom hinterlegten Lieferrhythmus.
+ ///
+ ///
+ ///
+ /// true wenn noch KundenControl-Clone verfügbar sind
+ public static bool KundenControlToClone(FormTourenplanung form, KundenControl kundectr)
+ {
+ Kunde _kunde = (Kunde)kundectr.Tag;
+ int maxAllowed = 0;
+ int saisonrhythmus = 0;
+
+ if (form.radioButtonSommer.Checked) { maxAllowed = Lieferrhythmen.GetMaxClonesNet48((Liefertage)_kunde.SommerLieferRhythmus); saisonrhythmus = _kunde.SommerLieferRhythmus; }
+ else { maxAllowed = Lieferrhythmen.GetMaxClonesNet48((Liefertage)_kunde.WinterLieferRhythmus); saisonrhythmus = _kunde.WinterLieferRhythmus; }
+
+
+ // Global über ALLE Tabs/Panels zählen
+ int count = 0;
+ foreach (TabPage tab in form.tabControlLKW.TabPages)
+ {
+ // 1. TabPage → UserControl finden
+ foreach (Control ctrl in tab.Controls)
+ {
+ if (ctrl is UserControl tabUserControl)
+ {
+ // 2. UserControl → 5 FlowLayoutPanels durchsuchen
+ foreach (Control subCtrl in tabUserControl.Controls)
+ {
+ if (subCtrl is TableLayoutPanel tablePanel)
+ {
+ foreach (Control subsubCtrl in tablePanel.Controls)
+ {
+ if (subsubCtrl is FlowLayoutPanel flowPanel)
+ {
+ count += flowPanel.Controls.OfType()
+ .Count(c => ((Kunde)c.Tag).KundeID == _kunde.KundeID);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (count >= maxAllowed)
+ {
+ MessageBox.Show($"Maximum {maxAllowed} für {Lieferrhythmen.GetAnzeigeText((Liefertage)saisonrhythmus)} erreicht!");
+ return false;
+ }
+ return true;
+ }
+
+ private void comboBoxFilter_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (this.comboBoxFilter.SelectedIndex != -1) GetList((string)this.comboBoxFilter.SelectedItem);
+ }
+
+ public static void KundenControlToDelete(FormTourenplanung form, KundenControl kundectr)
+ {
+ Kunde _knd = (Kunde)kundectr.Tag;
+ int saisonrhythmus = 0;
+
+ if (form.radioButtonSommer.Checked) { saisonrhythmus = _knd.SommerLieferRhythmus; }
+ else { saisonrhythmus = _knd.WinterLieferRhythmus; }
+ // Global über ALLE Tabs/Panels zählen
+ foreach (TabPage tab in form.tabControlLKW.TabPages)
+ {
+ // 1. TabPage → UserControl finden
+ foreach (Control ctrl in tab.Controls)
+ {
+ if (ctrl is UserControl tabUserControl)
+ {
+ // 2. UserControl → 5 FlowLayoutPanels durchsuchen
+ foreach (Control subCtrl in tabUserControl.Controls)
+ {
+ if (subCtrl is TableLayoutPanel tablePanel)
+ {
+ foreach (Control subsubCtrl in tablePanel.Controls)
+ {
+ if (subsubCtrl is FlowLayoutPanel flowPanel)
+ {
+ // Zu List konvertieren, damit während Iteration nicht modifiziert wird
+ foreach (KundenControl kc in flowPanel.Controls.OfType().ToList())
+ {
+ if(_knd == (Kunde)kc.Tag)
+ {
+ DayOfWeek dropDay = DayOfWeek.Sunday;
+ switch (flowPanel.Tag.ToString())
+ {
+ case "MO":
+ dropDay = DayOfWeek.Monday; break;
+ case "DI":
+ dropDay = DayOfWeek.Tuesday; break;
+ case "MI":
+ dropDay = DayOfWeek.Wednesday; break;
+ case "DO":
+ dropDay = DayOfWeek.Thursday; break;
+ case "FR":
+ dropDay = DayOfWeek.Friday; break;
+ default:
+ break;
+ }
+
+ if (!UCTabPageLKW.IstTagEnthalten((Liefertage)saisonrhythmus, dropDay))
+ flowPanel.Controls.Remove(kc);
+
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ private void radioButton_CheckedChanged(object sender, EventArgs e)
+ {
+ RadioButton rb = sender as RadioButton;
+ if (!rb.Checked) SpeichereAlleTabs(rb);
+ if (rb.Checked) LadeAlleTabs();
+ }
}
}
+//CHANGES: Es wir kontrolliert ob der gewählte Liefertag zum hinterlegten Lieferrhythmus passt.
+//CHANGES: Es kann nach der Kontrolle der Lieferrhythmus geändert werden. Dazu muss auch die Anzahl der Liefertage gewählt werden.
+//CHANGES: ComboBox kann zum Filtern der Kunden verwendet werden.
+//CHANGES: Es können nur so viele Clone erstellt werden wie Liefertag im Lieferrhythmus hinterlegt sind.
//DONE: Testen ob umbenennen funktioniert.
-//TODO: Max Clones von PanelKunde zu PanelTourenplanung. (Lieferrythmus eingeben?)
-//TODO: Speichern der Touren ermöglichen. Eventuell über .json oder .xml Datei?
+//DONE: Max Clones von PanelKunde zu PanelTourenplanung. (Lieferrythmus eingeben?)
+//DONE: Speichern der Touren ermöglichen. Eventuell über .json oder .xml Datei?
//TODO: Filter für Regionen ermöglichen.
-//TODO: Funktioniert mehrere KundenControls auf einmal DragDrop?
\ No newline at end of file
+//TODO: Funktioniert mehrere KundenControls auf einmal DragDrop?
+//TODO: Wenn der Lieferrhythmus geändert wurde müssen alle Clone von falschen Tagen gelöscht werden.
\ No newline at end of file
diff --git a/AA-Klassen/Artikel.cs b/AA-Klassen/Artikel.cs
index fb87b6d..3fefce4 100644
--- a/AA-Klassen/Artikel.cs
+++ b/AA-Klassen/Artikel.cs
@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using BrightIdeasSoftware;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
+using System.Configuration;
namespace DatenDB
{
diff --git a/AA-Klassen/Auftrag.cs b/AA-Klassen/Auftrag.cs
index ea3957d..70597ad 100644
--- a/AA-Klassen/Auftrag.cs
+++ b/AA-Klassen/Auftrag.cs
@@ -1,4 +1,5 @@
using BrightIdeasSoftware;
+using Deckungsbeitrag;
using Npgsql;
using System;
using System.Collections.Generic;
@@ -238,6 +239,70 @@ namespace DatenDB
if(result > 0) return true;
else return false;
}
+ public static int[] GetContainerAnzahlen(int? kundeId)
+ {
+ const string sql = @"
+ SELECT
+ COALESCE(MAX(container_clean), 0) as max_clean,
+ COALESCE(ROUND(AVG(container_clean)), 0) as avg_clean,
+ COALESCE(MIN(container_clean), 0) as min_clean
+ FROM {0}
+ WHERE (@kundeId IS NULL OR kunde_id = @kundeId)";
+
+ NpgsqlConnection connection = null;
+ NpgsqlCommand command = null;
+ NpgsqlDataReader reader = null;
+
+ try
+ {
+ connection = DatenbankConnection.GetConnection();
+ connection.Open();
+
+ command = new NpgsqlCommand(string.Format(sql, TABLE), connection);
+ command.Parameters.AddWithValue("kundeId", kundeId ?? (object)DBNull.Value);
+
+ reader = command.ExecuteReader();
+ if (reader.Read())
+ {
+ return new[]
+ {
+ reader.GetInt32(0),
+ reader.GetInt32(1),
+ reader.GetInt32(2)
+ };
+ }
+ return new[] { 0, 0, 0 };
+ }
+ finally
+ {
+ reader?.Close();
+ command?.Dispose();
+ connection?.Close();
+ }
+ }
+
+ public static int[] GetContaineranzahl(int? kundeId)
+ {
+ int[] result = { 0, 0, 0 };
+ int i = 0;
+ DatenbankConnection.GetConnection().Open();
+ NpgsqlCommand command = new NpgsqlCommand();
+
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select max(container_clean), avg(container_clean), min(container_clean) from {TABLE} where kunde_id = {kundeId}";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read())
+ {
+ result[i] = reader.IsDBNull(i) ? 0 : reader.GetInt16(i);
+ i++;
+ }
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+
+
+ return result;
+ }
public Auftrag(NpgsqlDataReader reader)
{
diff --git a/AA-Klassen/Funktionen.cs b/AA-Klassen/Funktionen.cs
index d308a7e..1b2ed35 100644
--- a/AA-Klassen/Funktionen.cs
+++ b/AA-Klassen/Funktionen.cs
@@ -12,6 +12,7 @@ using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime;
+using System.Runtime.CompilerServices;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
@@ -1053,22 +1054,23 @@ namespace Deckungsbeitrag
string text = gb.Text;
Font font = gb.Font;
Size textSize = TextRenderer.MeasureText(text, font);
+ Pen pen = new Pen(Color.FromArgb(1, 53, 101), 2);
int textWidth = textSize.Width;
int textHeight = textSize.Height;
- Pen pen = new Pen(Color.FromArgb(1, 53, 101), 2);
+ if (gb.Parent.Name == "FormExpedit") pen = new Pen(Color.Red, 3);
- int offset = 6; // Abstand von links zum Text
+ int offset = 9; // Abstand von links zum Text
// Rechteck für äußeren Rahmen
- Rectangle rect = new Rectangle(2, textHeight / 2, gb.Width - 3, gb.Height - textHeight / 2 - 1);
+ Rectangle rect = new Rectangle(1, textHeight / 2, gb.Width - 3, gb.Height - textHeight / 2 - 2);
// Obere linke Linie (links bis zum linken Rand des Textes)
- e.Graphics.DrawLine(pen, rect.Left, rect.Top, offset, rect.Top);
+ e.Graphics.DrawLine(pen, rect.Left - 1, rect.Top, offset, rect.Top);
// Obere rechte Linie (rechts vom Text bis zum rechten Rand)
- e.Graphics.DrawLine(pen, offset + textWidth, rect.Top, rect.Right, rect.Top);
+ e.Graphics.DrawLine(pen, offset + textWidth - 5, rect.Top, rect.Right + 2, rect.Top);
// Linke vertikale Linie
e.Graphics.DrawLine(pen, rect.Left, rect.Top, rect.Left, rect.Bottom);
@@ -1077,7 +1079,7 @@ namespace Deckungsbeitrag
e.Graphics.DrawLine(pen, rect.Right, rect.Top, rect.Right, rect.Bottom);
// Untere Linie
- e.Graphics.DrawLine(pen, rect.Left, rect.Bottom, rect.Right, rect.Bottom);
+ e.Graphics.DrawLine(pen, rect.Left - 1, rect.Bottom, rect.Right + 2, rect.Bottom);
return gb;
}
@@ -1113,7 +1115,7 @@ namespace Deckungsbeitrag
DateTime aktDatum = DateTime.Today;
// Starte ab morgen und suche nächsten passenden Arbeitstag
- for (int i = 1; i <= 7; i++)
+ for (int i = 2; i <= 7; i++)
{
DateTime testDatum = aktDatum.AddDays(i);
DayOfWeek dow = testDatum.DayOfWeek;
@@ -1146,5 +1148,86 @@ namespace Deckungsbeitrag
return aktDatum.AddDays(7);
}
+ public static Chart Load_FehlmengeChart(List artikelDaten, Chart chart1)
+ {
+ chart1.Series.Clear();
+
+ Title title = new Title();
+ title.Text = Kunde.GetKunde(null, artikelDaten[0].KundeID, null).KundeName;
+ title.Font = new Font("Arial", 12, FontStyle.Bold);
+ title.ForeColor = Color.White;
+ title.BackColor = Color.Transparent;
+
+ title.Position = new ElementPosition(0, 0, 100, 8); // X,Y,Breite,Höhe (Prozent)
+ title.Alignment = ContentAlignment.TopCenter;
+ title.Docking = Docking.Top;
+ title.DockingOffset = 0;
+
+
+ chart1.Titles.Clear();
+ chart1.Titles.Add(title);
+
+ chart1.ChartAreas[0].Position = new ElementPosition(0, 8, 100, 92);
+
+ // Gesamtmenge als einzelne Säule (links oder transparent)
+ var serieGesamt = new Series("Gesamtmenge") { ChartType = SeriesChartType.Bar };
+ serieGesamt.CustomProperties = "DrawSideBySide=False, PointWidth=0.8";
+ //chart1.Series.Add(serieGesamt);
+
+ // Gestapelte Fehler-Serie (rechts darüber)
+ var serieFehler = new Series("Fehlmenge")
+ {
+ ChartType = SeriesChartType.StackedBar,
+ Color = Color.Orange
+ };
+ var serieReklamation = new Series("Reklamation")
+ {
+ ChartType = SeriesChartType.StackedBar,
+ Color = Color.Red
+ };
+
+ for (int i = 0; i < artikelDaten.Count; i++)
+ {
+ var daten = artikelDaten[i];
+ double index = i; // Gleicher X-Wert für alle Serien
+
+ serieGesamt.Points.AddXY(index, daten.Stand);
+ serieFehler.Points.AddXY(index, daten.Fehlmenge);
+ serieReklamation.Points.AddXY(index, daten.Reklamation);
+
+ // Label setzen (X-Achse zeigt Artikelnamen)
+ string label = daten.ArtikelName;
+ if (label.Length > 10)
+ label = label.Substring(0, 10) + "...";
+
+ serieGesamt.Points[i].AxisLabel = label;
+ }
+
+ chart1.Series.Add(serieGesamt);
+ chart1.Series.Add(serieFehler);
+ chart1.Series.Add(serieReklamation);
+
+ // Legende wird ausgeblendet
+ chart1.Legends.Clear();
+
+ // Für Y-Achse (Mengen) WAAGERECHT
+ chart1.ChartAreas[0].AxisY.LabelStyle.ForeColor = Color.White;
+ chart1.ChartAreas[0].AxisY.TitleForeColor = Color.White;
+ chart1.ChartAreas[0].AxisY.LabelStyle.Font = new Font("Arial", 9, FontStyle.Bold);
+
+ // Für X-Achse (Mengen) SENKRECHT
+ chart1.ChartAreas[0].AxisX.LabelStyle.ForeColor = Color.White;
+ chart1.ChartAreas[0].AxisX.TitleForeColor = Color.White;
+ chart1.ChartAreas[0].AxisX.LabelStyle.Font = new Font("Arial", 7, FontStyle.Regular);
+ chart1.ChartAreas[0].AxisX.LabelStyle.Angle = -45; // Schräg für mehr Platz
+
+ // Gitterlinien (optional)
+ chart1.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.LightGray;
+ chart1.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.LightGray;
+
+ return chart1;
+ }
+
+
}
}
\ No newline at end of file
diff --git a/AA-Klassen/Kunde.cs b/AA-Klassen/Kunde.cs
index a97b85b..0f09864 100644
--- a/AA-Klassen/Kunde.cs
+++ b/AA-Klassen/Kunde.cs
@@ -16,8 +16,8 @@ namespace DatenDB
public class Kunde
{
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
- public const string COLUMNS = "kunde_id, tour_id, kunde_nr, name1, name2, straße, plz, bezeichnung, land, aktiv, bettenanzahl, kunde_gruppe, service, region, waescheart, suchtext, aufgabe, anmerkung, aufgabe_count, lieferrhythmus";
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ public const string COLUMNS = "kunde_id, tour_id, kunde_nr, name1, name2, straße, plz, bezeichnung, land, aktiv, bettenanzahl, kunde_gruppe, service, region, waescheart, suchtext, aufgabe, anmerkung, aufgabe_count, sommerlieferrhythmus, winterlieferrhythmus";
private const string RED_COLUMNS = "kunde_id, tour_id, kunde_nr, name1, name2, straße, plz, bezeichnung, land, aktiv, bettenanzahl, kunde_gruppe, service, region, waescheart, jahr, umsatz";
public const string TABLE = "kundenverwaltung.kunde";
public const string VIEW = "kundenverwaltung.jahresumsaetze"; //RICHTIGE VIEW AUSSUCHEN FÜR INAKTIVE MIT LETZTEN UMSATZ...
@@ -86,37 +86,21 @@ namespace DatenDB
return resultList;
}
- internal static List GetKundenTourenListe()
+ internal static List GetKundenTourenListe(string region)
{
DatenbankConnection.GetConnection().Open();
List resultList = new List();
using (NpgsqlCommand command = new NpgsqlCommand())
{
command.Connection = DatenbankConnection.GetConnection();
- command.CommandText = $"select {COLUMNS} from {TABLE} where aktiv = true and service = 'Lieferservice' order by region asc";
+ if (region == string.Empty) command.CommandText = $"select {COLUMNS} from {TABLE} where aktiv = true and service = 'Lieferservice' order by region asc";
+ else command.CommandText = $"select {COLUMNS} from {TABLE} where aktiv = true and service = 'Lieferservice' and region = '{region}' order by region asc";
NpgsqlDataReader reader = command.ExecuteReader();
- while (reader.Read()) resultList.Add(new Kunde(reader, false));
+ while (reader.Read()) resultList.Add(new Kunde(reader));
reader.Close();
}
DatenbankConnection.GetConnection().Close();
- foreach (Kunde kunde in resultList)
- {
- List list = new List();
- list = OLVKundenumsatz.GetJahresumsatz(kunde.KundeID);
- if (list.Count > 0)
- {
- kunde.Zeitraum = double.Parse(OLVKundenumsatz.GetJahresumsatz(kunde.KundeID).Last().Zeitraum);
- kunde.Umsatz1 = OLVKundenumsatz.GetJahresumsatz(kunde.KundeID).Last().Umsatz;
- }
- else
- {
- kunde.Zeitraum = 0;
- kunde.Umsatz1 = 0;
- }
-
- }
-
return resultList;
}
public static List GetList(bool? isaktiv, string text)
@@ -224,8 +208,8 @@ namespace DatenDB
this.Aufgabe = reader.IsDBNull(16) ? null : (int?)reader.GetInt32(16);
this.Anmerkung = reader.IsDBNull(17) ? string.Empty : reader.GetString(17);
this.AufgabeCount = reader.IsDBNull(18) ? 0 : reader.GetInt32(18);
- this.LieferRhythmus = reader.IsDBNull(19) ? (int)Lieferrhythmen.Unbekannt : reader.GetInt16(19);
-
+ this.SommerLieferRhythmus = reader.IsDBNull(19) ? (int)Lieferrhythmen.Unbekannt : reader.GetInt16(19);
+ this.WinterLieferRhythmus = reader.IsDBNull(20) ? (int)Lieferrhythmen.Unbekannt : reader.GetInt16(20);
}
}
public Kunde(NpgsqlDataReader reader)
@@ -249,8 +233,8 @@ namespace DatenDB
this.Aufgabe = reader.IsDBNull(16) ? null : (int?)reader.GetInt32(16);
this.Anmerkung = reader.IsDBNull(17) ? string.Empty : reader.GetString(17);
this.AufgabeCount = reader.IsDBNull(18) ? 0 : reader.GetInt32(18);
- this.LieferRhythmus = reader.IsDBNull(19) ? (int)Lieferrhythmen.Unbekannt : reader.GetInt16(19);
-
+ this.SommerLieferRhythmus = reader.IsDBNull(19) ? (int)Lieferrhythmen.Unbekannt : reader.GetInt16(19);
+ this.WinterLieferRhythmus = reader.IsDBNull(20) ? (int)Lieferrhythmen.Unbekannt : reader.GetInt16(20);
}
public int Save()
{
@@ -262,13 +246,13 @@ namespace DatenDB
if (this.KundeID.HasValue & this.KundeID != 0)
{
- command.CommandText = $"update {TABLE} set tour_id = :p1, kunde_nr = :p2, name1 = :p3, name2 = :p4, straße = :p5, plz = :p6, bezeichnung = :p7, land = :p8, aktiv = :p9, bettenanzahl = :p10, kunde_gruppe = :p11, service = :p12, region = :p13, waescheart = :p14, suchtext = :p15, aufgabe = :p16, anmerkung = :p17, aufgabe_count = :p18, lieferrhythmus = :p19 WHERE kunde_id = :p0";
+ command.CommandText = $"update {TABLE} set tour_id = :p1, kunde_nr = :p2, name1 = :p3, name2 = :p4, straße = :p5, plz = :p6, bezeichnung = :p7, land = :p8, aktiv = :p9, bettenanzahl = :p10, kunde_gruppe = :p11, service = :p12, region = :p13, waescheart = :p14, suchtext = :p15, aufgabe = :p16, anmerkung = :p17, aufgabe_count = :p18, sommerlieferrhythmus = :p19, winterlieferrhythmus = :p20 WHERE kunde_id = :p0";
}
else
{
command.CommandText = "select nextval('kundenverwaltung.kunde_seq')";
this.KundeID = (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, :p18, :p19)";
+ 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, :p18, :p19, :p20)";
}
command.Parameters.AddWithValue("p0", this.KundeID);
@@ -290,9 +274,10 @@ namespace DatenDB
command.Parameters.AddWithValue("p16", this.Aufgabe ?? (object)DBNull.Value);
command.Parameters.AddWithValue("p17", string.IsNullOrWhiteSpace(this.Anmerkung) ? (object)DBNull.Value : this.Anmerkung);
command.Parameters.AddWithValue("p18", this.AufgabeCount ?? (object)DBNull.Value);
- command.Parameters.AddWithValue("p19", this.LieferRhythmus);
+ command.Parameters.AddWithValue("p19", this.SommerLieferRhythmus);
+ command.Parameters.AddWithValue("p20", this.WinterLieferRhythmus);
- int result = command.ExecuteNonQuery();
+ int result = command.ExecuteNonQuery();
DatenbankConnection.GetConnection().Close();
return result;
}
@@ -330,6 +315,21 @@ namespace DatenDB
}
}
+ internal static List GetRegionDistinct()
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"SELECT distinct region FROM {TABLE} where region is not null order by region ASC";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(reader.GetString(0));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+
+ return resultList;
+ }
+
#region Properties
[OLVIgnore]
@@ -414,7 +414,8 @@ namespace DatenDB
[OLVIgnore]
public string Anmerkung { get; set; }
[OLVIgnore]
- public int LieferRhythmus { get; set; }
+ public int SommerLieferRhythmus { get; set; }
+ public int WinterLieferRhythmus { get; set; }
#endregion
}
}
\ No newline at end of file
diff --git a/AA-Klassen/KundeArtikel.cs b/AA-Klassen/KundeArtikel.cs
index 1754ead..f79eefa 100644
--- a/AA-Klassen/KundeArtikel.cs
+++ b/AA-Klassen/KundeArtikel.cs
@@ -1,6 +1,7 @@
using Npgsql;
using System;
using System.Collections.Generic;
+using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -11,7 +12,7 @@ namespace DatenDB
public class KundeArtikel
{
// 0 1 2 3 4 5 6 7 8 9
- private static string COLUMNS = "kunde_artikel_id, kunde_id, artikel_nr, artikel_name, stand, fehlmenge, stand_bearbeitet, fehlmenge_bearbeitet, korrektur, korrektur_bearbeitet";
+ private static string COLUMNS = "kunde_artikel_id, kunde_id, artikel_nr, artikel_name, stand, fehlmenge, stand_bearbeitet, fehlmenge_bearbeitet, korrektur, korrektur_bearbeitet, reklamation";
private static string TABLE = "kundenverwaltung.kunde_artikel";
public KundeArtikel() { }
@@ -68,13 +69,13 @@ namespace DatenDB
command.Connection = DatenbankConnection.GetConnection();
if (this.KundeArtikelID.HasValue & this.KundeArtikelID != 0)
{
- command.CommandText = $"update {TABLE} set kunde_id = :p1, artikel_nr = :p2, artikel_name = :p3, stand = :p4, fehlmenge = :p5, stand_bearbeitet = :p6, fehlmenge_bearbeitet = :p7, korrektur = :p8, korrektur_bearbeitet = :p9 WHERE kunde_artikel_id = :p0";
+ command.CommandText = $"update {TABLE} set kunde_id = :p1, artikel_nr = :p2, artikel_name = :p3, stand = :p4, fehlmenge = :p5, stand_bearbeitet = :p6, fehlmenge_bearbeitet = :p7, korrektur = :p8, korrektur_bearbeitet = :p9, reklamation = :p10 WHERE kunde_artikel_id = :p0";
}
else
{
command.CommandText = "select nextval('kundenverwaltung.kunde_artikel_seq')";
this.KundeArtikelID = (int)(long)command.ExecuteScalar();
- command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9)";
+ command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9, :p10)";
}
command.Parameters.AddWithValue("p0", this.KundeArtikelID.Value);
@@ -87,6 +88,7 @@ namespace DatenDB
command.Parameters.AddWithValue("p7", string.IsNullOrWhiteSpace(this.FehlmengeBearbeitet) ? (object)DBNull.Value : this.FehlmengeBearbeitet);
command.Parameters.AddWithValue("p8", this.Korrektur);
command.Parameters.AddWithValue("p9", string.IsNullOrWhiteSpace(this.KorrekturBearbeitet) ? (object)DBNull.Value : this.KorrekturBearbeitet);
+ command.Parameters.AddWithValue("p10", this.Reklamation);
int result = command.ExecuteNonQuery();
DatenbankConnection.GetConnection().Close();
@@ -123,6 +125,39 @@ namespace DatenDB
}
+ internal static async Task> LoadArtikelDatenAsync(Kunde kunde)
+ {
+ var artikelDaten = new List();
+
+ string connectionString = ConfigurationManager.AppSettings["ConnectionString"];
+
+ await Task.Run(() =>
+ {
+ using (var conn = new NpgsqlConnection(connectionString))
+ {
+ conn.Open();
+ using (var cmd = new NpgsqlCommand($"SELECT artikel_name, stand, fehlmenge, kunde_id, reklamation FROM {TABLE} WHERE kunde_id = {kunde.KundeID}", conn))
+ {
+ using (var reader = cmd.ExecuteReader())
+ {
+ while (reader.Read())
+ {
+ artikelDaten.Add(new KundeArtikel
+ {
+ ArtikelName = reader.GetString(0),
+ Stand = reader.GetInt32(1),
+ Fehlmenge = reader.GetInt32(2),
+ KundeID = reader.GetInt32(3),
+ Reklamation = reader.IsDBNull(4) ? 0 : reader.GetInt32(4)
+ });
+ }
+ }
+ }
+ }
+ });
+
+ return artikelDaten;
+ }
public KundeArtikel(NpgsqlDataReader reader)
{
@@ -136,6 +171,7 @@ namespace DatenDB
this.FehlmengeBearbeitet = reader.IsDBNull(7) ? string.Empty : reader.GetString(7);
this.Korrektur = reader.IsDBNull(8) ? 0 : reader.GetInt32(8);
this.KorrekturBearbeitet = reader.IsDBNull(9) ? string.Empty : reader.GetString(9);
+ this.Reklamation = reader.IsDBNull(10) ? 0 : reader.GetInt32(10);
}
public int? KundeArtikelID { get; set; }
@@ -148,6 +184,8 @@ namespace DatenDB
public string FehlmengeBearbeitet { get; set; }
public int Korrektur { get; set; }
public string KorrekturBearbeitet { get; set; }
+ public int Reklamation { get; set; }
}
}
+//INSTALL-REMINDER: Spalte Reklamation in Wirl_DB_17012023 einfügen
\ No newline at end of file
diff --git a/AA-Klassen/Lieferrhythmus.cs b/AA-Klassen/Lieferrhythmus.cs
index 9c906e2..6ebc764 100644
--- a/AA-Klassen/Lieferrhythmus.cs
+++ b/AA-Klassen/Lieferrhythmus.cs
@@ -50,6 +50,24 @@ namespace Deckungsbeitrag.AA_Klassen
{ "4x Mo/Di/Do/Fr", ViermalMoDiDoFr },
{ "Täglich Mo-Fr", TaeglichMoFr }
};
+ private static readonly Dictionary RhythmusAnzeige = AnzeigeNamen
+ .ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
+
+ public static int GetMaxClonesNet48(this Liefertage liefertage)
+ {
+ int count = 0;
+ uint flag = (uint)liefertage;
+ while (flag != 0)
+ {
+ count++;
+ flag &= flag - 1; // rechtes Bit löschen
+ }
+ return count;
+ }
+ public static string GetAnzeigeText(this Liefertage rhythmus)
+ {
+ return RhythmusAnzeige.TryGetValue(rhythmus, out string text) ? text : "Unbekannt";
+ }
}
diff --git a/AA-Klassen/Saison.cs b/AA-Klassen/Saison.cs
new file mode 100644
index 0000000..fcfa0ba
--- /dev/null
+++ b/AA-Klassen/Saison.cs
@@ -0,0 +1,98 @@
+using DatenDB;
+using Npgsql;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Web.UI.WebControls;
+
+namespace Deckungsbeitrag.AA_Klassen
+{
+ internal class Saison
+ {
+ public const string COLUMNS = "saison_id, bezeichnung, start_date, end_date, aktiv";
+ private const string TABLE = "kundenverwaltung.saison";
+
+ public static Saison GetAktivSaison()
+ {
+ DatenbankConnection.GetConnection().Open();
+ Saison saison = null;
+ using (NpgsqlCommand command = new NpgsqlCommand())
+ {
+ command.Connection = DatenbankConnection.GetConnection();
+
+ command.CommandText = $"select {COLUMNS} from {TABLE} where aktiv = {true}";
+
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) saison = new Saison(reader);
+ reader.Close();
+ }
+ DatenbankConnection.GetConnection().Close();
+
+ return saison;
+ }
+ public static List LadeSaisons()
+ {
+ DatenbankConnection.GetConnection().Open();
+ List resultList = new List();
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+ command.CommandText = $"select {COLUMNS} from {TABLE} order by bezeichnung";
+ NpgsqlDataReader reader = command.ExecuteReader();
+ while (reader.Read()) resultList.Add(new Saison(reader));
+ reader.Close();
+ DatenbankConnection.GetConnection().Close();
+ return resultList;
+ }
+
+ public Saison(NpgsqlDataReader reader)
+ {
+ this.SaisonId = reader.GetInt32(0);
+ this.Bezeichnung = reader.GetString(1);
+ this.StartDatum = reader.IsDBNull(2) ? (DateTime?)null : reader.GetDateTime(2);
+ this.EndDatum = reader.IsDBNull(3) ? (DateTime?)null : reader.GetDateTime(3);
+ this.Aktiv = reader.GetBoolean(4);
+ }
+
+
+ public int? SaisonId { get; set; }
+ public string Bezeichnung { get; set; }
+ public bool Aktiv { get; set; }
+ public DateTime? StartDatum { get; set; }
+ public DateTime? EndDatum { get; set; }
+
+ public override string ToString() => Bezeichnung;
+
+ public int Save()
+ {
+ DatenbankConnection.GetConnection().Open();
+
+ NpgsqlCommand command = new NpgsqlCommand();
+ command.Connection = DatenbankConnection.GetConnection();
+
+ if (this.SaisonId.HasValue & this.SaisonId != 0)
+ {
+ command.CommandText = $"update {TABLE} set bezeichnung = :p1, start_date = :p2, end_date = :p3, aktiv = :p4 where saison_id = :p0";
+ }
+ else
+ {
+ command.CommandText = "select nextval('kundenverwaltung.saison_seq')";
+ this.SaisonId = (int)(long)command.ExecuteScalar();
+ command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4)";
+ }
+
+ command.Parameters.AddWithValue("p0", this.SaisonId);
+ command.Parameters.AddWithValue("p1", this.Bezeichnung);
+ command.Parameters.AddWithValue("p2", this.StartDatum.HasValue ? this.StartDatum.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p3", this.EndDatum.HasValue ? this.EndDatum.Value : (object)DBNull.Value);
+ command.Parameters.AddWithValue("p4", this.Aktiv);
+
+ int result = command.ExecuteNonQuery();
+ DatenbankConnection.GetConnection().Close();
+ return result;
+ }
+
+ }
+}
diff --git a/AA-Klassen/TourenDaten.cs b/AA-Klassen/TourenDaten.cs
index 975d97d..e205078 100644
--- a/AA-Klassen/TourenDaten.cs
+++ b/AA-Klassen/TourenDaten.cs
@@ -11,7 +11,7 @@ namespace Deckungsbeitrag.AA_Klassen
{
public string FahrzeugName { get; set; }
public List KundenProTag { get; set; } = new List(); // [(Tag, Kunden[]), ...]
- public Dictionary Counter { get; set; } = new Dictionary();
+ public Dictionary Counter { get; set; } = new Dictionary();
}
public class KundeData
@@ -19,5 +19,7 @@ namespace Deckungsbeitrag.AA_Klassen
public string Name { get; set; }
public string Region { get; set; }
public string Tag { get; set; } // ← MO, DI, MI, DO, FR
+ public int KundeID { get; set; }
+ public int[] ContAnzahl { get; set; } = new int[3];
}
}
diff --git a/App.config b/App.config
index 735e1c5..9c36f1d 100644
--- a/App.config
+++ b/App.config
@@ -8,7 +8,8 @@
-
+
+
diff --git a/Datenbankanpassung_02-2026.sql b/Datenbankanpassung_02-2026.sql
new file mode 100644
index 0000000..8d317aa
--- /dev/null
+++ b/Datenbankanpassung_02-2026.sql
@@ -0,0 +1,55 @@
+-- This script was generated by the Schema Diff utility in pgAdmin 4.
+-- Due to circular dependencies, the order in which Schema Diff writes objects may not be optimal
+-- and manual changes to the script may be required to ensure changes are applied in the correct order.
+-- Please report any issues along with steps to reproduce.
+ BEGIN;
+ CREATE TABLE IF NOT EXISTS kundenverwaltung.saison
+(
+ saison_id numeric(10,0) NOT NULL,
+ bezeichnung character varying COLLATE pg_catalog."default",
+ start_date date,
+ end_date date,
+ aktiv boolean DEFAULT false,
+ CONSTRAINT saison_pk PRIMARY KEY (saison_id)
+ USING INDEX TABLESPACE wirl_ts
+)
+
+TABLESPACE wirl_ts;
+
+ALTER TABLE IF EXISTS kundenverwaltung.saison
+ OWNER to postgres;
+
+GRANT INSERT, DELETE, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO buro6380;
+
+GRANT INSERT, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO expedit;
+
+GRANT INSERT, DELETE, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO kevin;
+
+GRANT INSERT, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO msfrottee01;
+
+GRANT INSERT, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO msfrottee02;
+
+GRANT INSERT, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO msgrossteile01;
+
+GRANT INSERT, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO msgrossteile02;
+
+GRANT INSERT, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO mskleinteile01;
+
+GRANT INSERT, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO mswstrasse01;
+
+GRANT INSERT, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO mswstrasse02;
+
+GRANT ALL ON TABLE kundenverwaltung.saison TO postgres;
+
+GRANT INSERT, SELECT, UPDATE ON TABLE kundenverwaltung.saison TO psspannleintuch01;
+ALTER TABLE IF EXISTS kundenverwaltung.auftrag
+ ADD COLUMN abteilungen_status integer NOT NULL DEFAULT 0;
+ALTER TABLE IF EXISTS kundenverwaltung.kunde_artikel
+ ADD COLUMN reklamation numeric(5, 0);
+ALTER TABLE IF EXISTS kundenverwaltung.kunde
+ ADD COLUMN sommerlieferrhythmus numeric(2, 0);
+
+ALTER TABLE IF EXISTS kundenverwaltung.kunde
+ ADD COLUMN winterlieferrhythmus numeric(2, 0);
+
+ END;
\ No newline at end of file
diff --git a/UserControls/KundenControl.Designer.cs b/UserControls/KundenControl.Designer.cs
index 260c465..d6530b2 100644
--- a/UserControls/KundenControl.Designer.cs
+++ b/UserControls/KundenControl.Designer.cs
@@ -30,11 +30,64 @@ namespace Deckungsbeitrag.UserControls
///
private void InitializeComponent()
{
+ this.lblKunde = new System.Windows.Forms.Label();
+ this.lblRegion = new System.Windows.Forms.Label();
+ this.lblCont = new System.Windows.Forms.Label();
this.SuspendLayout();
- this.AutoScaleDimensions = new SizeF(7F, 15F);
+ //
+ // lblKunde
+ //
+ this.lblKunde.AutoSize = true;
+ this.lblKunde.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblKunde.Location = new System.Drawing.Point(3, 3);
+ this.lblKunde.Margin = new System.Windows.Forms.Padding(3);
+ this.lblKunde.Name = "lblKunde";
+ this.lblKunde.Size = new System.Drawing.Size(131, 20);
+ this.lblKunde.TabIndex = 0;
+ this.lblKunde.Text = "Max Mustermann";
+ //
+ // lblRegion
+ //
+ this.lblRegion.AutoSize = true;
+ this.lblRegion.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblRegion.Location = new System.Drawing.Point(4, 29);
+ this.lblRegion.Margin = new System.Windows.Forms.Padding(3);
+ this.lblRegion.Name = "lblRegion";
+ this.lblRegion.Size = new System.Drawing.Size(60, 16);
+ this.lblRegion.TabIndex = 1;
+ this.lblRegion.Text = "Salzburg";
+ //
+ // lblCont
+ //
+ this.lblCont.AutoSize = true;
+ this.lblCont.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblCont.Location = new System.Drawing.Point(176, 3);
+ this.lblCont.Name = "lblCont";
+ this.lblCont.Size = new System.Drawing.Size(44, 20);
+ this.lblCont.TabIndex = 2;
+ this.lblCont.Text = "5/4/1";
+ //
+ // KundenControl
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.BackColor = System.Drawing.SystemColors.ActiveCaption;
+ this.Controls.Add(this.lblCont);
+ this.Controls.Add(this.lblRegion);
+ this.Controls.Add(this.lblKunde);
+ this.MaximumSize = new System.Drawing.Size(234, 50);
+ this.Name = "KundenControl";
+ this.Size = new System.Drawing.Size(234, 50);
+ this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.KundenControl_MouseClick);
this.ResumeLayout(false);
+ this.PerformLayout();
+
}
#endregion
+
+ private System.Windows.Forms.Label lblKunde;
+ private System.Windows.Forms.Label lblRegion;
+ private System.Windows.Forms.Label lblCont;
}
}
diff --git a/UserControls/KundenControl.cs b/UserControls/KundenControl.cs
index ad68fa8..4b79548 100644
--- a/UserControls/KundenControl.cs
+++ b/UserControls/KundenControl.cs
@@ -1,4 +1,5 @@
-using System;
+using DatenDB;
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -12,20 +13,27 @@ namespace Deckungsbeitrag.UserControls
{
public partial class KundenControl : UserControl
{
- private Label lblKunde;
- private Label lblRegion;
- private FlowLayoutPanel flp; // ← Field deklarieren!
+ //private Label lblKunde;
+ //private Label lblRegion;
+ //private FlowLayoutPanel flp; // ← Field deklarieren!
+ private Kunde kunde;
public string KundenName
{
get => lblKunde.Text;
set => lblKunde.Text = value;
}
- public string Region
+ public string KundenRegion
{
get => lblRegion.Text;
set => lblRegion.Text = value;
}
+ public string ContainerAnzahl
+ {
+ get => lblCont.Text;
+ set => lblCont.Text = value;
+ }
+ public int[] ContAnzahl = new int[3];
public KundenControl()
{
@@ -33,69 +41,54 @@ namespace Deckungsbeitrag.UserControls
SetupControl();
}
- public KundenControl(string name, string region = "") : this()
+ public KundenControl(Kunde kunde) : this()
{
- KundenName = name;
- Region = region;
+ KundenName = kunde.Suchtext == string.Empty ? kunde.KundeName : kunde.Suchtext;
+ KundenRegion = kunde.Region;
+
+ ContAnzahl = Auftrag.GetContainerAnzahlen(kunde.KundeID);
+
+ // Sobald die Containeranzahlen angezeigt werden können.
+ ContainerAnzahl = $"{ContAnzahl[0]}/{ContAnzahl[1]}/{ContAnzahl[2]}";
}
private void SetupControl()
{
- this.Size = new Size(200, 35); // Breiter für 2 Labels
- this.BackColor = Color.LightSteelBlue;
- this.BorderStyle = BorderStyle.FixedSingle;
-
- // FlowLayoutPanel für horizontale Anordnung
- flp = new FlowLayoutPanel
- {
- Dock = DockStyle.Fill,
- FlowDirection = FlowDirection.LeftToRight,
- AutoSize = true,
- Padding = new Padding(4)
- };
-
- // Kunde-Label (links, fett)
- lblKunde = new Label
- {
- Text = "Max Mustermann",
- TextAlign = ContentAlignment.MiddleLeft,
- Font = new Font("Segoe UI", 12F, FontStyle.Bold),
- Margin = new Padding(0, 2, 5, 2), // Abstand rechts
- Anchor = AnchorStyles.None,
- AutoSize = true
- };
-
- // Region-Label (rechts, klein)
- lblRegion = new Label
- {
- Text = "Salzburg",
- TextAlign = ContentAlignment.MiddleLeft,
- Font = new Font("Segoe UI", 10F, FontStyle.Regular),
- ForeColor = Color.DarkBlue,
- Margin = new Padding(0),
- Anchor = AnchorStyles.None,
- AutoSize = true
- };
-
-
- flp.Controls.Add(lblKunde);
- flp.Controls.Add(lblRegion);
- this.Controls.Add(flp);
// ★★★ MOUSE-EVENTS DURCHREICHEN zu EINEM Handler ★★★
- flp.MouseDown += KundenControl_MouseDown;
+ this.MouseDown += KundenControl_MouseDown;
lblKunde.MouseDown += KundenControl_MouseDown;
lblRegion.MouseDown += KundenControl_MouseDown;
}
private void KundenControl_MouseDown(object sender, MouseEventArgs e)
{
+ Control ctr = sender as Control;
+ KundenControl kundectr;
+ if (ctr.GetType() == typeof(KundenControl)) kundectr = (KundenControl)ctr;
+ else kundectr = (KundenControl)ctr.Parent;
+
+ this.kunde = (Kunde)kundectr.Tag;
+
if (e.Button == MouseButtons.Left)
{
- this.DoDragDrop(new DataObject("KundeData", this), DragDropEffects.Copy);
+ if (kundectr.Parent.Tag == null) this.DoDragDrop(new DataObject("KundeData", this), DragDropEffects.Copy);
+ else
+ {
+ this.DoDragDrop(sender, DragDropEffects.Move);
+ }
}
}
public object Clone()
{
- return new KundenControl(this.KundenName, this.Region);
+ return new KundenControl(this.kunde);
+ }
+
+ private void KundenControl_MouseClick(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Right)
+ {
+ UserControl kndctrl = (UserControl)sender;
+ kndctrl.Parent.Controls.Remove(kndctrl);
+ }
}
}
}
diff --git a/UserControls/KundenControl.resx b/UserControls/KundenControl.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/UserControls/KundenControl.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
\ No newline at end of file
diff --git a/UserControls/UCTabPageLKW.Designer.cs b/UserControls/UCTabPageLKW.Designer.cs
index 4fe32df..4b665e0 100644
--- a/UserControls/UCTabPageLKW.Designer.cs
+++ b/UserControls/UCTabPageLKW.Designer.cs
@@ -44,6 +44,11 @@
this.labelMO = new System.Windows.Forms.Label();
this.labelContMO = new System.Windows.Forms.Label();
this.flowLayoutPanelMO = new System.Windows.Forms.FlowLayoutPanel();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
this.tableLayoutPanelTage.SuspendLayout();
this.SuspendLayout();
//
@@ -55,6 +60,10 @@
this.tableLayoutPanelTage.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanelTage.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanelTage.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
+ this.tableLayoutPanelTage.Controls.Add(this.label5, 4, 3);
+ this.tableLayoutPanelTage.Controls.Add(this.label4, 3, 3);
+ this.tableLayoutPanelTage.Controls.Add(this.label3, 1, 3);
+ this.tableLayoutPanelTage.Controls.Add(this.label2, 0, 3);
this.tableLayoutPanelTage.Controls.Add(this.flowLayoutPanelFR, 4, 1);
this.tableLayoutPanelTage.Controls.Add(this.flowLayoutPanelDO, 3, 1);
this.tableLayoutPanelTage.Controls.Add(this.flowLayoutPanelMI, 2, 1);
@@ -70,24 +79,27 @@
this.tableLayoutPanelTage.Controls.Add(this.labelMO, 0, 0);
this.tableLayoutPanelTage.Controls.Add(this.labelContMO, 0, 2);
this.tableLayoutPanelTage.Controls.Add(this.flowLayoutPanelMO, 0, 1);
+ this.tableLayoutPanelTage.Controls.Add(this.label1, 2, 3);
this.tableLayoutPanelTage.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanelTage.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanelTage.Name = "tableLayoutPanelTage";
- this.tableLayoutPanelTage.RowCount = 3;
+ this.tableLayoutPanelTage.RowCount = 4;
this.tableLayoutPanelTage.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanelTage.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanelTage.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.tableLayoutPanelTage.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanelTage.Size = new System.Drawing.Size(910, 719);
this.tableLayoutPanelTage.TabIndex = 1;
//
// flowLayoutPanelFR
//
this.flowLayoutPanelFR.AllowDrop = true;
+ this.flowLayoutPanelFR.AutoScroll = true;
this.flowLayoutPanelFR.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelFR.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelFR.Location = new System.Drawing.Point(731, 33);
this.flowLayoutPanelFR.Name = "flowLayoutPanelFR";
- this.flowLayoutPanelFR.Size = new System.Drawing.Size(176, 653);
+ this.flowLayoutPanelFR.Size = new System.Drawing.Size(176, 633);
this.flowLayoutPanelFR.TabIndex = 19;
this.flowLayoutPanelFR.Tag = "FR";
this.flowLayoutPanelFR.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop);
@@ -97,11 +109,12 @@
// flowLayoutPanelDO
//
this.flowLayoutPanelDO.AllowDrop = true;
+ this.flowLayoutPanelDO.AutoScroll = true;
this.flowLayoutPanelDO.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelDO.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelDO.Location = new System.Drawing.Point(549, 33);
this.flowLayoutPanelDO.Name = "flowLayoutPanelDO";
- this.flowLayoutPanelDO.Size = new System.Drawing.Size(176, 653);
+ this.flowLayoutPanelDO.Size = new System.Drawing.Size(176, 633);
this.flowLayoutPanelDO.TabIndex = 18;
this.flowLayoutPanelDO.Tag = "DO";
this.flowLayoutPanelDO.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop);
@@ -111,11 +124,12 @@
// flowLayoutPanelMI
//
this.flowLayoutPanelMI.AllowDrop = true;
+ this.flowLayoutPanelMI.AutoScroll = true;
this.flowLayoutPanelMI.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelMI.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelMI.Location = new System.Drawing.Point(367, 33);
this.flowLayoutPanelMI.Name = "flowLayoutPanelMI";
- this.flowLayoutPanelMI.Size = new System.Drawing.Size(176, 653);
+ this.flowLayoutPanelMI.Size = new System.Drawing.Size(176, 633);
this.flowLayoutPanelMI.TabIndex = 17;
this.flowLayoutPanelMI.Tag = "MI";
this.flowLayoutPanelMI.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop);
@@ -125,11 +139,12 @@
// flowLayoutPanelDI
//
this.flowLayoutPanelDI.AllowDrop = true;
+ this.flowLayoutPanelDI.AutoScroll = true;
this.flowLayoutPanelDI.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelDI.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelDI.Location = new System.Drawing.Point(185, 33);
this.flowLayoutPanelDI.Name = "flowLayoutPanelDI";
- this.flowLayoutPanelDI.Size = new System.Drawing.Size(176, 653);
+ this.flowLayoutPanelDI.Size = new System.Drawing.Size(176, 633);
this.flowLayoutPanelDI.TabIndex = 16;
this.flowLayoutPanelDI.Tag = "DI";
this.flowLayoutPanelDI.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop);
@@ -142,10 +157,11 @@
this.labelContFR.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContFR.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelContFR.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labelContFR.Location = new System.Drawing.Point(731, 689);
+ this.labelContFR.Location = new System.Drawing.Point(731, 669);
this.labelContFR.Name = "labelContFR";
this.labelContFR.Size = new System.Drawing.Size(176, 30);
this.labelContFR.TabIndex = 14;
+ this.labelContFR.Tag = "FR";
this.labelContFR.Text = "25";
this.labelContFR.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@@ -155,10 +171,11 @@
this.labelContDO.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContDO.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelContDO.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labelContDO.Location = new System.Drawing.Point(549, 689);
+ this.labelContDO.Location = new System.Drawing.Point(549, 669);
this.labelContDO.Name = "labelContDO";
this.labelContDO.Size = new System.Drawing.Size(176, 30);
this.labelContDO.TabIndex = 13;
+ this.labelContDO.Tag = "DO";
this.labelContDO.Text = "25";
this.labelContDO.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@@ -168,10 +185,11 @@
this.labelContMI.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContMI.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelContMI.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labelContMI.Location = new System.Drawing.Point(367, 689);
+ this.labelContMI.Location = new System.Drawing.Point(367, 669);
this.labelContMI.Name = "labelContMI";
this.labelContMI.Size = new System.Drawing.Size(176, 30);
this.labelContMI.TabIndex = 12;
+ this.labelContMI.Tag = "MI";
this.labelContMI.Text = "25";
this.labelContMI.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@@ -181,10 +199,11 @@
this.labelContDI.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContDI.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelContDI.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labelContDI.Location = new System.Drawing.Point(185, 689);
+ this.labelContDI.Location = new System.Drawing.Point(185, 669);
this.labelContDI.Name = "labelContDI";
this.labelContDI.Size = new System.Drawing.Size(176, 30);
this.labelContDI.TabIndex = 11;
+ this.labelContDI.Tag = "DI";
this.labelContDI.Text = "25";
this.labelContDI.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@@ -264,31 +283,97 @@
this.labelContMO.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContMO.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelContMO.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labelContMO.Location = new System.Drawing.Point(3, 689);
+ this.labelContMO.Location = new System.Drawing.Point(3, 669);
this.labelContMO.Name = "labelContMO";
this.labelContMO.Size = new System.Drawing.Size(176, 30);
this.labelContMO.TabIndex = 5;
+ this.labelContMO.Tag = "MO";
this.labelContMO.Text = "25";
this.labelContMO.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// flowLayoutPanelMO
//
this.flowLayoutPanelMO.AllowDrop = true;
+ this.flowLayoutPanelMO.AutoScroll = true;
this.flowLayoutPanelMO.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelMO.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelMO.Location = new System.Drawing.Point(3, 33);
this.flowLayoutPanelMO.Name = "flowLayoutPanelMO";
- this.flowLayoutPanelMO.Size = new System.Drawing.Size(176, 653);
+ this.flowLayoutPanelMO.Size = new System.Drawing.Size(176, 633);
this.flowLayoutPanelMO.TabIndex = 15;
this.flowLayoutPanelMO.Tag = "MO";
this.flowLayoutPanelMO.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop);
this.flowLayoutPanelMO.DragEnter += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragEnter);
this.flowLayoutPanelMO.DragOver += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragOver);
//
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.Location = new System.Drawing.Point(367, 699);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(176, 20);
+ this.label1.TabIndex = 20;
+ this.label1.Text = "max/avg/min";
+ this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label2.Location = new System.Drawing.Point(3, 699);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(176, 20);
+ this.label2.TabIndex = 21;
+ this.label2.Text = "max/avg/min";
+ this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label3.Location = new System.Drawing.Point(185, 699);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(176, 20);
+ this.label3.TabIndex = 22;
+ this.label3.Text = "max/avg/min";
+ this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label4.Location = new System.Drawing.Point(549, 699);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(176, 20);
+ this.label4.TabIndex = 23;
+ this.label4.Text = "max/avg/min";
+ this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
+ this.label5.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label5.Location = new System.Drawing.Point(731, 699);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(176, 20);
+ this.label5.TabIndex = 24;
+ this.label5.Text = "max/avg/min";
+ this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
// UCTabPageLKW
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.tableLayoutPanelTage);
this.Name = "UCTabPageLKW";
this.Size = new System.Drawing.Size(910, 719);
@@ -316,5 +401,10 @@
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelMI;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelDI;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelMO;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label2;
}
}
diff --git a/UserControls/UCTabPageLKW.cs b/UserControls/UCTabPageLKW.cs
index 342eb32..73a71b3 100644
--- a/UserControls/UCTabPageLKW.cs
+++ b/UserControls/UCTabPageLKW.cs
@@ -1,14 +1,18 @@
using DatenDB;
+using Deckungsbeitrag.AA_Forms;
using Deckungsbeitrag.AA_Klassen;
+using Microsoft.VisualBasic;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
+using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
+using static System.Net.WebRequestMethods;
namespace Deckungsbeitrag.UserControls
{
@@ -20,31 +24,267 @@ namespace Deckungsbeitrag.UserControls
}
private void FlowLayout_DragEnter(object sender, DragEventArgs e)
{
+ // Unterscheiden zwischen Clone und Move KundenControl
+ // Wenn KundenControl innerhalb eines Tages bewegt wird ist Move
+ // sonst ist Clone.
if (e.Data.GetDataPresent("KundeData")) // Custom Format
e.Effect = DragDropEffects.Copy;
-
+ if (e.Data.GetDataPresent(typeof(KundenControl)))
+ e.Effect = DragDropEffects.Move;
}
private void FlowLayout_DragOver(object sender, DragEventArgs e)
{
- e.Effect = DragDropEffects.Copy;
+ // Unterscheiden zwischen Clone und Move KundenControl
+ // Wenn KundenControl innerhalb eines Tages bewegt wird ist Move
+ // sonst ist Clone.
+ if (e.Data.GetDataPresent("KundeData")) // Custom Format
+ e.Effect = DragDropEffects.Copy;
+ if (e.Data.GetDataPresent(typeof(KundenControl)))
+ e.Effect = DragDropEffects.Move;
}
private void FlowLayout_DragDrop(object sender, DragEventArgs e)
{
+ bool toClone = true;
+ string saison = string.Empty;
+ int saisonrhythmus = 0;
FlowLayoutPanel dropTarget = sender as FlowLayoutPanel;
+
+ DayOfWeek dropDay = DayOfWeek.Sunday;
+ switch (dropTarget.Tag.ToString())
+ {
+ case "MO":
+ dropDay = DayOfWeek.Monday; break;
+ case "DI":
+ dropDay = DayOfWeek.Tuesday; break;
+ case "MI":
+ dropDay = DayOfWeek.Wednesday; break;
+ case "DO":
+ dropDay = DayOfWeek.Thursday; break;
+ case "FR":
+ dropDay = DayOfWeek.Friday; break;
+ default:
+ break;
+ }
+
+ FormTourenplanung tourenplanung = (FormTourenplanung)this.ParentForm;
+ foreach (RadioButton rb in tourenplanung.Controls.OfType()) if (rb.Checked) saison = rb.Text;
+
if (e.Data.GetDataPresent("KundeData"))
{
- KundenControl kunde = e.Data.GetData("KundeData") as KundenControl;
- if (kunde != null)
+ KundenControl kundectr = e.Data.GetData("KundeData") as KundenControl;
+ Kunde kunde = (Kunde)kundectr.Tag;
+ if (saison == "Sommer") saisonrhythmus = kunde.SommerLieferRhythmus;
+ else saisonrhythmus = kunde.WinterLieferRhythmus;
+ if (kundectr != null)
{
- // Kunde klonen (nicht original bewegen)
- KundenControl kundeKopie = (KundenControl)kunde.Clone();
- kundeKopie.Parent = dropTarget;
- dropTarget.Controls.Add(kundeKopie);
+
+ Liefertage neuerRhythmus = GetKompatiblenRhythmus(dropDay, (Liefertage)saisonrhythmus);
+ if (neuerRhythmus != (Liefertage)saisonrhythmus)
+ {
+ Meldungen meldung = new Meldungen();
+ if (meldung.GetFrage(null, $"Rhythmus von {Lieferrhythmen.GetAnzeigeText((Liefertage)saisonrhythmus)} auf {Lieferrhythmen.GetAnzeigeText((Liefertage)neuerRhythmus)} ändern?", false) == DialogResult.No) return;
+ else
+ {
+ if (saison == "Sommer") kunde.SommerLieferRhythmus = (int)neuerRhythmus;
+ else kunde.WinterLieferRhythmus = (int)neuerRhythmus;
+ kunde.Save();
+ kundectr.Tag = kunde;
+ FormTourenplanung.KundenControlToDelete(tourenplanung, kundectr);
+ }
+ }
+
+ // Überprüfung ob KundenControl geclont werden kann
+ if (neuerRhythmus == Lieferrhythmen.Unbekannt || !FormTourenplanung.KundenControlToClone(tourenplanung, kundectr)) toClone = false;
+
+ if (toClone)
+ {
+ // Kunde klonen (nicht original bewegen)
+ KundenControl kundeKopie = (KundenControl)kundectr.Clone();
+ kundeKopie.Tag = kundectr.Tag;
+ kundeKopie.Parent = dropTarget;
+ dropTarget.Controls.Add(kundeKopie);
+ }
+ }
+ GetGesamtContainer(dropTarget);
+ }
+
+ // Move statt Clone KundenControl
+ if (e.Data.GetDataPresent(typeof(KundenControl)))
+ {
+ KundenControl draggedControl = e.Data.GetData(typeof(KundenControl)) as KundenControl;
+
+ if (draggedControl == null || dropTarget == null || draggedControl.Parent.Tag != dropTarget.Tag) return;
+
+ dropTarget.SuspendLayout();
+ try
+ {
+ // Drop-Position berechnen
+ Point dropPoint = dropTarget.PointToClient(new Point(e.X, e.Y));
+ int dropIndex = GetDropIndex(dropTarget, dropPoint);
+
+ // Reihenfolge ändern
+ dropTarget.Controls.SetChildIndex(draggedControl, dropIndex);
+
+ // Gesamt-Labels aktualisieren
+ GetGesamtContainer(dropTarget);
+ }
+ finally
+ {
+ dropTarget.ResumeLayout(true);
}
}
}
+
+ private int GetDropIndex(FlowLayoutPanel flp, Point dropPoint)
+ {
+ for (int i = 0; i < flp.Controls.Count; i++)
+ {
+ if (flp.Controls[i].Bounds.Contains(dropPoint))
+ return i;
+ }
+ return flp.Controls.Count; // Am Ende anhängen
+ }
+
+ private void GetGesamtContainer(FlowLayoutPanel dropTarget)
+ {
+ int[] gesamt = { 0, 0, 0 };
+
+ foreach (KundenControl kndctrl in dropTarget.Controls.OfType())
+ {
+ for (int i = 0; i < Math.Min(kndctrl.ContAnzahl.Length, gesamt.Length); i++)
+ {
+ gesamt[i] += kndctrl.ContAnzahl[i];
+ }
+ }
+ foreach (Label ctr in tableLayoutPanelTage.Controls.OfType