Änerunge an KundeArtikel, FormExpedit, FormMain, Funktionen, FormNeuerAuftrag und andere.

This commit is contained in:
Kilian Wirl 2026-02-06 13:45:21 +01:00
parent 873bc72a54
commit ea075830cc
29 changed files with 2339 additions and 621 deletions

73
AA-Forms/FehlmengeChart.Designer.cs generated Normal file
View File

@ -0,0 +1,73 @@
namespace Deckungsbeitrag.AA_Forms
{
partial class FehlmengeChart
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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;
}
}

View File

@ -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);
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -29,8 +29,10 @@
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormExpedit)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormExpedit));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); 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.label10 = new System.Windows.Forms.Label();
this.buttonDrucken = new System.Windows.Forms.Button(); this.buttonDrucken = new System.Windows.Forms.Button();
this.groupBoxEtikett = new System.Windows.Forms.GroupBox(); this.groupBoxEtikett = new System.Windows.Forms.GroupBox();
@ -84,9 +86,14 @@
this.labelStatistik1 = new System.Windows.Forms.Label(); this.labelStatistik1 = new System.Windows.Forms.Label();
this.buttonSuchen = new System.Windows.Forms.Button(); this.buttonSuchen = new System.Windows.Forms.Button();
this.buttonNW = 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.buttonStats = new System.Windows.Forms.Button();
this.buttonEinstellung = 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(); this.groupBoxEtikett.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).BeginInit();
@ -101,6 +108,9 @@
((System.ComponentModel.ISupportInitialize)(this.objectListViewGeschaeft)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.objectListViewGeschaeft)).BeginInit();
this.groupBoxStatistik.SuspendLayout(); this.groupBoxStatistik.SuspendLayout();
this.tableLayoutPanelStatistik.SuspendLayout(); this.tableLayoutPanelStatistik.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).BeginInit();
this.groupBoxKndInfo.SuspendLayout();
this.tableLayoutPanelInfo.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// label10 // label10
@ -151,7 +161,7 @@
this.groupBoxEtikett.Controls.Add(this.label10); this.groupBoxEtikett.Controls.Add(this.label10);
this.groupBoxEtikett.Controls.Add(this.buttonKundeNr); this.groupBoxEtikett.Controls.Add(this.buttonKundeNr);
this.groupBoxEtikett.ForeColor = System.Drawing.Color.White; 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.Margin = new System.Windows.Forms.Padding(2);
this.groupBoxEtikett.Name = "groupBoxEtikett"; this.groupBoxEtikett.Name = "groupBoxEtikett";
this.groupBoxEtikett.Padding = new System.Windows.Forms.Padding(2); this.groupBoxEtikett.Padding = new System.Windows.Forms.Padding(2);
@ -159,6 +169,7 @@
this.groupBoxEtikett.TabIndex = 2; this.groupBoxEtikett.TabIndex = 2;
this.groupBoxEtikett.TabStop = false; this.groupBoxEtikett.TabStop = false;
this.groupBoxEtikett.Text = "Etikett-Druck"; this.groupBoxEtikett.Text = "Etikett-Druck";
this.groupBoxEtikett.Visible = false;
// //
// textBoxCont // textBoxCont
// //
@ -415,14 +426,6 @@
// dGArtikel // dGArtikel
// //
this.dGArtikel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 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.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dGArtikel.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dGArtikel.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.KundeArtikelID, this.KundeArtikelID,
@ -435,15 +438,7 @@
this.StandBearbeitet, this.StandBearbeitet,
this.FehlmengeBearbeitet, this.FehlmengeBearbeitet,
this.KorrekturBearbeitet}); this.KorrekturBearbeitet});
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; this.dGArtikel.Location = new System.Drawing.Point(385, 43);
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.Name = "dGArtikel"; this.dGArtikel.Name = "dGArtikel";
this.dGArtikel.RowHeadersVisible = false; this.dGArtikel.RowHeadersVisible = false;
this.dGArtikel.RowHeadersWidth = 62; this.dGArtikel.RowHeadersWidth = 62;
@ -538,7 +533,7 @@
this.tabPageSonder.Location = new System.Drawing.Point(4, 34); this.tabPageSonder.Location = new System.Drawing.Point(4, 34);
this.tabPageSonder.Name = "tabPageSonder"; this.tabPageSonder.Name = "tabPageSonder";
this.tabPageSonder.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 1;
this.tabPageSonder.Text = "Sonderaufträge"; this.tabPageSonder.Text = "Sonderaufträge";
this.tabPageSonder.UseVisualStyleBackColor = true; this.tabPageSonder.UseVisualStyleBackColor = true;
@ -553,7 +548,7 @@
this.objectListViewSonder.HideSelection = false; this.objectListViewSonder.HideSelection = false;
this.objectListViewSonder.Location = new System.Drawing.Point(3, 3); this.objectListViewSonder.Location = new System.Drawing.Point(3, 3);
this.objectListViewSonder.Name = "objectListViewSonder"; 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.TabIndex = 2;
this.objectListViewSonder.UseCompatibleStateImageBehavior = false; this.objectListViewSonder.UseCompatibleStateImageBehavior = false;
this.objectListViewSonder.UseHotControls = false; this.objectListViewSonder.UseHotControls = false;
@ -567,7 +562,7 @@
this.tabPageAll.Location = new System.Drawing.Point(4, 34); this.tabPageAll.Location = new System.Drawing.Point(4, 34);
this.tabPageAll.Name = "tabPageAll"; this.tabPageAll.Name = "tabPageAll";
this.tabPageAll.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 0;
this.tabPageAll.Text = "Aufträge heute"; this.tabPageAll.Text = "Aufträge heute";
this.tabPageAll.UseVisualStyleBackColor = true; this.tabPageAll.UseVisualStyleBackColor = true;
@ -586,7 +581,7 @@
this.objectListViewAuftrag.Location = new System.Drawing.Point(3, 3); this.objectListViewAuftrag.Location = new System.Drawing.Point(3, 3);
this.objectListViewAuftrag.Name = "objectListViewAuftrag"; this.objectListViewAuftrag.Name = "objectListViewAuftrag";
this.objectListViewAuftrag.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu; 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.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.objectListViewAuftrag.TabIndex = 1; this.objectListViewAuftrag.TabIndex = 1;
this.objectListViewAuftrag.TintSortColumn = true; this.objectListViewAuftrag.TintSortColumn = true;
@ -618,7 +613,7 @@
this.tabControlAuftragList.Location = new System.Drawing.Point(4, 9); this.tabControlAuftragList.Location = new System.Drawing.Point(4, 9);
this.tabControlAuftragList.Name = "tabControlAuftragList"; this.tabControlAuftragList.Name = "tabControlAuftragList";
this.tabControlAuftragList.SelectedIndex = 0; 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.TabIndex = 0;
this.tabControlAuftragList.Visible = false; this.tabControlAuftragList.Visible = false;
this.tabControlAuftragList.SelectedIndexChanged += new System.EventHandler(this.tabControlAuftragList_SelectedIndexChanged); this.tabControlAuftragList.SelectedIndexChanged += new System.EventHandler(this.tabControlAuftragList_SelectedIndexChanged);
@ -630,7 +625,7 @@
this.tabPageGeschaeft.Location = new System.Drawing.Point(4, 34); this.tabPageGeschaeft.Location = new System.Drawing.Point(4, 34);
this.tabPageGeschaeft.Name = "tabPageGeschaeft"; this.tabPageGeschaeft.Name = "tabPageGeschaeft";
this.tabPageGeschaeft.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 2;
this.tabPageGeschaeft.Text = "Geschäft"; this.tabPageGeschaeft.Text = "Geschäft";
this.tabPageGeschaeft.UseVisualStyleBackColor = true; this.tabPageGeschaeft.UseVisualStyleBackColor = true;
@ -649,7 +644,7 @@
this.objectListViewGeschaeft.Location = new System.Drawing.Point(3, 3); this.objectListViewGeschaeft.Location = new System.Drawing.Point(3, 3);
this.objectListViewGeschaeft.Name = "objectListViewGeschaeft"; this.objectListViewGeschaeft.Name = "objectListViewGeschaeft";
this.objectListViewGeschaeft.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu; 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.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.objectListViewGeschaeft.TabIndex = 2; this.objectListViewGeschaeft.TabIndex = 2;
this.objectListViewGeschaeft.TintSortColumn = true; this.objectListViewGeschaeft.TintSortColumn = true;
@ -914,6 +909,22 @@
this.buttonNW.UseVisualStyleBackColor = true; this.buttonNW.UseVisualStyleBackColor = true;
this.buttonNW.Click += new System.EventHandler(this.buttonNW_Click); 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 // buttonStats
// //
this.buttonStats.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.UseVisualStyleBackColor = true;
this.buttonEinstellung.Click += new System.EventHandler(this.buttonEinstellung_Click); 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.chartFehlmenge.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.buttonSWS_Drucken.BackColor = System.Drawing.Color.Yellow; | System.Windows.Forms.AnchorStyles.Right)));
this.buttonSWS_Drucken.FlatAppearance.BorderSize = 0; this.chartFehlmenge.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.buttonSWS_Drucken.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.chartFehlmenge.BorderSkin.PageColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.buttonSWS_Drucken.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); chartArea1.InnerPlotPosition.Auto = false;
this.buttonSWS_Drucken.Location = new System.Drawing.Point(916, 650); chartArea1.InnerPlotPosition.Height = 92.2266F;
this.buttonSWS_Drucken.Margin = new System.Windows.Forms.Padding(2); chartArea1.InnerPlotPosition.Width = 76.05405F;
this.buttonSWS_Drucken.Name = "buttonSWS_Drucken"; chartArea1.InnerPlotPosition.X = 20.54054F;
this.buttonSWS_Drucken.Size = new System.Drawing.Size(200, 41); chartArea1.Name = "ChartArea1";
this.buttonSWS_Drucken.TabIndex = 35; this.chartFehlmenge.ChartAreas.Add(chartArea1);
this.buttonSWS_Drucken.Text = "SWS-Drucken"; legend1.Name = "Legend1";
this.buttonSWS_Drucken.UseVisualStyleBackColor = false; this.chartFehlmenge.Legends.Add(legend1);
this.buttonSWS_Drucken.Click += new System.EventHandler(this.buttonSWS_Drucken_Click); 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 // FormExpedit
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.ClientSize = new System.Drawing.Size(1221, 703); 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.buttonNW);
this.Controls.Add(this.buttonSuchen); this.Controls.Add(this.buttonSuchen);
this.Controls.Add(this.dGArtikel);
this.Controls.Add(this.groupBoxStatistik);
this.Controls.Add(this.buttonStats); this.Controls.Add(this.buttonStats);
this.Controls.Add(this.buttonEinstellung); this.Controls.Add(this.buttonEinstellung);
this.Controls.Add(this.buttonNeuerAuftrag); this.Controls.Add(this.buttonNeuerAuftrag);
this.Controls.Add(this.buttonSWS_Drucken); this.Controls.Add(this.buttonSWS_Drucken);
this.Controls.Add(this.tabControlAuftragList); this.Controls.Add(this.tabControlAuftragList);
this.Controls.Add(this.groupBoxEtikett); this.Controls.Add(this.groupBoxEtikett);
this.Controls.Add(this.dGArtikel);
this.Controls.Add(this.groupBoxStatistik);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.HelpButton = true; this.HelpButton = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@ -984,6 +1060,7 @@
this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormExpedit_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormExpedit_FormClosing);
this.Load += new System.EventHandler(this.FormExpedit_Load); this.Load += new System.EventHandler(this.FormExpedit_Load);
this.Resize += new System.EventHandler(this.FormExpedit_Resize);
this.groupBoxEtikett.ResumeLayout(false); this.groupBoxEtikett.ResumeLayout(false);
this.groupBoxEtikett.PerformLayout(); this.groupBoxEtikett.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).EndInit();
@ -1000,6 +1077,10 @@
this.groupBoxStatistik.ResumeLayout(false); this.groupBoxStatistik.ResumeLayout(false);
this.tableLayoutPanelStatistik.ResumeLayout(false); this.tableLayoutPanelStatistik.ResumeLayout(false);
this.tableLayoutPanelStatistik.PerformLayout(); this.tableLayoutPanelStatistik.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).EndInit();
this.groupBoxKndInfo.ResumeLayout(false);
this.tableLayoutPanelInfo.ResumeLayout(false);
this.tableLayoutPanelInfo.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -1061,5 +1142,10 @@
private System.Windows.Forms.Button buttonNW; private System.Windows.Forms.Button buttonNW;
private System.Windows.Forms.TabPage tabPageGeschaeft; private System.Windows.Forms.TabPage tabPageGeschaeft;
private BrightIdeasSoftware.ObjectListView objectListViewGeschaeft; 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;
} }
} }

View File

@ -49,6 +49,8 @@ namespace Deckungsbeitrag
private int _consecutiveFailures = 0; private int _consecutiveFailures = 0;
private const int MAX_FAILURES = 3; private const int MAX_FAILURES = 3;
private bool aufgabeDone = false; private bool aufgabeDone = false;
private bool isttest = true;
private bool _doubleClickPending = false;
#endregion #endregion
public FormExpedit(Benutzer benutzer) public FormExpedit(Benutzer benutzer)
{ {
@ -121,7 +123,6 @@ namespace Deckungsbeitrag
// Controls aktivieren und deaktivieren nach BenutzerRolle // Controls aktivieren und deaktivieren nach BenutzerRolle
Enable_Controls(); Enable_Controls();
//TODO: Wenn GroupBox nicht notwendig, dann löschen. //TODO: Wenn GroupBox nicht notwendig, dann löschen.
//Load_Etikett_GroupBox(); //Load_Etikett_GroupBox();
this.groupBoxEtikett.Visible = false; 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); itemlocation = new Point(e.Location.X, e.Location.Y);
ObjectListView olv = (ObjectListView)sender; ObjectListView olv = (ObjectListView)sender;
Auftrag _auftrag = (Auftrag)e.Model; 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) if (_auftrag.Status != AuftragStatus.Fertig)
{ {
this.auftrag = _auftrag; this.auftrag = _auftrag;
@ -534,7 +535,24 @@ namespace Deckungsbeitrag
this.neuecontclean = null; this.neuecontclean = null;
Load_Etikett_GroupBox(); Load_Etikett_GroupBox();
this.artikelListe = KundeArtikel.GetList(kunde.KundeID.ToString()); 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 else
{ {
@ -967,9 +985,30 @@ namespace Deckungsbeitrag
if (e.Column.Text == "sauber") altecontclean = (int?)e.Value; if (e.Column.Text == "sauber") altecontclean = (int?)e.Value;
if (!string.IsNullOrWhiteSpace(e.NewValue.ToString())) Save_Auftrag(auftrag, false); if (!string.IsNullOrWhiteSpace(e.NewValue.ToString())) Save_Auftrag(auftrag, false);
} }
/// <summary>
/// Ausgelöst durch DoppelClick
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void objectListViewAuftrag_CellEditStarting(object sender, CellEditEventArgs e) 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? //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) private void tabControlAuftragList_Selected(object sender, TabControlEventArgs e)
{ {
TabControl tabControl = (TabControl)sender; 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; } if(tabControl.SelectedIndex == 3) { this.groupBoxEtikett.Visible = false; }
} }
@ -1082,6 +1121,7 @@ namespace Deckungsbeitrag
#region DataGridView-Events #region DataGridView-Events
private void Load_Gridview(Auftrag auftrag) private void Load_Gridview(Auftrag auftrag)
{ {
//Alle Einträge der DataGridView entfernen. Davor muss die DataSource entfernt werden. //Alle Einträge der DataGridView entfernen. Davor muss die DataSource entfernt werden.
this.dGArtikel.DataSource = null; this.dGArtikel.DataSource = null;
this.dGArtikel.Rows.Clear(); this.dGArtikel.Rows.Clear();
@ -1262,9 +1302,27 @@ namespace Deckungsbeitrag
_settings.Save(); _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. //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: 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: 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 //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 GroupBox entfernen. Änderungen direkt in ObjectListView vornehmen PrintPreview für Etikett.
//DONE: Etikett Drucken als Button in Row. Dann Vorschau anzeigen und Drucken. //DONE: Etikett Drucken als Button in Row. Dann Vorschau anzeigen und Drucken.
//DONE: StartUp von Expedit verfeinern. //DONE: StartUp von Expedit verfeinern.
//TODO: Datum HEUTE auch bei NeuerAuftrag??
//DONE: Einmalige Kunden für Geschäft ermöglichen //DONE: Einmalige Kunden für Geschäft ermöglichen

View File

@ -54,6 +54,12 @@ namespace Deckungsbeitrag
{ {
this.benutzer = benutzer; this.benutzer = benutzer;
} }
public FormKundeVW(Kunde kunde, Benutzer benutzer) : this(kunde)
{
this.benutzer = benutzer;
}
private void KundeDaten_Load(object sender, EventArgs e) private void KundeDaten_Load(object sender, EventArgs e)
{ {
formloading = true; formloading = true;
@ -72,8 +78,8 @@ namespace Deckungsbeitrag
ComboBox_Laden(); ComboBox_Laden();
this.kunde = Funktionen.KundenAuswahl();
if (this.kunde != null) DatenLesen(); if (this.kunde != null) DatenLesen();
else this.kunde = Funktionen.KundenAuswahl();
formloading = false; formloading = false;
@ -93,10 +99,15 @@ namespace Deckungsbeitrag
this.comboBoxAufgabe.SelectedIndex = -1; this.comboBoxAufgabe.SelectedIndex = -1;
this.comboBoxAufgabe.Enabled = false; this.comboBoxAufgabe.Enabled = false;
// Lieferrhythmus Liste mit ComboBox verknüpfen. // Sommer-Lieferrhythmus Liste mit ComboBox verknüpfen.
this.comboBoxLieferrhythmus.DataSource = new BindingSource(Lieferrhythmen.AnzeigeNamen, null); this.comboBoxLRSommer.DataSource = new BindingSource(Lieferrhythmen.AnzeigeNamen, null);
this.comboBoxLieferrhythmus.DisplayMember = "Key"; this.comboBoxLRSommer.DisplayMember = "Key";
this.comboBoxLieferrhythmus.ValueMember = "Value"; 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() private void DatenLesen()
@ -178,7 +189,8 @@ namespace Deckungsbeitrag
} }
// ComboBox-Item für Lieferrhythmus wird gewählt // 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 // numericUpDown für AufgabeCount befüllen
this.numericUpDownAufgabeCount.Value = (decimal)this.kunde.AufgabeCount; 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 (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 (aufgabeChanged) { numericUpDownAufgabeCount_Leave(this, null); }
if (serviceChanged) { if (this.comboBoxService.Enabled == true) this.kunde.Service = this.comboBoxService.SelectedValue.ToString(); } 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(); this.kunde.Save();
} }

View File

@ -97,8 +97,11 @@ namespace Deckungsbeitrag
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.labelAnzahlChars = new System.Windows.Forms.Label(); this.labelAnzahlChars = new System.Windows.Forms.Label();
this.numericUpDownAufgabeCount = new System.Windows.Forms.NumericUpDown(); 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.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.contextMenuStrip1.SuspendLayout();
this.tabControlKunde.SuspendLayout(); this.tabControlKunde.SuspendLayout();
this.tabPageVorschau.SuspendLayout(); this.tabPageVorschau.SuspendLayout();
@ -288,7 +291,7 @@ namespace Deckungsbeitrag
this.comboBoxAufgabe.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 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.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.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.Name = "comboBoxAufgabe";
this.comboBoxAufgabe.Size = new System.Drawing.Size(263, 28); this.comboBoxAufgabe.Size = new System.Drawing.Size(263, 28);
this.comboBoxAufgabe.TabIndex = 41; this.comboBoxAufgabe.TabIndex = 41;
@ -300,7 +303,7 @@ namespace Deckungsbeitrag
this.label2.AutoSize = true; 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.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.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.Name = "label2";
this.label2.Size = new System.Drawing.Size(123, 20); this.label2.Size = new System.Drawing.Size(123, 20);
this.label2.TabIndex = 42; this.label2.TabIndex = 42;
@ -723,7 +726,7 @@ namespace Deckungsbeitrag
// buttonAufgEnt // buttonAufgEnt
// //
this.buttonAufgEnt.Image = global::Deckungsbeitrag.Properties.Resources.Close_red_16x; 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.Name = "buttonAufgEnt";
this.buttonAufgEnt.Size = new System.Drawing.Size(28, 28); this.buttonAufgEnt.Size = new System.Drawing.Size(28, 28);
this.buttonAufgEnt.TabIndex = 43; 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) this.textBoxAnmerkung.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | 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.MaxLength = 200;
this.textBoxAnmerkung.Multiline = true; this.textBoxAnmerkung.Multiline = true;
this.textBoxAnmerkung.Name = "textBoxAnmerkung"; 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.TabIndex = 50;
this.textBoxAnmerkung.TextChanged += new System.EventHandler(this.textBoxAnmerkung_TextChanged); this.textBoxAnmerkung.TextChanged += new System.EventHandler(this.textBoxAnmerkung_TextChanged);
this.textBoxAnmerkung.Leave += new System.EventHandler(this.textBoxAnmerkung_Leave); this.textBoxAnmerkung.Leave += new System.EventHandler(this.textBoxAnmerkung_Leave);
@ -758,7 +761,7 @@ namespace Deckungsbeitrag
this.label4.AutoSize = true; 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.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.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.Name = "label4";
this.label4.Size = new System.Drawing.Size(109, 20); this.label4.Size = new System.Drawing.Size(109, 20);
this.label4.TabIndex = 51; this.label4.TabIndex = 51;
@ -769,7 +772,7 @@ namespace Deckungsbeitrag
this.labelAnzahlChars.AutoSize = true; 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.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.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.Name = "labelAnzahlChars";
this.labelAnzahlChars.Size = new System.Drawing.Size(53, 16); this.labelAnzahlChars.Size = new System.Drawing.Size(53, 16);
this.labelAnzahlChars.TabIndex = 52; this.labelAnzahlChars.TabIndex = 52;
@ -778,7 +781,7 @@ namespace Deckungsbeitrag
// numericUpDownAufgabeCount // 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.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[] { this.numericUpDownAufgabeCount.Maximum = new decimal(new int[] {
99, 99,
0, 0,
@ -790,16 +793,16 @@ namespace Deckungsbeitrag
this.numericUpDownAufgabeCount.ValueChanged += new System.EventHandler(this.numericUpDownAufgabeCount_ValueChanged); this.numericUpDownAufgabeCount.ValueChanged += new System.EventHandler(this.numericUpDownAufgabeCount_ValueChanged);
this.numericUpDownAufgabeCount.Leave += new System.EventHandler(this.numericUpDownAufgabeCount_Leave); 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.comboBoxLRSommer.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.comboBoxLieferrhythmus.FormattingEnabled = true; this.comboBoxLRSommer.FormattingEnabled = true;
this.comboBoxLieferrhythmus.Location = new System.Drawing.Point(13, 422); this.comboBoxLRSommer.Location = new System.Drawing.Point(13, 435);
this.comboBoxLieferrhythmus.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.comboBoxLRSommer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.comboBoxLieferrhythmus.Name = "comboBoxLieferrhythmus"; this.comboBoxLRSommer.Name = "comboBoxLRSommer";
this.comboBoxLieferrhythmus.Size = new System.Drawing.Size(352, 28); this.comboBoxLRSommer.Size = new System.Drawing.Size(170, 28);
this.comboBoxLieferrhythmus.TabIndex = 55; this.comboBoxLRSommer.TabIndex = 55;
this.comboBoxLieferrhythmus.SelectedIndexChanged += new System.EventHandler(this.comboBoxLieferrhythmus_SelectedIndexChanged); this.comboBoxLRSommer.SelectedIndexChanged += new System.EventHandler(this.comboBoxLieferrhythmus_SelectedIndexChanged);
// //
// label5 // label5
// //
@ -812,13 +815,49 @@ namespace Deckungsbeitrag
this.label5.TabIndex = 54; this.label5.TabIndex = 54;
this.label5.Text = "Lieferrhythmus"; 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 // FormKundeVW
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.ClientSize = new System.Drawing.Size(1318, 761); 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.label5);
this.Controls.Add(this.numericUpDownAufgabeCount); this.Controls.Add(this.numericUpDownAufgabeCount);
this.Controls.Add(this.labelAnzahlChars); this.Controls.Add(this.labelAnzahlChars);
@ -937,8 +976,11 @@ namespace Deckungsbeitrag
private BrightIdeasSoftware.ObjectListView olvJahresumsatz; private BrightIdeasSoftware.ObjectListView olvJahresumsatz;
private System.Windows.Forms.Label labelAnzahlChars; private System.Windows.Forms.Label labelAnzahlChars;
private System.Windows.Forms.NumericUpDown numericUpDownAufgabeCount; 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.Label label5;
private System.Windows.Forms.ComboBox comboBoxLRWinter;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
} }
} }

View File

@ -31,6 +31,21 @@ namespace Deckungsbeitrag
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
this.toolStripMenu = new System.Windows.Forms.ToolStrip(); 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.panelMain = new System.Windows.Forms.Panel();
this.buttonNeuerStand = new System.Windows.Forms.Button(); this.buttonNeuerStand = new System.Windows.Forms.Button();
this.buttonNeueInventur = 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.rBFertig = new System.Windows.Forms.RadioButton();
this.rBVorbereitet = new System.Windows.Forms.RadioButton(); this.rBVorbereitet = new System.Windows.Forms.RadioButton();
this.rBAlle = 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.buttonAusgeliefert = new System.Windows.Forms.Button();
this.groupBoxScannTest = new System.Windows.Forms.GroupBox(); this.groupBoxScannTest = new System.Windows.Forms.GroupBox();
this.pictureBoxScannTest = new System.Windows.Forms.PictureBox();
this.textBoxScannTest = new System.Windows.Forms.TextBox(); this.textBoxScannTest = new System.Windows.Forms.TextBox();
this.buttonScannTest = new System.Windows.Forms.Button(); this.buttonScannTest = new System.Windows.Forms.Button();
this.labelScannTest = new System.Windows.Forms.Label(); this.labelScannTest = new System.Windows.Forms.Label();
this.tSBBenutzerVW = new System.Windows.Forms.ToolStripButton(); this.comboBoxSaison = new System.Windows.Forms.ComboBox();
this.tSBAuftragVW = new System.Windows.Forms.ToolStripButton(); this.groupBoxSaison = new System.Windows.Forms.GroupBox();
this.tSBAufgabeVW = new System.Windows.Forms.ToolStripButton(); this.buttonTestChart = new System.Windows.Forms.Button();
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.toolStripMenu.SuspendLayout(); this.toolStripMenu.SuspendLayout();
this.panelMain.SuspendLayout(); this.panelMain.SuspendLayout();
this.groupBoxStatistik.SuspendLayout(); this.groupBoxStatistik.SuspendLayout();
@ -98,6 +101,7 @@ namespace Deckungsbeitrag
((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).BeginInit();
this.groupBoxScannTest.SuspendLayout(); this.groupBoxScannTest.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxScannTest)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxScannTest)).BeginInit();
this.groupBoxSaison.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// toolStripMenu // toolStripMenu
@ -130,10 +134,302 @@ namespace Deckungsbeitrag
this.toolStripMenu.TabIndex = 0; this.toolStripMenu.TabIndex = 0;
this.toolStripMenu.Text = "toolStripMenu"; 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 // panelMain
// //
this.panelMain.AllowDrop = true; this.panelMain.AllowDrop = true;
this.panelMain.BackColor = System.Drawing.Color.White; 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.buttonNeuerStand);
this.panelMain.Controls.Add(this.buttonNeueInventur); this.panelMain.Controls.Add(this.buttonNeueInventur);
this.panelMain.Controls.Add(this.buttonNeueAufgabe); this.panelMain.Controls.Add(this.buttonNeueAufgabe);
@ -276,9 +572,9 @@ namespace Deckungsbeitrag
this.dateTimePicker1.CustomFormat = "dddd dd.MM.yyyy"; 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.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.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.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.TabIndex = 1;
this.dateTimePicker1.CloseUp += new System.EventHandler(this.dateTimePicker1_CloseUp); this.dateTimePicker1.CloseUp += new System.EventHandler(this.dateTimePicker1_CloseUp);
// //
@ -676,6 +972,26 @@ namespace Deckungsbeitrag
this.rBAlle.UseVisualStyleBackColor = true; this.rBAlle.UseVisualStyleBackColor = true;
this.rBAlle.CheckedChanged += new System.EventHandler(this.RadioButton_CheckedChanged); 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 // buttonAusgeliefert
// //
this.buttonAusgeliefert.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); 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.TabStop = false;
this.groupBoxScannTest.Visible = 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 // textBoxScannTest
// //
this.textBoxScannTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 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.Text = "label1";
this.labelScannTest.Visible = false; this.labelScannTest.Visible = false;
// //
// tSBBenutzerVW // comboBoxSaison
// //
this.tSBBenutzerVW.AutoSize = false; this.comboBoxSaison.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.tSBBenutzerVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); this.comboBoxSaison.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tSBBenutzerVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.comboBoxSaison.FormattingEnabled = true;
this.tSBBenutzerVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxSaison.Location = new System.Drawing.Point(8, 19);
this.tSBBenutzerVW.ForeColor = System.Drawing.Color.White; this.comboBoxSaison.Name = "comboBoxSaison";
this.tSBBenutzerVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBBenutzerVW.Image"))); this.comboBoxSaison.Size = new System.Drawing.Size(265, 28);
this.tSBBenutzerVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.comboBoxSaison.TabIndex = 66;
this.tSBBenutzerVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.comboBoxSaison.SelectedIndexChanged += new System.EventHandler(this.comboBoxSaison_SelectedIndexChanged);
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 // groupBoxSaison
// //
this.tSBAuftragVW.AutoSize = false; this.groupBoxSaison.Controls.Add(this.comboBoxSaison);
this.tSBAuftragVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); this.groupBoxSaison.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.tSBAuftragVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.groupBoxSaison.Location = new System.Drawing.Point(8, 251);
this.tSBAuftragVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupBoxSaison.Name = "groupBoxSaison";
this.tSBAuftragVW.ForeColor = System.Drawing.Color.White; this.groupBoxSaison.Size = new System.Drawing.Size(279, 59);
this.tSBAuftragVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBAuftragVW.Image"))); this.groupBoxSaison.TabIndex = 62;
this.tSBAuftragVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.groupBoxSaison.TabStop = false;
this.tSBAuftragVW.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.groupBoxSaison.Text = "AKTIVE SAISON";
this.tSBAuftragVW.ImageTransparentColor = System.Drawing.Color.Magenta; this.groupBoxSaison.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox_Paint);
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 // buttonTestChart
// //
this.tSBAufgabeVW.AutoSize = false; this.buttonTestChart.Location = new System.Drawing.Point(8, 168);
this.tSBAufgabeVW.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); this.buttonTestChart.Name = "buttonTestChart";
this.tSBAufgabeVW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.buttonTestChart.Size = new System.Drawing.Size(75, 23);
this.tSBAufgabeVW.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonTestChart.TabIndex = 66;
this.tSBAufgabeVW.ForeColor = System.Drawing.Color.White; this.buttonTestChart.Text = "TestChart";
this.tSBAufgabeVW.Image = ((System.Drawing.Image)(resources.GetObject("tSBAufgabeVW.Image"))); this.buttonTestChart.UseVisualStyleBackColor = true;
this.tSBAufgabeVW.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.buttonTestChart.Click += new System.EventHandler(this.buttonTestChart_Click);
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;
// //
// FormMain // FormMain
// //
@ -1097,6 +1136,7 @@ namespace Deckungsbeitrag
this.groupBoxScannTest.ResumeLayout(false); this.groupBoxScannTest.ResumeLayout(false);
this.groupBoxScannTest.PerformLayout(); this.groupBoxScannTest.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxScannTest)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxScannTest)).EndInit();
this.groupBoxSaison.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -1161,6 +1201,9 @@ namespace Deckungsbeitrag
private System.Windows.Forms.Button buttonNeueInventur; private System.Windows.Forms.Button buttonNeueInventur;
private System.Windows.Forms.Button buttonNeuerStand; private System.Windows.Forms.Button buttonNeuerStand;
private System.Windows.Forms.ToolStripButton tSBTourenplanung; private System.Windows.Forms.ToolStripButton tSBTourenplanung;
private System.Windows.Forms.ComboBox comboBoxSaison;
private System.Windows.Forms.GroupBox groupBoxSaison;
private System.Windows.Forms.Button buttonTestChart;
} }
} }

View File

@ -1,6 +1,7 @@
using BrightIdeasSoftware; using BrightIdeasSoftware;
using DatenDB; using DatenDB;
using Deckungsbeitrag.AA_Forms; using Deckungsbeitrag.AA_Forms;
using Deckungsbeitrag.AA_Klassen;
using Deckungsbeitrag.Properties; using Deckungsbeitrag.Properties;
using Npgsql; using Npgsql;
using System; using System;
@ -33,6 +34,7 @@ namespace Deckungsbeitrag
private Size _fixedSize; private Size _fixedSize;
private bool _handlingResize; private bool _handlingResize;
private readonly UserSettingsManager _settings = new UserSettingsManager(); private readonly UserSettingsManager _settings = new UserSettingsManager();
private bool formloading = false;
public FormMain() public FormMain()
@ -94,6 +96,7 @@ namespace Deckungsbeitrag
private void FormMain_Load(object sender, EventArgs e) private void FormMain_Load(object sender, EventArgs e)
{ {
formloading = true;
_settings.Load(); _settings.Load();
@ -102,25 +105,42 @@ namespace Deckungsbeitrag
this.panelMain.Width = this.Width - this.toolStripMenu.Right - 20; this.panelMain.Width = this.Width - this.toolStripMenu.Right - 20;
this.panelMain.Location = new Point(this.toolStripMenu.Right, 0); this.panelMain.Location = new Point(this.toolStripMenu.Right, 0);
GetStatistik(); GetStatistik();
GetSaison();
// GroupBoxen im PanelMain werden ausgeblendet // GroupBoxen im PanelMain werden ausgeblendet
foreach (Control ctr in this.panelMain.Controls) foreach (GroupBox gb in this.panelMain.Controls.OfType<GroupBox>())
{ {
if (ctr.GetType() == typeof(GroupBox)) if (!gb.Name.Contains("Update") & !gb.Name.Contains("Statistik") & !gb.Name.Contains("Neuer") & !gb.Name.Contains("Saison"))
{ {
GroupBox gb = (GroupBox)ctr; gb.Visible = false;
if(!gb.Name.Contains("Update") & !gb.Name.Contains("Statistik") & !gb.Name.Contains("Neuer")) gb.Location = new Point(0, 0);
{ gb.Size = new Size(this.panelMain.Width, this.panelMain.Height);
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; _fixedSize = this.Size;
formloading = false;
} }
private void GetSaison()
{
var listenQuelle = Saison.LadeSaisons(); // Liste<Saison>
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) private void Paint_Boarder(Size size, Point location, PaintEventArgs e)
{ {
Pen pen = new Pen(Color.FromArgb(1, 53, 101), 4); Pen pen = new Pen(Color.FromArgb(1, 53, 101), 4);
@ -966,6 +986,7 @@ namespace Deckungsbeitrag
gb.MouseUp += groupBox_MouseUp; gb.MouseUp += groupBox_MouseUp;
foreach(Control ctr in gb.Controls) foreach(Control ctr in gb.Controls)
{ {
if (ctr.GetType() == typeof(ComboBox) || ctr.GetType() == typeof(DateTimePicker)) return;
ctr.MouseDown += groupBox_MouseDown; ctr.MouseDown += groupBox_MouseDown;
ctr.MouseMove += groupBox_MouseMove; ctr.MouseMove += groupBox_MouseMove;
ctr.MouseUp += groupBox_MouseUp; ctr.MouseUp += groupBox_MouseUp;
@ -974,19 +995,23 @@ namespace Deckungsbeitrag
private void groupBox_MouseDown(object sender, MouseEventArgs e) private void groupBox_MouseDown(object sender, MouseEventArgs e)
{ {
GroupBox gb; GroupBox gb;
Control ctr = null;
//if(hit == null && e.Button == MouseButtons.Left) {
if (sender.GetType() == typeof(GroupBox)) gb = (GroupBox)sender; if (sender.GetType() == typeof(GroupBox)) gb = (GroupBox)sender;
else else
{ {
var ctr = (Control)sender; ctr = (Control)sender;
gb = (GroupBox)ctr.Parent; gb = (GroupBox)ctr.Parent;
} }
if (e.Button == MouseButtons.Left) if (e.Button == MouseButtons.Left)
{ {
isDragging = true; isDragging = true;
dragStartPoint = new Point(e.X, e.Y); dragStartPoint = new Point(e.X, e.Y);
} }
else isDragging = false;
} }
private void groupBox_MouseMove(object sender, MouseEventArgs e) private void groupBox_MouseMove(object sender, MouseEventArgs e)
{ {
@ -1143,6 +1168,46 @@ namespace Deckungsbeitrag
tourenplanung.ShowDialog(); tourenplanung.ShowDialog();
this.Cursor = Cursors.Default; 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. //CHANGES: Fahrer können abgeholte Aufträge erstellen und ausgelieferte Aufträge markieren.

View File

@ -16,7 +16,8 @@ using System.Threading.Tasks;
using System.Web.Caching; using System.Web.Caching;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Forms.VisualStyles; using System.Windows.Forms.VisualStyles;
using static System.Net.Mime.MediaTypeNames; using System.Text.Json;
namespace Deckungsbeitrag namespace Deckungsbeitrag
{ {
@ -108,8 +109,25 @@ namespace Deckungsbeitrag
else this.textBoxKundeName.Text = kunde.Suchtext; else this.textBoxKundeName.Text = kunde.Suchtext;
//if (letzterLiefertag.HasValue) this.dTPLiefertag.Value = letzterLiefertag.Value; //if (letzterLiefertag.HasValue) this.dTPLiefertag.Value = letzterLiefertag.Value;
//else this.dTPLiefertag.Value = DateTime.Today.AddDays(1); //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); dTPLiefertag_Leave(this.dTPLiefertag, EventArgs.Empty);
textBoxCont_TextChanged(this.textBoxCont, EventArgs.Empty); textBoxCont_TextChanged(this.textBoxCont, EventArgs.Empty);
@ -158,8 +176,16 @@ namespace Deckungsbeitrag
} }
if (col.Name == "Korrektur") if (col.Name == "Korrektur")
{ {
if(auftragTyp >= AuftragTyp.Standerhöhung) col.Visible = true; if (auftragTyp >= AuftragTyp.Standerhöhung) col.Visible = true;
else col.Visible = false; 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.Erstellt = DateTime.Now;
Auftrag.Container = int.Parse(this.textBoxCont.Text); Auftrag.Container = int.Parse(this.textBoxCont.Text);
Auftrag.Typ = (AuftragTyp)comboBoxTyp.SelectedItem; 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; if (maschine != null) Auftrag.MaschineID = (int)maschine.MaschineID;
else Auftrag.MaschineID = null; else Auftrag.MaschineID = null;
@ -249,6 +275,7 @@ namespace Deckungsbeitrag
{ {
int tosave = 0; int tosave = 0;
int saved = 0; int saved = 0;
bool negieren = false;
foreach (DataGridViewRow artikel in this.dGArtikel.Rows) foreach (DataGridViewRow artikel in this.dGArtikel.Rows)
{ {
tosave++; tosave++;
@ -263,8 +290,13 @@ namespace Deckungsbeitrag
} }
if (artikel.Cells[6].Visible == true) if (artikel.Cells[6].Visible == true)
{ {
stand.Korrektur = int.Parse(artikel.Cells[6].Value.ToString()); if (int.TryParse(artikel.Cells[6].Value.ToString(), out int result))
stand.KorrekturBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString(); {
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++; if (stand.Save() == 1) saved++;
} }
@ -275,6 +307,7 @@ namespace Deckungsbeitrag
{ {
//Speichern von AUFTRAG //Speichern von AUFTRAG
save = Auftrag.Save(); save = Auftrag.Save();
GetInventurCSV();
} }
} }
else else
@ -355,6 +388,8 @@ namespace Deckungsbeitrag
{ {
//Speichern von AUFTRAG //Speichern von AUFTRAG
save = Auftrag.Save(); save = Auftrag.Save();
GetInventurCSV();
} }
} }
else else
@ -396,6 +431,58 @@ namespace Deckungsbeitrag
this.textBoxCont.Text = cont.ToString(); this.textBoxCont.Text = cont.ToString();
} }
/// <summary>
/// CSV-Liste für Inventur erstellen.
/// Wenn Liste vorhanden werden Inventuren unten angehängt sonst wird Datei erstellt.
/// </summary>
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<DataGridViewRow>()
.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);
}
/// <summary> /// <summary>
/// TextBox Events /// TextBox Events
/// </summary> /// </summary>
@ -522,32 +609,12 @@ namespace Deckungsbeitrag
default: default:
break; 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) private void comboBoxFahrer_Validating(object sender, CancelEventArgs e)
{ {
if (((ComboBox)sender).SelectedIndex == -1) return; 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; } 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 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: 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: 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. //CHANGES: NeuerAuftrag wird jetzt mit Propertie AuftragTyp aufgerufen. Dadurch ist die Auswahl des AuftragTyp konstanter.

View File

@ -33,6 +33,8 @@
this.flowLayoutPanelKunden = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanelKunden = new System.Windows.Forms.FlowLayoutPanel();
this.comboBoxFilter = new System.Windows.Forms.ComboBox(); this.comboBoxFilter = new System.Windows.Forms.ComboBox();
this.buttonAddPage = new System.Windows.Forms.Button(); this.buttonAddPage = new System.Windows.Forms.Button();
this.radioButtonSommer = new System.Windows.Forms.RadioButton();
this.radioButtonWinter = new System.Windows.Forms.RadioButton();
this.SuspendLayout(); this.SuspendLayout();
// //
// tabControlLKW // tabControlLKW
@ -54,19 +56,22 @@
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.flowLayoutPanelKunden.AutoScroll = true; this.flowLayoutPanelKunden.AutoScroll = true;
this.flowLayoutPanelKunden.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); 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.Name = "flowLayoutPanelKunden";
this.flowLayoutPanelKunden.Size = new System.Drawing.Size(204, 414); this.flowLayoutPanelKunden.Size = new System.Drawing.Size(204, 407);
this.flowLayoutPanelKunden.TabIndex = 1; this.flowLayoutPanelKunden.TabIndex = 1;
// //
// comboBoxFilter // comboBoxFilter
// //
this.comboBoxFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxFilter.FormattingEnabled = true; 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.Margin = new System.Windows.Forms.Padding(5);
this.comboBoxFilter.Name = "comboBoxFilter"; 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.TabIndex = 2;
this.comboBoxFilter.SelectedIndexChanged += new System.EventHandler(this.comboBoxFilter_SelectedIndexChanged);
// //
// buttonAddPage // 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.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.ForeColor = System.Drawing.Color.Black;
this.buttonAddPage.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; 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.Margin = new System.Windows.Forms.Padding(5);
this.buttonAddPage.Name = "buttonAddPage"; this.buttonAddPage.Name = "buttonAddPage";
this.buttonAddPage.Size = new System.Drawing.Size(150, 28); this.buttonAddPage.Size = new System.Drawing.Size(150, 28);
@ -88,11 +93,49 @@
this.buttonAddPage.UseVisualStyleBackColor = false; this.buttonAddPage.UseVisualStyleBackColor = false;
this.buttonAddPage.Click += new System.EventHandler(this.buttonAddPage_Click); 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 // FormTourenplanung
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.ClientSize = new System.Drawing.Size(800, 450); 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.buttonAddPage);
this.Controls.Add(this.comboBoxFilter); this.Controls.Add(this.comboBoxFilter);
this.Controls.Add(this.flowLayoutPanelKunden); this.Controls.Add(this.flowLayoutPanelKunden);
@ -111,9 +154,11 @@
#endregion #endregion
private System.Windows.Forms.TabControl tabControlLKW; public System.Windows.Forms.TabControl tabControlLKW;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelKunden; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelKunden;
private System.Windows.Forms.ComboBox comboBoxFilter; private System.Windows.Forms.ComboBox comboBoxFilter;
private System.Windows.Forms.Button buttonAddPage; private System.Windows.Forms.Button buttonAddPage;
private System.Windows.Forms.RadioButton radioButtonSommer;
private System.Windows.Forms.RadioButton radioButtonWinter;
} }
} }

View File

@ -7,8 +7,10 @@ using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.CompilerServices;
using System.Text; using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -18,7 +20,10 @@ namespace Deckungsbeitrag.AA_Forms
{ {
public partial class FormTourenplanung : Form public partial class FormTourenplanung : Form
{ {
private List<Kunde> kundenliste;
private Benutzer Benutzer; private Benutzer Benutzer;
Meldungen meldung = new Meldungen();
#region Form-Konstruktor #region Form-Konstruktor
public FormTourenplanung() public FormTourenplanung()
@ -31,7 +36,6 @@ namespace Deckungsbeitrag.AA_Forms
this.Cursor = Cursors.WaitCursor; this.Cursor = Cursors.WaitCursor;
this.Benutzer = benutzer; this.Benutzer = benutzer;
LadeAlleTabs();
// Controls steuern nach BenutzerRolle // Controls steuern nach BenutzerRolle
switch (this.Benutzer.Rolle) switch (this.Benutzer.Rolle)
@ -65,23 +69,42 @@ namespace Deckungsbeitrag.AA_Forms
#endregion #endregion
private void FormTourenplanung_Load(object sender, EventArgs e) private void FormTourenplanung_Load(object sender, EventArgs e)
{ {
List<Kunde> kundenliste = Kunde.GetKundenTourenListe(); List<string> list = Kunde.GetRegionDistinct();
this.comboBoxFilter.DataSource = list;
this.comboBoxFilter.SelectedIndex = -1;
// Kunden hinzufügen GetList(string.Empty);
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);
}
// Breite des Panels anpassen damit die kompletten KundenControls sichtbar sind. +25 = ScrollBar Breite. // Breite des Panels anpassen damit die kompletten KundenControls sichtbar sind. +25 = ScrollBar Breite.
this.flowLayoutPanelKunden.Width = flowLayoutPanelKunden.Controls[0].Width + 25; this.flowLayoutPanelKunden.Width = flowLayoutPanelKunden.Controls[0].Width + 25;
this.tabControlLKW.Location = new Point(this.flowLayoutPanelKunden.Right, this.tabControlLKW.Location.Y); 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 #region TabControl-Funktionen
// 1. TabPage wird hinzugefügt. // 1. TabPage wird hinzugefügt.
@ -96,7 +119,7 @@ namespace Deckungsbeitrag.AA_Forms
// 2. Umbennen mit DoppelClick starten // 2. Umbennen mit DoppelClick starten
private void tabControlLKW_MouseDoubleClick(object sender, MouseEventArgs e) 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++) for (int i = 0; i < tabControlLKW.TabCount; i++)
{ {
@ -119,6 +142,7 @@ namespace Deckungsbeitrag.AA_Forms
} }
private void tabControlLKW_SelectedIndexChanged(object sender, EventArgs e) private void tabControlLKW_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (tabControlLKW.SelectedTab == null) return;
if (tabControlLKW.SelectedTab.Controls.Count == 0) if (tabControlLKW.SelectedTab.Controls.Count == 0)
{ {
UCTabPageLKW uc = new UCTabPageLKW(); UCTabPageLKW uc = new UCTabPageLKW();
@ -126,7 +150,7 @@ namespace Deckungsbeitrag.AA_Forms
tabControlLKW.SelectedTab.Controls.Add(uc); tabControlLKW.SelectedTab.Controls.Add(uc);
} }
} }
private void SpeichereAlleTabs() private void SpeichereAlleTabs(RadioButton rb)
{ {
var alleTabs = new List<TourenDaten>(); var alleTabs = new List<TourenDaten>();
@ -142,15 +166,27 @@ namespace Deckungsbeitrag.AA_Forms
{ {
WriteIndented = true 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() 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 try
{ {
string json = File.ReadAllText("lkw-touren.json");
var tabDaten = JsonSerializer.Deserialize<List<TourenDaten>>(json); var tabDaten = JsonSerializer.Deserialize<List<TourenDaten>>(json);
// Bestehende Tabs löschen // Bestehende Tabs löschen
@ -187,18 +223,149 @@ namespace Deckungsbeitrag.AA_Forms
private void FormTourenplanung_FormClosing(object sender, FormClosingEventArgs e) private void FormTourenplanung_FormClosing(object sender, FormClosingEventArgs e)
{ {
SpeichereAlleTabs(); foreach (RadioButton rb in this.Controls.OfType<RadioButton>()) if (rb.Checked) SpeichereAlleTabs(rb);
} }
private void FormTourenplanung_Shown(object sender, EventArgs e) private void FormTourenplanung_Shown(object sender, EventArgs e)
{ {
this.tabControlLKW.Width = this.Width - flowLayoutPanelKunden.Right - 20;
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
} }
/// <summary>
/// Hier werden die KundenControl-Clone gezählt und kontrolliert ob die maximale Cloneanzahl bereits existiert.
/// Max. Cloneanzahl ist abhängig vom hinterlegten Lieferrhythmus.
/// </summary>
/// <param name="form"></param>
/// <param name="kundectr"></param>
/// <returns>true wenn noch KundenControl-Clone verfügbar sind</returns>
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<KundenControl>()
.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<KundenControl>().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. //DONE: Testen ob umbenennen funktioniert.
//TODO: Max Clones von PanelKunde zu PanelTourenplanung. (Lieferrythmus eingeben?) //DONE: Max Clones von PanelKunde zu PanelTourenplanung. (Lieferrythmus eingeben?)
//TODO: Speichern der Touren ermöglichen. Eventuell über .json oder .xml Datei? //DONE: Speichern der Touren ermöglichen. Eventuell über .json oder .xml Datei?
//TODO: Filter für Regionen ermöglichen. //TODO: Filter für Regionen ermöglichen.
//TODO: Funktioniert mehrere KundenControls auf einmal DragDrop? //TODO: Funktioniert mehrere KundenControls auf einmal DragDrop?
//TODO: Wenn der Lieferrhythmus geändert wurde müssen alle Clone von falschen Tagen gelöscht werden.

View File

@ -7,6 +7,7 @@ using System.Threading.Tasks;
using BrightIdeasSoftware; using BrightIdeasSoftware;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Windows.Forms; using System.Windows.Forms;
using System.Configuration;
namespace DatenDB namespace DatenDB
{ {

View File

@ -1,4 +1,5 @@
using BrightIdeasSoftware; using BrightIdeasSoftware;
using Deckungsbeitrag;
using Npgsql; using Npgsql;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -238,6 +239,70 @@ namespace DatenDB
if(result > 0) return true; if(result > 0) return true;
else return false; 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) public Auftrag(NpgsqlDataReader reader)
{ {

View File

@ -12,6 +12,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Runtime; using System.Runtime;
using System.Runtime.CompilerServices;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting; using System.Windows.Forms.DataVisualization.Charting;
@ -1053,22 +1054,23 @@ namespace Deckungsbeitrag
string text = gb.Text; string text = gb.Text;
Font font = gb.Font; Font font = gb.Font;
Size textSize = TextRenderer.MeasureText(text, font); Size textSize = TextRenderer.MeasureText(text, font);
Pen pen = new Pen(Color.FromArgb(1, 53, 101), 2);
int textWidth = textSize.Width; int textWidth = textSize.Width;
int textHeight = textSize.Height; 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 // 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) // 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) // 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 // Linke vertikale Linie
e.Graphics.DrawLine(pen, rect.Left, rect.Top, rect.Left, rect.Bottom); 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); e.Graphics.DrawLine(pen, rect.Right, rect.Top, rect.Right, rect.Bottom);
// Untere Linie // 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; return gb;
} }
@ -1113,7 +1115,7 @@ namespace Deckungsbeitrag
DateTime aktDatum = DateTime.Today; DateTime aktDatum = DateTime.Today;
// Starte ab morgen und suche nächsten passenden Arbeitstag // 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); DateTime testDatum = aktDatum.AddDays(i);
DayOfWeek dow = testDatum.DayOfWeek; DayOfWeek dow = testDatum.DayOfWeek;
@ -1146,5 +1148,86 @@ namespace Deckungsbeitrag
return aktDatum.AddDays(7); return aktDatum.AddDays(7);
} }
public static Chart Load_FehlmengeChart(List<KundeArtikel> 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;
}
} }
} }

View File

@ -16,8 +16,8 @@ namespace DatenDB
public class Kunde public class Kunde
{ {
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 // 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, lieferrhythmus"; 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"; 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 TABLE = "kundenverwaltung.kunde";
public const string VIEW = "kundenverwaltung.jahresumsaetze"; //RICHTIGE VIEW AUSSUCHEN FÜR INAKTIVE MIT LETZTEN UMSATZ... public const string VIEW = "kundenverwaltung.jahresumsaetze"; //RICHTIGE VIEW AUSSUCHEN FÜR INAKTIVE MIT LETZTEN UMSATZ...
@ -86,37 +86,21 @@ namespace DatenDB
return resultList; return resultList;
} }
internal static List<Kunde> GetKundenTourenListe() internal static List<Kunde> GetKundenTourenListe(string region)
{ {
DatenbankConnection.GetConnection().Open(); DatenbankConnection.GetConnection().Open();
List<Kunde> resultList = new List<Kunde>(); List<Kunde> resultList = new List<Kunde>();
using (NpgsqlCommand command = new NpgsqlCommand()) using (NpgsqlCommand command = new NpgsqlCommand())
{ {
command.Connection = DatenbankConnection.GetConnection(); 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(); NpgsqlDataReader reader = command.ExecuteReader();
while (reader.Read()) resultList.Add(new Kunde(reader, false)); while (reader.Read()) resultList.Add(new Kunde(reader));
reader.Close(); reader.Close();
} }
DatenbankConnection.GetConnection().Close(); DatenbankConnection.GetConnection().Close();
foreach (Kunde kunde in resultList)
{
List<OLVKundenumsatz> list = new List<OLVKundenumsatz>();
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; return resultList;
} }
public static List<Kunde> GetList(bool? isaktiv, string text) public static List<Kunde> GetList(bool? isaktiv, string text)
@ -224,8 +208,8 @@ namespace DatenDB
this.Aufgabe = reader.IsDBNull(16) ? null : (int?)reader.GetInt32(16); this.Aufgabe = reader.IsDBNull(16) ? null : (int?)reader.GetInt32(16);
this.Anmerkung = reader.IsDBNull(17) ? string.Empty : reader.GetString(17); this.Anmerkung = reader.IsDBNull(17) ? string.Empty : reader.GetString(17);
this.AufgabeCount = reader.IsDBNull(18) ? 0 : reader.GetInt32(18); 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) public Kunde(NpgsqlDataReader reader)
@ -249,8 +233,8 @@ namespace DatenDB
this.Aufgabe = reader.IsDBNull(16) ? null : (int?)reader.GetInt32(16); this.Aufgabe = reader.IsDBNull(16) ? null : (int?)reader.GetInt32(16);
this.Anmerkung = reader.IsDBNull(17) ? string.Empty : reader.GetString(17); this.Anmerkung = reader.IsDBNull(17) ? string.Empty : reader.GetString(17);
this.AufgabeCount = reader.IsDBNull(18) ? 0 : reader.GetInt32(18); 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() public int Save()
{ {
@ -262,13 +246,13 @@ namespace DatenDB
if (this.KundeID.HasValue & this.KundeID != 0) 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 else
{ {
command.CommandText = "select nextval('kundenverwaltung.kunde_seq')"; command.CommandText = "select nextval('kundenverwaltung.kunde_seq')";
this.KundeID = (int)(long)command.ExecuteScalar(); 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); command.Parameters.AddWithValue("p0", this.KundeID);
@ -290,9 +274,10 @@ namespace DatenDB
command.Parameters.AddWithValue("p16", this.Aufgabe ?? (object)DBNull.Value); 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("p17", string.IsNullOrWhiteSpace(this.Anmerkung) ? (object)DBNull.Value : this.Anmerkung);
command.Parameters.AddWithValue("p18", this.AufgabeCount ?? (object)DBNull.Value); 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(); DatenbankConnection.GetConnection().Close();
return result; return result;
} }
@ -330,6 +315,21 @@ namespace DatenDB
} }
} }
internal static List<string> GetRegionDistinct()
{
DatenbankConnection.GetConnection().Open();
List<string> resultList = new List<string>();
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 #region Properties
[OLVIgnore] [OLVIgnore]
@ -414,7 +414,8 @@ namespace DatenDB
[OLVIgnore] [OLVIgnore]
public string Anmerkung { get; set; } public string Anmerkung { get; set; }
[OLVIgnore] [OLVIgnore]
public int LieferRhythmus { get; set; } public int SommerLieferRhythmus { get; set; }
public int WinterLieferRhythmus { get; set; }
#endregion #endregion
} }
} }

View File

@ -1,6 +1,7 @@
using Npgsql; using Npgsql;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -11,7 +12,7 @@ namespace DatenDB
public class KundeArtikel public class KundeArtikel
{ {
// 0 1 2 3 4 5 6 7 8 9 // 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"; private static string TABLE = "kundenverwaltung.kunde_artikel";
public KundeArtikel() { } public KundeArtikel() { }
@ -68,13 +69,13 @@ namespace DatenDB
command.Connection = DatenbankConnection.GetConnection(); command.Connection = DatenbankConnection.GetConnection();
if (this.KundeArtikelID.HasValue & this.KundeArtikelID != 0) 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 else
{ {
command.CommandText = "select nextval('kundenverwaltung.kunde_artikel_seq')"; command.CommandText = "select nextval('kundenverwaltung.kunde_artikel_seq')";
this.KundeArtikelID = (int)(long)command.ExecuteScalar(); 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); 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("p7", string.IsNullOrWhiteSpace(this.FehlmengeBearbeitet) ? (object)DBNull.Value : this.FehlmengeBearbeitet);
command.Parameters.AddWithValue("p8", this.Korrektur); command.Parameters.AddWithValue("p8", this.Korrektur);
command.Parameters.AddWithValue("p9", string.IsNullOrWhiteSpace(this.KorrekturBearbeitet) ? (object)DBNull.Value : this.KorrekturBearbeitet); command.Parameters.AddWithValue("p9", string.IsNullOrWhiteSpace(this.KorrekturBearbeitet) ? (object)DBNull.Value : this.KorrekturBearbeitet);
command.Parameters.AddWithValue("p10", this.Reklamation);
int result = command.ExecuteNonQuery(); int result = command.ExecuteNonQuery();
DatenbankConnection.GetConnection().Close(); DatenbankConnection.GetConnection().Close();
@ -123,6 +125,39 @@ namespace DatenDB
} }
internal static async Task<List<KundeArtikel>> LoadArtikelDatenAsync(Kunde kunde)
{
var artikelDaten = new List<KundeArtikel>();
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) public KundeArtikel(NpgsqlDataReader reader)
{ {
@ -136,6 +171,7 @@ namespace DatenDB
this.FehlmengeBearbeitet = reader.IsDBNull(7) ? string.Empty : reader.GetString(7); this.FehlmengeBearbeitet = reader.IsDBNull(7) ? string.Empty : reader.GetString(7);
this.Korrektur = reader.IsDBNull(8) ? 0 : reader.GetInt32(8); this.Korrektur = reader.IsDBNull(8) ? 0 : reader.GetInt32(8);
this.KorrekturBearbeitet = reader.IsDBNull(9) ? string.Empty : reader.GetString(9); this.KorrekturBearbeitet = reader.IsDBNull(9) ? string.Empty : reader.GetString(9);
this.Reklamation = reader.IsDBNull(10) ? 0 : reader.GetInt32(10);
} }
public int? KundeArtikelID { get; set; } public int? KundeArtikelID { get; set; }
@ -148,6 +184,8 @@ namespace DatenDB
public string FehlmengeBearbeitet { get; set; } public string FehlmengeBearbeitet { get; set; }
public int Korrektur { get; set; } public int Korrektur { get; set; }
public string KorrekturBearbeitet { get; set; } public string KorrekturBearbeitet { get; set; }
public int Reklamation { get; set; }
} }
} }
//INSTALL-REMINDER: Spalte Reklamation in Wirl_DB_17012023 einfügen

View File

@ -50,6 +50,24 @@ namespace Deckungsbeitrag.AA_Klassen
{ "4x Mo/Di/Do/Fr", ViermalMoDiDoFr }, { "4x Mo/Di/Do/Fr", ViermalMoDiDoFr },
{ "Täglich Mo-Fr", TaeglichMoFr } { "Täglich Mo-Fr", TaeglichMoFr }
}; };
private static readonly Dictionary<Liefertage, string> 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";
}
} }

98
AA-Klassen/Saison.cs Normal file
View File

@ -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<Saison> LadeSaisons()
{
DatenbankConnection.GetConnection().Open();
List<Saison> resultList = new List<Saison>();
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;
}
}
}

View File

@ -11,7 +11,7 @@ namespace Deckungsbeitrag.AA_Klassen
{ {
public string FahrzeugName { get; set; } public string FahrzeugName { get; set; }
public List<KundeData> KundenProTag { get; set; } = new List<KundeData>(); // [(Tag, Kunden[]), ...] public List<KundeData> KundenProTag { get; set; } = new List<KundeData>(); // [(Tag, Kunden[]), ...]
public Dictionary<string, int> Counter { get; set; } = new Dictionary<string, int>(); public Dictionary<string, int[]> Counter { get; set; } = new Dictionary<string, int[]>();
} }
public class KundeData public class KundeData
@ -19,5 +19,7 @@ namespace Deckungsbeitrag.AA_Klassen
public string Name { get; set; } public string Name { get; set; }
public string Region { get; set; } public string Region { get; set; }
public string Tag { get; set; } // ← MO, DI, MI, DO, FR public string Tag { get; set; } // ← MO, DI, MI, DO, FR
public int KundeID { get; set; }
public int[] ContAnzahl { get; set; } = new int[3];
} }
} }

View File

@ -8,7 +8,8 @@
<appSettings> <appSettings>
<add key="ConnectionString" value="user id=postgres;password=Ki985941Wi;host=10.10.10.1;port=5432;database=Test_Wirl;Timeout=30" /> <add key="ConnectionString" value="user id=postgres;password=Ki985941Wi;host=10.10.10.1;port=5432;database=Test_Wirl;Timeout=30" />
<add key="SortimentPfad" value="N:\\BÜRO\\SOCOM\\Zaehlscheine\\Kundensortiment.txt" /> <add key="SortimentPfad" value="N:\\BÜRO\\SOCOM\\Zaehlscheine\\Kundensortiment.txt" />
<add key="BildPfad" value="C:\\Users\\KilianWirl\\OneDrive - gehgassi GmbH\\Wäscherei Wirl\\Programme\\Deckungsbeitrag\\Deckungsbeitrag\\Star.png" /> <add key="InventurPfad" value="N:\BÜRO\KUNDEN\INVENTUREN\Verwaltung" />
<add key="BildPfad" value="C:\\Users\\KilianWirl\\OneDrive - gehgassi GmbH\\Wäscherei Wirl\\Programme\\Deckungsbeitrag\\Deckungsbeitrag\\Star.png" />
<add key="QrPfad" value="N:\\BÜRO\\SOCOM\\Zaehlscheine\\qrweb.png" /> <add key="QrPfad" value="N:\\BÜRO\\SOCOM\\Zaehlscheine\\qrweb.png" />
<add key="Variabel" value="5000,5020,5300,5450,5701,5702,5800,5805,5812,6000,6010,6040,6090,6402,6600,6620,6630,6640,6660,7171,7220,7230,7235" /> <add key="Variabel" value="5000,5020,5300,5450,5701,5702,5800,5805,5812,6000,6010,6040,6090,6402,6600,6620,6630,6640,6660,7171,7220,7230,7235" />
<add key="FixLohn" value="6120,6200,6210,6240,6790,6791,7021,7022,7150,7180,7181,7200,7201,7202,7203,7204,7207,7215,7225" /> <add key="FixLohn" value="6120,6200,6210,6240,6790,6791,7021,7022,7150,7180,7181,7200,7201,7202,7203,7204,7207,7215,7225" />

View File

@ -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;

View File

@ -30,11 +30,64 @@ namespace Deckungsbeitrag.UserControls
/// </summary> /// </summary>
private void InitializeComponent() 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.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.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion
private System.Windows.Forms.Label lblKunde;
private System.Windows.Forms.Label lblRegion;
private System.Windows.Forms.Label lblCont;
} }
} }

View File

@ -1,4 +1,5 @@
using System; using DatenDB;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@ -12,20 +13,27 @@ namespace Deckungsbeitrag.UserControls
{ {
public partial class KundenControl : UserControl public partial class KundenControl : UserControl
{ {
private Label lblKunde; //private Label lblKunde;
private Label lblRegion; //private Label lblRegion;
private FlowLayoutPanel flp; // ← Field deklarieren! //private FlowLayoutPanel flp; // ← Field deklarieren!
private Kunde kunde;
public string KundenName public string KundenName
{ {
get => lblKunde.Text; get => lblKunde.Text;
set => lblKunde.Text = value; set => lblKunde.Text = value;
} }
public string Region public string KundenRegion
{ {
get => lblRegion.Text; get => lblRegion.Text;
set => lblRegion.Text = value; set => lblRegion.Text = value;
} }
public string ContainerAnzahl
{
get => lblCont.Text;
set => lblCont.Text = value;
}
public int[] ContAnzahl = new int[3];
public KundenControl() public KundenControl()
{ {
@ -33,69 +41,54 @@ namespace Deckungsbeitrag.UserControls
SetupControl(); SetupControl();
} }
public KundenControl(string name, string region = "") : this() public KundenControl(Kunde kunde) : this()
{ {
KundenName = name; KundenName = kunde.Suchtext == string.Empty ? kunde.KundeName : kunde.Suchtext;
Region = region; 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() 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 ★★★ // ★★★ MOUSE-EVENTS DURCHREICHEN zu EINEM Handler ★★★
flp.MouseDown += KundenControl_MouseDown; this.MouseDown += KundenControl_MouseDown;
lblKunde.MouseDown += KundenControl_MouseDown; lblKunde.MouseDown += KundenControl_MouseDown;
lblRegion.MouseDown += KundenControl_MouseDown; lblRegion.MouseDown += KundenControl_MouseDown;
} }
private void KundenControl_MouseDown(object sender, MouseEventArgs e) 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) 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() 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);
}
} }
} }
} }

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -44,6 +44,11 @@
this.labelMO = new System.Windows.Forms.Label(); this.labelMO = new System.Windows.Forms.Label();
this.labelContMO = new System.Windows.Forms.Label(); this.labelContMO = new System.Windows.Forms.Label();
this.flowLayoutPanelMO = new System.Windows.Forms.FlowLayoutPanel(); 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.tableLayoutPanelTage.SuspendLayout();
this.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.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.flowLayoutPanelFR, 4, 1);
this.tableLayoutPanelTage.Controls.Add(this.flowLayoutPanelDO, 3, 1); this.tableLayoutPanelTage.Controls.Add(this.flowLayoutPanelDO, 3, 1);
this.tableLayoutPanelTage.Controls.Add(this.flowLayoutPanelMI, 2, 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.labelMO, 0, 0);
this.tableLayoutPanelTage.Controls.Add(this.labelContMO, 0, 2); this.tableLayoutPanelTage.Controls.Add(this.labelContMO, 0, 2);
this.tableLayoutPanelTage.Controls.Add(this.flowLayoutPanelMO, 0, 1); 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.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanelTage.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanelTage.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanelTage.Name = "tableLayoutPanelTage"; 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.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.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, 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.Size = new System.Drawing.Size(910, 719);
this.tableLayoutPanelTage.TabIndex = 1; this.tableLayoutPanelTage.TabIndex = 1;
// //
// flowLayoutPanelFR // flowLayoutPanelFR
// //
this.flowLayoutPanelFR.AllowDrop = true; this.flowLayoutPanelFR.AllowDrop = true;
this.flowLayoutPanelFR.AutoScroll = true;
this.flowLayoutPanelFR.BackColor = System.Drawing.SystemColors.ControlLight; this.flowLayoutPanelFR.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelFR.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanelFR.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelFR.Location = new System.Drawing.Point(731, 33); this.flowLayoutPanelFR.Location = new System.Drawing.Point(731, 33);
this.flowLayoutPanelFR.Name = "flowLayoutPanelFR"; 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.TabIndex = 19;
this.flowLayoutPanelFR.Tag = "FR"; this.flowLayoutPanelFR.Tag = "FR";
this.flowLayoutPanelFR.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop); this.flowLayoutPanelFR.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop);
@ -97,11 +109,12 @@
// flowLayoutPanelDO // flowLayoutPanelDO
// //
this.flowLayoutPanelDO.AllowDrop = true; this.flowLayoutPanelDO.AllowDrop = true;
this.flowLayoutPanelDO.AutoScroll = true;
this.flowLayoutPanelDO.BackColor = System.Drawing.SystemColors.ControlLight; this.flowLayoutPanelDO.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelDO.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanelDO.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelDO.Location = new System.Drawing.Point(549, 33); this.flowLayoutPanelDO.Location = new System.Drawing.Point(549, 33);
this.flowLayoutPanelDO.Name = "flowLayoutPanelDO"; 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.TabIndex = 18;
this.flowLayoutPanelDO.Tag = "DO"; this.flowLayoutPanelDO.Tag = "DO";
this.flowLayoutPanelDO.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop); this.flowLayoutPanelDO.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop);
@ -111,11 +124,12 @@
// flowLayoutPanelMI // flowLayoutPanelMI
// //
this.flowLayoutPanelMI.AllowDrop = true; this.flowLayoutPanelMI.AllowDrop = true;
this.flowLayoutPanelMI.AutoScroll = true;
this.flowLayoutPanelMI.BackColor = System.Drawing.SystemColors.ControlLight; this.flowLayoutPanelMI.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelMI.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanelMI.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelMI.Location = new System.Drawing.Point(367, 33); this.flowLayoutPanelMI.Location = new System.Drawing.Point(367, 33);
this.flowLayoutPanelMI.Name = "flowLayoutPanelMI"; 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.TabIndex = 17;
this.flowLayoutPanelMI.Tag = "MI"; this.flowLayoutPanelMI.Tag = "MI";
this.flowLayoutPanelMI.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop); this.flowLayoutPanelMI.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop);
@ -125,11 +139,12 @@
// flowLayoutPanelDI // flowLayoutPanelDI
// //
this.flowLayoutPanelDI.AllowDrop = true; this.flowLayoutPanelDI.AllowDrop = true;
this.flowLayoutPanelDI.AutoScroll = true;
this.flowLayoutPanelDI.BackColor = System.Drawing.SystemColors.ControlLight; this.flowLayoutPanelDI.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelDI.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanelDI.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelDI.Location = new System.Drawing.Point(185, 33); this.flowLayoutPanelDI.Location = new System.Drawing.Point(185, 33);
this.flowLayoutPanelDI.Name = "flowLayoutPanelDI"; 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.TabIndex = 16;
this.flowLayoutPanelDI.Tag = "DI"; this.flowLayoutPanelDI.Tag = "DI";
this.flowLayoutPanelDI.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop); 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.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContFR.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "labelContFR";
this.labelContFR.Size = new System.Drawing.Size(176, 30); this.labelContFR.Size = new System.Drawing.Size(176, 30);
this.labelContFR.TabIndex = 14; this.labelContFR.TabIndex = 14;
this.labelContFR.Tag = "FR";
this.labelContFR.Text = "25"; this.labelContFR.Text = "25";
this.labelContFR.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 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.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContDO.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "labelContDO";
this.labelContDO.Size = new System.Drawing.Size(176, 30); this.labelContDO.Size = new System.Drawing.Size(176, 30);
this.labelContDO.TabIndex = 13; this.labelContDO.TabIndex = 13;
this.labelContDO.Tag = "DO";
this.labelContDO.Text = "25"; this.labelContDO.Text = "25";
this.labelContDO.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 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.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContMI.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "labelContMI";
this.labelContMI.Size = new System.Drawing.Size(176, 30); this.labelContMI.Size = new System.Drawing.Size(176, 30);
this.labelContMI.TabIndex = 12; this.labelContMI.TabIndex = 12;
this.labelContMI.Tag = "MI";
this.labelContMI.Text = "25"; this.labelContMI.Text = "25";
this.labelContMI.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 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.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContDI.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "labelContDI";
this.labelContDI.Size = new System.Drawing.Size(176, 30); this.labelContDI.Size = new System.Drawing.Size(176, 30);
this.labelContDI.TabIndex = 11; this.labelContDI.TabIndex = 11;
this.labelContDI.Tag = "DI";
this.labelContDI.Text = "25"; this.labelContDI.Text = "25";
this.labelContDI.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 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.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.labelContMO.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "labelContMO";
this.labelContMO.Size = new System.Drawing.Size(176, 30); this.labelContMO.Size = new System.Drawing.Size(176, 30);
this.labelContMO.TabIndex = 5; this.labelContMO.TabIndex = 5;
this.labelContMO.Tag = "MO";
this.labelContMO.Text = "25"; this.labelContMO.Text = "25";
this.labelContMO.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.labelContMO.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// flowLayoutPanelMO // flowLayoutPanelMO
// //
this.flowLayoutPanelMO.AllowDrop = true; this.flowLayoutPanelMO.AllowDrop = true;
this.flowLayoutPanelMO.AutoScroll = true;
this.flowLayoutPanelMO.BackColor = System.Drawing.SystemColors.ControlLight; this.flowLayoutPanelMO.BackColor = System.Drawing.SystemColors.ControlLight;
this.flowLayoutPanelMO.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanelMO.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelMO.Location = new System.Drawing.Point(3, 33); this.flowLayoutPanelMO.Location = new System.Drawing.Point(3, 33);
this.flowLayoutPanelMO.Name = "flowLayoutPanelMO"; 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.TabIndex = 15;
this.flowLayoutPanelMO.Tag = "MO"; this.flowLayoutPanelMO.Tag = "MO";
this.flowLayoutPanelMO.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop); this.flowLayoutPanelMO.DragDrop += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragDrop);
this.flowLayoutPanelMO.DragEnter += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragEnter); this.flowLayoutPanelMO.DragEnter += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragEnter);
this.flowLayoutPanelMO.DragOver += new System.Windows.Forms.DragEventHandler(this.FlowLayout_DragOver); 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 // UCTabPageLKW
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanelTage); this.Controls.Add(this.tableLayoutPanelTage);
this.Name = "UCTabPageLKW"; this.Name = "UCTabPageLKW";
this.Size = new System.Drawing.Size(910, 719); this.Size = new System.Drawing.Size(910, 719);
@ -316,5 +401,10 @@
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelMI; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelMI;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelDI; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelDI;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelMO; 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;
} }
} }

View File

@ -1,14 +1,18 @@
using DatenDB; using DatenDB;
using Deckungsbeitrag.AA_Forms;
using Deckungsbeitrag.AA_Klassen; using Deckungsbeitrag.AA_Klassen;
using Microsoft.VisualBasic;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using static System.Net.WebRequestMethods;
namespace Deckungsbeitrag.UserControls namespace Deckungsbeitrag.UserControls
{ {
@ -20,31 +24,267 @@ namespace Deckungsbeitrag.UserControls
} }
private void FlowLayout_DragEnter(object sender, DragEventArgs e) 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 if (e.Data.GetDataPresent("KundeData")) // Custom Format
e.Effect = DragDropEffects.Copy; e.Effect = DragDropEffects.Copy;
if (e.Data.GetDataPresent(typeof(KundenControl)))
e.Effect = DragDropEffects.Move;
} }
private void FlowLayout_DragOver(object sender, DragEventArgs e) 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) private void FlowLayout_DragDrop(object sender, DragEventArgs e)
{ {
bool toClone = true;
string saison = string.Empty;
int saisonrhythmus = 0;
FlowLayoutPanel dropTarget = sender as FlowLayoutPanel; 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<RadioButton>()) if (rb.Checked) saison = rb.Text;
if (e.Data.GetDataPresent("KundeData")) if (e.Data.GetDataPresent("KundeData"))
{ {
KundenControl kunde = e.Data.GetData("KundeData") as KundenControl; KundenControl kundectr = e.Data.GetData("KundeData") as KundenControl;
if (kunde != null) 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(); Liefertage neuerRhythmus = GetKompatiblenRhythmus(dropDay, (Liefertage)saisonrhythmus);
kundeKopie.Parent = dropTarget; if (neuerRhythmus != (Liefertage)saisonrhythmus)
dropTarget.Controls.Add(kundeKopie); {
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<KundenControl>())
{
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<Label>())
{
if (tableLayoutPanelTage.GetRow(ctr) == 2) // Zeile 3 (Index 2)
{
if (ctr.Tag.ToString() == dropTarget.Tag.ToString())
{
// ctr.Text aktualisieren
ctr.Text = $"{gesamt[0]}/{gesamt[1]}/{gesamt[2]}";
}
}
}
}
/// <summary>
/// Wenn KundeControl gedropped wird, wird der Lieferrhythmus kontrolliert.
/// Stimmt Drop-Tag mit Liefertagen überein wenn NICHT kann Lieferrhythmus angepasst werden.
/// </summary>
/// <param name="dropDay"></param>
/// <param name="originalRhythmus"></param>
/// <returns>Liefertage von Lieferrhythmen</returns>
private static Liefertage GetKompatiblenRhythmus(DayOfWeek dropDay, Liefertage originalRhythmus)
{
Meldungen meldung = new Meldungen();
CancelEventArgs e = new CancelEventArgs();
string dropTag = CultureInfo.GetCultureInfo("de-DE").DateTimeFormat.GetDayName(dropDay);
// 1. Ist dropDay im Original enthalten? Wird originalRhythums zurück gegeben.
if (IstTagEnthalten(originalRhythmus, dropDay))
return originalRhythmus;
// 2. Anzahl Liefertag pro Woche von hinterlegtem Rhythmus finden
int originalAnzahl = Lieferrhythmen.GetMaxClonesNet48(originalRhythmus);
// 3. Fragen ob der Lieferrhythmus geändert werden soll.
// Wenn NEIN wird Lieferage.None zurückgegeben.
// Sonst wird Anzahl der gewünschten Lieferungen pro Woche abgefragt,
if (meldung.GetFrage(null, $"Der gewählte Liefertag {dropTag} passt nicht zum Lieferrhythmus: {originalRhythmus.GetAnzeigeText()}\n\nSoll der **Lieferrhythmus geändert** werden?", false) == DialogResult.Yes)
{
string input = Interaction.InputBox("Wie oft soll der Kunde pro Woche angefahren werden?\n\nAnzahl Lieferungen:", "Lieferungen pro Woche", originalAnzahl.ToString());
// Kontrolle ob Input ist eine Zahl.
// Bei Abbruch wird KEIN Lieferrhythmus zurück gegeben.
if (!string.IsNullOrWhiteSpace(input))
{
while (!int.TryParse(input, out int zahl) || zahl < 1)
{
MessageBox.Show("Bitte nur positive Ganzzahlen eingeben!", "Ungültig");
input = Interaction.InputBox("Wie oft soll der Kunde pro Woche angefahren werden?\n\nAnzahl Lieferungen:", "Lieferungen pro Woche", originalAnzahl.ToString());
if (string.IsNullOrWhiteSpace(input)) return Lieferrhythmen.Unbekannt;
}
}
else return Lieferrhythmen.Unbekannt;
// Wenn Input korrekt abgeschlossen, wird original Anzahl geändert.
originalAnzahl = int.Parse(input);
// Lieferrhythmus mit übereinstimmenden Liefertag und Liefertaganzahl wird gewählt und zurück gegeben.
switch (originalAnzahl)
{
case 1:
switch (dropDay)
{
case DayOfWeek.Monday: return Lieferrhythmen.WoechentlichMo;
case DayOfWeek.Tuesday: return Lieferrhythmen.WoechentlichDi;
case DayOfWeek.Wednesday: return Lieferrhythmen.WoechentlichMi;
case DayOfWeek.Thursday: return Lieferrhythmen.WoechentlichDo;
case DayOfWeek.Friday: return Lieferrhythmen.WoechentlichFr;
default: return Lieferrhythmen.WoechentlichMi;
}
case 2:
switch (dropDay)
{
case DayOfWeek.Monday: return Lieferrhythmen.ZweimalMoDo;
case DayOfWeek.Thursday: return Lieferrhythmen.ZweimalMoDo;
case DayOfWeek.Tuesday: return Lieferrhythmen.ZweimalDiFr;
case DayOfWeek.Friday: return Lieferrhythmen.ZweimalDiFr;
default:
return Lieferrhythmen.ZweimalMoDo;
}
case 3:
return Lieferrhythmen.DreimalMoMiFr;
case 4:
return Lieferrhythmen.ViermalMoDiDoFr;
case 5:
return Lieferrhythmen.TaeglichMoFr;
default:
return Lieferrhythmen.WoechentlichMo;
}
}
else return Lieferrhythmen.Unbekannt;
}
/// <summary>
/// Überprüfung ob Liefertag in hinterlegtem Lieferrhythmus enthalten ist.
/// </summary>
/// <param name="rhythmus"></param>
/// <param name="tag"></param>
/// <returns>Wenn enthalten return true</returns>
public static bool IstTagEnthalten(Liefertage rhythmus, DayOfWeek tag)
{
Liefertage tagFlag;
switch (tag)
{
case DayOfWeek.Monday:
tagFlag = Liefertage.Monday;
break;
case DayOfWeek.Tuesday:
tagFlag = Liefertage.Tuesday;
break;
case DayOfWeek.Wednesday:
tagFlag = Liefertage.Wednesday;
break;
case DayOfWeek.Thursday:
tagFlag = Liefertage.Thursday;
break;
case DayOfWeek.Friday:
tagFlag = Liefertage.Friday;
break;
default:
tagFlag = Liefertage.None;
break;
}
return (rhythmus & tagFlag) == tagFlag;
}
// ★ SPEICHERN nutzt TAG der FlowLayoutPanels ★ // ★ SPEICHERN nutzt TAG der FlowLayoutPanels ★
public TourenDaten SpeichereDaten() public TourenDaten SpeichereDaten()
{ {
@ -67,17 +307,31 @@ namespace Deckungsbeitrag.UserControls
data.KundenProTag.Add(new KundeData data.KundenProTag.Add(new KundeData
{ {
Name = kc.KundenName, Name = kc.KundenName,
Region = kc.Region, Region = kc.KundenRegion,
Tag = tag // ← Wochentag mit speichern! Tag = tag, // ← Wochentag mit speichern!
KundeID = (int)((Kunde)kundeCtrl.Tag).KundeID,
ContAnzahl = kc.ContAnzahl
}); });
} }
} }
// Counter finden (labelContMO -> MO, etc.) // Counter finden (labelContMO -> MO, etc.)
string counterName = $"labelCont{tag}"; if (data.Counter.TryGetValue(tag, out int[] counts))
var counterLabel = tableLayoutPanelTage.Controls.Find(counterName, true).FirstOrDefault() as Label; {
if (counterLabel != null) // Bestehende Werte laden
data.Counter[tag] = int.Parse(counterLabel.Text); string baseName = $"labelCont{tag}";
for (int i = 0; i < 3; i++)
{
string lblName = $"{baseName}{i}"; // labelContMO0, labelContMO1, labelContMO2
var lbl = tableLayoutPanelTage.Controls.Find(lblName, true).FirstOrDefault() as Label;
if (lbl != null && int.TryParse(lbl.Text, out int value))
{
counts[i] = value;
}
}
}
} }
} }
@ -108,21 +362,34 @@ namespace Deckungsbeitrag.UserControls
{ {
foreach (var kundeData in gruppe) foreach (var kundeData in gruppe)
{ {
var kunde = new KundenControl(kundeData.Name, kundeData.Region); Kunde kunde = Kunde.GetKunde(null, kundeData.KundeID, null);
zielFlp.Controls.Add(kunde); KundenControl kundectrl = new KundenControl(kunde);
kundectrl.Tag = kunde;
zielFlp.Controls.Add(kundectrl);
} }
} }
// Counter setzen // Counter setzen
if (data.Counter.TryGetValue(tag, out int count)) if (data.Counter.TryGetValue(tag, out int[] counts))
{ {
string counterName = $"labelCont{tag}"; string counterName = $"labelCont{tag}";
var counterLabel = tableLayoutPanelTage.Controls.Find(counterName, true).FirstOrDefault() as Label; var counterLabel = tableLayoutPanelTage.Controls
counterLabel.Text = count.ToString(); .Find(counterName, true)
.FirstOrDefault() as Label;
if (counterLabel != null)
{
// Beispiel: nur ersten Wert anzeigen
counterLabel.Text = $"{counts[0]}/{counts[1]}/{counts[2]}";
// oder alle drei, z.B. "max / avg / min"
// counterLabel.Text = $"{counts[0]} / {counts[1]} / {counts[2]}";
}
} }
GetGesamtContainer(zielFlp);
} }
} }
} }
} }
//TODO: Kein Clone mehr wenn im Panel bewegt wird. Nur neue Position übernehmen. (Fahrreihenfolge) //CHANGES: Innerhalb eines Tages kann die Reihenfolge angepasst werden.
//TODO: Kein Clone wenn zwischen den Panelen bewegt wird. //CHANGES: Wenn der Lieferrhythmus geändert wird, werden KundenControls an falschen Tagen gelöscht.

View File

@ -157,6 +157,12 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AA-Forms\FehlmengeChart.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AA-Forms\FehlmengeChart.Designer.cs">
<DependentUpon>FehlmengeChart.cs</DependentUpon>
</Compile>
<Compile Include="AA-Forms\FormNeuerBenutzer.cs"> <Compile Include="AA-Forms\FormNeuerBenutzer.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -348,6 +354,7 @@
<Compile Include="AA-Klassen\ListViewColumnSorter.cs" /> <Compile Include="AA-Klassen\ListViewColumnSorter.cs" />
<Compile Include="AA-Klassen\OLVBewertung.cs" /> <Compile Include="AA-Klassen\OLVBewertung.cs" />
<Compile Include="AA-Klassen\OLVKundenumsatz.cs" /> <Compile Include="AA-Klassen\OLVKundenumsatz.cs" />
<Compile Include="AA-Klassen\Saison.cs" />
<Compile Include="AA-Klassen\TourenDaten.cs" /> <Compile Include="AA-Klassen\TourenDaten.cs" />
<Compile Include="AA-Klassen\WSFach.cs" /> <Compile Include="AA-Klassen\WSFach.cs" />
<Compile Include="Config.cs" /> <Compile Include="Config.cs" />
@ -395,6 +402,9 @@
<DependentUpon>UCTabPageLKW.cs</DependentUpon> <DependentUpon>UCTabPageLKW.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UserSettingsManager.cs" /> <Compile Include="UserSettingsManager.cs" />
<EmbeddedResource Include="AA-Forms\FehlmengeChart.resx">
<DependentUpon>FehlmengeChart.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AA-Forms\FormArtikelVW.resx"> <EmbeddedResource Include="AA-Forms\FormArtikelVW.resx">
<DependentUpon>FormArtikelVW.cs</DependentUpon> <DependentUpon>FormArtikelVW.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -487,6 +497,9 @@
<EmbeddedResource Include="AA-Forms\FormKundeVW.resx"> <EmbeddedResource Include="AA-Forms\FormKundeVW.resx">
<DependentUpon>FormKundeVW.cs</DependentUpon> <DependentUpon>FormKundeVW.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UserControls\KundenControl.resx">
<DependentUpon>KundenControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UserControls\UCAuftrag.resx"> <EmbeddedResource Include="UserControls\UCAuftrag.resx">
<DependentUpon>UCAuftrag.cs</DependentUpon> <DependentUpon>UCAuftrag.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@ -4,27 +4,33 @@ NEUIGKEITEN - Version 1.0.4.7
Build-Info: Build-Info:
- Build-Typ: Release Build - Build-Typ: Release Build
- Erledigte TODOs: 16 - Erledigte TODOs: 18
- Offene TODOs: 35 - Offene TODOs: 31
- Install-Reminders: 1 - Install-Reminders: 1
- Changes: 22 - Changes: 29
=== ⚙️ INSTALL-REMINDER (1) === === ⚙️ INSTALL-REMINDER (1) ===
- ⚙️ Spalte Abteilungen in Auftrag muss in Wirl_DB_17012023 eingefügt werden. [FormExpedit.cs] - ⚙️ Spalte Abteilungen in Auftrag muss in Wirl_DB_17012023 eingefügt werden. [FormExpedit.cs]
=== ✨ CHANGES (22) === === ✨ CHANGES (29) ===
- ✨ AbteilungsStatus ist implementiert. [FormExpedit.cs] - ✨ AbteilungsStatus ist implementiert. [FormExpedit.cs]
- ✨ Als zweite Sortierung wird immer der Liefertag gewählt. [FormExpedit.cs] - ✨ Als zweite Sortierung wird immer der Liefertag gewählt. [FormExpedit.cs]
- ✨ Auftragverwaltung Spalten wurden aktualisiert. Mit Icons, Buttons und Sortierung auf Liefertag. [FormMain.cs] - ✨ Auftragverwaltung Spalten wurden aktualisiert. Mit Icons, Buttons und Sortierung auf Liefertag. [FormMain.cs]
- ✨ Aus und Einblenden der Nachwäsche möglich. [FormExpedit.cs] - ✨ Aus und Einblenden der Nachwäsche möglich. [FormExpedit.cs]
- ✨ Bearbeiten in ObjectListView möglich. (Kundename wird aber zurückgesetzt) [FormExpedit.cs] - ✨ Bearbeiten in ObjectListView möglich. (Kundename wird aber zurückgesetzt) [FormExpedit.cs]
- ✨ ComboBox kann zum Filtern der Kunden verwendet werden. [FormTourenplanung.cs]
- ✨ CSV Datei wird erstellt oder bei jeder Inventur erweitert. (Einfach in Excel importieren und auswerten.) [FormNeuerAuftrag.cs]
- ✨ Datumfilter funktioniert. [FormExpedit.cs] - ✨ Datumfilter funktioniert. [FormExpedit.cs]
- ✨ Es kann nach der Kontrolle der Lieferrhythmus geändert werden. Dazu muss auch die Anzahl der Liefertage gewählt werden. [FormTourenplanung.cs]
- ✨ Es können nur so viele Clone erstellt werden wie Liefertag im Lieferrhythmus hinterlegt sind. [FormTourenplanung.cs]
- ✨ Es wir kontrolliert ob der gewählte Liefertag zum hinterlegten Lieferrhythmus passt. [FormTourenplanung.cs]
- ✨ Es wird der zuständige Fahrer angezeigt. ToolTip zeigt den Grund falls vorhanden(Bei Sonderzuteilung). [FormExpedit.cs] - ✨ Es wird der zuständige Fahrer angezeigt. ToolTip zeigt den Grund falls vorhanden(Bei Sonderzuteilung). [FormExpedit.cs]
- ✨ Fahrer können abgeholte Aufträge erstellen und ausgelieferte Aufträge markieren. [FormMain.cs] - ✨ Fahrer können abgeholte Aufträge erstellen und ausgelieferte Aufträge markieren. [FormMain.cs]
- ✨ Geschäftaufträge werden in neuem Tab angezeigt. [FormExpedit.cs] - ✨ Geschäftaufträge werden in neuem Tab angezeigt. [FormExpedit.cs]
- ✨ GroupBox nicht mehr notwendig. Etikette Druck über ObjectListView. [FormExpedit.cs] - ✨ GroupBox nicht mehr notwendig. Etikette Druck über ObjectListView. [FormExpedit.cs]
- ✨ Highlightfarbe bleibt auch wenn unfocused. (Farbe ändern?) [FormExpedit.cs] - ✨ Highlightfarbe bleibt auch wenn unfocused. (Farbe ändern?) [FormExpedit.cs]
- ✨ Innerhalb eines Tages kann die Reihenfolge angepasst werden. [UCTabPageLKW.cs]
- ✨ Keine Timer da Probleme mit DB-Connection. DataGridView wird neu geladen wenn Auftrag neu gewählt wird. [FormExpedit.cs] - ✨ Keine Timer da Probleme mit DB-Connection. DataGridView wird neu geladen wenn Auftrag neu gewählt wird. [FormExpedit.cs]
- ✨ Kundeneingabe mit ? fügt einmaligen Kundenname als ZusatzInfo hinzu und wählt Kunde BAR DIVERSE 2320000 [FormExpedit.cs] - ✨ Kundeneingabe mit ? fügt einmaligen Kundenname als ZusatzInfo hinzu und wählt Kunde BAR DIVERSE 2320000 [FormExpedit.cs]
- ✨ 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?) [FormNeuerAuftrag.cs] - ✨ 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?) [FormNeuerAuftrag.cs]
@ -33,12 +39,13 @@ Build-Info:
- ✨ Rechtsklick auf Spaltenheader ermöglicht Filtern. [FormExpedit.cs] - ✨ Rechtsklick auf Spaltenheader ermöglicht Filtern. [FormExpedit.cs]
- ✨ Sortierte Spalte hat leicht andere Farbe. (Besser zu erkennen wonach sortiert wird) [FormExpedit.cs] - ✨ Sortierte Spalte hat leicht andere Farbe. (Besser zu erkennen wonach sortiert wird) [FormExpedit.cs]
- ✨ Suchen eines Auftrags mit Scan möglich. [FormExpedit.cs] - ✨ Suchen eines Auftrags mit Scan möglich. [FormExpedit.cs]
- ✨ Wenn der Lieferrhythmus geändert wird, werden KundenControls an falschen Tagen gelöscht. [UCTabPageLKW.cs]
- ✨ Wenn Doppelklick auf Zelle, wird gefragt ob bearbeiten wirklich gewollt. Sonst wird blockiert. [FormExpedit.cs] - ✨ Wenn Doppelklick auf Zelle, wird gefragt ob bearbeiten wirklich gewollt. Sonst wird blockiert. [FormExpedit.cs]
- ✨ Wenn Fahrer Auftrag erstellt wird beim Speichern standardmäßig seine ID als ArbeiterID gespeichert. Bedeutet ausführender = Fahrer selber. [FormNeuerAuftrag.cs] - ✨ Wenn Fahrer Auftrag erstellt wird beim Speichern standardmäßig seine ID als ArbeiterID gespeichert. Bedeutet ausführender = Fahrer selber. [FormNeuerAuftrag.cs]
- ✨ Wenn HEUTE als Liefertag gewählt, kommt Frage ob heute oder in einer Woche. Wenn JA dann HEUTE. [FormExpedit.cs] - ✨ Wenn HEUTE als Liefertag gewählt, kommt Frage ob heute oder in einer Woche. Wenn JA dann HEUTE. [FormExpedit.cs]
=== ✅ ERLEDIGTE TODOs (16) === === ✅ ERLEDIGTE TODOs (18) ===
- ✅ : 2 neue Buttons für "Neue Inventur" und "Neue Standveränderung" [FormMain.cs] - ✅ : 2 neue Buttons für "Neue Inventur" und "Neue Standveränderung" [FormMain.cs]
- ✅ : Auftrag über FormListe holen und daraus den Kunden für Fehlmenge holen. [FormFehlmengeCount.cs] - ✅ : Auftrag über FormListe holen und daraus den Kunden für Fehlmenge holen. [FormFehlmengeCount.cs]
- ✅ : Bei Fahrer neue Deaktivierung von Controls. [FormMain.cs] - ✅ : Bei Fahrer neue Deaktivierung von Controls. [FormMain.cs]
@ -48,8 +55,10 @@ Build-Info:
- ✅ : Etikett GroupBox entfernen. Änderungen direkt in ObjectListView vornehmen PrintPreview für Etikett. [FormExpedit.cs] - ✅ : Etikett GroupBox entfernen. Änderungen direkt in ObjectListView vornehmen PrintPreview für Etikett. [FormExpedit.cs]
- ✅ : Fehler wenn FormListe mit X geschlossen wird und Kunde null ist wurde behoben. [FormNeuerAuftrag.cs] - ✅ : Fehler wenn FormListe mit X geschlossen wird und Kunde null ist wurde behoben. [FormNeuerAuftrag.cs]
- ✅ : Logik überlegen wie ein bearbeiteter Auftrag nicht doppelt gewählt werden kann. (Abteilungen zu Auftrag hinzufügen und bei Ausschlager Druck definieren?) [FormFehlmengeCount.cs] - ✅ : Logik überlegen wie ein bearbeiteter Auftrag nicht doppelt gewählt werden kann. (Abteilungen zu Auftrag hinzufügen und bei Ausschlager Druck definieren?) [FormFehlmengeCount.cs]
- ✅ : Max Clones von PanelKunde zu PanelTourenplanung. (Lieferrythmus eingeben?) [FormTourenplanung.cs]
- ✅ : Neue Aufgabe Screen erstellen. [FormNeueAufgabe.cs] - ✅ : Neue Aufgabe Screen erstellen. [FormNeueAufgabe.cs]
- ✅ : Nur die Kunden der Aufträge als Liste anzeigen wäre möglich. Macht die Auswahl für das Personal einfacher weil 90% bereits weg fallen. [FormFehlmengeCount.cs] - ✅ : Nur die Kunden der Aufträge als Liste anzeigen wäre möglich. Macht die Auswahl für das Personal einfacher weil 90% bereits weg fallen. [FormFehlmengeCount.cs]
- ✅ : Speichern der Touren ermöglichen. Eventuell über .json oder .xml Datei? [FormTourenplanung.cs]
- ✅ : StartUp von Expedit verfeinern. [FormExpedit.cs] - ✅ : StartUp von Expedit verfeinern. [FormExpedit.cs]
- ✅ : Testen ob umbenennen funktioniert. [FormTourenplanung.cs] - ✅ : Testen ob umbenennen funktioniert. [FormTourenplanung.cs]
- ✅ : Wenn Fahrer einen Auftrag an Kollege übergibt? [FormNeuerAuftrag.cs] - ✅ : Wenn Fahrer einen Auftrag an Kollege übergibt? [FormNeuerAuftrag.cs]
@ -57,13 +66,12 @@ Build-Info:
- ✅ : Wenn NeuerAuftrag gewählt wie gehts weiter? [FormAusschlager.cs] - ✅ : Wenn NeuerAuftrag gewählt wie gehts weiter? [FormAusschlager.cs]
=== 🔄 OFFENE TODOs (35) === === 🔄 OFFENE TODOs (31) ===
- 🔄 Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? [FormExpedit.cs] - 🔄 Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? [FormExpedit.cs]
- 🔄 Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? [FormMain.cs] - 🔄 Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? [FormMain.cs]
- 🔄 Artikel Update weiter testen und programmieren. Für ArtikelKurzliste ausprogrammieren. [FormMain.cs] - 🔄 Artikel Update weiter testen und programmieren. Für ArtikelKurzliste ausprogrammieren. [FormMain.cs]
- 🔄 Auftragauswahl aufrufen statt NeuerAuftrag. (Wenn Fahrer Aufträge erstellen) [FormWSVerfolgung.cs] - 🔄 Auftragauswahl aufrufen statt NeuerAuftrag. (Wenn Fahrer Aufträge erstellen) [FormWSVerfolgung.cs]
- 🔄 Ausprobieren ob die Ausrichtung jetzt richtig ist. Sowohl beim ersten wie auch zweiten Mal. [Funktionen.cs] - 🔄 Ausprobieren ob die Ausrichtung jetzt richtig ist. Sowohl beim ersten wie auch zweiten Mal. [Funktionen.cs]
- 🔄 Datum HEUTE auch bei NeuerAuftrag?? [FormExpedit.cs]
- 🔄 Deaktivieren wenn SPS funktioniert. Transport wird simuliert. [FormWSVerfolgung.cs] - 🔄 Deaktivieren wenn SPS funktioniert. Transport wird simuliert. [FormWSVerfolgung.cs]
- 🔄 Design des Controls anpassen. Eventuell im Designer erstellen. [KundenControl.cs] - 🔄 Design des Controls anpassen. Eventuell im Designer erstellen. [KundenControl.cs]
- 🔄 Einkommentieren wenn ArtikelUpdate auf ArtikelKurzliste umgestellt werden kann. [FormMain.cs] - 🔄 Einkommentieren wenn ArtikelUpdate auf ArtikelKurzliste umgestellt werden kann. [FormMain.cs]
@ -73,16 +81,12 @@ Build-Info:
- 🔄 für Ladescreen den Progressbar programieren. (perplexity fragen wie der Status an einen anderen Screen übergeben werden kann) [FormMain.cs] - 🔄 für Ladescreen den Progressbar programieren. (perplexity fragen wie der Status an einen anderen Screen übergeben werden kann) [FormMain.cs]
- 🔄 Grund immer abfragen oder nur wenn Fahrer die Zuteilung ändert? [FormNeuerAuftrag.cs] - 🔄 Grund immer abfragen oder nur wenn Fahrer die Zuteilung ändert? [FormNeuerAuftrag.cs]
- 🔄 Hier Settings speichern mit UserSettingsManager Klasse. [FormEinstellung.cs] - 🔄 Hier Settings speichern mit UserSettingsManager Klasse. [FormEinstellung.cs]
- 🔄 Kein Clone mehr wenn im Panel bewegt wird. Nur neue Position übernehmen. (Fahrreihenfolge) [UCTabPageLKW.cs]
- 🔄 Kein Clone wenn zwischen den Panelen bewegt wird. [UCTabPageLKW.cs]
- 🔄 LadenScreen anzeigen etc. [FormMain.cs] - 🔄 LadenScreen anzeigen etc. [FormMain.cs]
- 🔄 Max Clones von PanelKunde zu PanelTourenplanung. (Lieferrythmus eingeben?) [FormTourenplanung.cs]
- 🔄 Nach Test und Rücksprache eventuell wieder umbauen. Benutzer.Rolle etc. [FormFehlmengeCount.cs] - 🔄 Nach Test und Rücksprache eventuell wieder umbauen. Benutzer.Rolle etc. [FormFehlmengeCount.cs]
- 🔄 OLV State speichern. [FormExpedit.cs] - 🔄 OLV State speichern. [FormExpedit.cs]
- 🔄 Reihenfolge Spalten richtig stellen. [FormExpedit.cs] - 🔄 Reihenfolge Spalten richtig stellen. [FormExpedit.cs]
- 🔄 Settings hier ändern auf UserSettingsManager Klasse. [FormEinstellung.cs] - 🔄 Settings hier ändern auf UserSettingsManager Klasse. [FormEinstellung.cs]
- 🔄 Soll hier ebenfalls der nächste Liefertag laut Rhythmus vorgeschlagen werden? [FormExpedit.cs] - 🔄 Soll hier ebenfalls der nächste Liefertag laut Rhythmus vorgeschlagen werden? [FormExpedit.cs]
- 🔄 Speichern der Touren ermöglichen. Eventuell über .json oder .xml Datei? [FormTourenplanung.cs]
- 🔄 Testen ob Get_ArtikelKurzliste funktioniert. [FormMain.cs] - 🔄 Testen ob Get_ArtikelKurzliste funktioniert. [FormMain.cs]
- 🔄 Testen ob Scan mit Prompt bei Suchen funktioniert. Kundenummer und Text etc. (meherere QR-Codes teseten) [FormExpedit.cs] - 🔄 Testen ob Scan mit Prompt bei Suchen funktioniert. Kundenummer und Text etc. (meherere QR-Codes teseten) [FormExpedit.cs]
- 🔄 Testen ob SWS-QRCodes gelesen werden können. Nur notwendig bis alle SWS-QRCodes richtig gedruckt und gelesen werden. [Kunde.cs] - 🔄 Testen ob SWS-QRCodes gelesen werden können. Nur notwendig bis alle SWS-QRCodes richtig gedruckt und gelesen werden. [Kunde.cs]
@ -90,9 +94,10 @@ Build-Info:
- 🔄 Umbau in Switch. [FormWSVerfolgung.cs] - 🔄 Umbau in Switch. [FormWSVerfolgung.cs]
- 🔄 UserSetting Properties eintragen und in EinstellungsScreen abrufen. [UserSettingsManager.cs] - 🔄 UserSetting Properties eintragen und in EinstellungsScreen abrufen. [UserSettingsManager.cs]
- 🔄 Weitere Properties von oben hier zuweisen [UserSettingsManager.cs] - 🔄 Weitere Properties von oben hier zuweisen [UserSettingsManager.cs]
- 🔄 Wenn der Lieferrhythmus geändert wurde müssen alle Clone von falschen Tagen gelöscht werden. [FormTourenplanung.cs]
- 🔄 Wenn GroupBox nicht notwendig, dann löschen. [FormExpedit.cs] - 🔄 Wenn GroupBox nicht notwendig, dann löschen. [FormExpedit.cs]
- 🔄 Wenn kunde null dann return. [FormNeuerAuftrag.cs] - 🔄 Wenn kunde null dann return. [FormNeuerAuftrag.cs]
- 🔄 Wenn Nachwäsche oder Müllwäsche alle Artikel anzeigen. [FormFehlmengeCount.cs] - 🔄 Wenn Nachwäsche oder Müllwäsche alle Artikel anzeigen. [FormFehlmengeCount.cs]
Installation: 16.01.2026 18:12 Installation: 06.02.2026 13:29
===================================== =====================================