From 20dad58b7a0d6df01537e8adb735aa1a615a341c Mon Sep 17 00:00:00 2001 From: Kilian Wirl Date: Wed, 1 Apr 2026 09:33:41 +0200 Subject: [PATCH] Inventur erneuern --- AA-Forms/FormAufleger.cs | 2 - AA-Forms/FormAuftragDetail.Designer.cs | 138 ++-- AA-Forms/FormAuftragDetail.cs | 221 ++++++- AA-Forms/FormExpedit.Designer.cs | 42 +- AA-Forms/FormExpedit.cs | 182 ++++-- AA-Forms/FormMain.Designer.cs | 831 ++++++++++++++----------- AA-Forms/FormMain.cs | 131 +++- AA-Forms/FormMain.resx | 30 +- AA-Forms/FormNeuerAuftrag.Designer.cs | 271 +++----- AA-Forms/FormNeuerAuftrag.cs | 284 +-------- AA-Forms/FormNeuerAuftrag.resx | 60 -- AA-Forms/FormOnBoarding.Designer.cs | 49 +- AA-Forms/FormOnBoarding.cs | 3 + AA-Klassen/Auftrag.cs | 1 + AA-Klassen/AuftragArtikel.cs | 3 +- AA-Klassen/Benutzer.cs | 3 +- AA-Klassen/Funktionen.cs | 7 +- AA-Klassen/KundeArtikel.cs | 18 + Program.cs | 1 + UserControls/UCInventur.Designer.cs | 363 +++++++++++ UserControls/UCInventur.cs | 550 ++++++++++++++++ UserControls/UCInventur.resx | 176 ++++++ Verwaltung.csproj | 9 + Verwaltung_ReadMe.txt | 17 +- 24 files changed, 2246 insertions(+), 1146 deletions(-) create mode 100644 UserControls/UCInventur.Designer.cs create mode 100644 UserControls/UCInventur.cs create mode 100644 UserControls/UCInventur.resx diff --git a/AA-Forms/FormAufleger.cs b/AA-Forms/FormAufleger.cs index ba83bfd..428dce4 100644 --- a/AA-Forms/FormAufleger.cs +++ b/AA-Forms/FormAufleger.cs @@ -219,8 +219,6 @@ namespace Deckungsbeitrag /// protected override bool ProcessDialogKey(Keys keyData) { - //TODO: Umbau in Switch. - // Escape [ESC] schließt den Screen. if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape) { diff --git a/AA-Forms/FormAuftragDetail.Designer.cs b/AA-Forms/FormAuftragDetail.Designer.cs index 42a939c..37ea83c 100644 --- a/AA-Forms/FormAuftragDetail.Designer.cs +++ b/AA-Forms/FormAuftragDetail.Designer.cs @@ -69,9 +69,10 @@ this.dTPLiefertag.Enabled = false; this.dTPLiefertag.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.dTPLiefertag.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.dTPLiefertag.Location = new System.Drawing.Point(138, 171); + this.dTPLiefertag.Location = new System.Drawing.Point(123, 137); + this.dTPLiefertag.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.dTPLiefertag.Name = "dTPLiefertag"; - this.dTPLiefertag.Size = new System.Drawing.Size(390, 29); + this.dTPLiefertag.Size = new System.Drawing.Size(347, 34); this.dTPLiefertag.TabIndex = 1; // // labelKundeName @@ -79,23 +80,24 @@ this.labelKundeName.AutoSize = true; this.labelKundeName.Font = new System.Drawing.Font("Microsoft Sans Serif", 22.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelKundeName.ForeColor = System.Drawing.Color.White; - this.labelKundeName.Location = new System.Drawing.Point(12, 45); + this.labelKundeName.Location = new System.Drawing.Point(11, 36); this.labelKundeName.Name = "labelKundeName"; - this.labelKundeName.Size = new System.Drawing.Size(179, 36); + this.labelKundeName.Size = new System.Drawing.Size(226, 42); this.labelKundeName.TabIndex = 1; this.labelKundeName.Text = "KundeName"; // // buttonFertig // - this.buttonFertig.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.buttonFertig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonFertig.BackColor = System.Drawing.Color.Turquoise; this.buttonFertig.FlatAppearance.BorderSize = 0; this.buttonFertig.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonFertig.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonFertig.ForeColor = System.Drawing.Color.Black; - this.buttonFertig.Location = new System.Drawing.Point(322, 769); + this.buttonFertig.Location = new System.Drawing.Point(286, 615); + this.buttonFertig.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonFertig.Name = "buttonFertig"; - this.buttonFertig.Size = new System.Drawing.Size(300, 63); + this.buttonFertig.Size = new System.Drawing.Size(267, 50); this.buttonFertig.TabIndex = 14; this.buttonFertig.Text = "Auftrag abschließen"; this.buttonFertig.UseVisualStyleBackColor = false; @@ -103,15 +105,16 @@ // // buttonAbbrechen // - this.buttonAbbrechen.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.buttonAbbrechen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonAbbrechen.BackColor = System.Drawing.Color.Red; this.buttonAbbrechen.FlatAppearance.BorderSize = 0; this.buttonAbbrechen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonAbbrechen.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonAbbrechen.ForeColor = System.Drawing.Color.Black; - this.buttonAbbrechen.Location = new System.Drawing.Point(934, 769); + this.buttonAbbrechen.Location = new System.Drawing.Point(830, 615); + this.buttonAbbrechen.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonAbbrechen.Name = "buttonAbbrechen"; - this.buttonAbbrechen.Size = new System.Drawing.Size(300, 63); + this.buttonAbbrechen.Size = new System.Drawing.Size(267, 50); this.buttonAbbrechen.TabIndex = 0; this.buttonAbbrechen.Text = "Abbrechen"; this.buttonAbbrechen.UseVisualStyleBackColor = false; @@ -122,22 +125,23 @@ this.labelRegion.AutoSize = true; this.labelRegion.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelRegion.ForeColor = System.Drawing.Color.White; - this.labelRegion.Location = new System.Drawing.Point(132, 117); + this.labelRegion.Location = new System.Drawing.Point(117, 94); this.labelRegion.Name = "labelRegion"; - this.labelRegion.Size = new System.Drawing.Size(71, 24); + this.labelRegion.Size = new System.Drawing.Size(91, 29); this.labelRegion.TabIndex = 18; this.labelRegion.Text = "Region"; // // textBoxZusatz // - this.textBoxZusatz.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxZusatz.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); this.textBoxZusatz.Enabled = false; this.textBoxZusatz.Font = new System.Drawing.Font("Microsoft Sans Serif", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxZusatz.Location = new System.Drawing.Point(24, 546); + this.textBoxZusatz.Location = new System.Drawing.Point(21, 437); + this.textBoxZusatz.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.textBoxZusatz.Multiline = true; this.textBoxZusatz.Name = "textBoxZusatz"; - this.textBoxZusatz.Size = new System.Drawing.Size(504, 201); + this.textBoxZusatz.Size = new System.Drawing.Size(448, 162); this.textBoxZusatz.TabIndex = 20; // // label1 @@ -145,9 +149,9 @@ this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.Color.White; - this.label1.Location = new System.Drawing.Point(18, 512); + this.label1.Location = new System.Drawing.Point(16, 410); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(62, 20); + this.label1.Size = new System.Drawing.Size(77, 25); this.label1.TabIndex = 21; this.label1.Text = "Zusatz:"; // @@ -156,9 +160,9 @@ this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.Color.White; - this.label2.Location = new System.Drawing.Point(18, 382); + this.label2.Location = new System.Drawing.Point(16, 306); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(82, 20); + this.label2.Size = new System.Drawing.Size(103, 25); this.label2.TabIndex = 22; this.label2.Text = "Container:"; // @@ -166,9 +170,10 @@ // this.pictureBoxMinus.BackColor = System.Drawing.Color.Red; this.pictureBoxMinus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxMinus.Image"))); - this.pictureBoxMinus.Location = new System.Drawing.Point(138, 434); + this.pictureBoxMinus.Location = new System.Drawing.Point(123, 347); + this.pictureBoxMinus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxMinus.Name = "pictureBoxMinus"; - this.pictureBoxMinus.Size = new System.Drawing.Size(57, 63); + this.pictureBoxMinus.Size = new System.Drawing.Size(51, 50); this.pictureBoxMinus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxMinus.TabIndex = 30; this.pictureBoxMinus.TabStop = false; @@ -178,9 +183,10 @@ // this.pictureBoxPlus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.pictureBoxPlus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxPlus.Image"))); - this.pictureBoxPlus.Location = new System.Drawing.Point(250, 434); + this.pictureBoxPlus.Location = new System.Drawing.Point(222, 347); + this.pictureBoxPlus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxPlus.Name = "pictureBoxPlus"; - this.pictureBoxPlus.Size = new System.Drawing.Size(57, 63); + this.pictureBoxPlus.Size = new System.Drawing.Size(51, 50); this.pictureBoxPlus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxPlus.TabIndex = 29; this.pictureBoxPlus.TabStop = false; @@ -191,9 +197,9 @@ this.labelContainer.BackColor = System.Drawing.Color.White; this.labelContainer.Font = new System.Drawing.Font("Microsoft Sans Serif", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelContainer.ForeColor = System.Drawing.Color.Black; - this.labelContainer.Location = new System.Drawing.Point(194, 434); + this.labelContainer.Location = new System.Drawing.Point(172, 347); this.labelContainer.Name = "labelContainer"; - this.labelContainer.Size = new System.Drawing.Size(57, 63); + this.labelContainer.Size = new System.Drawing.Size(51, 50); this.labelContainer.TabIndex = 28; this.labelContainer.Text = "0"; this.labelContainer.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -204,9 +210,9 @@ this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.ForeColor = System.Drawing.Color.White; - this.label5.Location = new System.Drawing.Point(188, 405); + this.label5.Location = new System.Drawing.Point(167, 324); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(52, 17); + this.label5.Size = new System.Drawing.Size(60, 20); this.label5.TabIndex = 31; this.label5.Text = "sauber"; // @@ -215,23 +221,24 @@ this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label6.ForeColor = System.Drawing.Color.White; - this.label6.Location = new System.Drawing.Point(394, 405); + this.label6.Location = new System.Drawing.Point(350, 324); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(71, 17); + this.label6.Size = new System.Drawing.Size(86, 20); this.label6.TabIndex = 32; this.label6.Text = "schmutzig"; // // buttonSWS // - this.buttonSWS.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.buttonSWS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonSWS.BackColor = System.Drawing.Color.Yellow; this.buttonSWS.FlatAppearance.BorderSize = 0; this.buttonSWS.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonSWS.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonSWS.ForeColor = System.Drawing.Color.Black; - this.buttonSWS.Location = new System.Drawing.Point(16, 769); + this.buttonSWS.Location = new System.Drawing.Point(14, 615); + this.buttonSWS.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonSWS.Name = "buttonSWS"; - this.buttonSWS.Size = new System.Drawing.Size(300, 63); + this.buttonSWS.Size = new System.Drawing.Size(267, 50); this.buttonSWS.TabIndex = 34; this.buttonSWS.Text = "Sonderetikett drucken"; this.buttonSWS.UseVisualStyleBackColor = false; @@ -239,15 +246,16 @@ // // buttonSpeichern // - this.buttonSpeichern.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.buttonSpeichern.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonSpeichern.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.buttonSpeichern.FlatAppearance.BorderSize = 0; this.buttonSpeichern.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonSpeichern.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonSpeichern.ForeColor = System.Drawing.Color.Black; - this.buttonSpeichern.Location = new System.Drawing.Point(628, 769); + this.buttonSpeichern.Location = new System.Drawing.Point(558, 615); + this.buttonSpeichern.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonSpeichern.Name = "buttonSpeichern"; - this.buttonSpeichern.Size = new System.Drawing.Size(300, 63); + this.buttonSpeichern.Size = new System.Drawing.Size(267, 50); this.buttonSpeichern.TabIndex = 36; this.buttonSpeichern.Text = "Änderungen speichern"; this.buttonSpeichern.UseVisualStyleBackColor = false; @@ -258,9 +266,9 @@ this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label7.ForeColor = System.Drawing.Color.White; - this.label7.Location = new System.Drawing.Point(16, 249); + this.label7.Location = new System.Drawing.Point(14, 199); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(60, 20); + this.label7.Size = new System.Drawing.Size(75, 25); this.label7.TabIndex = 37; this.label7.Text = "Fahrer:"; // @@ -269,9 +277,9 @@ this.label10.AutoSize = true; this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label10.ForeColor = System.Drawing.Color.White; - this.label10.Location = new System.Drawing.Point(16, 320); + this.label10.Location = new System.Drawing.Point(14, 256); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(67, 20); + this.label10.Size = new System.Drawing.Size(83, 25); this.label10.TabIndex = 39; this.label10.Text = "Priorität:"; // @@ -279,10 +287,10 @@ // this.comboBoxPriority.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxPriority.FormattingEnabled = true; - this.comboBoxPriority.Location = new System.Drawing.Point(136, 311); - this.comboBoxPriority.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.comboBoxPriority.Location = new System.Drawing.Point(121, 249); + this.comboBoxPriority.Margin = new System.Windows.Forms.Padding(4); this.comboBoxPriority.Name = "comboBoxPriority"; - this.comboBoxPriority.Size = new System.Drawing.Size(391, 32); + this.comboBoxPriority.Size = new System.Drawing.Size(348, 37); this.comboBoxPriority.TabIndex = 41; this.comboBoxPriority.SelectedValueChanged += new System.EventHandler(this.comboBox_SelectedValueChanged); // @@ -290,10 +298,10 @@ // this.comboBoxFahrer.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxFahrer.FormattingEnabled = true; - this.comboBoxFahrer.Location = new System.Drawing.Point(136, 240); - this.comboBoxFahrer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.comboBoxFahrer.Location = new System.Drawing.Point(121, 192); + this.comboBoxFahrer.Margin = new System.Windows.Forms.Padding(4); this.comboBoxFahrer.Name = "comboBoxFahrer"; - this.comboBoxFahrer.Size = new System.Drawing.Size(391, 32); + this.comboBoxFahrer.Size = new System.Drawing.Size(348, 37); this.comboBoxFahrer.TabIndex = 42; this.comboBoxFahrer.SelectedValueChanged += new System.EventHandler(this.comboBox_SelectedValueChanged); // @@ -301,9 +309,10 @@ // this.pictureBoxDirtMinus.BackColor = System.Drawing.Color.Red; this.pictureBoxDirtMinus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxDirtMinus.Image"))); - this.pictureBoxDirtMinus.Location = new System.Drawing.Point(360, 434); + this.pictureBoxDirtMinus.Location = new System.Drawing.Point(320, 347); + this.pictureBoxDirtMinus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxDirtMinus.Name = "pictureBoxDirtMinus"; - this.pictureBoxDirtMinus.Size = new System.Drawing.Size(57, 63); + this.pictureBoxDirtMinus.Size = new System.Drawing.Size(51, 50); this.pictureBoxDirtMinus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxDirtMinus.TabIndex = 45; this.pictureBoxDirtMinus.TabStop = false; @@ -313,9 +322,10 @@ // this.pictureBoxDirtPlus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.pictureBoxDirtPlus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxDirtPlus.Image"))); - this.pictureBoxDirtPlus.Location = new System.Drawing.Point(472, 434); + this.pictureBoxDirtPlus.Location = new System.Drawing.Point(420, 347); + this.pictureBoxDirtPlus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxDirtPlus.Name = "pictureBoxDirtPlus"; - this.pictureBoxDirtPlus.Size = new System.Drawing.Size(57, 63); + this.pictureBoxDirtPlus.Size = new System.Drawing.Size(51, 50); this.pictureBoxDirtPlus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxDirtPlus.TabIndex = 44; this.pictureBoxDirtPlus.TabStop = false; @@ -326,9 +336,9 @@ this.labelContDirt.BackColor = System.Drawing.Color.White; this.labelContDirt.Font = new System.Drawing.Font("Microsoft Sans Serif", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelContDirt.ForeColor = System.Drawing.Color.Black; - this.labelContDirt.Location = new System.Drawing.Point(416, 434); + this.labelContDirt.Location = new System.Drawing.Point(370, 347); this.labelContDirt.Name = "labelContDirt"; - this.labelContDirt.Size = new System.Drawing.Size(57, 63); + this.labelContDirt.Size = new System.Drawing.Size(51, 50); this.labelContDirt.TabIndex = 43; this.labelContDirt.Text = "0"; this.labelContDirt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -338,9 +348,9 @@ this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.ForeColor = System.Drawing.Color.White; - this.label3.Location = new System.Drawing.Point(18, 14); + this.label3.Location = new System.Drawing.Point(16, 11); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(75, 20); + this.label3.Size = new System.Drawing.Size(96, 25); this.label3.TabIndex = 46; this.label3.Text = "KundeNr:"; // @@ -349,9 +359,9 @@ this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.ForeColor = System.Drawing.Color.White; - this.label4.Location = new System.Drawing.Point(16, 122); + this.label4.Location = new System.Drawing.Point(14, 98); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(64, 20); + this.label4.Size = new System.Drawing.Size(79, 25); this.label4.TabIndex = 47; this.label4.Text = "Region:"; // @@ -360,9 +370,9 @@ this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label8.ForeColor = System.Drawing.Color.White; - this.label8.Location = new System.Drawing.Point(18, 185); + this.label8.Location = new System.Drawing.Point(16, 148); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(76, 20); + this.label8.Size = new System.Drawing.Size(93, 25); this.label8.TabIndex = 48; this.label8.Text = "Liefertag:"; // @@ -378,11 +388,11 @@ this.oLVArtikel.FullRowSelect = true; this.oLVArtikel.GridLines = true; this.oLVArtikel.HideSelection = false; - this.oLVArtikel.Location = new System.Drawing.Point(556, 97); - this.oLVArtikel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.oLVArtikel.Location = new System.Drawing.Point(494, 78); + this.oLVArtikel.Margin = new System.Windows.Forms.Padding(4); this.oLVArtikel.Name = "oLVArtikel"; this.oLVArtikel.ShowImagesOnSubItems = true; - this.oLVArtikel.Size = new System.Drawing.Size(676, 650); + this.oLVArtikel.Size = new System.Drawing.Size(601, 521); this.oLVArtikel.TabIndex = 49; this.oLVArtikel.UseAlternatingBackColors = true; this.oLVArtikel.UseCompatibleStateImageBehavior = false; @@ -392,13 +402,14 @@ this.oLVArtikel.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.oLVArtikel_CellEditStarting); this.oLVArtikel.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.oLVArtikel_ItemCheck); this.oLVArtikel.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.oLVArtikel_ItemChecked); + this.oLVArtikel.SizeChanged += new System.EventHandler(this.oLVArtikel_SizeChanged); // // FormAuftragDetail // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - this.ClientSize = new System.Drawing.Size(1252, 858); + this.ClientSize = new System.Drawing.Size(1113, 686); this.Controls.Add(this.oLVArtikel); this.Controls.Add(this.label8); this.Controls.Add(this.label4); @@ -427,6 +438,7 @@ this.Controls.Add(this.dTPLiefertag); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.MaximizeBox = false; this.Name = "FormAuftragDetail"; this.Text = "Auftrag Detail"; diff --git a/AA-Forms/FormAuftragDetail.cs b/AA-Forms/FormAuftragDetail.cs index 6f32993..cb2f2f0 100644 --- a/AA-Forms/FormAuftragDetail.cs +++ b/AA-Forms/FormAuftragDetail.cs @@ -1,30 +1,38 @@ -using System; +using BrightIdeasSoftware; +using DatenDB; +using Deckungsbeitrag.UserControls; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.Data; +using System.Diagnostics.Eventing.Reader; using System.Drawing; using System.Drawing.Printing; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; using System.Windows.Forms; -using BrightIdeasSoftware; -using DatenDB; -using Deckungsbeitrag.UserControls; +using System.Windows.Input; +using ZXing; namespace Deckungsbeitrag { public partial class FormAuftragDetail : Form { + private Dictionary dictionary = new Dictionary(); public Auftrag auftrag; public Benutzer benutzer; public List artikelList; public Meldungen meldung = new Meldungen(); + private UCInventur uci; + private UCFeedback fb; public Kunde kunde; private int diff = 0; - int[] bestand = new int[3]; // Reklamation/Fehlmenge/Standveränderung + int[] bestand; // Reklamation/Fehlmenge/Standveränderung/Inventurausgleich + bool etikettgedruckt = false; //WENN AUFTRAG SPEICHERN @@ -97,13 +105,32 @@ namespace Deckungsbeitrag this.comboBoxPriority.SelectedValueChanged += comboBox_SelectedValueChanged; this.comboBoxFahrer.SelectedValueChanged += comboBox_SelectedValueChanged; - Load_OLV(); + if (this.auftrag.Typ != AuftragTyp.Inventur || (this.auftrag.Typ == AuftragTyp.Inventur & this.auftrag.Status == AuftragStatus.Herrichten)) Load_OLV(); + else Load_UCInventur(this.auftrag); this.ClientSize = new Size(this.oLVArtikel.Right + 10, this.ClientSize.Height); //WENN STATUS VORBEREITET BUTTON FERTIG ENABLEN if (auftrag.Status == AuftragStatus.Vorbereitet) { buttonFertig.Enabled = true; buttonFertig.BackColor = Color.FromArgb(0, 192, 0); toclose = true; } } + private void Load_UCInventur(Auftrag _auftrag) + { + Point loc = this.oLVArtikel.Location; + this.oLVArtikel.Visible = false; + string loadPath = Path.Combine(ConfigurationManager.AppSettings["DateiSavePfad"], "Listen\\Inventuren") ?? "Inventuren"; + // Alle "Herrichten" Inventur Files auflisten. + string[] invFiles = Directory.GetFiles(loadPath, $"Warten-{_auftrag.AuftragID.ToString()}*.csv"); + if (invFiles.Length == 0) return; + if (invFiles.Length > 1) { MessageBox.Show("Es wurden mehr Inventuren gefunden. Besprich das mit deinem Vorgesetzten.", "FEHLER", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } + string[] lines = File.ReadAllLines(Path.Combine(loadPath, invFiles[0]), Encoding.UTF8); + + + uci = new UCInventur(lines, this.benutzer, this); + uci.Visible = false; + uci.SizeChangedForParent += () => { this.PerformLayout(); }; + this.Controls.Add(uci); + } + private void Load_OLV() { Generator.GenerateColumns(this.oLVArtikel, typeof(AuftragArtikel), true); @@ -112,6 +139,9 @@ namespace Deckungsbeitrag this.oLVArtikel.SetObjects(this.artikelList); this.oLVArtikel = Funktionen.Columns_Resize(null, this.oLVArtikel).olv; + + // Wenn alle Artikel Checked sind TOCLOSE auslösen. + oLVArtikel_ItemChecked(this.oLVArtikel, null); } private void LadeComboBoxen() @@ -218,16 +248,20 @@ namespace Deckungsbeitrag auftrag.ZusatzInfo = this.textBoxZusatz.Text; auftrag.Save(); - if (auftrag.Typ == AuftragTyp.Regelmäßig) + if (auftrag.Typ == AuftragTyp.Regelmäßig || (auftrag.Typ == AuftragTyp.Inventur & auftrag.Status == AuftragStatus.Herrichten)) { foreach (OLVListItem item in this.oLVArtikel.Items) { - AuftragArtikel art = (AuftragArtikel)item.Tag; + AuftragArtikel art = (AuftragArtikel)item.RowObject; if (item.Checked) art.Erledigt = true; else art.Erledigt = false; art.Save(); } + if (auftrag.Typ == AuftragTyp.Inventur) + { + WriteToCSV(dictionary); + } } } @@ -306,6 +340,18 @@ namespace Deckungsbeitrag auftrag.Status = AuftragStatus.Fertig; auftrag.Save(); } + if (auftrag.Typ == AuftragTyp.Inventur) + { + string loadPath = Path.Combine(ConfigurationManager.AppSettings["DateiSavePfad"], "Listen\\Inventuren") ?? "Inventuren"; + // Inventur File des aktuellen Auftrags auflisten. + string[] invFiles = Directory.GetFiles(loadPath, $"Herrichten-{auftrag.AuftragID.ToString()}-{kunde.KundeNummer}.csv"); + if (invFiles.Length == 1) + { + string ausgeliefertFile = $"Fertig-{auftrag.AuftragID.ToString()}-{kunde.KundeNummer}.csv"; + File.Copy(Path.Combine(loadPath, invFiles[0]), Path.Combine(loadPath, ausgeliefertFile)); + File.Delete(Path.Combine(loadPath, invFiles[0])); + } + } } this.DialogResult = DialogResult.OK; @@ -322,8 +368,87 @@ namespace Deckungsbeitrag if (MessageBox.Show("Möchtest du Etiketten für die Änderung drucken?", "FRAGE", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Funktionen.SonderEtikett_Drucken(this.auftrag, bestand); + + + etikettgedruckt = true; + } + + } + + /// + /// SonderAuftrag in CSV-Liste eintragen. Jede Änderung wird in eine Zeile eingetragen. Rek./NW/Rest + /// + /// + private void WriteToCSV(Dictionary dictionary) + { + Kunde _knd = Kunde.GetKunde(null, auftrag.KundeID, null); + Benutzer _user = this.benutzer; + List _artikelliste = KundeArtikel.GetList(_knd.KundeID.ToString()); + + string artikel = string.Empty; + string artikelStand = string.Empty; + string[] bestandNamen = new string[4] { "Rek.", "NW", "Rest", "INV" }; + string fileName = $"{_knd.KundeNummer}_{_knd.Suchtext}.csv"; // Immer gleiche Datei! + string savePath = ConfigurationManager.AppSettings["DateiSavePfad"]; + string inventurOrdner = Path.Combine(savePath, "Listen\\Kundenstand") ?? "Kundenstand"; + string csvPath = Path.Combine(inventurOrdner, fileName); + + // Prüfen ob Header schon existiert + bool headerExists = File.Exists(csvPath); + + // Artikelbezeichnungen in string convertieren + foreach (KundeArtikel art in _artikelliste) { artikel += ";" + art.ArtikelName; artikelStand += ";" + art.Stand.ToString(); } + + // Nur Header bei NEUER Datei + if (!headerExists) + { + var csv = new StringBuilder(); + csv.AppendLine("=== STANDVERÄNDERUNG ==="); + csv.AppendLine($"KundeNr: {_knd.KundeNummer}"); + csv.AppendLine($"Kunde: {_knd.KundeName}"); + csv.AppendLine(new string('=', 30)); + csv.AppendLine(); + csv.AppendLine($"Erstellt am;Erstellt von;Hergerichtet am;Veränderung;{artikel}"); + File.WriteAllText(csvPath, csv.ToString(), Encoding.UTF8); } + // NEUE Artikel ANHÄNGEN (ohne Header) + var appendCsv = new StringBuilder(); + string difftrennzeichen = string.Empty; + + var artikelArray = artikel.Split(';'); + + foreach (var kvp in dictionary) + { + string artikelKey = kvp.Key; // z.B. "ART1" + int[] artbestand = kvp.Value; // z.B. [3, 0, 5] + + int artikelIndex = Array.IndexOf(artikelArray, artikelKey); + if (artikelIndex < 0) continue; + + for (int idxInBestand = 0; idxInBestand < artbestand.Length; idxInBestand++) + { + int art = artbestand[idxInBestand]; + if (art == 0) continue; + + // Spalten: Datum, User, Heute, Bestandsname, dann alle Artikel‑Spalten + int totalColumns = 4 + artikelArray.Length; + var line = new string[totalColumns]; + + line[0] = auftrag.Erstellt.Value.Date.ToString("yyyy-MM-dd"); + line[1] = _user.Vorname + " " + _user.Nachname; + line[2] = DateTime.Today.ToString("yyyy-MM-dd"); + line[3] = bestandNamen[idxInBestand]; // z.B. "Lager A" + + // Wert in der richtigen Artikel‑Spalte + line[4 + artikelIndex] = art.ToString(); + + appendCsv.AppendLine(string.Join(";", line)); + } + } + appendCsv.AppendLine($"{DateTime.Today.Date.ToString("yyyy-MM-dd")};;;Stand;{artikelStand}{difftrennzeichen}"); + // ANHÄNGEN statt überschreiben + File.AppendAllText(csvPath, appendCsv.ToString(), Encoding.UTF8); } @@ -344,16 +469,30 @@ namespace Deckungsbeitrag //PRINT PAGE FÜR DRUCK private void FormAuftragDetail_Shown(object sender, EventArgs e) { - UCFeedback fb = new UCFeedback(benutzer); + fb = new UCFeedback(benutzer); Button btn = fb.Controls[0] as Button; - if (fb != null) fb.Location = new Point(this.ClientSize.Width - fb.Width - 7, 0); btn.BackColor = Program.Wirlblau; btn.ForeColor = Color.White; btn.FlatAppearance.BorderColor = Color.White; this.Controls.Add(fb); fb.BringToFront(); - this.oLVArtikel.Location = new Point(this.oLVArtikel.Location.X, fb.Bottom + 2); - this.oLVArtikel.Height = this.textBoxZusatz.Bottom - this.oLVArtikel.Top; + if (uci != null) + { + uci.Location = this.oLVArtikel.Location = new Point(this.oLVArtikel.Location.X, fb.Bottom + 2); + uci.Visible = true; + this.ClientSize = new Size(uci.Right, uci.Bottom + buttonAbbrechen.Height + 25); + } + else + { + this.oLVArtikel.Height = this.textBoxZusatz.Bottom - this.oLVArtikel.Top; + this.ClientSize = new Size(oLVArtikel.Right + 10, oLVArtikel.Bottom + buttonAbbrechen.Height + 25); + } + if (fb != null) fb.Location = new Point(this.ClientSize.Width - fb.Width - 7, 0); + + + + //if (oLVArtikel != null) this.ClientSize = new Size(oLVArtikel.Right + 10, oLVArtikel.Bottom + buttonAbbrechen.Height + 25); + } private void oLVArtikel_CellEditStarting(object sender, CellEditEventArgs e) @@ -368,34 +507,44 @@ namespace Deckungsbeitrag ObjectListView olv = (ObjectListView)sender; AuftragArtikel auftragArtikel = (AuftragArtikel)e.RowObject; - if (e.Column.Text == "Anzahl") diff = ((int)e.Value - ((int)e.NewValue)); + if (e.Column.Text == "Anzahl") diff = (int)e.Value - ((int)e.NewValue); + if (diff > 0) tosave = true; auftragArtikel.Anzahl = (int)e.NewValue; auftragArtikel.Save(); + if (auftragArtikel.Anzahl == 0) e.ListViewItem.Checked = true; KundeArtikel kndart = KundeArtikel.GetKundeArtikelVonArtikelID(this.kunde.KundeID, auftragArtikel.ArtikelID); int reklamation = kndart.Reklamation; int fehlmenge = kndart.Fehlmenge; int stand = kndart.Stand; - KorrigiereBestand(diff, ref reklamation, ref fehlmenge, ref stand); + int korrektur = kndart.Korrektur; + KorrigiereBestand(diff, ref reklamation, ref fehlmenge, ref stand, ref korrektur); kndart.Reklamation = reklamation; kndart.Fehlmenge = fehlmenge; kndart.Stand = stand; + kndart.Korrektur = korrektur; - kndart.Save(); + if (dictionary.TryGetValue(kndart.ArtikelName, out int[] value)) + { + for (int i = 0; i < value.Length; i++) + { + value[i] += bestand[i]; + } + } + else dictionary.Add(kndart.ArtikelName, bestand); + //WriteToCSV(kndart); this.ResumeLayout(); this.Cursor = Cursors.Default; } - //TODO: Standerhöhung funktioniert soweit Standverringerung soll nur auf Stand gehen - public void KorrigiereBestand(int diff, ref int reklamation, ref int fehlmenge, ref int stand) + public void KorrigiereBestand(int diff, ref int reklamation, ref int fehlmenge, ref int stand, ref int korrektur) { - + bestand = new int[4]; if (diff == 0) return; - if (diff < 0) { bestand[2] = diff; stand += diff; return; } int rest = diff * 1; @@ -417,20 +566,48 @@ namespace Deckungsbeitrag rest -= abbau; } - // 3) Rest auf Stand buchen + // 3) Inventurausgleich korrigieren + if (korrektur > 0) + { + int korr = Math.Min(korrektur, rest); + bestand[3] = korr; + korrektur -= korr; + rest -= korr; + } + // 4) Rest auf Stand buchen if (rest > 0) stand += rest; bestand[2] = rest; } - private void oLVArtikel_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { tosave = true; } + + private void FormAuftragDetail_Resize(object sender, EventArgs e) + { + if (fb != null) fb.Location = new Point(this.ClientSize.Width - fb.Width - 7, 0); + if (uci != null) this.ClientSize = new Size(uci.Right, uci.Bottom + buttonAbbrechen.Height + 25); + if (oLVArtikel != null) this.ClientSize = new Size(oLVArtikel.Right + 10, oLVArtikel.Bottom + buttonAbbrechen.Height + 25); + } + + private void FormAuftragDetail_Layout(object sender, LayoutEventArgs e) + { + if (fb != null) fb.Location = new Point(this.ClientSize.Width - fb.Width - 7, 0); + if (uci != null) this.ClientSize = new Size(uci.Right, uci.Bottom + buttonAbbrechen.Height + 25); + if (oLVArtikel != null) this.ClientSize = new Size(oLVArtikel.Right + 10, oLVArtikel.Bottom + buttonAbbrechen.Height + 25); + + //FormAuftragDetail_Resize(this, null); + } + + private void oLVArtikel_SizeChanged(object sender, EventArgs e) + { + this.ClientSize = new Size(oLVArtikel.Right + 10, oLVArtikel.Bottom + buttonAbbrechen.Height + 25); + } } } //TODO: Standverminderung und Standerhöhung mit einem Aufruf (Standveränderung?) Bei Verminderung -Zahlen sonst Plus. -//TODO: Korrigiere Bestand: Wenn -Zahl dann Stand - Zahl. +//DONE: Korrigiere Bestand: Wenn -Zahl dann Stand - Zahl. //TODO: Speichern etc. durchgehen und adaptieren //TODO: Liste vorher/nachher durchdenken //DONE: Feedback Button hinzufügen diff --git a/AA-Forms/FormExpedit.Designer.cs b/AA-Forms/FormExpedit.Designer.cs index b1d0a8b..1d42cb3 100644 --- a/AA-Forms/FormExpedit.Designer.cs +++ b/AA-Forms/FormExpedit.Designer.cs @@ -192,12 +192,12 @@ 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.Location = new System.Drawing.Point(3, 26); 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.Size = new System.Drawing.Size(287, 154); this.tableLayoutPanelInfo.TabIndex = 0; // // labelAnmerkung @@ -207,7 +207,7 @@ 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.Size = new System.Drawing.Size(281, 77); this.labelAnmerkung.TabIndex = 0; this.labelAnmerkung.Text = "label2"; // @@ -215,9 +215,9 @@ // this.labelAufgabe.AutoSize = true; this.labelAufgabe.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelAufgabe.Location = new System.Drawing.Point(3, 79); + this.labelAufgabe.Location = new System.Drawing.Point(3, 77); this.labelAufgabe.Name = "labelAufgabe"; - this.labelAufgabe.Size = new System.Drawing.Size(281, 79); + this.labelAufgabe.Size = new System.Drawing.Size(281, 77); this.labelAufgabe.TabIndex = 1; this.labelAufgabe.Text = "label3"; // @@ -270,9 +270,9 @@ // tabPageRampe // this.tabPageRampe.Controls.Add(this.objectListViewRampe); - this.tabPageRampe.Location = new System.Drawing.Point(4, 34); + this.tabPageRampe.Location = new System.Drawing.Point(4, 39); this.tabPageRampe.Name = "tabPageRampe"; - this.tabPageRampe.Size = new System.Drawing.Size(890, 584); + this.tabPageRampe.Size = new System.Drawing.Size(890, 579); this.tabPageRampe.TabIndex = 3; this.tabPageRampe.Text = "Rampe"; this.tabPageRampe.UseVisualStyleBackColor = true; @@ -291,7 +291,7 @@ this.objectListViewRampe.Location = new System.Drawing.Point(0, 0); this.objectListViewRampe.Name = "objectListViewRampe"; this.objectListViewRampe.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu; - this.objectListViewRampe.Size = new System.Drawing.Size(890, 584); + this.objectListViewRampe.Size = new System.Drawing.Size(890, 579); this.objectListViewRampe.Sorting = System.Windows.Forms.SortOrder.Ascending; this.objectListViewRampe.TabIndex = 2; this.objectListViewRampe.TintSortColumn = true; @@ -308,10 +308,10 @@ // tabPageSonder // this.tabPageSonder.Controls.Add(this.objectListViewSonder); - this.tabPageSonder.Location = new System.Drawing.Point(4, 34); + this.tabPageSonder.Location = new System.Drawing.Point(4, 39); this.tabPageSonder.Name = "tabPageSonder"; this.tabPageSonder.Padding = new System.Windows.Forms.Padding(3); - this.tabPageSonder.Size = new System.Drawing.Size(890, 584); + this.tabPageSonder.Size = new System.Drawing.Size(890, 579); this.tabPageSonder.TabIndex = 1; this.tabPageSonder.Text = "Sonderaufträge"; this.tabPageSonder.UseVisualStyleBackColor = true; @@ -329,7 +329,7 @@ this.objectListViewSonder.Location = new System.Drawing.Point(3, 3); this.objectListViewSonder.Name = "objectListViewSonder"; this.objectListViewSonder.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu; - this.objectListViewSonder.Size = new System.Drawing.Size(884, 578); + this.objectListViewSonder.Size = new System.Drawing.Size(884, 573); this.objectListViewSonder.Sorting = System.Windows.Forms.SortOrder.Ascending; this.objectListViewSonder.TabIndex = 2; this.objectListViewSonder.TintSortColumn = true; @@ -347,10 +347,10 @@ // tabPageGeschaeft // this.tabPageGeschaeft.Controls.Add(this.objectListViewGeschaeft); - this.tabPageGeschaeft.Location = new System.Drawing.Point(4, 34); + this.tabPageGeschaeft.Location = new System.Drawing.Point(4, 39); this.tabPageGeschaeft.Name = "tabPageGeschaeft"; this.tabPageGeschaeft.Padding = new System.Windows.Forms.Padding(3); - this.tabPageGeschaeft.Size = new System.Drawing.Size(890, 584); + this.tabPageGeschaeft.Size = new System.Drawing.Size(890, 579); this.tabPageGeschaeft.TabIndex = 2; this.tabPageGeschaeft.Text = "Geschäft"; this.tabPageGeschaeft.UseVisualStyleBackColor = true; @@ -369,7 +369,7 @@ this.objectListViewGeschaeft.Location = new System.Drawing.Point(3, 3); this.objectListViewGeschaeft.Name = "objectListViewGeschaeft"; this.objectListViewGeschaeft.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu; - this.objectListViewGeschaeft.Size = new System.Drawing.Size(884, 578); + this.objectListViewGeschaeft.Size = new System.Drawing.Size(884, 573); this.objectListViewGeschaeft.Sorting = System.Windows.Forms.SortOrder.Ascending; this.objectListViewGeschaeft.TabIndex = 2; this.objectListViewGeschaeft.TintSortColumn = true; @@ -392,10 +392,10 @@ // tabPageAll // this.tabPageAll.Controls.Add(this.objectListViewAuftrag); - this.tabPageAll.Location = new System.Drawing.Point(4, 34); + this.tabPageAll.Location = new System.Drawing.Point(4, 39); this.tabPageAll.Name = "tabPageAll"; this.tabPageAll.Padding = new System.Windows.Forms.Padding(3); - this.tabPageAll.Size = new System.Drawing.Size(890, 584); + this.tabPageAll.Size = new System.Drawing.Size(890, 579); this.tabPageAll.TabIndex = 0; this.tabPageAll.Text = "Aufträge heute"; this.tabPageAll.UseVisualStyleBackColor = true; @@ -414,7 +414,7 @@ this.objectListViewAuftrag.Location = new System.Drawing.Point(3, 3); this.objectListViewAuftrag.Name = "objectListViewAuftrag"; this.objectListViewAuftrag.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu; - this.objectListViewAuftrag.Size = new System.Drawing.Size(884, 578); + this.objectListViewAuftrag.Size = new System.Drawing.Size(884, 573); this.objectListViewAuftrag.Sorting = System.Windows.Forms.SortOrder.Ascending; this.objectListViewAuftrag.TabIndex = 1; this.objectListViewAuftrag.TintSortColumn = true; @@ -457,9 +457,9 @@ // tabPageVorbereitet // this.tabPageVorbereitet.Controls.Add(this.objectListViewVorbereitet); - this.tabPageVorbereitet.Location = new System.Drawing.Point(4, 34); + this.tabPageVorbereitet.Location = new System.Drawing.Point(4, 39); this.tabPageVorbereitet.Name = "tabPageVorbereitet"; - this.tabPageVorbereitet.Size = new System.Drawing.Size(890, 584); + this.tabPageVorbereitet.Size = new System.Drawing.Size(890, 579); this.tabPageVorbereitet.TabIndex = 4; this.tabPageVorbereitet.Text = "Vorbereitet"; this.tabPageVorbereitet.UseVisualStyleBackColor = true; @@ -479,7 +479,7 @@ this.objectListViewVorbereitet.Location = new System.Drawing.Point(0, 0); this.objectListViewVorbereitet.Name = "objectListViewVorbereitet"; this.objectListViewVorbereitet.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu; - this.objectListViewVorbereitet.Size = new System.Drawing.Size(890, 584); + this.objectListViewVorbereitet.Size = new System.Drawing.Size(890, 579); this.objectListViewVorbereitet.Sorting = System.Windows.Forms.SortOrder.Ascending; this.objectListViewVorbereitet.TabIndex = 2; this.objectListViewVorbereitet.TintSortColumn = true; @@ -512,7 +512,6 @@ this.Controls.Add(this.buttonNeuerAuftrag); this.Controls.Add(this.buttonSWS_Drucken); this.Controls.Add(this.tabControlAuftragList); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.HelpButton = true; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Margin = new System.Windows.Forms.Padding(2); @@ -521,6 +520,7 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "EXPEDIT"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.HelpButtonClicked += new System.ComponentModel.CancelEventHandler(this.FormExpedit_HelpButtonClicked); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormExpedit_FormClosing); this.Load += new System.EventHandler(this.FormExpedit_Load); this.Shown += new System.EventHandler(this.FormExpedit_Shown); diff --git a/AA-Forms/FormExpedit.cs b/AA-Forms/FormExpedit.cs index 7a2e41b..0ab6826 100644 --- a/AA-Forms/FormExpedit.cs +++ b/AA-Forms/FormExpedit.cs @@ -68,11 +68,10 @@ namespace Deckungsbeitrag private bool aufgabeDone = false; private bool isttest = true; private bool _doubleClickPending = false; + private OnboardingSchritt onBoardingArt = OnboardingSchritt.Expedit; #endregion public FormExpedit(Benutzer benutzer) { - this.Cursor = Cursors.WaitCursor; - InitializeComponent(); this.Text += " Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString(); @@ -82,8 +81,6 @@ namespace Deckungsbeitrag } public FormExpedit(Benutzer benutzer, Screen[] screens) : this(benutzer) { - this.Cursor = Cursors.WaitCursor; - this.screens = screens; foreach (Screen screen in screens) { @@ -97,8 +94,7 @@ namespace Deckungsbeitrag #region Form-Funktionen private void FormExpedit_Load(object sender, EventArgs e) { - //Application.UseWaitCursor = true; - this.Cursor = Cursors.WaitCursor; + this.UseWaitCursor = true; this.SuspendLayout(); _settings.Load(); @@ -119,18 +115,14 @@ namespace Deckungsbeitrag { // OLVs füllen if (auftraglist.Count > 0) OLV_Load(this.objectListViewAuftrag, auftraglist); - //if (sonderlist.Count > 0) OLV_Load(this.objectListViewSonder, sonderlist); - //if (geschaeftlist.Count > 0) OLV_Load(this.objectListViewGeschaeft, geschaeftlist); - //if (rampenlist.Count > 0) OLV_Load(this.objectListViewRampe, rampenlist); - //if (vorbereitetliste.Count > 0) OLV_Load(this.objectListViewVorbereitet, vorbereitetliste); - + if (sonderlist.Count > 0) OLV_Load(this.objectListViewSonder, sonderlist); + if (geschaeftlist.Count > 0) OLV_Load(this.objectListViewGeschaeft, geschaeftlist); + if (rampenlist.Count > 0) OLV_Load(this.objectListViewRampe, rampenlist); + if (vorbereitetliste.Count > 0) OLV_Load(this.objectListViewVorbereitet, vorbereitetliste); + // Controls aktivieren und deaktivieren nach BenutzerRolle Enable_Controls(); - this.Visible = true; - this.ResumeLayout(false); - this.Cursor = Cursors.Default; - })); } catch (Exception ex) @@ -141,7 +133,6 @@ namespace Deckungsbeitrag Program.AddFehler(this.benutzer, ex.Message, ex.StackTrace, null); } }); - } private void FormExpedit_FormClosing(object sender, FormClosingEventArgs e) { @@ -150,26 +141,27 @@ namespace Deckungsbeitrag } private void FormExpedit_Resize(object sender, EventArgs e) { - this.Cursor = Cursors.WaitCursor; - this.tabControlAuftragList.Width = this.Width - 25; - + this.tabControlAuftragList.Width = this.ClientSize.Width; } + + /// + /// Wenn FormExpedit angezeigt wird, wird die Location des FeedbackButtons berechnet. + /// + /// + /// private void FormExpedit_Shown(object sender, EventArgs e) { // Location des Feedback Buttons wird berechnet. (Screengröße ist hier klar) UCFeedback fb = this.Controls.Find("feedback", false)[0] as UCFeedback; Button btn = fb.Controls[0] as Button; - if (fb != null) fb.Location = new Point(this.Width - fb.Width - 18, 0); + if (fb != null) fb.Location = new Point(this.ClientSize.Width - fb.Width, 0); btn.BackColor = Program.Wirlblau; btn.ForeColor = Color.White; btn.FlatAppearance.BorderColor = Color.White; fb.BringToFront(); - this.ResumeLayout(); - //this.Cursor = Cursors.Default; - Application.UseWaitCursor = false; - WindowState = FormWindowState.Maximized; - } + //WindowState = FormWindowState.Maximized; + } #endregion #region Button_Click-Events @@ -207,7 +199,7 @@ namespace Deckungsbeitrag if (string.IsNullOrWhiteSpace(eingabe)) { - this.Cursor = Cursors.Default; + this.UseWaitCursor = false; return; } @@ -251,6 +243,8 @@ namespace Deckungsbeitrag { fahrer = benutzerVW.user; } + else fahrer = null; + if (fahrer != null) { List auftragliste = Auftrag.GetTourenListe(fahrer); @@ -275,7 +269,6 @@ namespace Deckungsbeitrag /// private void OLV_Load(ObjectListView olv, List auftraglist) { - this.Cursor = Cursors.WaitCursor; // Layout- und Update-Änderungen pausieren, um Flackern zu verhindern olv.SuspendLayout(); // Stoppt Layout-Berechnungen (Anchor/Dock) @@ -491,9 +484,9 @@ namespace Deckungsbeitrag olv.FilterMenuBuildStrategy = new MeinFilterMenu(); // ========== AUFRÄUMEN & AKTIVIEREN ========== - //olv.ResumeLayout(); // Layout-Pause beenden, Positionen neu berechnen + olv.ResumeLayout(); // Layout-Pause beenden, Positionen neu berechnen olv.Focus(); // OLV fokussieren (Tastaturbedienung aktivieren) - + this.UseWaitCursor = false; } private void objectListViewAuftrag_FormatCell(object sender, FormatCellEventArgs e) { @@ -555,20 +548,21 @@ namespace Deckungsbeitrag this.chartFehlmenge = Funktionen.Load_FehlmengeChart(chartliste, chartFehlmenge); this.chartFehlmenge.Visible = true; } - this.groupBoxKndInfo.Visible = true; - if (!string.IsNullOrWhiteSpace(this.kunde.Anmerkung)) + else this.chartFehlmenge.Visible = false; + if (!string.IsNullOrWhiteSpace(this.kunde.Anmerkung) || auftrag.AufgabeID != null) this.groupBoxKndInfo.Visible = true; + else this.groupBoxKndInfo.Visible = false; + if (!string.IsNullOrWhiteSpace(this.kunde.Anmerkung)) { labelAnmerkung.Visible = true; labelAnmerkung.Text = this.kunde.Anmerkung; } - else labelAnmerkung.Visible = false; + 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 { labelAufgabe.Visible = false; } // GroupBox einblenden wenn notwendig. if (labelAufgabe.Visible || labelAnmerkung.Visible || chartFehlmenge.Visible) this.groupBoxKndInfo.Visible = true; @@ -642,12 +636,12 @@ namespace Deckungsbeitrag } break; default: - if (_auftrag.Typ == AuftragTyp.Regelmäßig || _auftrag.Typ == AuftragTyp.Standerhöhung || _auftrag.Typ == AuftragTyp.Standverminderung) + if (_auftrag.Typ == AuftragTyp.Regelmäßig || _auftrag.Typ == AuftragTyp.Standerhöhung || _auftrag.Typ == AuftragTyp.Standverminderung || _auftrag.Typ == AuftragTyp.Inventur) { FormAuftragDetail auftragDetail = new FormAuftragDetail(_auftrag, this.benutzer); - if (auftragDetail.ShowDialog() == DialogResult.Yes) + if (auftragDetail.ShowDialog() == DialogResult.OK) { - olv.RefreshObject(olv.SelectedObject); + Neuladen_OLV(olv); } } break; @@ -655,8 +649,6 @@ namespace Deckungsbeitrag } private void objectListViewAuftrag_ButtonClick(object sender, BrightIdeasSoftware.CellClickEventArgs e) { - Cursor.Current = Cursors.WaitCursor; - ObjectListView olv = (ObjectListView)sender; Auftrag _auftrag = (Auftrag)e.Model; if (e.Column.Text == "Abschließen") @@ -797,7 +789,7 @@ namespace Deckungsbeitrag if (string.IsNullOrWhiteSpace(eingabe) || !int.TryParse(eingabe, out int anzahl)) { - this.Cursor = Cursors.Default; + this.UseWaitCursor = false; return; } this.auftrag.ContainerClean = anzahl; @@ -816,7 +808,7 @@ namespace Deckungsbeitrag Neuladen_OLV(olv); - this.Cursor = Cursors.Default; + this.UseWaitCursor = false; } /// @@ -826,8 +818,6 @@ namespace Deckungsbeitrag /// private void OLV_SetObjects(ObjectListView olv, List auftraglist) { - this.Cursor = Cursors.WaitCursor; - this.SuspendLayout(); if (olv.AllColumns.Count == 0) OLV_Load(olv, auftraglist); else { @@ -835,8 +825,6 @@ namespace Deckungsbeitrag olv.SetObjects(auftraglist); // Bindet die Auftragsliste an die View olv.EndUpdate(); // Update-Pause beenden, Daten neu zeichnen } - this.ResumeLayout(false); - this.Cursor = Cursors.Default; } /// @@ -845,18 +833,25 @@ namespace Deckungsbeitrag /// private async void Neuladen_OLV(ObjectListView olv) { + this.UseWaitCursor = true; + olv.SuspendLayout(); // Neu-Laden der Sonderaufträge ObjectListView if (olv.Name.Contains("Sonder")) { await GetSonderAuftraege(); OLV_SetObjects(olv, sonderlist); - return; } - // Neu-Laden der Standartaufträge ObjectListView - if (olv.Name.Contains("Geschaeft")) { await GetAuftraege(ListenArt.Geschäftliste); OLV_SetObjects(olv, geschaeftlist); } - if (olv.Name.Contains("Auftrag")) { await GetAuftraege(ListenArt.Auftragliste); OLV_SetObjects(olv, auftraglist); } - if (olv.Name.Contains("Rampe")) { await GetAuftraege(ListenArt.Rampenliste); OLV_SetObjects(olv, rampenlist); } - if (olv.Name.Contains("Vorbereitet")) { await GetAuftraege(ListenArt.Vorbereitetliste); OLV_SetObjects(olv, vorbereitetliste); } + else + { + // Neu-Laden der Standartaufträge ObjectListView + if (olv.Name.Contains("Geschaeft")) { await GetAuftraege(ListenArt.Geschäftliste); OLV_SetObjects(olv, geschaeftlist); } + if (olv.Name.Contains("Auftrag")) { await GetAuftraege(ListenArt.Auftragliste); OLV_SetObjects(olv, auftraglist); } + if (olv.Name.Contains("Rampe")) { await GetAuftraege(ListenArt.Rampenliste); OLV_SetObjects(olv, rampenlist); } + if (olv.Name.Contains("Vorbereitet")) { await GetAuftraege(ListenArt.Vorbereitetliste); OLV_SetObjects(olv, vorbereitetliste); } + } + + olv.ResumeLayout(false); + this.UseWaitCursor = false; } /// @@ -864,9 +859,6 @@ namespace Deckungsbeitrag /// private void GetUnvisibleColumns(ObjectListView olv) { - this.Cursor = Cursors.WaitCursor; - this.SuspendLayout(); - foreach (OLVColumn col in olv.AllColumns) { switch (tabControlAuftragList.SelectedTab.Text) @@ -895,23 +887,20 @@ namespace Deckungsbeitrag } olv.RebuildColumns(); - - this.ResumeLayout(false); } + /// + /// Cell Edit Finished wird verwendet um die Container Sauber Anzahl festzulegen. + /// + /// + /// private void objectListViewAuftrag_CellEditFinished(object sender, CellEditEventArgs e) { - this.Cursor = Cursors.WaitCursor; - this.SuspendLayout(); - ObjectListView olv = (ObjectListView)sender; this.auftrag = (Auftrag)e.RowObject; if (e.Column.Text == "sauber") altecontclean = (int?)e.Value; if (!string.IsNullOrWhiteSpace(e.NewValue.ToString())) Save_Auftrag(this.auftrag, false); //Neuladen_OLV(olv); - - this.ResumeLayout(); - this.Cursor = Cursors.Default; } /// @@ -947,7 +936,6 @@ namespace Deckungsbeitrag /// private void Enable_Controls() { - this.Cursor = Cursors.WaitCursor; switch (this.benutzer.Rolle) { case BenutzerRolle.Verwaltung: @@ -1094,13 +1082,28 @@ namespace Deckungsbeitrag { TabControl tabControl = sender as TabControl; ObjectListView olv = tabControl.SelectedTab.Controls[0] as ObjectListView; - if (olv == null) return; - GetUnvisibleColumns(olv); + + tabControl.SuspendLayout(); + olv.SuspendLayout(); + + chartFehlmenge.Visible = false; + groupBoxKndInfo.Visible = false; + + //GetUnvisibleColumns(olv); Neuladen_OLV(olv); + olv.ResumeLayout(); + tabControl.ResumeLayout(); + this.UseWaitCursor = false; } + + /// + /// Wenn Suche mehr als 1 Auftrag wird TabPage mit Ergebnis hinzugefügt. + /// + /// + /// private void AddTabPage(List liste, ListenArt listenArt) { if (liste == null) return; @@ -1134,9 +1137,16 @@ namespace Deckungsbeitrag ucl.Dock = DockStyle.Fill; this.tabControlAuftragList.Controls.Add(tabPage); } - // MouseDown-Event für Klick-Erkennung + + /// + /// MouseDown um Klick auf TabControl zu erkennen. + /// Wenn Klick auf "x" wird die TabPage geschlossen. NUR BEI SUCHE MÖGLICH + /// + /// + /// private void tabControlAuftragList_MouseDown(object sender, MouseEventArgs e) { + this.UseWaitCursor = true; if (e.Button == MouseButtons.Left) { for (int i = 0; i < tabControlAuftragList.TabCount; i++) @@ -1152,6 +1162,7 @@ namespace Deckungsbeitrag return; } tabControlAuftragList.SelectedIndex = i; + this.UseWaitCursor = false; break; } } @@ -1167,11 +1178,18 @@ namespace Deckungsbeitrag { Funktionen.GetGroupBoxBoarder(groupBoxKndInfo, e); } + + /// + /// Wenn Chart wird sichtbar wird die Position berechnet. + /// Das TabControl wird um die Chart schmäler. + /// + /// + /// private void chartFehlmenge_VisibleChanged(object sender, EventArgs e) { UCFeedback fb = this.Controls.Find("feedback", false)[0] as UCFeedback; - if (chartFehlmenge.Visible) + if (chartFehlmenge.Visible || groupBoxKndInfo.Visible) { this.tabControlAuftragList.Width = (int)(this.Width * 0.80); this.chartFehlmenge.Width = (int)(this.Width * 0.20) - 20; @@ -1183,7 +1201,7 @@ namespace Deckungsbeitrag 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); + groupBoxKndInfo.Location = new Point(this.tabControlAuftragList.Right + 10, this.tabControlAuftragList.Bottom - gbHeight); fb.Visible = false; } @@ -1193,6 +1211,13 @@ namespace Deckungsbeitrag fb.Visible = true; } } + + /// + /// Wenn die GroupBox für Aufgabe und Anmerkung sichtbar wird wird die Position berechnet. + /// Das TabControl wird um die GroupBox schmäler. + /// + /// + /// private void groupBoxKndInfo_VisibleChanged(object sender, EventArgs e) { if (groupBoxKndInfo.Visible) @@ -1204,7 +1229,7 @@ namespace Deckungsbeitrag int gbHeight = (int)(this.tabControlAuftragList.Height * 0.25); groupBoxKndInfo.Height = gbHeight; - groupBoxKndInfo.Location = new Point(chartFehlmenge.Left, chartHeight + 10); + groupBoxKndInfo.Location = new Point(this.tabControlAuftragList.Right + 10, this.tabControlAuftragList.Bottom - gbHeight); } else @@ -1213,5 +1238,24 @@ namespace Deckungsbeitrag } } + private async void FormExpedit_HelpButtonClicked(object sender, System.ComponentModel.CancelEventArgs e) + { + this.benutzer.OnboardingStatus = this.benutzer.ClearOnboardingFlag(onBoardingArt); // OnBoarding zurücksetzen + await this.benutzer.UpdateOnBoardingAsync(); // Update OnBoardingStatus + ZeigeOnboarding(); + } + private async void ZeigeOnboarding() + { + if (this.benutzer.IstGesehen(onBoardingArt)) return; // Bereits fertig + + if (Program.ShowOnBoarding(this.benutzer.Rolle.ToString(), onBoardingArt) == DialogResult.OK) + { + // Nächster Schritt → Flag setzen + this.benutzer.OnboardingStatus = this.benutzer.SetOnboardingFlag(onBoardingArt); + await this.benutzer.UpdateOnBoardingAsync(); // Deine Update-Methode + //this.Close(); // Onboarding beendet + } + } + } } diff --git a/AA-Forms/FormMain.Designer.cs b/AA-Forms/FormMain.Designer.cs index f2c97a0..2bdbe76 100644 --- a/AA-Forms/FormMain.Designer.cs +++ b/AA-Forms/FormMain.Designer.cs @@ -48,6 +48,7 @@ namespace Deckungsbeitrag this.tSBTourenplanung = new System.Windows.Forms.ToolStripButton(); this.toolStripBeenden = new System.Windows.Forms.ToolStripButton(); this.panelMain = new System.Windows.Forms.Panel(); + this.buttonTestInventur = new System.Windows.Forms.Button(); this.buttonNeuerRegAuft = new System.Windows.Forms.Button(); this.panelProgress = new System.Windows.Forms.Panel(); this.buttonKundeArtikelUpdate = new System.Windows.Forms.Button(); @@ -82,6 +83,15 @@ namespace Deckungsbeitrag this.labelContZahl1 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); + this.groupBoxAuftrag = new System.Windows.Forms.GroupBox(); + this.objectListViewAuftrag = new BrightIdeasSoftware.ObjectListView(); + this.rBAufAbruf = new System.Windows.Forms.RadioButton(); + this.rBAusgeliefert = new System.Windows.Forms.RadioButton(); + this.rBFertig = new System.Windows.Forms.RadioButton(); + this.rBVorbereitet = new System.Windows.Forms.RadioButton(); + this.rBAlle = new System.Windows.Forms.RadioButton(); + this.buttonAufAbruf = new System.Windows.Forms.Button(); + this.buttonAusgeliefert = new System.Windows.Forms.Button(); this.groupBoxSaison = new System.Windows.Forms.GroupBox(); this.comboBoxSaison = new System.Windows.Forms.ComboBox(); this.buttonNeuerStand = new System.Windows.Forms.Button(); @@ -97,15 +107,6 @@ namespace Deckungsbeitrag this.label11 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.labelKundenDatum = new System.Windows.Forms.Label(); - this.groupBoxAuftrag = new System.Windows.Forms.GroupBox(); - this.objectListViewAuftrag = new BrightIdeasSoftware.ObjectListView(); - this.rBAufAbruf = new System.Windows.Forms.RadioButton(); - this.rBAusgeliefert = new System.Windows.Forms.RadioButton(); - this.rBFertig = new System.Windows.Forms.RadioButton(); - this.rBVorbereitet = new System.Windows.Forms.RadioButton(); - this.rBAlle = new System.Windows.Forms.RadioButton(); - this.buttonAufAbruf = new System.Windows.Forms.Button(); - this.buttonAusgeliefert = new System.Windows.Forms.Button(); this.groupBoxScannTest = new System.Windows.Forms.GroupBox(); this.pictureBoxScannTest = new System.Windows.Forms.PictureBox(); this.textBoxScannTest = new System.Windows.Forms.TextBox(); @@ -116,11 +117,11 @@ namespace Deckungsbeitrag this.panelProgress.SuspendLayout(); this.groupBoxContAnz.SuspendLayout(); this.tLPContAnz.SuspendLayout(); + this.groupBoxAuftrag.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).BeginInit(); this.groupBoxSaison.SuspendLayout(); this.groupBoxUpdate.SuspendLayout(); this.tableLayoutPanelUpdate.SuspendLayout(); - this.groupBoxAuftrag.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).BeginInit(); this.groupBoxScannTest.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxScannTest)).BeginInit(); this.SuspendLayout(); @@ -152,7 +153,7 @@ namespace Deckungsbeitrag this.toolStripMenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow; this.toolStripMenu.Location = new System.Drawing.Point(0, 0); this.toolStripMenu.Name = "toolStripMenu"; - this.toolStripMenu.Size = new System.Drawing.Size(212, 689); + this.toolStripMenu.Size = new System.Drawing.Size(283, 848); this.toolStripMenu.TabIndex = 0; this.toolStripMenu.Text = "toolStripMenu"; // @@ -473,10 +474,9 @@ namespace Deckungsbeitrag // panelMain // this.panelMain.AllowDrop = true; - this.panelMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); this.panelMain.BackColor = System.Drawing.Color.White; + this.panelMain.Controls.Add(this.buttonTestInventur); + this.panelMain.Controls.Add(this.groupBoxAuftrag); this.panelMain.Controls.Add(this.buttonNeuerRegAuft); this.panelMain.Controls.Add(this.panelProgress); this.panelMain.Controls.Add(this.buttonTourenliste); @@ -489,14 +489,36 @@ namespace Deckungsbeitrag this.panelMain.Controls.Add(this.buttonNeuerUser); this.panelMain.Controls.Add(this.groupBoxUpdate); this.panelMain.Controls.Add(this.groupBoxScannTest); - this.panelMain.Location = new System.Drawing.Point(218, 0); - this.panelMain.Margin = new System.Windows.Forms.Padding(2); + this.panelMain.Dock = System.Windows.Forms.DockStyle.Right; + this.panelMain.Location = new System.Drawing.Point(291, 0); + this.panelMain.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.panelMain.Name = "panelMain"; - this.panelMain.Size = new System.Drawing.Size(1063, 689); + this.panelMain.Size = new System.Drawing.Size(1417, 848); this.panelMain.TabIndex = 5; this.panelMain.Paint += new System.Windows.Forms.PaintEventHandler(this.panelMain_Paint); this.panelMain.Resize += new System.EventHandler(this.panelMain_Resize); // + // buttonTestInventur + // + this.buttonTestInventur.BackColor = System.Drawing.Color.Turquoise; + this.buttonTestInventur.Enabled = false; + this.buttonTestInventur.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.buttonTestInventur.FlatAppearance.BorderSize = 0; + this.buttonTestInventur.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonTestInventur.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonTestInventur.ForeColor = System.Drawing.Color.Black; + this.buttonTestInventur.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.buttonTestInventur.Location = new System.Drawing.Point(357, 80); + this.buttonTestInventur.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); + this.buttonTestInventur.Name = "buttonTestInventur"; + this.buttonTestInventur.Size = new System.Drawing.Size(333, 50); + this.buttonTestInventur.TabIndex = 72; + this.buttonTestInventur.Text = "Test Inventur"; + this.buttonTestInventur.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.buttonTestInventur.UseVisualStyleBackColor = false; + this.buttonTestInventur.Visible = false; + this.buttonTestInventur.Click += new System.EventHandler(this.buttonTestInventur_Click); + // // buttonNeuerRegAuft // this.buttonNeuerRegAuft.BackColor = System.Drawing.Color.CadetBlue; @@ -507,10 +529,10 @@ namespace Deckungsbeitrag this.buttonNeuerRegAuft.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonNeuerRegAuft.ForeColor = System.Drawing.Color.Black; this.buttonNeuerRegAuft.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonNeuerRegAuft.Location = new System.Drawing.Point(790, 14); - this.buttonNeuerRegAuft.Margin = new System.Windows.Forms.Padding(5); + this.buttonNeuerRegAuft.Location = new System.Drawing.Point(1053, 17); + this.buttonNeuerRegAuft.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); this.buttonNeuerRegAuft.Name = "buttonNeuerRegAuft"; - this.buttonNeuerRegAuft.Size = new System.Drawing.Size(250, 41); + this.buttonNeuerRegAuft.Size = new System.Drawing.Size(333, 50); this.buttonNeuerRegAuft.TabIndex = 71; this.buttonNeuerRegAuft.Text = "Regelmäßiger Auftrag"; this.buttonNeuerRegAuft.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; @@ -524,12 +546,11 @@ namespace Deckungsbeitrag this.panelProgress.BackColor = System.Drawing.Color.Transparent; this.panelProgress.Controls.Add(this.buttonKundeArtikelUpdate); this.panelProgress.Controls.Add(this.progressBarKundeArtikelUpdate); - this.panelProgress.Enabled = false; - this.panelProgress.Location = new System.Drawing.Point(801, 560); + this.panelProgress.Location = new System.Drawing.Point(1071, 700); + this.panelProgress.Margin = new System.Windows.Forms.Padding(4); this.panelProgress.Name = "panelProgress"; - this.panelProgress.Size = new System.Drawing.Size(250, 117); + this.panelProgress.Size = new System.Drawing.Size(333, 144); this.panelProgress.TabIndex = 70; - this.panelProgress.Visible = false; // // buttonKundeArtikelUpdate // @@ -542,10 +563,10 @@ namespace Deckungsbeitrag this.buttonKundeArtikelUpdate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonKundeArtikelUpdate.ForeColor = System.Drawing.Color.Black; this.buttonKundeArtikelUpdate.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonKundeArtikelUpdate.Location = new System.Drawing.Point(0, 35); - this.buttonKundeArtikelUpdate.Margin = new System.Windows.Forms.Padding(5); + this.buttonKundeArtikelUpdate.Location = new System.Drawing.Point(0, 44); + this.buttonKundeArtikelUpdate.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); this.buttonKundeArtikelUpdate.Name = "buttonKundeArtikelUpdate"; - this.buttonKundeArtikelUpdate.Size = new System.Drawing.Size(250, 41); + this.buttonKundeArtikelUpdate.Size = new System.Drawing.Size(333, 50); this.buttonKundeArtikelUpdate.TabIndex = 67; this.buttonKundeArtikelUpdate.Text = "KundeArtikel Update"; this.buttonKundeArtikelUpdate.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; @@ -556,9 +577,10 @@ namespace Deckungsbeitrag // progressBarKundeArtikelUpdate // this.progressBarKundeArtikelUpdate.Dock = System.Windows.Forms.DockStyle.Bottom; - this.progressBarKundeArtikelUpdate.Location = new System.Drawing.Point(0, 76); + this.progressBarKundeArtikelUpdate.Location = new System.Drawing.Point(0, 94); + this.progressBarKundeArtikelUpdate.Margin = new System.Windows.Forms.Padding(4); this.progressBarKundeArtikelUpdate.Name = "progressBarKundeArtikelUpdate"; - this.progressBarKundeArtikelUpdate.Size = new System.Drawing.Size(250, 41); + this.progressBarKundeArtikelUpdate.Size = new System.Drawing.Size(333, 50); this.progressBarKundeArtikelUpdate.TabIndex = 68; // // buttonTourenliste @@ -571,10 +593,10 @@ namespace Deckungsbeitrag this.buttonTourenliste.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonTourenliste.ForeColor = System.Drawing.Color.Black; this.buttonTourenliste.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonTourenliste.Location = new System.Drawing.Point(8, 65); - this.buttonTourenliste.Margin = new System.Windows.Forms.Padding(5); + this.buttonTourenliste.Location = new System.Drawing.Point(11, 80); + this.buttonTourenliste.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); this.buttonTourenliste.Name = "buttonTourenliste"; - this.buttonTourenliste.Size = new System.Drawing.Size(250, 41); + this.buttonTourenliste.Size = new System.Drawing.Size(333, 50); this.buttonTourenliste.TabIndex = 66; this.buttonTourenliste.Text = "Tourenliste drucken"; this.buttonTourenliste.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; @@ -586,12 +608,13 @@ namespace Deckungsbeitrag // this.groupBoxContAnz.AutoSize = true; this.groupBoxContAnz.Controls.Add(this.tLPContAnz); - this.groupBoxContAnz.Controls.Add(this.groupBoxAuftrag); this.groupBoxContAnz.Enabled = false; this.groupBoxContAnz.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - this.groupBoxContAnz.Location = new System.Drawing.Point(579, 75); + this.groupBoxContAnz.Location = new System.Drawing.Point(772, 92); + this.groupBoxContAnz.Margin = new System.Windows.Forms.Padding(4); this.groupBoxContAnz.Name = "groupBoxContAnz"; - this.groupBoxContAnz.Size = new System.Drawing.Size(741, 260); + this.groupBoxContAnz.Padding = new System.Windows.Forms.Padding(4); + this.groupBoxContAnz.Size = new System.Drawing.Size(988, 322); this.groupBoxContAnz.TabIndex = 62; this.groupBoxContAnz.TabStop = false; this.groupBoxContAnz.Text = "CONT. ANZAHL / WASCHZEIT"; @@ -634,17 +657,18 @@ namespace Deckungsbeitrag this.tLPContAnz.Controls.Add(this.labelContZahl1, 1, 1); this.tLPContAnz.Controls.Add(this.label10, 0, 1); this.tLPContAnz.Controls.Add(this.label12, 0, 0); - this.tLPContAnz.Location = new System.Drawing.Point(3, 19); + this.tLPContAnz.Location = new System.Drawing.Point(4, 23); + this.tLPContAnz.Margin = new System.Windows.Forms.Padding(4); this.tLPContAnz.Name = "tLPContAnz"; this.tLPContAnz.RowCount = 7; - this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tLPContAnz.Size = new System.Drawing.Size(296, 210); + this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F)); + this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F)); + this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F)); + this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F)); + this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F)); + this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F)); + this.tLPContAnz.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F)); + this.tLPContAnz.Size = new System.Drawing.Size(475, 259); this.tLPContAnz.TabIndex = 0; // // label14 @@ -653,9 +677,10 @@ namespace Deckungsbeitrag this.label14.Dock = System.Windows.Forms.DockStyle.Right; this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label14.ForeColor = System.Drawing.SystemColors.ControlText; - this.label14.Location = new System.Drawing.Point(249, 180); + this.label14.Location = new System.Drawing.Point(417, 222); + this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(44, 30); + this.label14.Size = new System.Drawing.Size(54, 37); this.label14.TabIndex = 29; this.label14.Text = "0,00"; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -666,9 +691,10 @@ namespace Deckungsbeitrag this.label13.Dock = System.Windows.Forms.DockStyle.Right; this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label13.ForeColor = System.Drawing.SystemColors.ControlText; - this.label13.Location = new System.Drawing.Point(199, 180); + this.label13.Location = new System.Drawing.Point(244, 222); + this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(44, 30); + this.label13.Size = new System.Drawing.Size(54, 37); this.label13.TabIndex = 28; this.label13.Text = "0,00"; this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -679,9 +705,10 @@ namespace Deckungsbeitrag this.labelContGes.Dock = System.Windows.Forms.DockStyle.Left; this.labelContGes.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelContGes.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelContGes.Location = new System.Drawing.Point(134, 180); + this.labelContGes.Location = new System.Drawing.Point(164, 222); + this.labelContGes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelContGes.Name = "labelContGes"; - this.labelContGes.Size = new System.Drawing.Size(59, 30); + this.labelContGes.Size = new System.Drawing.Size(72, 37); this.labelContGes.TabIndex = 27; this.labelContGes.Text = "Zahl 5"; this.labelContGes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -692,9 +719,10 @@ namespace Deckungsbeitrag this.label9.Dock = System.Windows.Forms.DockStyle.Left; this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label9.ForeColor = System.Drawing.SystemColors.ControlText; - this.label9.Location = new System.Drawing.Point(3, 180); + this.label9.Location = new System.Drawing.Point(4, 222); + this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(72, 30); + this.label9.Size = new System.Drawing.Size(86, 37); this.label9.TabIndex = 25; this.label9.Text = "Gesamt"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -705,9 +733,10 @@ namespace Deckungsbeitrag this.label5.Dock = System.Windows.Forms.DockStyle.Right; this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.ForeColor = System.Drawing.SystemColors.ControlText; - this.label5.Location = new System.Drawing.Point(253, 150); + this.label5.Location = new System.Drawing.Point(421, 185); + this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(40, 30); + this.label5.Size = new System.Drawing.Size(50, 37); this.label5.TabIndex = 23; this.label5.Text = "0,00"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -718,9 +747,10 @@ namespace Deckungsbeitrag this.label4.Dock = System.Windows.Forms.DockStyle.Right; 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.SystemColors.ControlText; - this.label4.Location = new System.Drawing.Point(203, 150); + this.label4.Location = new System.Drawing.Point(248, 185); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(40, 30); + this.label4.Size = new System.Drawing.Size(50, 37); this.label4.TabIndex = 22; this.label4.Text = "0,00"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -731,9 +761,10 @@ namespace Deckungsbeitrag this.labelContZahl5.Dock = System.Windows.Forms.DockStyle.Left; this.labelContZahl5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelContZahl5.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelContZahl5.Location = new System.Drawing.Point(134, 150); + this.labelContZahl5.Location = new System.Drawing.Point(164, 185); + this.labelContZahl5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelContZahl5.Name = "labelContZahl5"; - this.labelContZahl5.Size = new System.Drawing.Size(53, 30); + this.labelContZahl5.Size = new System.Drawing.Size(66, 37); this.labelContZahl5.TabIndex = 21; this.labelContZahl5.Text = "Zahl 5"; this.labelContZahl5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -744,9 +775,10 @@ namespace Deckungsbeitrag this.label2.Dock = System.Windows.Forms.DockStyle.Left; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.SystemColors.ControlText; - this.label2.Location = new System.Drawing.Point(3, 150); + this.label2.Location = new System.Drawing.Point(4, 185); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(90, 30); + this.label2.Size = new System.Drawing.Size(107, 37); this.label2.TabIndex = 20; this.label2.Text = "Cont Rest"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -757,9 +789,10 @@ namespace Deckungsbeitrag this.labelZeit52.Dock = System.Windows.Forms.DockStyle.Right; this.labelZeit52.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit52.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit52.Location = new System.Drawing.Point(253, 120); + this.labelZeit52.Location = new System.Drawing.Point(421, 148); + this.labelZeit52.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit52.Name = "labelZeit52"; - this.labelZeit52.Size = new System.Drawing.Size(40, 30); + this.labelZeit52.Size = new System.Drawing.Size(50, 37); this.labelZeit52.TabIndex = 19; this.labelZeit52.Text = "0,00"; this.labelZeit52.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -770,9 +803,10 @@ namespace Deckungsbeitrag this.labelZeit42.Dock = System.Windows.Forms.DockStyle.Right; this.labelZeit42.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit42.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit42.Location = new System.Drawing.Point(253, 90); + this.labelZeit42.Location = new System.Drawing.Point(421, 111); + this.labelZeit42.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit42.Name = "labelZeit42"; - this.labelZeit42.Size = new System.Drawing.Size(40, 30); + this.labelZeit42.Size = new System.Drawing.Size(50, 37); this.labelZeit42.TabIndex = 18; this.labelZeit42.Text = "0,00"; this.labelZeit42.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -783,9 +817,10 @@ namespace Deckungsbeitrag this.labelZeit32.Dock = System.Windows.Forms.DockStyle.Right; this.labelZeit32.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit32.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit32.Location = new System.Drawing.Point(253, 60); + this.labelZeit32.Location = new System.Drawing.Point(421, 74); + this.labelZeit32.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit32.Name = "labelZeit32"; - this.labelZeit32.Size = new System.Drawing.Size(40, 30); + this.labelZeit32.Size = new System.Drawing.Size(50, 37); this.labelZeit32.TabIndex = 17; this.labelZeit32.Text = "0,00"; this.labelZeit32.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -796,9 +831,10 @@ namespace Deckungsbeitrag this.labelZeit22.Dock = System.Windows.Forms.DockStyle.Right; this.labelZeit22.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit22.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit22.Location = new System.Drawing.Point(253, 30); + this.labelZeit22.Location = new System.Drawing.Point(421, 37); + this.labelZeit22.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit22.Name = "labelZeit22"; - this.labelZeit22.Size = new System.Drawing.Size(40, 30); + this.labelZeit22.Size = new System.Drawing.Size(50, 37); this.labelZeit22.TabIndex = 16; this.labelZeit22.Text = "0,00"; this.labelZeit22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -809,9 +845,10 @@ namespace Deckungsbeitrag this.labelZeit12.Dock = System.Windows.Forms.DockStyle.Fill; this.labelZeit12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit12.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit12.Location = new System.Drawing.Point(249, 0); + this.labelZeit12.Location = new System.Drawing.Point(306, 0); + this.labelZeit12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit12.Name = "labelZeit12"; - this.labelZeit12.Size = new System.Drawing.Size(44, 30); + this.labelZeit12.Size = new System.Drawing.Size(165, 37); this.labelZeit12.TabIndex = 15; this.labelZeit12.Text = "2"; this.labelZeit12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -822,9 +859,10 @@ namespace Deckungsbeitrag this.labelZeit5.Dock = System.Windows.Forms.DockStyle.Right; this.labelZeit5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit5.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit5.Location = new System.Drawing.Point(203, 120); + this.labelZeit5.Location = new System.Drawing.Point(248, 148); + this.labelZeit5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit5.Name = "labelZeit5"; - this.labelZeit5.Size = new System.Drawing.Size(40, 30); + this.labelZeit5.Size = new System.Drawing.Size(50, 37); this.labelZeit5.TabIndex = 14; this.labelZeit5.Text = "0,00"; this.labelZeit5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -835,9 +873,10 @@ namespace Deckungsbeitrag this.labelZeit4.Dock = System.Windows.Forms.DockStyle.Right; this.labelZeit4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit4.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit4.Location = new System.Drawing.Point(203, 90); + this.labelZeit4.Location = new System.Drawing.Point(248, 111); + this.labelZeit4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit4.Name = "labelZeit4"; - this.labelZeit4.Size = new System.Drawing.Size(40, 30); + this.labelZeit4.Size = new System.Drawing.Size(50, 37); this.labelZeit4.TabIndex = 13; this.labelZeit4.Text = "0,00"; this.labelZeit4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -848,9 +887,10 @@ namespace Deckungsbeitrag this.labelZeit3.Dock = System.Windows.Forms.DockStyle.Right; this.labelZeit3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit3.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit3.Location = new System.Drawing.Point(203, 60); + this.labelZeit3.Location = new System.Drawing.Point(248, 74); + this.labelZeit3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit3.Name = "labelZeit3"; - this.labelZeit3.Size = new System.Drawing.Size(40, 30); + this.labelZeit3.Size = new System.Drawing.Size(50, 37); this.labelZeit3.TabIndex = 12; this.labelZeit3.Text = "0,00"; this.labelZeit3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -861,9 +901,10 @@ namespace Deckungsbeitrag this.labelZeit2.Dock = System.Windows.Forms.DockStyle.Right; this.labelZeit2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit2.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit2.Location = new System.Drawing.Point(203, 30); + this.labelZeit2.Location = new System.Drawing.Point(248, 37); + this.labelZeit2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit2.Name = "labelZeit2"; - this.labelZeit2.Size = new System.Drawing.Size(40, 30); + this.labelZeit2.Size = new System.Drawing.Size(50, 37); this.labelZeit2.TabIndex = 11; this.labelZeit2.Text = "0,00"; this.labelZeit2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -874,9 +915,10 @@ namespace Deckungsbeitrag this.labelZeit1.Dock = System.Windows.Forms.DockStyle.Fill; this.labelZeit1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelZeit1.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelZeit1.Location = new System.Drawing.Point(199, 0); + this.labelZeit1.Location = new System.Drawing.Point(244, 0); + this.labelZeit1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelZeit1.Name = "labelZeit1"; - this.labelZeit1.Size = new System.Drawing.Size(44, 30); + this.labelZeit1.Size = new System.Drawing.Size(54, 37); this.labelZeit1.TabIndex = 10; this.labelZeit1.Text = "1"; this.labelZeit1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -887,9 +929,10 @@ namespace Deckungsbeitrag this.labelContZahl4.Dock = System.Windows.Forms.DockStyle.Left; this.labelContZahl4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelContZahl4.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelContZahl4.Location = new System.Drawing.Point(134, 120); + this.labelContZahl4.Location = new System.Drawing.Point(164, 148); + this.labelContZahl4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelContZahl4.Name = "labelContZahl4"; - this.labelContZahl4.Size = new System.Drawing.Size(53, 30); + this.labelContZahl4.Size = new System.Drawing.Size(66, 37); this.labelContZahl4.TabIndex = 9; this.labelContZahl4.Text = "Zahl 5"; this.labelContZahl4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -900,9 +943,10 @@ namespace Deckungsbeitrag this.label1.Dock = System.Windows.Forms.DockStyle.Left; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.SystemColors.ControlText; - this.label1.Location = new System.Drawing.Point(3, 120); + this.label1.Location = new System.Drawing.Point(4, 148); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(118, 30); + this.label1.Size = new System.Drawing.Size(143, 37); this.label1.TabIndex = 8; this.label1.Text = "Cont heute+3"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -913,9 +957,10 @@ namespace Deckungsbeitrag this.labelContZahl3.Dock = System.Windows.Forms.DockStyle.Left; this.labelContZahl3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelContZahl3.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelContZahl3.Location = new System.Drawing.Point(134, 90); + this.labelContZahl3.Location = new System.Drawing.Point(164, 111); + this.labelContZahl3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelContZahl3.Name = "labelContZahl3"; - this.labelContZahl3.Size = new System.Drawing.Size(53, 30); + this.labelContZahl3.Size = new System.Drawing.Size(66, 37); this.labelContZahl3.TabIndex = 7; this.labelContZahl3.Text = "Zahl 4"; this.labelContZahl3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -926,9 +971,10 @@ namespace Deckungsbeitrag this.label6.Dock = System.Windows.Forms.DockStyle.Left; this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label6.ForeColor = System.Drawing.SystemColors.ControlText; - this.label6.Location = new System.Drawing.Point(3, 90); + this.label6.Location = new System.Drawing.Point(4, 111); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(118, 30); + this.label6.Size = new System.Drawing.Size(143, 37); this.label6.TabIndex = 6; this.label6.Text = "Cont heute+2"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -939,9 +985,10 @@ namespace Deckungsbeitrag this.labelContZahl2.Dock = System.Windows.Forms.DockStyle.Left; this.labelContZahl2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelContZahl2.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelContZahl2.Location = new System.Drawing.Point(134, 60); + this.labelContZahl2.Location = new System.Drawing.Point(164, 74); + this.labelContZahl2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelContZahl2.Name = "labelContZahl2"; - this.labelContZahl2.Size = new System.Drawing.Size(53, 30); + this.labelContZahl2.Size = new System.Drawing.Size(66, 37); this.labelContZahl2.TabIndex = 5; this.labelContZahl2.Text = "Zahl 3"; this.labelContZahl2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -952,9 +999,10 @@ namespace Deckungsbeitrag this.label8.Dock = System.Windows.Forms.DockStyle.Left; this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label8.ForeColor = System.Drawing.SystemColors.ControlText; - this.label8.Location = new System.Drawing.Point(3, 60); + this.label8.Location = new System.Drawing.Point(4, 74); + this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(118, 30); + this.label8.Size = new System.Drawing.Size(143, 37); this.label8.TabIndex = 4; this.label8.Text = "Cont heute+1"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -965,9 +1013,10 @@ namespace Deckungsbeitrag this.labelContZahl1.Dock = System.Windows.Forms.DockStyle.Left; this.labelContZahl1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelContZahl1.ForeColor = System.Drawing.SystemColors.ControlText; - this.labelContZahl1.Location = new System.Drawing.Point(134, 30); + this.labelContZahl1.Location = new System.Drawing.Point(164, 37); + this.labelContZahl1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelContZahl1.Name = "labelContZahl1"; - this.labelContZahl1.Size = new System.Drawing.Size(53, 30); + this.labelContZahl1.Size = new System.Drawing.Size(66, 37); this.labelContZahl1.TabIndex = 3; this.labelContZahl1.Text = "Zahl 2"; this.labelContZahl1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -978,9 +1027,10 @@ namespace Deckungsbeitrag this.label10.Dock = System.Windows.Forms.DockStyle.Left; this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label10.ForeColor = System.Drawing.SystemColors.ControlText; - this.label10.Location = new System.Drawing.Point(3, 30); + this.label10.Location = new System.Drawing.Point(4, 37); + this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(98, 30); + this.label10.Size = new System.Drawing.Size(118, 37); this.label10.TabIndex = 2; this.label10.Text = "Cont heute"; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -991,253 +1041,14 @@ namespace Deckungsbeitrag this.label12.Dock = System.Windows.Forms.DockStyle.Left; this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label12.ForeColor = System.Drawing.SystemColors.ControlText; - this.label12.Location = new System.Drawing.Point(3, 0); + this.label12.Location = new System.Drawing.Point(4, 0); + this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(125, 30); + this.label12.Size = new System.Drawing.Size(152, 37); this.label12.TabIndex = 0; this.label12.Text = "Waschstraßen"; this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // groupBoxSaison - // - this.groupBoxSaison.Controls.Add(this.comboBoxSaison); - this.groupBoxSaison.Enabled = false; - this.groupBoxSaison.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - this.groupBoxSaison.Location = new System.Drawing.Point(281, 116); - this.groupBoxSaison.Name = "groupBoxSaison"; - this.groupBoxSaison.Size = new System.Drawing.Size(279, 59); - this.groupBoxSaison.TabIndex = 62; - this.groupBoxSaison.TabStop = false; - this.groupBoxSaison.Text = "AKTIVE SAISON"; - this.groupBoxSaison.Visible = false; - this.groupBoxSaison.GiveFeedback += new System.Windows.Forms.GiveFeedbackEventHandler(this.groupBox_GiveFeedback); - this.groupBoxSaison.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox_Paint); - // - // comboBoxSaison - // - this.comboBoxSaison.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxSaison.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboBoxSaison.FormattingEnabled = true; - this.comboBoxSaison.Location = new System.Drawing.Point(8, 19); - this.comboBoxSaison.Name = "comboBoxSaison"; - this.comboBoxSaison.Size = new System.Drawing.Size(265, 28); - this.comboBoxSaison.TabIndex = 66; - this.comboBoxSaison.SelectedIndexChanged += new System.EventHandler(this.comboBoxSaison_SelectedIndexChanged); - // - // buttonNeuerStand - // - this.buttonNeuerStand.BackColor = System.Drawing.Color.MediumTurquoise; - this.buttonNeuerStand.Enabled = false; - this.buttonNeuerStand.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); - this.buttonNeuerStand.FlatAppearance.BorderSize = 0; - this.buttonNeuerStand.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonNeuerStand.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonNeuerStand.ForeColor = System.Drawing.Color.Black; - this.buttonNeuerStand.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonNeuerStand.Location = new System.Drawing.Point(530, 14); - this.buttonNeuerStand.Margin = new System.Windows.Forms.Padding(5); - this.buttonNeuerStand.Name = "buttonNeuerStand"; - this.buttonNeuerStand.Size = new System.Drawing.Size(250, 41); - this.buttonNeuerStand.TabIndex = 65; - this.buttonNeuerStand.Text = "Neue Standveränderung"; - this.buttonNeuerStand.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.buttonNeuerStand.UseVisualStyleBackColor = false; - this.buttonNeuerStand.Visible = false; - this.buttonNeuerStand.Click += new System.EventHandler(this.buttonNeuerStand_Click); - // - // buttonNeueInventur - // - this.buttonNeueInventur.BackColor = System.Drawing.Color.Turquoise; - this.buttonNeueInventur.Enabled = false; - this.buttonNeueInventur.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); - this.buttonNeueInventur.FlatAppearance.BorderSize = 0; - this.buttonNeueInventur.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonNeueInventur.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonNeueInventur.ForeColor = System.Drawing.Color.Black; - this.buttonNeueInventur.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonNeueInventur.Location = new System.Drawing.Point(268, 14); - this.buttonNeueInventur.Margin = new System.Windows.Forms.Padding(5); - this.buttonNeueInventur.Name = "buttonNeueInventur"; - this.buttonNeueInventur.Size = new System.Drawing.Size(250, 41); - this.buttonNeueInventur.TabIndex = 64; - this.buttonNeueInventur.Text = "Neue Inventur"; - this.buttonNeueInventur.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.buttonNeueInventur.UseVisualStyleBackColor = false; - this.buttonNeueInventur.Visible = false; - this.buttonNeueInventur.Click += new System.EventHandler(this.buttonNeueInventur_Click); - // - // buttonNeueAufgabe - // - this.buttonNeueAufgabe.BackColor = System.Drawing.Color.DarkOrange; - this.buttonNeueAufgabe.Enabled = false; - this.buttonNeueAufgabe.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); - this.buttonNeueAufgabe.FlatAppearance.BorderSize = 0; - this.buttonNeueAufgabe.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonNeueAufgabe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonNeueAufgabe.ForeColor = System.Drawing.Color.Black; - this.buttonNeueAufgabe.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonNeueAufgabe.Location = new System.Drawing.Point(8, 167); - this.buttonNeueAufgabe.Margin = new System.Windows.Forms.Padding(5); - this.buttonNeueAufgabe.Name = "buttonNeueAufgabe"; - this.buttonNeueAufgabe.Size = new System.Drawing.Size(250, 41); - this.buttonNeueAufgabe.TabIndex = 63; - this.buttonNeueAufgabe.Text = "Neue Aufgabe"; - this.buttonNeueAufgabe.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.buttonNeueAufgabe.UseVisualStyleBackColor = false; - this.buttonNeueAufgabe.Visible = false; - this.buttonNeueAufgabe.Click += new System.EventHandler(this.buttonNeueAufgabe_Click); - // - // buttonNeuerAuftrag - // - this.buttonNeuerAuftrag.BackColor = System.Drawing.Color.PaleTurquoise; - this.buttonNeuerAuftrag.Enabled = false; - this.buttonNeuerAuftrag.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); - this.buttonNeuerAuftrag.FlatAppearance.BorderSize = 0; - this.buttonNeuerAuftrag.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonNeuerAuftrag.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonNeuerAuftrag.ForeColor = System.Drawing.Color.Black; - this.buttonNeuerAuftrag.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonNeuerAuftrag.Location = new System.Drawing.Point(8, 14); - this.buttonNeuerAuftrag.Margin = new System.Windows.Forms.Padding(5); - this.buttonNeuerAuftrag.Name = "buttonNeuerAuftrag"; - this.buttonNeuerAuftrag.Size = new System.Drawing.Size(250, 41); - this.buttonNeuerAuftrag.TabIndex = 56; - this.buttonNeuerAuftrag.Text = "Neuer Auftrag"; - this.buttonNeuerAuftrag.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.buttonNeuerAuftrag.UseVisualStyleBackColor = false; - this.buttonNeuerAuftrag.Visible = false; - this.buttonNeuerAuftrag.Click += new System.EventHandler(this.buttonNeuerAuftrag_Click); - // - // buttonNeuerUser - // - this.buttonNeuerUser.BackColor = System.Drawing.Color.DarkOrange; - this.buttonNeuerUser.Enabled = false; - this.buttonNeuerUser.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); - this.buttonNeuerUser.FlatAppearance.BorderSize = 0; - this.buttonNeuerUser.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonNeuerUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonNeuerUser.ForeColor = System.Drawing.Color.Black; - this.buttonNeuerUser.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonNeuerUser.Location = new System.Drawing.Point(8, 116); - this.buttonNeuerUser.Margin = new System.Windows.Forms.Padding(5); - this.buttonNeuerUser.Name = "buttonNeuerUser"; - this.buttonNeuerUser.Size = new System.Drawing.Size(250, 41); - this.buttonNeuerUser.TabIndex = 62; - this.buttonNeuerUser.Text = "Neuer User"; - this.buttonNeuerUser.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.buttonNeuerUser.UseVisualStyleBackColor = false; - this.buttonNeuerUser.Visible = false; - this.buttonNeuerUser.Click += new System.EventHandler(this.buttonNeuerUser_Click); - // - // groupBoxUpdate - // - this.groupBoxUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.groupBoxUpdate.Controls.Add(this.tableLayoutPanelUpdate); - this.groupBoxUpdate.Enabled = false; - this.groupBoxUpdate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - this.groupBoxUpdate.Location = new System.Drawing.Point(8, 573); - this.groupBoxUpdate.Name = "groupBoxUpdate"; - this.groupBoxUpdate.Size = new System.Drawing.Size(593, 110); - this.groupBoxUpdate.TabIndex = 60; - this.groupBoxUpdate.TabStop = false; - this.groupBoxUpdate.Text = "PFAD FÜR UPDATES ODER IMPORTE"; - this.groupBoxUpdate.Visible = false; - this.groupBoxUpdate.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox_Paint); - // - // tableLayoutPanelUpdate - // - this.tableLayoutPanelUpdate.ColumnCount = 2; - this.tableLayoutPanelUpdate.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanelUpdate.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 510F)); - this.tableLayoutPanelUpdate.Controls.Add(this.labelSoftwareDatum, 1, 2); - this.tableLayoutPanelUpdate.Controls.Add(this.labelArtikelDatum, 1, 1); - this.tableLayoutPanelUpdate.Controls.Add(this.label16, 0, 2); - this.tableLayoutPanelUpdate.Controls.Add(this.label11, 0, 1); - this.tableLayoutPanelUpdate.Controls.Add(this.label3, 0, 0); - this.tableLayoutPanelUpdate.Controls.Add(this.labelKundenDatum, 1, 0); - this.tableLayoutPanelUpdate.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanelUpdate.ForeColor = System.Drawing.Color.Black; - this.tableLayoutPanelUpdate.Location = new System.Drawing.Point(3, 16); - this.tableLayoutPanelUpdate.Name = "tableLayoutPanelUpdate"; - this.tableLayoutPanelUpdate.RowCount = 3; - this.tableLayoutPanelUpdate.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanelUpdate.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanelUpdate.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanelUpdate.Size = new System.Drawing.Size(587, 91); - this.tableLayoutPanelUpdate.TabIndex = 0; - // - // labelSoftwareDatum - // - this.labelSoftwareDatum.AutoSize = true; - this.labelSoftwareDatum.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelSoftwareDatum.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelSoftwareDatum.Location = new System.Drawing.Point(80, 60); - this.labelSoftwareDatum.Name = "labelSoftwareDatum"; - this.labelSoftwareDatum.Size = new System.Drawing.Size(504, 31); - this.labelSoftwareDatum.TabIndex = 7; - this.labelSoftwareDatum.Text = "label17"; - this.labelSoftwareDatum.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // labelArtikelDatum - // - this.labelArtikelDatum.AutoSize = true; - this.labelArtikelDatum.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelArtikelDatum.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelArtikelDatum.Location = new System.Drawing.Point(80, 30); - this.labelArtikelDatum.Name = "labelArtikelDatum"; - this.labelArtikelDatum.Size = new System.Drawing.Size(504, 30); - this.labelArtikelDatum.TabIndex = 6; - this.labelArtikelDatum.Text = "label15"; - this.labelArtikelDatum.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Dock = System.Windows.Forms.DockStyle.Fill; - this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label16.Location = new System.Drawing.Point(3, 60); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(71, 31); - this.label16.TabIndex = 4; - this.label16.Text = "Software:"; - this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Dock = System.Windows.Forms.DockStyle.Fill; - this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label11.Location = new System.Drawing.Point(3, 30); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(71, 30); - this.label11.TabIndex = 2; - this.label11.Text = "Artikel:"; - this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Dock = System.Windows.Forms.DockStyle.Fill; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(3, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(71, 30); - this.label3.TabIndex = 0; - this.label3.Text = "Kunden:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // labelKundenDatum - // - this.labelKundenDatum.AutoSize = true; - this.labelKundenDatum.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelKundenDatum.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelKundenDatum.Location = new System.Drawing.Point(80, 0); - this.labelKundenDatum.Name = "labelKundenDatum"; - this.labelKundenDatum.Size = new System.Drawing.Size(504, 30); - this.labelKundenDatum.TabIndex = 5; - this.labelKundenDatum.Text = "label7"; - this.labelKundenDatum.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // groupBoxAuftrag // this.groupBoxAuftrag.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -1252,9 +1063,11 @@ namespace Deckungsbeitrag this.groupBoxAuftrag.Controls.Add(this.buttonAufAbruf); this.groupBoxAuftrag.Controls.Add(this.buttonAusgeliefert); this.groupBoxAuftrag.Enabled = false; - this.groupBoxAuftrag.Location = new System.Drawing.Point(252, 10); + this.groupBoxAuftrag.Location = new System.Drawing.Point(1119, 80); + this.groupBoxAuftrag.Margin = new System.Windows.Forms.Padding(4); this.groupBoxAuftrag.Name = "groupBoxAuftrag"; - this.groupBoxAuftrag.Size = new System.Drawing.Size(1224, 491); + this.groupBoxAuftrag.Padding = new System.Windows.Forms.Padding(4); + this.groupBoxAuftrag.Size = new System.Drawing.Size(1632, 607); this.groupBoxAuftrag.TabIndex = 51; this.groupBoxAuftrag.TabStop = false; this.groupBoxAuftrag.Visible = false; @@ -1273,9 +1086,10 @@ namespace Deckungsbeitrag this.objectListViewAuftrag.FullRowSelect = true; this.objectListViewAuftrag.GridLines = true; this.objectListViewAuftrag.HideSelection = false; - this.objectListViewAuftrag.Location = new System.Drawing.Point(165, 14); + this.objectListViewAuftrag.Location = new System.Drawing.Point(220, 17); + this.objectListViewAuftrag.Margin = new System.Windows.Forms.Padding(4); this.objectListViewAuftrag.Name = "objectListViewAuftrag"; - this.objectListViewAuftrag.Size = new System.Drawing.Size(1053, 471); + this.objectListViewAuftrag.Size = new System.Drawing.Size(1404, 582); this.objectListViewAuftrag.TabIndex = 58; this.objectListViewAuftrag.UseAlternatingBackColors = true; this.objectListViewAuftrag.UseCompatibleStateImageBehavior = false; @@ -1287,9 +1101,10 @@ namespace Deckungsbeitrag this.rBAufAbruf.AutoSize = true; this.rBAufAbruf.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; this.rBAufAbruf.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.rBAufAbruf.Location = new System.Drawing.Point(44, 136); + this.rBAufAbruf.Location = new System.Drawing.Point(59, 167); + this.rBAufAbruf.Margin = new System.Windows.Forms.Padding(4); this.rBAufAbruf.Name = "rBAufAbruf"; - this.rBAufAbruf.Size = new System.Drawing.Size(95, 24); + this.rBAufAbruf.Size = new System.Drawing.Size(115, 29); this.rBAufAbruf.TabIndex = 57; this.rBAufAbruf.TabStop = true; this.rBAufAbruf.Text = "Auf Abruf"; @@ -1301,9 +1116,10 @@ namespace Deckungsbeitrag this.rBAusgeliefert.AutoSize = true; this.rBAusgeliefert.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; this.rBAusgeliefert.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.rBAusgeliefert.Location = new System.Drawing.Point(27, 106); + this.rBAusgeliefert.Location = new System.Drawing.Point(36, 130); + this.rBAusgeliefert.Margin = new System.Windows.Forms.Padding(4); this.rBAusgeliefert.Name = "rBAusgeliefert"; - this.rBAusgeliefert.Size = new System.Drawing.Size(112, 24); + this.rBAusgeliefert.Size = new System.Drawing.Size(136, 29); this.rBAusgeliefert.TabIndex = 54; this.rBAusgeliefert.TabStop = true; this.rBAusgeliefert.Text = "Ausgeliefert"; @@ -1315,9 +1131,10 @@ namespace Deckungsbeitrag this.rBFertig.AutoSize = true; this.rBFertig.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; this.rBFertig.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.rBFertig.Location = new System.Drawing.Point(71, 76); + this.rBFertig.Location = new System.Drawing.Point(95, 94); + this.rBFertig.Margin = new System.Windows.Forms.Padding(4); this.rBFertig.Name = "rBFertig"; - this.rBFertig.Size = new System.Drawing.Size(68, 24); + this.rBFertig.Size = new System.Drawing.Size(82, 29); this.rBFertig.TabIndex = 53; this.rBFertig.TabStop = true; this.rBFertig.Text = "Fertig"; @@ -1329,9 +1146,10 @@ namespace Deckungsbeitrag this.rBVorbereitet.AutoSize = true; this.rBVorbereitet.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; this.rBVorbereitet.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.rBVorbereitet.Location = new System.Drawing.Point(33, 46); + this.rBVorbereitet.Location = new System.Drawing.Point(44, 57); + this.rBVorbereitet.Margin = new System.Windows.Forms.Padding(4); this.rBVorbereitet.Name = "rBVorbereitet"; - this.rBVorbereitet.Size = new System.Drawing.Size(106, 24); + this.rBVorbereitet.Size = new System.Drawing.Size(128, 29); this.rBVorbereitet.TabIndex = 52; this.rBVorbereitet.TabStop = true; this.rBVorbereitet.Text = "Vorbereitet"; @@ -1343,9 +1161,10 @@ namespace Deckungsbeitrag this.rBAlle.AutoSize = true; this.rBAlle.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; this.rBAlle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.rBAlle.Location = new System.Drawing.Point(86, 16); + this.rBAlle.Location = new System.Drawing.Point(115, 20); + this.rBAlle.Margin = new System.Windows.Forms.Padding(4); this.rBAlle.Name = "rBAlle"; - this.rBAlle.Size = new System.Drawing.Size(53, 24); + this.rBAlle.Size = new System.Drawing.Size(66, 29); this.rBAlle.TabIndex = 51; this.rBAlle.TabStop = true; this.rBAlle.Text = "Alle"; @@ -1361,10 +1180,10 @@ namespace Deckungsbeitrag 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.Location = new System.Drawing.Point(13, 265); + this.buttonAufAbruf.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonAufAbruf.Name = "buttonAufAbruf"; - this.buttonAufAbruf.Size = new System.Drawing.Size(150, 41); + this.buttonAufAbruf.Size = new System.Drawing.Size(200, 50); this.buttonAufAbruf.TabIndex = 56; this.buttonAufAbruf.Text = "AufAbruf"; this.buttonAufAbruf.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; @@ -1381,10 +1200,10 @@ namespace Deckungsbeitrag this.buttonAusgeliefert.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonAusgeliefert.ForeColor = System.Drawing.Color.White; this.buttonAusgeliefert.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonAusgeliefert.Location = new System.Drawing.Point(10, 170); - this.buttonAusgeliefert.Margin = new System.Windows.Forms.Padding(2); + this.buttonAusgeliefert.Location = new System.Drawing.Point(13, 209); + this.buttonAusgeliefert.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonAusgeliefert.Name = "buttonAusgeliefert"; - this.buttonAusgeliefert.Size = new System.Drawing.Size(150, 41); + this.buttonAusgeliefert.Size = new System.Drawing.Size(200, 50); this.buttonAusgeliefert.TabIndex = 55; this.buttonAusgeliefert.Text = "Ausgeliefert"; this.buttonAusgeliefert.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; @@ -1392,6 +1211,258 @@ namespace Deckungsbeitrag this.buttonAusgeliefert.Visible = false; this.buttonAusgeliefert.Click += new System.EventHandler(this.buttonAusgeliefert_Click); // + // groupBoxSaison + // + this.groupBoxSaison.Controls.Add(this.comboBoxSaison); + this.groupBoxSaison.Enabled = false; + this.groupBoxSaison.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); + this.groupBoxSaison.Location = new System.Drawing.Point(375, 143); + this.groupBoxSaison.Margin = new System.Windows.Forms.Padding(4); + this.groupBoxSaison.Name = "groupBoxSaison"; + this.groupBoxSaison.Padding = new System.Windows.Forms.Padding(4); + this.groupBoxSaison.Size = new System.Drawing.Size(372, 73); + this.groupBoxSaison.TabIndex = 62; + this.groupBoxSaison.TabStop = false; + this.groupBoxSaison.Text = "AKTIVE SAISON"; + this.groupBoxSaison.Visible = false; + this.groupBoxSaison.GiveFeedback += new System.Windows.Forms.GiveFeedbackEventHandler(this.groupBox_GiveFeedback); + this.groupBoxSaison.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox_Paint); + // + // comboBoxSaison + // + this.comboBoxSaison.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxSaison.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBoxSaison.FormattingEnabled = true; + this.comboBoxSaison.Location = new System.Drawing.Point(11, 23); + this.comboBoxSaison.Margin = new System.Windows.Forms.Padding(4); + this.comboBoxSaison.Name = "comboBoxSaison"; + this.comboBoxSaison.Size = new System.Drawing.Size(352, 33); + this.comboBoxSaison.TabIndex = 66; + this.comboBoxSaison.SelectedIndexChanged += new System.EventHandler(this.comboBoxSaison_SelectedIndexChanged); + // + // buttonNeuerStand + // + this.buttonNeuerStand.BackColor = System.Drawing.Color.MediumTurquoise; + this.buttonNeuerStand.Enabled = false; + this.buttonNeuerStand.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.buttonNeuerStand.FlatAppearance.BorderSize = 0; + this.buttonNeuerStand.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonNeuerStand.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonNeuerStand.ForeColor = System.Drawing.Color.Black; + this.buttonNeuerStand.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.buttonNeuerStand.Location = new System.Drawing.Point(707, 17); + this.buttonNeuerStand.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); + this.buttonNeuerStand.Name = "buttonNeuerStand"; + this.buttonNeuerStand.Size = new System.Drawing.Size(333, 50); + this.buttonNeuerStand.TabIndex = 65; + this.buttonNeuerStand.Text = "Neue Standveränderung"; + this.buttonNeuerStand.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.buttonNeuerStand.UseVisualStyleBackColor = false; + this.buttonNeuerStand.Visible = false; + this.buttonNeuerStand.Click += new System.EventHandler(this.buttonNeuerStand_Click); + // + // buttonNeueInventur + // + this.buttonNeueInventur.BackColor = System.Drawing.Color.Turquoise; + this.buttonNeueInventur.Enabled = false; + this.buttonNeueInventur.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.buttonNeueInventur.FlatAppearance.BorderSize = 0; + this.buttonNeueInventur.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonNeueInventur.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonNeueInventur.ForeColor = System.Drawing.Color.Black; + this.buttonNeueInventur.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.buttonNeueInventur.Location = new System.Drawing.Point(357, 17); + this.buttonNeueInventur.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); + this.buttonNeueInventur.Name = "buttonNeueInventur"; + this.buttonNeueInventur.Size = new System.Drawing.Size(333, 50); + this.buttonNeueInventur.TabIndex = 64; + this.buttonNeueInventur.Text = "Neue Inventur"; + this.buttonNeueInventur.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.buttonNeueInventur.UseVisualStyleBackColor = false; + this.buttonNeueInventur.Visible = false; + this.buttonNeueInventur.Click += new System.EventHandler(this.buttonNeueInventur_Click); + // + // buttonNeueAufgabe + // + this.buttonNeueAufgabe.BackColor = System.Drawing.Color.DarkOrange; + this.buttonNeueAufgabe.Enabled = false; + this.buttonNeueAufgabe.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.buttonNeueAufgabe.FlatAppearance.BorderSize = 0; + this.buttonNeueAufgabe.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonNeueAufgabe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonNeueAufgabe.ForeColor = System.Drawing.Color.Black; + this.buttonNeueAufgabe.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.buttonNeueAufgabe.Location = new System.Drawing.Point(11, 206); + this.buttonNeueAufgabe.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); + this.buttonNeueAufgabe.Name = "buttonNeueAufgabe"; + this.buttonNeueAufgabe.Size = new System.Drawing.Size(333, 50); + this.buttonNeueAufgabe.TabIndex = 63; + this.buttonNeueAufgabe.Text = "Neue Aufgabe"; + this.buttonNeueAufgabe.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.buttonNeueAufgabe.UseVisualStyleBackColor = false; + this.buttonNeueAufgabe.Visible = false; + this.buttonNeueAufgabe.Click += new System.EventHandler(this.buttonNeueAufgabe_Click); + // + // buttonNeuerAuftrag + // + this.buttonNeuerAuftrag.BackColor = System.Drawing.Color.PaleTurquoise; + this.buttonNeuerAuftrag.Enabled = false; + this.buttonNeuerAuftrag.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.buttonNeuerAuftrag.FlatAppearance.BorderSize = 0; + this.buttonNeuerAuftrag.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonNeuerAuftrag.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonNeuerAuftrag.ForeColor = System.Drawing.Color.Black; + this.buttonNeuerAuftrag.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.buttonNeuerAuftrag.Location = new System.Drawing.Point(11, 17); + this.buttonNeuerAuftrag.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); + this.buttonNeuerAuftrag.Name = "buttonNeuerAuftrag"; + this.buttonNeuerAuftrag.Size = new System.Drawing.Size(333, 50); + this.buttonNeuerAuftrag.TabIndex = 56; + this.buttonNeuerAuftrag.Text = "Neuer Auftrag"; + this.buttonNeuerAuftrag.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.buttonNeuerAuftrag.UseVisualStyleBackColor = false; + this.buttonNeuerAuftrag.Visible = false; + this.buttonNeuerAuftrag.Click += new System.EventHandler(this.buttonNeuerAuftrag_Click); + // + // buttonNeuerUser + // + this.buttonNeuerUser.BackColor = System.Drawing.Color.DarkOrange; + this.buttonNeuerUser.Enabled = false; + this.buttonNeuerUser.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.buttonNeuerUser.FlatAppearance.BorderSize = 0; + this.buttonNeuerUser.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonNeuerUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonNeuerUser.ForeColor = System.Drawing.Color.Black; + this.buttonNeuerUser.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.buttonNeuerUser.Location = new System.Drawing.Point(11, 143); + this.buttonNeuerUser.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); + this.buttonNeuerUser.Name = "buttonNeuerUser"; + this.buttonNeuerUser.Size = new System.Drawing.Size(333, 50); + this.buttonNeuerUser.TabIndex = 62; + this.buttonNeuerUser.Text = "Neuer User"; + this.buttonNeuerUser.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.buttonNeuerUser.UseVisualStyleBackColor = false; + this.buttonNeuerUser.Visible = false; + this.buttonNeuerUser.Click += new System.EventHandler(this.buttonNeuerUser_Click); + // + // groupBoxUpdate + // + this.groupBoxUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.groupBoxUpdate.Controls.Add(this.tableLayoutPanelUpdate); + this.groupBoxUpdate.Enabled = false; + this.groupBoxUpdate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); + this.groupBoxUpdate.Location = new System.Drawing.Point(11, 705); + this.groupBoxUpdate.Margin = new System.Windows.Forms.Padding(4); + this.groupBoxUpdate.Name = "groupBoxUpdate"; + this.groupBoxUpdate.Padding = new System.Windows.Forms.Padding(4); + this.groupBoxUpdate.Size = new System.Drawing.Size(791, 135); + this.groupBoxUpdate.TabIndex = 60; + this.groupBoxUpdate.TabStop = false; + this.groupBoxUpdate.Text = "PFAD FÜR UPDATES ODER IMPORTE"; + this.groupBoxUpdate.Visible = false; + this.groupBoxUpdate.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox_Paint); + // + // tableLayoutPanelUpdate + // + this.tableLayoutPanelUpdate.ColumnCount = 2; + this.tableLayoutPanelUpdate.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanelUpdate.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 686F)); + this.tableLayoutPanelUpdate.Controls.Add(this.labelSoftwareDatum, 1, 2); + this.tableLayoutPanelUpdate.Controls.Add(this.labelArtikelDatum, 1, 1); + this.tableLayoutPanelUpdate.Controls.Add(this.label16, 0, 2); + this.tableLayoutPanelUpdate.Controls.Add(this.label11, 0, 1); + this.tableLayoutPanelUpdate.Controls.Add(this.label3, 0, 0); + this.tableLayoutPanelUpdate.Controls.Add(this.labelKundenDatum, 1, 0); + this.tableLayoutPanelUpdate.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanelUpdate.ForeColor = System.Drawing.Color.Black; + this.tableLayoutPanelUpdate.Location = new System.Drawing.Point(4, 19); + this.tableLayoutPanelUpdate.Margin = new System.Windows.Forms.Padding(4); + this.tableLayoutPanelUpdate.Name = "tableLayoutPanelUpdate"; + this.tableLayoutPanelUpdate.RowCount = 3; + this.tableLayoutPanelUpdate.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanelUpdate.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanelUpdate.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanelUpdate.Size = new System.Drawing.Size(783, 112); + this.tableLayoutPanelUpdate.TabIndex = 0; + // + // labelSoftwareDatum + // + this.labelSoftwareDatum.AutoSize = true; + this.labelSoftwareDatum.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelSoftwareDatum.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelSoftwareDatum.Location = new System.Drawing.Point(101, 74); + this.labelSoftwareDatum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSoftwareDatum.Name = "labelSoftwareDatum"; + this.labelSoftwareDatum.Size = new System.Drawing.Size(678, 38); + this.labelSoftwareDatum.TabIndex = 7; + this.labelSoftwareDatum.Text = "label17"; + this.labelSoftwareDatum.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelArtikelDatum + // + this.labelArtikelDatum.AutoSize = true; + this.labelArtikelDatum.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelArtikelDatum.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelArtikelDatum.Location = new System.Drawing.Point(101, 37); + this.labelArtikelDatum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelArtikelDatum.Name = "labelArtikelDatum"; + this.labelArtikelDatum.Size = new System.Drawing.Size(678, 37); + this.labelArtikelDatum.TabIndex = 6; + this.labelArtikelDatum.Text = "label15"; + this.labelArtikelDatum.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Dock = System.Windows.Forms.DockStyle.Fill; + this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label16.Location = new System.Drawing.Point(4, 74); + this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(89, 38); + this.label16.TabIndex = 4; + this.label16.Text = "Software:"; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Dock = System.Windows.Forms.DockStyle.Fill; + this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label11.Location = new System.Drawing.Point(4, 37); + this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(89, 37); + this.label11.TabIndex = 2; + this.label11.Text = "Artikel:"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Dock = System.Windows.Forms.DockStyle.Fill; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(4, 0); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(89, 37); + this.label3.TabIndex = 0; + this.label3.Text = "Kunden:"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelKundenDatum + // + this.labelKundenDatum.AutoSize = true; + this.labelKundenDatum.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelKundenDatum.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelKundenDatum.Location = new System.Drawing.Point(101, 0); + this.labelKundenDatum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelKundenDatum.Name = "labelKundenDatum"; + this.labelKundenDatum.Size = new System.Drawing.Size(678, 37); + this.labelKundenDatum.TabIndex = 5; + this.labelKundenDatum.Text = "label7"; + this.labelKundenDatum.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // groupBoxScannTest // this.groupBoxScannTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -1401,18 +1472,21 @@ namespace Deckungsbeitrag this.groupBoxScannTest.Controls.Add(this.buttonScannTest); this.groupBoxScannTest.Controls.Add(this.labelScannTest); this.groupBoxScannTest.Enabled = false; - this.groupBoxScannTest.Location = new System.Drawing.Point(8, 572); + this.groupBoxScannTest.Location = new System.Drawing.Point(11, 695); + this.groupBoxScannTest.Margin = new System.Windows.Forms.Padding(4); this.groupBoxScannTest.Name = "groupBoxScannTest"; - this.groupBoxScannTest.Size = new System.Drawing.Size(1057, 264); + this.groupBoxScannTest.Padding = new System.Windows.Forms.Padding(4); + this.groupBoxScannTest.Size = new System.Drawing.Size(808, 334); this.groupBoxScannTest.TabIndex = 50; this.groupBoxScannTest.TabStop = false; this.groupBoxScannTest.Visible = false; // // pictureBoxScannTest // - this.pictureBoxScannTest.Location = new System.Drawing.Point(6, 10); + this.pictureBoxScannTest.Location = new System.Drawing.Point(8, 12); + this.pictureBoxScannTest.Margin = new System.Windows.Forms.Padding(4); this.pictureBoxScannTest.Name = "pictureBoxScannTest"; - this.pictureBoxScannTest.Size = new System.Drawing.Size(179, 160); + this.pictureBoxScannTest.Size = new System.Drawing.Size(239, 197); this.pictureBoxScannTest.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxScannTest.TabIndex = 14; this.pictureBoxScannTest.TabStop = false; @@ -1420,17 +1494,19 @@ namespace Deckungsbeitrag // textBoxScannTest // this.textBoxScannTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxScannTest.Location = new System.Drawing.Point(6, 176); + this.textBoxScannTest.Location = new System.Drawing.Point(8, 217); + this.textBoxScannTest.Margin = new System.Windows.Forms.Padding(4); this.textBoxScannTest.Name = "textBoxScannTest"; - this.textBoxScannTest.Size = new System.Drawing.Size(129, 26); + this.textBoxScannTest.Size = new System.Drawing.Size(171, 30); this.textBoxScannTest.TabIndex = 13; this.textBoxScannTest.TextChanged += new System.EventHandler(this.textBoxScannTest_TextChanged); // // buttonScannTest // - this.buttonScannTest.Location = new System.Drawing.Point(6, 208); + this.buttonScannTest.Location = new System.Drawing.Point(8, 256); + this.buttonScannTest.Margin = new System.Windows.Forms.Padding(4); this.buttonScannTest.Name = "buttonScannTest"; - this.buttonScannTest.Size = new System.Drawing.Size(75, 23); + this.buttonScannTest.Size = new System.Drawing.Size(100, 28); this.buttonScannTest.TabIndex = 12; this.buttonScannTest.Text = "Test starten"; this.buttonScannTest.UseVisualStyleBackColor = true; @@ -1440,23 +1516,25 @@ namespace Deckungsbeitrag // this.labelScannTest.AutoSize = true; this.labelScannTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelScannTest.Location = new System.Drawing.Point(6, 234); + this.labelScannTest.Location = new System.Drawing.Point(8, 288); + this.labelScannTest.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelScannTest.Name = "labelScannTest"; - this.labelScannTest.Size = new System.Drawing.Size(60, 24); + this.labelScannTest.Size = new System.Drawing.Size(79, 29); this.labelScannTest.TabIndex = 11; this.labelScannTest.Text = "label1"; // // FormMain // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - this.ClientSize = new System.Drawing.Size(1281, 689); + this.ClientSize = new System.Drawing.Size(1708, 848); this.Controls.Add(this.toolStripMenu); this.Controls.Add(this.panelMain); this.HelpButton = true; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(2); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(200, 200); this.Name = "FormMain"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "VERWALTUNG Version: "; @@ -1476,13 +1554,13 @@ namespace Deckungsbeitrag this.groupBoxContAnz.PerformLayout(); this.tLPContAnz.ResumeLayout(false); this.tLPContAnz.PerformLayout(); + this.groupBoxAuftrag.ResumeLayout(false); + this.groupBoxAuftrag.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).EndInit(); this.groupBoxSaison.ResumeLayout(false); this.groupBoxUpdate.ResumeLayout(false); this.tableLayoutPanelUpdate.ResumeLayout(false); this.tableLayoutPanelUpdate.PerformLayout(); - this.groupBoxAuftrag.ResumeLayout(false); - this.groupBoxAuftrag.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).EndInit(); this.groupBoxScannTest.ResumeLayout(false); this.groupBoxScannTest.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxScannTest)).EndInit(); @@ -1573,6 +1651,7 @@ namespace Deckungsbeitrag private System.Windows.Forms.ProgressBar progressBarKundeArtikelUpdate; private System.Windows.Forms.Panel panelProgress; private System.Windows.Forms.Button buttonNeuerRegAuft; + private System.Windows.Forms.Button buttonTestInventur; } } diff --git a/AA-Forms/FormMain.cs b/AA-Forms/FormMain.cs index 9b61fcb..3e65763 100644 --- a/AA-Forms/FormMain.cs +++ b/AA-Forms/FormMain.cs @@ -27,6 +27,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using System.Windows.Input; using System.Xml.Serialization; +using ZXing.Common; using Timer = System.Windows.Forms.Timer; namespace Deckungsbeitrag @@ -60,6 +61,8 @@ namespace Deckungsbeitrag private OnboardingSchritt onBoardingArt = OnboardingSchritt.Main; private UCStatistik uCStatistik; private UCAuftragSuchen uCAuftrag; + private UCInventur uCInventur; + private Screen screen = Screen.PrimaryScreen; #endregion public FormMain() { @@ -67,7 +70,7 @@ namespace Deckungsbeitrag this.panelMain.AllowDrop = true; this.toolStripMenu.Size = new Size(toolStripButton1.Size.Width + 20, this.Height); - + _fixedSize = screen.WorkingArea.Size; } public FormMain(Benutzer benutzer) : this() { @@ -86,6 +89,9 @@ namespace Deckungsbeitrag #region FormMain-Events private async void FormMain_Load(object sender, EventArgs e) { + this.SuspendLayout(); + this.Cursor = Cursors.WaitCursor; + formloading = true; _settings.Load(); @@ -100,6 +106,8 @@ namespace Deckungsbeitrag this.labelSoftwareDatum.Text = @"N:\TECHNIK\Software\Wirl-Verwaltung\Setup\SetupVerwaltung*.msi"; this.labelArtikelDatum.Text = @"N:\TECHNIK\Software\Wirl-Verwaltung\Listen\Artikelkurzliste.csv"; + GetInventuren(); + GetSaison(); if (this.groupBoxContAnz.Visible) { @@ -107,13 +115,22 @@ namespace Deckungsbeitrag GetContainerProTag(); } - GetSaison(); + // UserCotnrols werden eingefügt + GetUserControls(); + // Controls werde Enabled + Enable_Controls(); + // Location für UCInventur festlegen. + Get_UCInventur_Location(); + + this.Activate(); _fixedSize = this.Size; formloading = false; } + private void FormMain_Shown(object sender, EventArgs e) { + // Meldung wenn Updates oder Imports erledigt wurden. if (Program.Artikelliste_Importiert | Program.Kundenliste_Importiert | Program.Software_Updated) { @@ -123,13 +140,30 @@ namespace Deckungsbeitrag updates[2] = Program.Software_Updated ? "Software: ✅" : "Sofware: ❌"; MessageBox.Show($"Folgende Updates wurden heute durchgeführt:\n\n{updates[0]}\n{updates[1]}\n{updates[2]}", "UPDATES DURCHGEFÜHRT", MessageBoxButtons.OK, MessageBoxIcon.Information); } + // OnBoarding nur bei den Fahrern anzeigen. Bis die anderen Fertig sind. + if (this.benutzer.Rolle == BenutzerRolle.Fahrer) ZeigeOnboarding(); - // UserCotnrols werden eingefügt - GetUserControls(); - // Controls werde Enabled - Enable_Controls(); - ZeigeOnboarding(); + this.ResumeLayout(); + this.Cursor = Cursors.Default; + } + private void FormMain_ResizeBegin(object sender, EventArgs e) + { + _handlingResize = true; + this.Size = _fixedSize; + _handlingResize = false; + } + private void FormMain_Resize(object sender, EventArgs e) + { + if (_handlingResize) return; + if (this.Size != _fixedSize) + { + _handlingResize = true; + this.Size = _fixedSize; + _handlingResize = false; + } + //this.panelMain.Size = new Size(this.ClientSize.Width - this.toolStripMenu.Right, this.Height); + //this.panelProgress.Location = new Point(this.panelMain.Right - this.panelProgress.Width - 100, this.panelMain.Bottom - this.panelProgress.Height - 20); } /// @@ -163,22 +197,6 @@ namespace Deckungsbeitrag MessageBox.Show("Fehler beim Speichern" + ex.Message); } } - private void FormMain_ResizeBegin(object sender, EventArgs e) - { - _handlingResize = true; - this.Size = _fixedSize; - _handlingResize = false; - } - private void FormMain_Resize(object sender, EventArgs e) - { - if (_handlingResize) return; - if (this.Size != _fixedSize) - { - _handlingResize = true; - this.Size = _fixedSize; - _handlingResize = false; - } - } #endregion @@ -330,7 +348,7 @@ namespace Deckungsbeitrag private void buttonNeuerAuftrag_Click(object sender, EventArgs e) { onBoardingArt = OnboardingSchritt.NeuerAuftrag; - ZeigeOnboarding(); + if (this.benutzer.Rolle == BenutzerRolle.Fahrer) ZeigeOnboarding(); FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.benutzer, AuftragTyp.Standart); neuerAuftrag.ShowDialog(); } @@ -978,7 +996,8 @@ namespace Deckungsbeitrag // 2. ALLE Children (rekursiv) - auch Child of Child! foreach (Control child in parent.Controls) { - if (child is ComboBox || child is DateTimePicker || child is Button || child is RadioButton) continue; + if (child is ComboBox || child is DateTimePicker || child is Button || child is RadioButton || child is PictureBox || child is DataGridView) continue; + if (child.Name == "labelInvText") continue; // JEDES Control bekommt Child-Handler child.MouseDown += Child_MouseDown; child.MouseMove += Child_MouseMove; @@ -1038,6 +1057,49 @@ namespace Deckungsbeitrag } #endregion + private async void GetInventuren() + { + foreach (UCInventur uci in panelMain.Controls.OfType()) + { + this.panelMain.Controls.Remove(uci); + } + + string loadPath = Path.Combine(ConfigurationManager.AppSettings["DateiSavePfad"], "Listen\\Inventuren") ?? "Inventuren"; + // Alle "Warten" Inventur Files auflisten. + string[] invFiles = Directory.GetFiles(loadPath, "Warten-*.csv"); + if (invFiles.Length == 0) return; + int i = 0; + foreach (string s in invFiles) + { + i++; + // 1. alle Zeilen lesen + string[] lines = File.ReadAllLines(Path.Combine(loadPath, s), Encoding.UTF8); + // 2. an UCInventur übergeben + uCInventur = new UCInventur(lines, this.benutzer, this); + uCInventur.Visible = false; + uCInventur.Name = $"uci_{i}"; + uCInventur.UCInventur_Update += () => { this.GetInventuren(); }; + + this.panelMain.Controls.Add(uCInventur); + } + Get_UCInventur_Location(); + } + private void Get_UCInventur_Location() + { + // UCInventur in den Vordergrund bringen und Location setzen. + int y = 0; + int x = 0; + if (!formloading) y = panelMain.Controls["feedback"].Top; + foreach (UCInventur uci in panelMain.Controls.OfType()) + { + if (!formloading) x = panelMain.Controls["feedback"].Left - uCInventur.Width - 10; + uci.BringToFront(); + uci.Location = new Point(x, y); + y += uci.Height; + uci.Visible = true; + } + + } private async void ZeigeOnboarding() { @@ -1373,6 +1435,25 @@ namespace Deckungsbeitrag } } + private void buttonTestInventur_Click(object sender, EventArgs e) + { + onBoardingArt = OnboardingSchritt.NeueInventur; + ZeigeOnboarding(); + + Kunde kunde = null; + FormListe liste = new FormListe(null, (int)Listentyp.Reklamationliste, "Miete"); + if (liste.ShowDialog() == DialogResult.OK) + { + kunde = liste.kunde; + uCInventur = new UCInventur(kunde, this.benutzer); + uCInventur.UCInventur_Update += () => { this.GetInventuren(); }; + this.panelMain.Controls.Add(uCInventur); + uCInventur.Location = new Point(100, 100); + uCInventur.BringToFront(); + RegisterDragEvents(uCInventur); + } + + } } } //CHANGES: Fahrer können abgeholte Aufträge erstellen und ausgelieferte Aufträge markieren. diff --git a/AA-Forms/FormMain.resx b/AA-Forms/FormMain.resx index 39c5225..cf40d7c 100644 --- a/AA-Forms/FormMain.resx +++ b/AA-Forms/FormMain.resx @@ -124,7 +124,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW kgYsrGgkBgyzP43J6r95PHcBETeZzP6zsx9kZtbzPM8TkftxHF8BaBFpAJwYP7R4ua5rHcexDoJAp2mq m6bRAG6XuZuLX+bloih4yfgkScx+z64ACt/3nUPqPXMAIvLynz9YAViwrRoopR6uST+5a8Dl4IlBpZQ5 rKrqU0SenaQ9wDAMyPNcZ1mm27Y1nppxO28TQFGWpY6iyPgwDB1tJ/8KWFbZtq7rTDLnwgZM03S3om7t @@ -135,7 +135,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW kgYsrGgkBgyzP43J6r95PHcBETeZzP6zsx9kZtbzPM8TkftxHF8BaBFpAJwYP7R4ua5rHcexDoJAp2mq m6bRAG6XuZuLX+bloih4yfgkScx+z64ACt/3nUPqPXMAIvLynz9YAViwrRoopR6uST+5a8Dl4IlBpZQ5 rKrqU0SenaQ9wDAMyPNcZ1mm27Y1nppxO28TQFGWpY6iyPgwDB1tJ/8KWFbZtq7rTDLnwgZM03S3om7t @@ -146,7 +146,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW kgYsrGgkBgyzP43J6r95PHcBETeZzP6zsx9kZtbzPM8TkftxHF8BaBFpAJwYP7R4ua5rHcexDoJAp2mq m6bRAG6XuZuLX+bloih4yfgkScx+z64ACt/3nUPqPXMAIvLynz9YAViwrRoopR6uST+5a8Dl4IlBpZQ5 rKrqU0SenaQ9wDAMyPNcZ1mm27Y1nppxO28TQFGWpY6iyPgwDB1tJ/8KWFbZtq7rTDLnwgZM03S3om7t @@ -157,7 +157,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB7SURBVDhPnZBBDoAgDAR5W///F/XCVaIJyXZcEG2yB5p2 + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAB7SURBVDhPnZBBDoAgDAR5W///F/XCVaIJyXZcEG2yB5p2 ukspqFrrORPnH3UNRYTVJ8C+HUm/AYxAcd8CGGUaaQRYikR71BKANtXuMmBk1/VebVMWoDZpm28L6IN6 afQmMGV3A9pTYJcFcEj76dd7EaAX+ebuXbw2E3cbfftvjPBKL5kAAAAASUVORK5CYII= @@ -165,7 +165,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB7SURBVDhPnZBBDoAgDAR5W///F/XCVaIJyXZcEG2yB5p2 + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAB7SURBVDhPnZBBDoAgDAR5W///F/XCVaIJyXZcEG2yB5p2 ukspqFrrORPnH3UNRYTVJ8C+HUm/AYxAcd8CGGUaaQRYikR71BKANtXuMmBk1/VebVMWoDZpm28L6IN6 afQmMGV3A9pTYJcFcEj76dd7EaAX+ebuXbw2E3cbfftvjPBKL5kAAAAASUVORK5CYII= @@ -173,7 +173,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW kgYsrGgkBgyzP43J6r95PHcBETeZzP6zsx9kZtbzPM8TkftxHF8BaBFpAJwYP7R4ua5rHcexDoJAp2mq m6bRAG6XuZuLX+bloih4yfgkScx+z64ACt/3nUPqPXMAIvLynz9YAViwrRoopR6uST+5a8Dl4IlBpZQ5 rKrqU0SenaQ9wDAMyPNcZ1mm27Y1nppxO28TQFGWpY6iyPgwDB1tJ/8KWFbZtq7rTDLnwgZM03S3om7t @@ -184,7 +184,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACxSURBVDhPnZI9DsMgDIVzNo7SzM2czqm4EKfgHm0WhrYL + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAACxSURBVDhPnZI9DsMgDIVzNo7SzM2czqm4EKfgHm0WhrYL K5WtGpmnmIhaegrBvM8vP9P0q5xzIcn9UJHRe88ahojZOVcBQxCc/lcSmSpJdBo8axYC8JEsNYAeRO+J GIBEhFgpGsARGV+sPmcC3q9PVQihpJRqmlOANm/bnfcIQn0CxRi51wXIdb7MddpyXZpeF4AJSLTWPROg Ic/HXtb1xqK1NotRdPgVzsRG/IFGJf4vZOpFEVHH2lgAAAAASUVORK5CYII= @@ -193,7 +193,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACxSURBVDhPnZI9DsMgDIVzNo7SzM2czqm4EKfgHm0WhrYL + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAACxSURBVDhPnZI9DsMgDIVzNo7SzM2czqm4EKfgHm0WhrYL K5WtGpmnmIhaegrBvM8vP9P0q5xzIcn9UJHRe88ahojZOVcBQxCc/lcSmSpJdBo8axYC8JEsNYAeRO+J GIBEhFgpGsARGV+sPmcC3q9PVQihpJRqmlOANm/bnfcIQn0CxRi51wXIdb7MddpyXZpeF4AJSLTWPROg Ic/HXtb1xqK1NotRdPgVzsRG/IFGJf4vZOpFEVHH2lgAAAAASUVORK5CYII= @@ -418,7 +418,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW kgYsrGgkBgyzP43J6r95PHcBETeZzP6zsx9kZtbzPM8TkftxHF8BaBFpAJwYP7R4ua5rHcexDoJAp2mq m6bRAG6XuZuLX+bloih4yfgkScx+z64ACt/3nUPqPXMAIvLynz9YAViwrRoopR6uST+5a8Dl4IlBpZQ5 rKrqU0SenaQ9wDAMyPNcZ1mm27Y1nppxO28TQFGWpY6iyPgwDB1tJ/8KWFbZtq7rTDLnwgZM03S3om7t @@ -429,7 +429,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW kgYsrGgkBgyzP43J6r95PHcBETeZzP6zsx9kZtbzPM8TkftxHF8BaBFpAJwYP7R4ua5rHcexDoJAp2mq m6bRAG6XuZuLX+bloih4yfgkScx+z64ACt/3nUPqPXMAIvLynz9YAViwrRoopR6uST+5a8Dl4IlBpZQ5 rKrqU0SenaQ9wDAMyPNcZ1mm27Y1nppxO28TQFGWpY6iyPgwDB1tJ/8KWFbZtq7rTDLnwgZM03S3om7t @@ -440,7 +440,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEgSURBVDhPlZMxToVAEIY5gmeCY5D4SBShs3kF4Ro03seW kgYsrGgkBgyzP43J6r95PHcBETeZzP6zsx9kZtbzPM8TkftxHF8BaBFpAJwYP7R4ua5rHcexDoJAp2mq m6bRAG6XuZuLX+bloih4yfgkScx+z64ACt/3nUPqPXMAIvLynz9YAViwrRoopR6uST+5a8Dl4IlBpZQ5 rKrqU0SenaQ9wDAMyPNcZ1mm27Y1nppxO28TQFGWpY6iyPgwDB1tJ/8KWFbZtq7rTDLnwgZM03S3om7t @@ -451,7 +451,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM @@ -466,7 +466,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEMSURBVDhPrZMxjoNADEVzpD1CRE9PzwW2pkpDzwEo0tEi + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEMSURBVDhPrZMxjoNADEVzpD1CRE9PzwW2pkpDzwEo0tEi DkBPT09BSbORsCkneqM1yUxQtNLG0pdG/va3x+M5nT5p27adVbVVVRehhYvjA1PVapomV5alS9PUJUni wRkfHDFxnjeIcRx9cJZlrmkaNwyDB2d8cIcitAZhleZ5vonIBT/gjK+qKtf3PQI/67p+PVdvSaQKgQH5 ayLyvSzLXiQQYUgQXdc5qh0kXwBJds08zx/FEGBY3Pdo0vB1Xe8oisLHm8hnBP57hX2ILxN+iARDDIYd @@ -477,7 +477,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEMSURBVDhPrZMxjoNADEVzpD1CRE9PzwW2pkpDzwEo0tEi + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEMSURBVDhPrZMxjoNADEVzpD1CRE9PzwW2pkpDzwEo0tEi DkBPT09BSbORsCkneqM1yUxQtNLG0pdG/va3x+M5nT5p27adVbVVVRehhYvjA1PVapomV5alS9PUJUni wRkfHDFxnjeIcRx9cJZlrmkaNwyDB2d8cIcitAZhleZ5vonIBT/gjK+qKtf3PQI/67p+PVdvSaQKgQH5 ayLyvSzLXiQQYUgQXdc5qh0kXwBJds08zx/FEGBY3Pdo0vB1Xe8oisLHm8hnBP57hX2ILxN+iARDDIYd @@ -488,7 +488,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEMSURBVDhPrZMxjoNADEVzpD1CRE9PzwW2pkpDzwEo0tEi + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEMSURBVDhPrZMxjoNADEVzpD1CRE9PzwW2pkpDzwEo0tEi DkBPT09BSbORsCkneqM1yUxQtNLG0pdG/va3x+M5nT5p27adVbVVVRehhYvjA1PVapomV5alS9PUJUni wRkfHDFxnjeIcRx9cJZlrmkaNwyDB2d8cIcitAZhleZ5vonIBT/gjK+qKtf3PQI/67p+PVdvSaQKgQH5 ayLyvSzLXiQQYUgQXdc5qh0kXwBJds08zx/FEGBY3Pdo0vB1Xe8oisLHm8hnBP57hX2ILxN+iARDDIYd diff --git a/AA-Forms/FormNeuerAuftrag.Designer.cs b/AA-Forms/FormNeuerAuftrag.Designer.cs index b748e04..53771b9 100644 --- a/AA-Forms/FormNeuerAuftrag.Designer.cs +++ b/AA-Forms/FormNeuerAuftrag.Designer.cs @@ -47,17 +47,6 @@ namespace Deckungsbeitrag this.label6 = new System.Windows.Forms.Label(); this.comboBoxTyp = new System.Windows.Forms.ComboBox(); this.textBoxCont = new System.Windows.Forms.TextBox(); - this.dGArtikel = new System.Windows.Forms.DataGridView(); - this.KundeArtikelID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.KundeID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ArtikelNR = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ArtikelName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Stand = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Fehlmenge = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Korrektur = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.StandBearbeitet = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.FehlmengeBearbeitet = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.KorrekturBearbeitet = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.label1 = new System.Windows.Forms.Label(); this.comboBoxFahrer = new System.Windows.Forms.ComboBox(); this.buttonEinstellung = new System.Windows.Forms.Button(); @@ -70,7 +59,6 @@ namespace Deckungsbeitrag this.fLPArtikel = new System.Windows.Forms.FlowLayoutPanel(); this.pictureBoxMinus = new System.Windows.Forms.PictureBox(); this.pictureBoxPlus = new System.Windows.Forms.PictureBox(); - ((System.ComponentModel.ISupportInitialize)(this.dGArtikel)).BeginInit(); this.panelRegAuftrag.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxAddArtikel)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).BeginInit(); @@ -83,9 +71,10 @@ namespace Deckungsbeitrag this.dTPLiefertag.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right; this.dTPLiefertag.Font = new System.Drawing.Font("Microsoft Sans Serif", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.dTPLiefertag.Format = System.Windows.Forms.DateTimePickerFormat.Short; - this.dTPLiefertag.Location = new System.Drawing.Point(219, 317); + this.dTPLiefertag.Location = new System.Drawing.Point(195, 254); + this.dTPLiefertag.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.dTPLiefertag.Name = "dTPLiefertag"; - this.dTPLiefertag.Size = new System.Drawing.Size(210, 32); + this.dTPLiefertag.Size = new System.Drawing.Size(187, 38); this.dTPLiefertag.TabIndex = 2; this.dTPLiefertag.ValueChanged += new System.EventHandler(this.dTPLiefertag_ValueChanged); this.dTPLiefertag.Leave += new System.EventHandler(this.dTPLiefertag_Leave); @@ -98,10 +87,12 @@ namespace Deckungsbeitrag this.buttonSpeichern.FlatAppearance.BorderSize = 0; this.buttonSpeichern.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonSpeichern.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonSpeichern.ForeColor = System.Drawing.Color.White; - this.buttonSpeichern.Location = new System.Drawing.Point(83, 578); + this.buttonSpeichern.ForeColor = System.Drawing.Color.Black; + this.buttonSpeichern.Location = new System.Drawing.Point(231, 462); + this.buttonSpeichern.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.buttonSpeichern.MinimumSize = new System.Drawing.Size(150, 50); this.buttonSpeichern.Name = "buttonSpeichern"; - this.buttonSpeichern.Size = new System.Drawing.Size(172, 63); + this.buttonSpeichern.Size = new System.Drawing.Size(150, 50); this.buttonSpeichern.TabIndex = 11; this.buttonSpeichern.Text = "Speichern"; this.buttonSpeichern.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; @@ -117,10 +108,12 @@ namespace Deckungsbeitrag this.buttonAbbrechen.FlatAppearance.BorderSize = 0; this.buttonAbbrechen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonAbbrechen.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonAbbrechen.ForeColor = System.Drawing.Color.White; - this.buttonAbbrechen.Location = new System.Drawing.Point(262, 578); + this.buttonAbbrechen.ForeColor = System.Drawing.Color.Black; + this.buttonAbbrechen.Location = new System.Drawing.Point(72, 462); + this.buttonAbbrechen.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.buttonAbbrechen.MinimumSize = new System.Drawing.Size(150, 50); this.buttonAbbrechen.Name = "buttonAbbrechen"; - this.buttonAbbrechen.Size = new System.Drawing.Size(172, 63); + this.buttonAbbrechen.Size = new System.Drawing.Size(150, 50); this.buttonAbbrechen.TabIndex = 12; this.buttonAbbrechen.Text = "Abbrechen"; this.buttonAbbrechen.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; @@ -130,9 +123,10 @@ namespace Deckungsbeitrag // textBoxKndNr // this.textBoxKndNr.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxKndNr.Location = new System.Drawing.Point(14, 66); + this.textBoxKndNr.Location = new System.Drawing.Point(12, 53); + this.textBoxKndNr.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.textBoxKndNr.Name = "textBoxKndNr"; - this.textBoxKndNr.Size = new System.Drawing.Size(156, 31); + this.textBoxKndNr.Size = new System.Drawing.Size(139, 37); this.textBoxKndNr.TabIndex = 0; this.textBoxKndNr.Click += new System.EventHandler(this.textBoxKndNr_Click); this.textBoxKndNr.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.textBoxKndNr_PreviewKeyDown); @@ -141,18 +135,19 @@ namespace Deckungsbeitrag // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(8, 26); + this.label2.Location = new System.Drawing.Point(7, 21); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(75, 20); + this.label2.Size = new System.Drawing.Size(96, 25); this.label2.TabIndex = 0; this.label2.Text = "KundeNr:"; // // textBoxKundeName // this.textBoxKundeName.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxKundeName.Location = new System.Drawing.Point(14, 160); + this.textBoxKundeName.Location = new System.Drawing.Point(12, 128); + this.textBoxKundeName.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.textBoxKundeName.Name = "textBoxKundeName"; - this.textBoxKundeName.Size = new System.Drawing.Size(415, 31); + this.textBoxKundeName.Size = new System.Drawing.Size(369, 37); this.textBoxKundeName.TabIndex = 8; this.textBoxKundeName.Leave += new System.EventHandler(this.textBoxKundeName_Leave); // @@ -160,9 +155,9 @@ namespace Deckungsbeitrag // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(8, 122); + this.label3.Location = new System.Drawing.Point(7, 98); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(59, 20); + this.label3.Size = new System.Drawing.Size(76, 25); this.label3.TabIndex = 19; this.label3.Text = "Kunde:"; // @@ -170,9 +165,9 @@ namespace Deckungsbeitrag // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(8, 332); + this.label4.Location = new System.Drawing.Point(7, 266); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(98, 20); + this.label4.Size = new System.Drawing.Size(120, 25); this.label4.TabIndex = 22; this.label4.Text = "Lieferdatum:"; // @@ -180,9 +175,9 @@ namespace Deckungsbeitrag // this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(8, 425); + this.label5.Location = new System.Drawing.Point(7, 340); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(158, 20); + this.label5.Size = new System.Drawing.Size(196, 25); this.label5.TabIndex = 24; this.label5.Text = "Container schmutzig:"; // @@ -195,9 +190,10 @@ namespace Deckungsbeitrag this.rBMO.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.rBMO.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.rBMO.ForeColor = System.Drawing.Color.Black; - this.rBMO.Location = new System.Drawing.Point(15, 225); + this.rBMO.Location = new System.Drawing.Point(13, 180); + this.rBMO.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.rBMO.Name = "rBMO"; - this.rBMO.Size = new System.Drawing.Size(68, 69); + this.rBMO.Size = new System.Drawing.Size(60, 55); this.rBMO.TabIndex = 3; this.rBMO.TabStop = true; this.rBMO.Tag = ""; @@ -216,9 +212,10 @@ namespace Deckungsbeitrag this.rBFR.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.rBFR.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.rBFR.ForeColor = System.Drawing.Color.Black; - this.rBFR.Location = new System.Drawing.Point(363, 225); + this.rBFR.Location = new System.Drawing.Point(323, 180); + this.rBFR.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.rBFR.Name = "rBFR"; - this.rBFR.Size = new System.Drawing.Size(68, 69); + this.rBFR.Size = new System.Drawing.Size(60, 55); this.rBFR.TabIndex = 7; this.rBFR.TabStop = true; this.rBFR.Text = "FR"; @@ -236,9 +233,10 @@ namespace Deckungsbeitrag this.rBDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.rBDO.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.rBDO.ForeColor = System.Drawing.Color.Black; - this.rBDO.Location = new System.Drawing.Point(278, 225); + this.rBDO.Location = new System.Drawing.Point(247, 180); + this.rBDO.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.rBDO.Name = "rBDO"; - this.rBDO.Size = new System.Drawing.Size(68, 69); + this.rBDO.Size = new System.Drawing.Size(60, 55); this.rBDO.TabIndex = 6; this.rBDO.TabStop = true; this.rBDO.Text = "DO"; @@ -256,9 +254,10 @@ namespace Deckungsbeitrag this.rBMI.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.rBMI.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.rBMI.ForeColor = System.Drawing.Color.Black; - this.rBMI.Location = new System.Drawing.Point(192, 225); + this.rBMI.Location = new System.Drawing.Point(171, 180); + this.rBMI.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.rBMI.Name = "rBMI"; - this.rBMI.Size = new System.Drawing.Size(68, 69); + this.rBMI.Size = new System.Drawing.Size(60, 55); this.rBMI.TabIndex = 5; this.rBMI.TabStop = true; this.rBMI.Text = "MI"; @@ -276,9 +275,10 @@ namespace Deckungsbeitrag this.rBDI.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.rBDI.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.rBDI.ForeColor = System.Drawing.Color.Black; - this.rBDI.Location = new System.Drawing.Point(104, 225); + this.rBDI.Location = new System.Drawing.Point(92, 180); + this.rBDI.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.rBDI.Name = "rBDI"; - this.rBDI.Size = new System.Drawing.Size(68, 69); + this.rBDI.Size = new System.Drawing.Size(60, 55); this.rBDI.TabIndex = 4; this.rBDI.TabStop = true; this.rBDI.Text = "DI"; @@ -291,9 +291,9 @@ namespace Deckungsbeitrag // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label6.Location = new System.Drawing.Point(171, 26); + this.label6.Location = new System.Drawing.Point(152, 21); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(95, 20); + this.label6.Size = new System.Drawing.Size(120, 25); this.label6.TabIndex = 1; this.label6.Text = "Auftrag Typ:"; // @@ -304,122 +304,32 @@ namespace Deckungsbeitrag this.comboBoxTyp.FlatStyle = System.Windows.Forms.FlatStyle.System; this.comboBoxTyp.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxTyp.FormattingEnabled = true; - this.comboBoxTyp.Location = new System.Drawing.Point(177, 65); + this.comboBoxTyp.Location = new System.Drawing.Point(157, 52); + this.comboBoxTyp.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.comboBoxTyp.Name = "comboBoxTyp"; - this.comboBoxTyp.Size = new System.Drawing.Size(252, 33); + this.comboBoxTyp.Size = new System.Drawing.Size(224, 38); this.comboBoxTyp.TabIndex = 1; this.comboBoxTyp.SelectedValueChanged += new System.EventHandler(this.comboBoxTyp_SelectedValueChanged); // // textBoxCont // this.textBoxCont.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxCont.Location = new System.Drawing.Point(315, 394); + this.textBoxCont.Location = new System.Drawing.Point(281, 316); + this.textBoxCont.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.textBoxCont.Name = "textBoxCont"; - this.textBoxCont.Size = new System.Drawing.Size(56, 40); + this.textBoxCont.Size = new System.Drawing.Size(50, 49); this.textBoxCont.TabIndex = 31; this.textBoxCont.Text = "0"; this.textBoxCont.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.textBoxCont.TextChanged += new System.EventHandler(this.textBoxCont_TextChanged); // - // dGArtikel - // - this.dGArtikel.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells; - this.dGArtikel.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells; - this.dGArtikel.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dGArtikel.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.KundeArtikelID, - this.KundeID, - this.ArtikelNR, - this.ArtikelName, - this.Stand, - this.Fehlmenge, - this.Korrektur, - this.StandBearbeitet, - this.FehlmengeBearbeitet, - this.KorrekturBearbeitet}); - this.dGArtikel.Location = new System.Drawing.Point(460, 18); - this.dGArtikel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.dGArtikel.MinimumSize = new System.Drawing.Size(0, 437); - this.dGArtikel.Name = "dGArtikel"; - this.dGArtikel.Size = new System.Drawing.Size(640, 523); - this.dGArtikel.TabIndex = 32; - this.dGArtikel.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellEnter); - this.dGArtikel.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.dGArtikel_CellValidating); - // - // KundeArtikelID - // - this.KundeArtikelID.HeaderText = "KundeArtikelID"; - this.KundeArtikelID.Name = "KundeArtikelID"; - this.KundeArtikelID.ReadOnly = true; - this.KundeArtikelID.Visible = false; - this.KundeArtikelID.Width = 103; - // - // KundeID - // - this.KundeID.HeaderText = "KundeID"; - this.KundeID.Name = "KundeID"; - this.KundeID.ReadOnly = true; - this.KundeID.Visible = false; - this.KundeID.Width = 74; - // - // ArtikelNR - // - this.ArtikelNR.HeaderText = "Art. Nr."; - this.ArtikelNR.Name = "ArtikelNR"; - this.ArtikelNR.ReadOnly = true; - this.ArtikelNR.Width = 59; - // - // ArtikelName - // - this.ArtikelName.HeaderText = "Art. Name"; - this.ArtikelName.Name = "ArtikelName"; - this.ArtikelName.ReadOnly = true; - this.ArtikelName.Width = 97; - // - // Stand - // - this.Stand.HeaderText = "Stand"; - this.Stand.Name = "Stand"; - this.Stand.ReadOnly = true; - this.Stand.Width = 77; - // - // Fehlmenge - // - this.Fehlmenge.HeaderText = "Fehlmenge"; - this.Fehlmenge.Name = "Fehlmenge"; - this.Fehlmenge.Width = 114; - // - // Korrektur - // - this.Korrektur.HeaderText = "Korrektur"; - this.Korrektur.Name = "Korrektur"; - this.Korrektur.Width = 99; - // - // StandBearbeitet - // - this.StandBearbeitet.HeaderText = "Stand Bearbeitet"; - this.StandBearbeitet.Name = "StandBearbeitet"; - this.StandBearbeitet.Width = 142; - // - // FehlmengeBearbeitet - // - this.FehlmengeBearbeitet.HeaderText = "Fehlmenge Bearbeitet"; - this.FehlmengeBearbeitet.Name = "FehlmengeBearbeitet"; - this.FehlmengeBearbeitet.Width = 175; - // - // KorrekturBearbeitet - // - this.KorrekturBearbeitet.HeaderText = "Korrektur Bearbeitet"; - this.KorrekturBearbeitet.Name = "KorrekturBearbeitet"; - this.KorrekturBearbeitet.Width = 161; - // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(9, 511); + this.label1.Location = new System.Drawing.Point(8, 409); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(102, 20); + this.label1.Size = new System.Drawing.Size(125, 25); this.label1.TabIndex = 33; this.label1.Text = "Zustellfahrer:"; // @@ -430,9 +340,10 @@ namespace Deckungsbeitrag this.comboBoxFahrer.FlatStyle = System.Windows.Forms.FlatStyle.System; this.comboBoxFahrer.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxFahrer.FormattingEnabled = true; - this.comboBoxFahrer.Location = new System.Drawing.Point(177, 491); + this.comboBoxFahrer.Location = new System.Drawing.Point(157, 393); + this.comboBoxFahrer.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.comboBoxFahrer.Name = "comboBoxFahrer"; - this.comboBoxFahrer.Size = new System.Drawing.Size(252, 33); + this.comboBoxFahrer.Size = new System.Drawing.Size(224, 38); this.comboBoxFahrer.TabIndex = 34; this.comboBoxFahrer.Validating += new System.ComponentModel.CancelEventHandler(this.comboBoxFahrer_Validating); // @@ -443,10 +354,11 @@ namespace Deckungsbeitrag this.buttonEinstellung.FlatAppearance.BorderSize = 3; this.buttonEinstellung.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonEinstellung.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonEinstellung.Location = new System.Drawing.Point(14, 578); - this.buttonEinstellung.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonEinstellung.Location = new System.Drawing.Point(12, 462); + this.buttonEinstellung.Margin = new System.Windows.Forms.Padding(4); + this.buttonEinstellung.MinimumSize = new System.Drawing.Size(50, 50); this.buttonEinstellung.Name = "buttonEinstellung"; - this.buttonEinstellung.Size = new System.Drawing.Size(62, 63); + this.buttonEinstellung.Size = new System.Drawing.Size(50, 50); this.buttonEinstellung.TabIndex = 46; this.buttonEinstellung.Text = "i"; this.buttonEinstellung.UseVisualStyleBackColor = true; @@ -461,10 +373,10 @@ namespace Deckungsbeitrag this.panelRegAuftrag.Controls.Add(this.comboBoxRhythmus); this.panelRegAuftrag.Controls.Add(this.fLPArtikel); this.panelRegAuftrag.Enabled = false; - this.panelRegAuftrag.Location = new System.Drawing.Point(460, -5); - this.panelRegAuftrag.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.panelRegAuftrag.Location = new System.Drawing.Point(409, -2); + this.panelRegAuftrag.Margin = new System.Windows.Forms.Padding(4); this.panelRegAuftrag.Name = "panelRegAuftrag"; - this.panelRegAuftrag.Size = new System.Drawing.Size(640, 546); + this.panelRegAuftrag.Size = new System.Drawing.Size(569, 514); this.panelRegAuftrag.TabIndex = 47; this.panelRegAuftrag.Visible = false; this.panelRegAuftrag.EnabledChanged += new System.EventHandler(this.panelRegAuftrag_EnabledChanged); @@ -474,9 +386,10 @@ namespace Deckungsbeitrag this.pictureBoxAddArtikel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pictureBoxAddArtikel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.pictureBoxAddArtikel.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxAddArtikel.Image"))); - this.pictureBoxAddArtikel.Location = new System.Drawing.Point(562, 165); + this.pictureBoxAddArtikel.Location = new System.Drawing.Point(500, 132); + this.pictureBoxAddArtikel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxAddArtikel.Name = "pictureBoxAddArtikel"; - this.pictureBoxAddArtikel.Size = new System.Drawing.Size(50, 51); + this.pictureBoxAddArtikel.Size = new System.Drawing.Size(44, 41); this.pictureBoxAddArtikel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxAddArtikel.TabIndex = 39; this.pictureBoxAddArtikel.TabStop = false; @@ -486,9 +399,9 @@ namespace Deckungsbeitrag // this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label8.Location = new System.Drawing.Point(22, 131); + this.label8.Location = new System.Drawing.Point(20, 105); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(57, 20); + this.label8.Size = new System.Drawing.Size(72, 25); this.label8.TabIndex = 38; this.label8.Text = "Artikel:"; // @@ -501,18 +414,19 @@ namespace Deckungsbeitrag this.comboBoxArtikel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.comboBoxArtikel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxArtikel.FormattingEnabled = true; - this.comboBoxArtikel.Location = new System.Drawing.Point(28, 165); + this.comboBoxArtikel.Location = new System.Drawing.Point(25, 132); + this.comboBoxArtikel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.comboBoxArtikel.Name = "comboBoxArtikel"; - this.comboBoxArtikel.Size = new System.Drawing.Size(505, 33); + this.comboBoxArtikel.Size = new System.Drawing.Size(449, 38); this.comboBoxArtikel.TabIndex = 37; // // label7 // this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label7.Location = new System.Drawing.Point(22, 31); + this.label7.Location = new System.Drawing.Point(20, 25); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(85, 20); + this.label7.Size = new System.Drawing.Size(105, 25); this.label7.TabIndex = 36; this.label7.Text = "Rhythmus:"; // @@ -525,9 +439,10 @@ namespace Deckungsbeitrag this.comboBoxRhythmus.FlatStyle = System.Windows.Forms.FlatStyle.System; this.comboBoxRhythmus.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxRhythmus.FormattingEnabled = true; - this.comboBoxRhythmus.Location = new System.Drawing.Point(28, 68); + this.comboBoxRhythmus.Location = new System.Drawing.Point(25, 54); + this.comboBoxRhythmus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.comboBoxRhythmus.Name = "comboBoxRhythmus"; - this.comboBoxRhythmus.Size = new System.Drawing.Size(582, 33); + this.comboBoxRhythmus.Size = new System.Drawing.Size(518, 38); this.comboBoxRhythmus.TabIndex = 35; // // fLPArtikel @@ -536,19 +451,20 @@ namespace Deckungsbeitrag | System.Windows.Forms.AnchorStyles.Right))); this.fLPArtikel.AutoScroll = true; this.fLPArtikel.BackColor = System.Drawing.SystemColors.Control; - this.fLPArtikel.Location = new System.Drawing.Point(28, 229); - this.fLPArtikel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.fLPArtikel.Location = new System.Drawing.Point(25, 183); + this.fLPArtikel.Margin = new System.Windows.Forms.Padding(4); this.fLPArtikel.Name = "fLPArtikel"; - this.fLPArtikel.Size = new System.Drawing.Size(584, 317); + this.fLPArtikel.Size = new System.Drawing.Size(519, 329); this.fLPArtikel.TabIndex = 0; // // pictureBoxMinus // this.pictureBoxMinus.BackColor = System.Drawing.Color.Red; this.pictureBoxMinus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxMinus.Image"))); - this.pictureBoxMinus.Location = new System.Drawing.Point(261, 394); + this.pictureBoxMinus.Location = new System.Drawing.Point(232, 315); + this.pictureBoxMinus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxMinus.Name = "pictureBoxMinus"; - this.pictureBoxMinus.Size = new System.Drawing.Size(57, 62); + this.pictureBoxMinus.Size = new System.Drawing.Size(51, 50); this.pictureBoxMinus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxMinus.TabIndex = 27; this.pictureBoxMinus.TabStop = false; @@ -558,9 +474,10 @@ namespace Deckungsbeitrag // this.pictureBoxPlus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.pictureBoxPlus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxPlus.Image"))); - this.pictureBoxPlus.Location = new System.Drawing.Point(374, 394); + this.pictureBoxPlus.Location = new System.Drawing.Point(332, 315); + this.pictureBoxPlus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxPlus.Name = "pictureBoxPlus"; - this.pictureBoxPlus.Size = new System.Drawing.Size(57, 62); + this.pictureBoxPlus.Size = new System.Drawing.Size(51, 50); this.pictureBoxPlus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxPlus.TabIndex = 26; this.pictureBoxPlus.TabStop = false; @@ -568,12 +485,12 @@ namespace Deckungsbeitrag // // FormNeuerAuftrag // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); this.CancelButton = this.buttonAbbrechen; - this.ClientSize = new System.Drawing.Size(451, 663); + this.ClientSize = new System.Drawing.Size(996, 530); this.Controls.Add(this.buttonEinstellung); this.Controls.Add(this.comboBoxFahrer); this.Controls.Add(this.label1); @@ -597,13 +514,13 @@ namespace Deckungsbeitrag this.Controls.Add(this.buttonSpeichern); this.Controls.Add(this.dTPLiefertag); this.Controls.Add(this.panelRegAuftrag); - this.Controls.Add(this.dGArtikel); this.ForeColor = System.Drawing.Color.White; this.HelpButton = true; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.MaximizeBox = false; this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(16, 702); + this.MinimumSize = new System.Drawing.Size(350, 571); this.Name = "FormNeuerAuftrag"; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; @@ -612,7 +529,6 @@ namespace Deckungsbeitrag this.HelpButtonClicked += new System.ComponentModel.CancelEventHandler(this.FormNeuerAuftrag_HelpButtonClicked); this.Load += new System.EventHandler(this.FormNeuerAuftrag_Load); this.Shown += new System.EventHandler(this.FormNeuerAuftrag_Shown); - ((System.ComponentModel.ISupportInitialize)(this.dGArtikel)).EndInit(); this.panelRegAuftrag.ResumeLayout(false); this.panelRegAuftrag.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxAddArtikel)).EndInit(); @@ -643,17 +559,6 @@ namespace Deckungsbeitrag private System.Windows.Forms.Label label6; private System.Windows.Forms.ComboBox comboBoxTyp; private System.Windows.Forms.TextBox textBoxCont; - private System.Windows.Forms.DataGridView dGArtikel; - private System.Windows.Forms.DataGridViewTextBoxColumn KundeArtikelID; - private System.Windows.Forms.DataGridViewTextBoxColumn KundeID; - private System.Windows.Forms.DataGridViewTextBoxColumn ArtikelNR; - private System.Windows.Forms.DataGridViewTextBoxColumn ArtikelName; - private System.Windows.Forms.DataGridViewTextBoxColumn Stand; - private System.Windows.Forms.DataGridViewTextBoxColumn Fehlmenge; - private System.Windows.Forms.DataGridViewTextBoxColumn Korrektur; - private System.Windows.Forms.DataGridViewTextBoxColumn StandBearbeitet; - private System.Windows.Forms.DataGridViewTextBoxColumn FehlmengeBearbeitet; - private System.Windows.Forms.DataGridViewTextBoxColumn KorrekturBearbeitet; private System.Windows.Forms.Label label1; private System.Windows.Forms.ComboBox comboBoxFahrer; private System.Windows.Forms.Button buttonEinstellung; diff --git a/AA-Forms/FormNeuerAuftrag.cs b/AA-Forms/FormNeuerAuftrag.cs index dc96e49..62aa25c 100644 --- a/AA-Forms/FormNeuerAuftrag.cs +++ b/AA-Forms/FormNeuerAuftrag.cs @@ -121,7 +121,6 @@ namespace Deckungsbeitrag this.Close(); } - this.dGArtikel.ForeColor = Color.Black; this.textBoxKundeName.Enabled = false; this.textBoxKndNr.Enabled = false; @@ -183,72 +182,6 @@ namespace Deckungsbeitrag if (this.benutzer.Rolle == BenutzerRolle.Fahrer) this.comboBoxFahrer.SelectedItem = this.benutzer; else this.comboBoxFahrer.SelectedIndex = -1; } - private void Load_Gridview(string kundeid, AuftragTyp auftragTyp) - { - - List artikelListe = KundeArtikel.GetList(kundeid); - - //List resultList = null; - //resultList = sortimentListe.FindAll(Sortiment => Sortiment.KundeNummer == kundeNr); - - if (artikelListe.Count != 0) - { - this.dGArtikel.AutoGenerateColumns = false; - foreach (DataGridViewColumn col in this.dGArtikel.Columns) - { - col.DataPropertyName = col.Name; - - if (col.Name.Contains("Bearbeitet")) col.Visible = false; - if (col.Name == "Fehlmenge") - { - if (auftragTyp == AuftragTyp.Inventur) col.Visible = true; - else col.Visible = false; - } - if (col.Name == "Korrektur") - { - if (auftragTyp >= AuftragTyp.Standerhöhung & auftragTyp <= AuftragTyp.Standverminderung) col.Visible = true; - else - { - if (auftragTyp == AuftragTyp.Inventur) - { - col.Visible = true; - col.Name = "Inventurausgleich"; - } - else col.Visible = false; - } - } - } - - - // DataGridView mit ArtikelStand Liste verbinden und Columns automatisch generieren. - this.dGArtikel.DataSource = artikelListe; - - this.dGArtikel.ClearSelection(); - //this.dGArtikel.CurrentCell = this.dGArtikel.Rows[0].Cells[3]; - - // Alle Spaltenbreiten an den Zellinhalt anpassen - this.dGArtikel.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; - this.dGArtikel.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells); - // Alle Zeilenhöhen an Zellinhalt anpassen - this.dGArtikel.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; - this.dGArtikel.AutoResizeRows(DataGridViewAutoSizeRowsMode.AllCells); - - int totalWidth = dGArtikel.RowHeadersVisible ? dGArtikel.RowHeadersWidth : 0; - foreach (DataGridViewColumn col in dGArtikel.Columns) - { - if (col.Visible) totalWidth += col.Width; - } - - int totalHeight = dGArtikel.ColumnHeadersVisible ? dGArtikel.ColumnHeadersHeight : 0; - foreach (DataGridViewRow row in dGArtikel.Rows) - { - if (row.Visible) totalHeight += row.Height; - } - totalHeight += dGArtikel.ColumnHeadersHeight; - - dGArtikel.ClientSize = new Size(totalWidth, totalHeight); - } - } /// /// Button Click Events. @@ -311,39 +244,13 @@ namespace Deckungsbeitrag { int tosave = 0; int saved = 0; - bool negieren = false; - foreach (DataGridViewRow artikel in this.dGArtikel.Rows) - { - tosave++; - KundeArtikel stand; - if (artikel.Cells[0].Value != null) - { - stand = KundeArtikel.GetItem(int.Parse(artikel.Cells[0].Value.ToString())); - if (artikel.Cells[5].Visible == true) - { - stand.Fehlmenge = int.Parse(artikel.Cells[5].Value.ToString()); - stand.FehlmengeBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString(); - } - if (artikel.Cells[6].Visible == true) - { - if (int.TryParse(artikel.Cells[6].Value.ToString(), out int result)) - { - if (Auftrag.Typ == AuftragTyp.Standverminderung) negieren = true; - stand.Korrektur = (negieren && stand.Korrektur > 0) ? -result : result; - stand.KorrekturBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString(); - } - else { meldung.Eingabefehler(); return; } - } - if (stand.Save() == 1) saved++; - } - } //Kontrolle ob alle Artikel gespeichert wurden. if (saved != tosave) meldung.Speicherfehler(); else { //Speichern von AUFTRAG save = Auftrag.Save(); - GetInventurCSV(); + //GetInventurCSV(); } } else @@ -387,71 +294,7 @@ namespace Deckungsbeitrag break; } - //Wenn SONDERAUFTRAG(STH,STV,STA) dann ARTIKEL speichern. - if (Auftrag.Typ >= AuftragTyp.Inventur & Auftrag.Typ <= AuftragTyp.Standverminderung) - { - int tosave = 0; - int saved = 0; - bool negieren = false; - foreach (DataGridViewRow artikel in this.dGArtikel.Rows) - { - tosave++; - KundeArtikel stand; - if (artikel.Cells[0].Value != null) - { - stand = KundeArtikel.GetItem(int.Parse(artikel.Cells[0].Value.ToString())); - if (artikel.Cells[5].Visible == true) - { - stand.Fehlmenge = int.Parse(artikel.Cells[5].Value.ToString()); - stand.FehlmengeBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString(); - } - if (artikel.Cells[6].Visible == true) - { - if (int.TryParse(artikel.Cells[6].Value.ToString(), out int result)) - { - if (Auftrag.Typ == AuftragTyp.Standverminderung) negieren = true; - stand.Korrektur = (negieren && stand.Korrektur > 0) ? -result : result; - stand.KorrekturBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString(); - } - else { meldung.Eingabefehler(); return; } - } - if (stand.Save() == 1) saved++; - } - } - //Kontrolle ob alle Artikel gespeichert wurden. - if (saved != tosave) meldung.Speicherfehler(); - else - { - //Speichern von AUFTRAG - save = Auftrag.Save(); - GetInventurCSV(); - - } - } - else - { - if (!extra) - { - //this.fach.KundeID = Auftrag.KundeID; - //this.fach.Lieferdatum = Auftrag.Liefertag; - //this.fach.Liefertag = (Liefertag)Auftrag.Liefertag.DayOfWeek; - //if (extraAuftrag == null) { this.fach.ExtraAuftragID = null; this.fach.ExtraKundeID = null; } - //else { this.fach.ExtraAuftragID = extraAuftrag.AuftragID; this.fach.ExtraKundeID = extraAuftrag.KundeID; } - //this.fach.Gewaschen = (DateTime)Auftrag.Erstellt; - - //FormFachBearbeiten fachbearb = new FormFachBearbeiten(this.Auftrag ,this.fach); - //if (fachbearb.ShowDialog() == DialogResult.OK) - //{ - // this.fach = fachbearb.fach; - // //Speichern von AUFTRAG - // save = Auftrag.Save(); - //} - //this.fach.AuftragID = Auftrag.AuftragID; - if (Auftrag.Save()[1] == 1) this.Close(); - - } - else save = Auftrag.Save(); - } + save = Auftrag.Save(); } if (this.benutzer.Rolle == BenutzerRolle.Fahrer) @@ -490,9 +333,11 @@ namespace Deckungsbeitrag Auftrag.Status = AuftragStatus.Herrichten; Auftrag.Rhythmus = this.comboBoxRhythmus.Enabled ? (RegRhythmen)this.comboBoxRhythmus.SelectedItem : RegRhythmen.Unbekannt; + if (Auftrag.FindeAuftrag(false).Gefunden) { - Auftrag auf = Auftrag.GetAuftrag(Auftrag.FindeAuftrag(false).auftragID); + int aufID = Auftrag.FindeAuftrag(false).auftragID; + Auftrag auf = Auftrag.GetAuftrag(aufID); ; List liste = AuftragArtikel.GetList(auf.AuftragID); string output = string.Join(Environment.NewLine, liste.Select(a => $"{a.ArtikelName,-20} {a.Anzahl,4} Stk.")); if (MessageBox.Show($"Es wurde ein Auftrag von {kunde.Suchtext ?? kunde.KundeName} für {auf.Liefertag.ToShortDateString()}\nmit folgenden Artikeln gefunden:\n\n{output}\nGeplanter Rhythmus: {Lieferrhythmen.Rhythmus}\n\nMöchtest du den Auftrag als erledigt markieren?", "AUFTRAG GEFUNDEN", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) @@ -602,105 +447,6 @@ namespace Deckungsbeitrag this.textBoxCont.Text = cont.ToString(); } - /// - /// CSV-Liste für Inventur erstellen. - /// Wenn Liste vorhanden werden Inventuren unten angehängt sonst wird Datei erstellt. - /// - private void GetInventurCSV() - { - Kunde _knd = Kunde.GetKunde(null, Auftrag.KundeID, null); - Benutzer _user = Benutzer.GetBenutzer(null, Auftrag.ErstelltVon); - - string fileName = $"{_knd.KundeNummer}.csv"; // Immer gleiche Datei! - string inventurOrdner = ConfigurationManager.AppSettings["InventurPfad"] ?? "Inventur"; - string csvPath = Path.Combine(Application.StartupPath, inventurOrdner, fileName); - - // Prüfen ob Header schon existiert - bool headerExists = File.Exists(csvPath); - - // Nur Header bei NEUER Datei - if (!headerExists) - { - var csv = new StringBuilder(); - csv.AppendLine("=== INVENTUR INFO ==="); - csv.AppendLine($"KundeNr: {_knd.KundeNummer}"); - csv.AppendLine($"Kunde: {_knd.KundeName}"); - csv.AppendLine(new string('=', 30)); - csv.AppendLine(); - csv.AppendLine("Erstellt am;Erstellt von;Liefertag;ArtikelNr;Bezeichnung;Stand;Fehlmenge;Korrektur;InventurDatum"); - File.WriteAllText(csvPath, csv.ToString(), Encoding.UTF8); - } - - // NEUE Artikel ANHÄNGEN (ohne Header) - var appendCsv = new StringBuilder(); - - foreach (DataGridViewRow row in this.dGArtikel.Rows.Cast() - .Where(row => row.Cells[0].Value != null)) - { - appendCsv.AppendLine(string.Join(";", new object[] - { - Auftrag.Erstellt.Value.Date.ToString("yyyy-MM-dd"), - _user.Vorname + " " + _user.Nachname, - Auftrag.Liefertag.Date.ToString("yyyy-MM-dd"), - row.Cells[2].Value?.ToString().Replace(";", " ") ?? "", - row.Cells[3].Value?.ToString().Replace(";", " ") ?? "", - row.Cells[4].Value?.ToString() ?? "0", - row.Cells[5].Visible ? (row.Cells[5].Value?.ToString() ?? "0") : "", - row.Cells[6].Visible ? (row.Cells[6].Value?.ToString() ?? "0") : "", - })); - } - - // ANHÄNGEN statt überschreiben - File.AppendAllText(csvPath, appendCsv.ToString(), Encoding.UTF8); - } - private void GetStandCSV() - { - Kunde _knd = Kunde.GetKunde(null, Auftrag.KundeID, null); - Benutzer _user = Benutzer.GetBenutzer(null, Auftrag.ErstelltVon); - - string fileName = $"{_knd.KundeNummer}.csv"; // Immer gleiche Datei! - string inventurOrdner = ConfigurationManager.AppSettings["InventurPfad"] ?? "Inventur"; - string csvPath = Path.Combine(Application.StartupPath, inventurOrdner, fileName); - - // Prüfen ob Header schon existiert - bool headerExists = File.Exists(csvPath); - - // Nur Header bei NEUER Datei - if (!headerExists) - { - var csv = new StringBuilder(); - csv.AppendLine("=== INVENTUR INFO ==="); - csv.AppendLine($"KundeNr: {_knd.KundeNummer}"); - csv.AppendLine($"Kunde: {_knd.KundeName}"); - csv.AppendLine(new string('=', 30)); - csv.AppendLine(); - csv.AppendLine("Erstellt am;Erstellt von;Liefertag;ArtikelNr;Bezeichnung;Stand;Fehlmenge;Korrektur;InventurDatum"); - File.WriteAllText(csvPath, csv.ToString(), Encoding.UTF8); - } - - // NEUE Artikel ANHÄNGEN (ohne Header) - var appendCsv = new StringBuilder(); - - foreach (DataGridViewRow row in this.dGArtikel.Rows.Cast() - .Where(row => row.Cells[0].Value != null)) - { - appendCsv.AppendLine(string.Join(";", new object[] - { - Auftrag.Erstellt.Value.Date.ToString("yyyy-MM-dd"), - _user.Vorname + " " + _user.Nachname, - Auftrag.Liefertag.Date.ToString("yyyy-MM-dd"), - row.Cells[2].Value?.ToString().Replace(";", " ") ?? "", - row.Cells[3].Value?.ToString().Replace(";", " ") ?? "", - row.Cells[4].Value?.ToString() ?? "0", - row.Cells[5].Visible ? (row.Cells[5].Value?.ToString() ?? "0") : "", - row.Cells[6].Visible ? (row.Cells[6].Value?.ToString() ?? "0") : "", - })); - } - - // ANHÄNGEN statt überschreiben - File.AppendAllText(csvPath, appendCsv.ToString(), Encoding.UTF8); - } - /// /// TextBox Events /// @@ -805,54 +551,36 @@ namespace Deckungsbeitrag switch ((AuftragTyp)comboBoxTyp.SelectedValue) { case AuftragTyp.Geschäft: // Wird derzeit wenig verwendet da die Auswahl in DatenLaden nach KundenService erfolgt. - this.dGArtikel.Enabled = this.dGArtikel.Visible = false; this.Width = textBoxKundeName.Right + 30; this.Height = 470; break; case AuftragTyp.Standart: - this.dGArtikel.Enabled = this.dGArtikel.Visible = false; this.Width = textBoxKundeName.Right + 30; this.Height = 470; break; case 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; break; case AuftragTyp.Standerhöhung: if (this.kunde == null) return; - this.dGArtikel.Enabled = this.dGArtikel.Visible = false; this.panelRegAuftrag.Enabled = this.panelRegAuftrag.Visible = true; this.pictureBoxPlus.Enabled = this.pictureBoxMinus.Enabled = this.textBoxCont.Enabled = false; this.Width = this.panelRegAuftrag.Right + 25; this.Height = 470; - //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; break; case AuftragTyp.Standverminderung: - this.dGArtikel.Enabled = this.dGArtikel.Visible = false; this.panelRegAuftrag.Enabled = this.panelRegAuftrag.Visible = true; this.pictureBoxPlus.Enabled = this.pictureBoxMinus.Enabled = this.textBoxCont.Enabled = false; this.Width = this.panelRegAuftrag.Right + 25; this.Height = 470; - //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; break; case AuftragTyp.Regelmäßig: - this.dGArtikel.Enabled = this.dGArtikel.Visible = false; this.panelRegAuftrag.Enabled = this.panelRegAuftrag.Visible = true; this.pictureBoxPlus.Enabled = this.pictureBoxMinus.Enabled = this.textBoxCont.Enabled = false; this.Width = this.panelRegAuftrag.Right + 25; this.Height = 470; break; case AuftragTyp.AufAbruf: - this.dGArtikel.Enabled = this.dGArtikel.Visible = false; this.Width = textBoxKundeName.Right + 30; this.Height = 470; break; @@ -971,6 +699,4 @@ namespace Deckungsbeitrag } } } -//TODO: Form AuftragDetail muss überarbeitet werden. //TODO: TourenListe Entwurf muss überarbeitet werden. -//TODO: Grund immer abfragen oder nur wenn Fahrer die Zuteilung ändert? \ No newline at end of file diff --git a/AA-Forms/FormNeuerAuftrag.resx b/AA-Forms/FormNeuerAuftrag.resx index 00ac223..301014b 100644 --- a/AA-Forms/FormNeuerAuftrag.resx +++ b/AA-Forms/FormNeuerAuftrag.resx @@ -117,66 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - diff --git a/AA-Forms/FormOnBoarding.Designer.cs b/AA-Forms/FormOnBoarding.Designer.cs index 2c4ae92..8b59884 100644 --- a/AA-Forms/FormOnBoarding.Designer.cs +++ b/AA-Forms/FormOnBoarding.Designer.cs @@ -49,9 +49,10 @@ this.panelButtons.BackColor = System.Drawing.Color.Transparent; this.panelButtons.Controls.Add(this.tLPButtons); this.panelButtons.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panelButtons.Location = new System.Drawing.Point(0, 380); + this.panelButtons.Location = new System.Drawing.Point(0, 468); + this.panelButtons.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelButtons.Name = "panelButtons"; - this.panelButtons.Size = new System.Drawing.Size(800, 70); + this.panelButtons.Size = new System.Drawing.Size(1067, 86); this.panelButtons.TabIndex = 1; // // tLPButtons @@ -65,11 +66,12 @@ this.tLPButtons.Controls.Add(this.buttonPrevious, 0, 0); this.tLPButtons.Controls.Add(this.buttonNext, 2, 0); this.tLPButtons.Dock = System.Windows.Forms.DockStyle.Bottom; - this.tLPButtons.Location = new System.Drawing.Point(0, 23); + this.tLPButtons.Location = new System.Drawing.Point(0, 28); + this.tLPButtons.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.tLPButtons.Name = "tLPButtons"; this.tLPButtons.RowCount = 1; - this.tLPButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 47F)); - this.tLPButtons.Size = new System.Drawing.Size(800, 47); + this.tLPButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 58F)); + this.tLPButtons.Size = new System.Drawing.Size(1067, 58); this.tLPButtons.TabIndex = 0; // // buttonFertig @@ -81,10 +83,10 @@ this.buttonFertig.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonFertig.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonFertig.ForeColor = System.Drawing.Color.Black; - this.buttonFertig.Location = new System.Drawing.Point(309, 2); - this.buttonFertig.Margin = new System.Windows.Forms.Padding(2); + this.buttonFertig.Location = new System.Drawing.Point(413, 2); + this.buttonFertig.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.buttonFertig.Name = "buttonFertig"; - this.buttonFertig.Size = new System.Drawing.Size(180, 43); + this.buttonFertig.Size = new System.Drawing.Size(240, 54); this.buttonFertig.TabIndex = 48; this.buttonFertig.Text = "Fertig"; this.buttonFertig.UseVisualStyleBackColor = false; @@ -99,9 +101,10 @@ this.buttonPrevious.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonPrevious.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonPrevious.ForeColor = System.Drawing.Color.White; - this.buttonPrevious.Location = new System.Drawing.Point(263, 3); + this.buttonPrevious.Location = new System.Drawing.Point(351, 4); + this.buttonPrevious.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.buttonPrevious.Name = "buttonPrevious"; - this.buttonPrevious.Size = new System.Drawing.Size(41, 41); + this.buttonPrevious.Size = new System.Drawing.Size(55, 50); this.buttonPrevious.TabIndex = 47; this.buttonPrevious.Text = "<"; this.buttonPrevious.UseVisualStyleBackColor = true; @@ -116,9 +119,10 @@ this.buttonNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonNext.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonNext.ForeColor = System.Drawing.Color.White; - this.buttonNext.Location = new System.Drawing.Point(494, 3); + this.buttonNext.Location = new System.Drawing.Point(660, 4); + this.buttonNext.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.buttonNext.Name = "buttonNext"; - this.buttonNext.Size = new System.Drawing.Size(41, 41); + this.buttonNext.Size = new System.Drawing.Size(55, 50); this.buttonNext.TabIndex = 46; this.buttonNext.Text = ">"; this.buttonNext.UseVisualStyleBackColor = true; @@ -132,8 +136,9 @@ this.panelText.Controls.Add(this.pictureBoxScreen); this.panelText.Dock = System.Windows.Forms.DockStyle.Fill; this.panelText.Location = new System.Drawing.Point(0, 0); + this.panelText.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelText.Name = "panelText"; - this.panelText.Size = new System.Drawing.Size(800, 380); + this.panelText.Size = new System.Drawing.Size(1067, 468); this.panelText.TabIndex = 2; // // labelText @@ -142,9 +147,10 @@ this.labelText.Dock = System.Windows.Forms.DockStyle.Top; this.labelText.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelText.ForeColor = System.Drawing.Color.White; - this.labelText.Location = new System.Drawing.Point(0, 42); + this.labelText.Location = new System.Drawing.Point(0, 52); + this.labelText.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelText.Name = "labelText"; - this.labelText.Size = new System.Drawing.Size(0, 20); + this.labelText.Size = new System.Drawing.Size(0, 25); this.labelText.TabIndex = 2; this.labelText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelText.Resize += new System.EventHandler(this.labelText_Resize); @@ -155,8 +161,9 @@ this.labelHeader.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelHeader.ForeColor = System.Drawing.Color.White; this.labelHeader.Location = new System.Drawing.Point(0, 0); + this.labelHeader.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelHeader.Name = "labelHeader"; - this.labelHeader.Size = new System.Drawing.Size(800, 42); + this.labelHeader.Size = new System.Drawing.Size(1067, 52); this.labelHeader.TabIndex = 1; this.labelHeader.Text = "label1"; this.labelHeader.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -168,22 +175,24 @@ | System.Windows.Forms.AnchorStyles.Right))); this.pictureBoxScreen.BackColor = System.Drawing.Color.SkyBlue; this.pictureBoxScreen.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.pictureBoxScreen.Location = new System.Drawing.Point(0, 149); + this.pictureBoxScreen.Location = new System.Drawing.Point(0, 183); + this.pictureBoxScreen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.pictureBoxScreen.Name = "pictureBoxScreen"; - this.pictureBoxScreen.Size = new System.Drawing.Size(800, 231); + this.pictureBoxScreen.Size = new System.Drawing.Size(1065, 283); this.pictureBoxScreen.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxScreen.TabIndex = 0; this.pictureBoxScreen.TabStop = false; // // FormOnBoarding // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - this.ClientSize = new System.Drawing.Size(800, 450); + this.ClientSize = new System.Drawing.Size(1067, 554); this.Controls.Add(this.panelText); this.Controls.Add(this.panelButtons); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FormOnBoarding"; diff --git a/AA-Forms/FormOnBoarding.cs b/AA-Forms/FormOnBoarding.cs index baa1348..919da0c 100644 --- a/AA-Forms/FormOnBoarding.cs +++ b/AA-Forms/FormOnBoarding.cs @@ -115,6 +115,9 @@ namespace Deckungsbeitrag.AA_Forms break; case OnboardingSchritt.Tourenplanung: break; + case OnboardingSchritt.NeueInventur: + OnBoardingText = LoadDictionary("NeueInventur"); + break; default: OnBoardingText = LoadDictionary("Login"); break; diff --git a/AA-Klassen/Auftrag.cs b/AA-Klassen/Auftrag.cs index 6508ecd..843c259 100644 --- a/AA-Klassen/Auftrag.cs +++ b/AA-Klassen/Auftrag.cs @@ -39,6 +39,7 @@ namespace DatenDB Gewaschen = 2, Herrichten = 3, Vorbereitet = 4, + Warten = 5, Fertig = 6, Geladen = 7, Ausgeliefert = 8, diff --git a/AA-Klassen/AuftragArtikel.cs b/AA-Klassen/AuftragArtikel.cs index c2d1f59..6d7cc34 100644 --- a/AA-Klassen/AuftragArtikel.cs +++ b/AA-Klassen/AuftragArtikel.cs @@ -14,6 +14,7 @@ namespace DatenDB { private static string TABLE = "kundenverwaltung.auftrag_artikel"; private static string COLUMNS = "auftrag_artikel_id, auftrag_id, artikel_id, artikel_name, anzahl, erledigt, gesamt"; + private static string ACOLUMNS = "a.auftrag_artikel_id, a.auftrag_id, a.artikel_id, a.artikel_name, a.anzahl, a.erledigt, a.gesamt"; public Kunde kunde; public AuftragArtikel() @@ -26,7 +27,7 @@ namespace DatenDB List resultList = new List(); NpgsqlCommand command = new NpgsqlCommand(); command.Connection = DatenbankConnection.GetConnection(); - command.CommandText = $"select {COLUMNS} from {TABLE} where auftrag_id = {auftragID}"; + command.CommandText = $"select {ACOLUMNS} from {TABLE} a where auftrag_id = {auftragID}"; NpgsqlDataReader reader = command.ExecuteReader(); while (reader.Read()) resultList.Add(new AuftragArtikel(reader, 1)); reader.Close(); diff --git a/AA-Klassen/Benutzer.cs b/AA-Klassen/Benutzer.cs index cdb6a51..7c71c42 100644 --- a/AA-Klassen/Benutzer.cs +++ b/AA-Klassen/Benutzer.cs @@ -29,7 +29,8 @@ namespace DatenDB NeuerAuftrag = 1, Main = 2, Expedit = 4, - Tourenplanung = 8 + Tourenplanung = 8, + NeueInventur = 16 } public class Benutzer diff --git a/AA-Klassen/Funktionen.cs b/AA-Klassen/Funktionen.cs index 033c56b..9f5d15a 100644 --- a/AA-Klassen/Funktionen.cs +++ b/AA-Klassen/Funktionen.cs @@ -1401,7 +1401,7 @@ namespace Deckungsbeitrag }//COLUMNS BREITE CONTENT ODER HEADER SIZE //BREITE DER LISTVIEW UNVERÄNDERT BEI NAMEN MIT... - if (!olv.Name.Contains("Lieferungen") & !olv.Name.Contains("STH") & !olv.Name.Contains("Artikel") & !olv.Name.Contains("AufgabeVW") & !olv.Name.Contains("Auftrag")) olv.Width = lvwWidth; + if (!olv.Name.Contains("Lieferungen") & !olv.Name.Contains("STH") & !olv.Name.Contains("AufgabeVW") & !olv.Name.Contains("Auftrag")) olv.Width = lvwWidth; return (null, olv); @@ -1795,5 +1795,10 @@ namespace Deckungsbeitrag default: return AuftragPriority.None; } } + + internal static void GetInventuren(Panel panelMain) + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/AA-Klassen/KundeArtikel.cs b/AA-Klassen/KundeArtikel.cs index 1c72cce..8d9a880 100644 --- a/AA-Klassen/KundeArtikel.cs +++ b/AA-Klassen/KundeArtikel.cs @@ -14,9 +14,27 @@ namespace DatenDB { // 0 1 2 3 4 5 6 7 8 9 10 11 12 private static string COLUMNS = "kunde_artikel_id, kunde_id, artikel_nr, artikel_name, stand, fehlmenge, stand_bearbeitet, fehlmenge_bearbeitet, korrektur, korrektur_bearbeitet, reklamation, artikel_id, reihung"; + private static string TABLE = "kundenverwaltung.kunde_artikel"; public KundeArtikel() { } + internal static List GetInventurList(int? kundeid) + { + DatenbankConnection.GetConnection().Open(); + List resultList = new List(); + NpgsqlCommand command = new NpgsqlCommand(); + command.Connection = DatenbankConnection.GetConnection(); + command.CommandText = $"select {COLUMNS} from {TABLE} where kunde_id = {kundeid} order by reihung asc"; + using (var reader = command.ExecuteReader()) + { + while (reader.Read()) + { + resultList.Add(new KundeArtikel(reader)); + } + } + DatenbankConnection.GetConnection().Close(); + return resultList; + } public static List GetList(string kundeid) { diff --git a/Program.cs b/Program.cs index 5cb9150..f39b818 100644 --- a/Program.cs +++ b/Program.cs @@ -574,6 +574,7 @@ namespace Deckungsbeitrag #endregion #region public-Funktion + public static void AddFeedback(Benutzer user, string feedbackText, string bildDateiname, string timeStamp) { string vaultPath = Path.Combine(savePath, "Feedback\\VerwaltungFeedback.md"); diff --git a/UserControls/UCInventur.Designer.cs b/UserControls/UCInventur.Designer.cs new file mode 100644 index 0000000..6bee0e6 --- /dev/null +++ b/UserControls/UCInventur.Designer.cs @@ -0,0 +1,363 @@ +namespace Deckungsbeitrag.UserControls +{ + partial class UCInventur + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Komponenten-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UCInventur)); + this.groupBoxInventur = new System.Windows.Forms.GroupBox(); + this.labelLieferDat = new System.Windows.Forms.Label(); + this.dTPLieferDat = new System.Windows.Forms.DateTimePicker(); + this.labelInvDat = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.pictureBoxClose = new System.Windows.Forms.PictureBox(); + this.dTPInvDatum = new System.Windows.Forms.DateTimePicker(); + this.pictureBoxPlus = new System.Windows.Forms.PictureBox(); + this.dGArtikel = new System.Windows.Forms.DataGridView(); + this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.buttonFreigeben = new System.Windows.Forms.Button(); + this.panelButtons = new System.Windows.Forms.Panel(); + this.buttonSpeichern = new System.Windows.Forms.Button(); + this.labelInvText = new System.Windows.Forms.Label(); + this.groupBoxInventur.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxClose)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dGArtikel)).BeginInit(); + this.panelButtons.SuspendLayout(); + this.SuspendLayout(); + // + // groupBoxInventur + // + this.groupBoxInventur.Controls.Add(this.labelLieferDat); + this.groupBoxInventur.Controls.Add(this.dTPLieferDat); + this.groupBoxInventur.Controls.Add(this.labelInvDat); + this.groupBoxInventur.Controls.Add(this.label1); + this.groupBoxInventur.Controls.Add(this.pictureBoxClose); + this.groupBoxInventur.Controls.Add(this.dTPInvDatum); + this.groupBoxInventur.Controls.Add(this.pictureBoxPlus); + this.groupBoxInventur.Controls.Add(this.dGArtikel); + this.groupBoxInventur.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBoxInventur.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.groupBoxInventur.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); + this.groupBoxInventur.Location = new System.Drawing.Point(3, 3); + this.groupBoxInventur.Name = "groupBoxInventur"; + this.groupBoxInventur.Padding = new System.Windows.Forms.Padding(5); + this.groupBoxInventur.Size = new System.Drawing.Size(983, 485); + this.groupBoxInventur.TabIndex = 0; + this.groupBoxInventur.TabStop = false; + this.groupBoxInventur.Text = "Inventur 000000 Kundename"; + this.groupBoxInventur.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBoxInventur_Paint); + // + // labelLieferDat + // + this.labelLieferDat.AutoSize = true; + this.labelLieferDat.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelLieferDat.Location = new System.Drawing.Point(319, 46); + this.labelLieferDat.Name = "labelLieferDat"; + this.labelLieferDat.Size = new System.Drawing.Size(115, 20); + this.labelLieferDat.TabIndex = 46; + this.labelLieferDat.Text = "Lieferdatum:"; + this.labelLieferDat.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // dTPLieferDat + // + this.dTPLieferDat.CalendarForeColor = System.Drawing.SystemColors.ActiveCaptionText; + this.dTPLieferDat.Format = System.Windows.Forms.DateTimePickerFormat.Short; + this.dTPLieferDat.Location = new System.Drawing.Point(440, 37); + this.dTPLieferDat.Name = "dTPLieferDat"; + this.dTPLieferDat.Size = new System.Drawing.Size(161, 30); + this.dTPLieferDat.TabIndex = 45; + // + // labelInvDat + // + this.labelInvDat.AutoSize = true; + this.labelInvDat.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelInvDat.Location = new System.Drawing.Point(3, 46); + this.labelInvDat.Name = "labelInvDat"; + this.labelInvDat.Size = new System.Drawing.Size(133, 20); + this.labelInvDat.TabIndex = 44; + this.labelInvDat.Text = "Inventurdatum:"; + this.labelInvDat.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(697, 46); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(245, 20); + this.label1.TabIndex = 43; + this.label1.Text = "Lager/Lieferung hinzufügen:"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // pictureBoxClose + // + this.pictureBoxClose.ErrorImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxClose.ErrorImage"))); + this.pictureBoxClose.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxClose.Image"))); + this.pictureBoxClose.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxClose.InitialImage"))); + this.pictureBoxClose.Location = new System.Drawing.Point(948, 7); + this.pictureBoxClose.Name = "pictureBoxClose"; + this.pictureBoxClose.Size = new System.Drawing.Size(25, 25); + this.pictureBoxClose.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBoxClose.TabIndex = 42; + this.pictureBoxClose.TabStop = false; + this.pictureBoxClose.Click += new System.EventHandler(this.pictureBoxClose_Click); + // + // dTPInvDatum + // + this.dTPInvDatum.CalendarForeColor = System.Drawing.SystemColors.ActiveCaptionText; + this.dTPInvDatum.Format = System.Windows.Forms.DateTimePickerFormat.Short; + this.dTPInvDatum.Location = new System.Drawing.Point(142, 37); + this.dTPInvDatum.Name = "dTPInvDatum"; + this.dTPInvDatum.Size = new System.Drawing.Size(161, 30); + this.dTPInvDatum.TabIndex = 41; + // + // pictureBoxPlus + // + this.pictureBoxPlus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.pictureBoxPlus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxPlus.Image"))); + this.pictureBoxPlus.Location = new System.Drawing.Point(948, 37); + this.pictureBoxPlus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.pictureBoxPlus.Name = "pictureBoxPlus"; + this.pictureBoxPlus.Size = new System.Drawing.Size(30, 30); + this.pictureBoxPlus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBoxPlus.TabIndex = 40; + this.pictureBoxPlus.TabStop = false; + this.pictureBoxPlus.Click += new System.EventHandler(this.pictureBoxPlus_Click); + // + // dGArtikel + // + this.dGArtikel.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dGArtikel.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Column1, + this.Column2, + this.Column3, + this.Column4, + this.Column5, + this.Column6, + this.Column7}); + this.dGArtikel.Dock = System.Windows.Forms.DockStyle.Bottom; + this.dGArtikel.Location = new System.Drawing.Point(5, 96); + this.dGArtikel.Margin = new System.Windows.Forms.Padding(4); + this.dGArtikel.MinimumSize = new System.Drawing.Size(0, 350); + this.dGArtikel.Name = "dGArtikel"; + this.dGArtikel.RowHeadersVisible = false; + this.dGArtikel.RowHeadersWidth = 51; + this.dGArtikel.Size = new System.Drawing.Size(973, 384); + this.dGArtikel.TabIndex = 34; + this.dGArtikel.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dGArtikel_CellEndEdit); + this.dGArtikel.CellLeave += new System.Windows.Forms.DataGridViewCellEventHandler(this.dGArtikel_CellLeave); + this.dGArtikel.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dGArtikel_CellMouseDoubleClick); + this.dGArtikel.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dGArtikel_CellValueChanged); + this.dGArtikel.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(this.dGArtikel_DataBindingComplete); + this.dGArtikel.Leave += new System.EventHandler(this.dGArtikel_Leave); + // + // Column1 + // + this.Column1.DataPropertyName = "ArtikelNR"; + this.Column1.HeaderText = "Art.Nr."; + this.Column1.MinimumWidth = 6; + this.Column1.Name = "Column1"; + this.Column1.ReadOnly = true; + this.Column1.Width = 103; + // + // Column2 + // + this.Column2.DataPropertyName = "ArtikelName"; + this.Column2.HeaderText = "Art.Name"; + this.Column2.MinimumWidth = 6; + this.Column2.Name = "Column2"; + this.Column2.ReadOnly = true; + this.Column2.Width = 131; + // + // Column3 + // + this.Column3.DataPropertyName = "Stand"; + this.Column3.HeaderText = "Ist-Stand"; + this.Column3.MinimumWidth = 6; + this.Column3.Name = "Column3"; + this.Column3.ReadOnly = true; + this.Column3.Width = 129; + // + // Column4 + // + this.Column4.DataPropertyName = "Reklamation"; + this.Column4.HeaderText = "Rekl."; + this.Column4.MinimumWidth = 6; + this.Column4.Name = "Column4"; + this.Column4.ReadOnly = true; + this.Column4.Width = 89; + // + // Column5 + // + this.Column5.DataPropertyName = "Fehlmenge"; + this.Column5.HeaderText = "NW"; + this.Column5.MinimumWidth = 6; + this.Column5.Name = "Column5"; + this.Column5.ReadOnly = true; + this.Column5.Width = 77; + // + // Column6 + // + this.Column6.HeaderText = "Schwund"; + this.Column6.MinimumWidth = 6; + this.Column6.Name = "Column6"; + this.Column6.ReadOnly = true; + this.Column6.Width = 130; + // + // Column7 + // + this.Column7.DataPropertyName = "Korrektur"; + this.Column7.HeaderText = "Inv.Ausgleich"; + this.Column7.MinimumWidth = 6; + this.Column7.Name = "Column7"; + this.Column7.ReadOnly = true; + this.Column7.Width = 125; + // + // buttonFreigeben + // + this.buttonFreigeben.AutoSize = true; + this.buttonFreigeben.BackColor = System.Drawing.Color.Gray; + this.buttonFreigeben.CausesValidation = false; + this.buttonFreigeben.Dock = System.Windows.Forms.DockStyle.Right; + this.buttonFreigeben.Enabled = false; + this.buttonFreigeben.FlatAppearance.BorderSize = 0; + this.buttonFreigeben.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonFreigeben.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonFreigeben.ForeColor = System.Drawing.Color.Black; + this.buttonFreigeben.Location = new System.Drawing.Point(776, 0); + this.buttonFreigeben.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.buttonFreigeben.Name = "buttonFreigeben"; + this.buttonFreigeben.Size = new System.Drawing.Size(200, 48); + this.buttonFreigeben.TabIndex = 38; + this.buttonFreigeben.Text = "Inventur freigeben"; + this.buttonFreigeben.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; + this.buttonFreigeben.UseVisualStyleBackColor = false; + this.buttonFreigeben.Click += new System.EventHandler(this.buttonFreigeben_Click); + // + // panelButtons + // + this.panelButtons.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panelButtons.Controls.Add(this.buttonSpeichern); + this.panelButtons.Controls.Add(this.labelInvText); + this.panelButtons.Controls.Add(this.buttonFreigeben); + this.panelButtons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panelButtons.Location = new System.Drawing.Point(3, 488); + this.panelButtons.Name = "panelButtons"; + this.panelButtons.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.panelButtons.Size = new System.Drawing.Size(983, 50); + this.panelButtons.TabIndex = 43; + // + // buttonSpeichern + // + this.buttonSpeichern.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.buttonSpeichern.BackColor = System.Drawing.Color.Gray; + this.buttonSpeichern.CausesValidation = false; + this.buttonSpeichern.Enabled = false; + this.buttonSpeichern.FlatAppearance.BorderSize = 0; + this.buttonSpeichern.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonSpeichern.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonSpeichern.ForeColor = System.Drawing.Color.Black; + this.buttonSpeichern.Location = new System.Drawing.Point(569, 0); + this.buttonSpeichern.Margin = new System.Windows.Forms.Padding(5, 2, 5, 2); + this.buttonSpeichern.MinimumSize = new System.Drawing.Size(150, 50); + this.buttonSpeichern.Name = "buttonSpeichern"; + this.buttonSpeichern.Size = new System.Drawing.Size(200, 50); + this.buttonSpeichern.TabIndex = 40; + this.buttonSpeichern.Text = "Speichern"; + this.buttonSpeichern.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; + this.buttonSpeichern.UseVisualStyleBackColor = false; + this.buttonSpeichern.Click += new System.EventHandler(this.buttonSpeichern_Click); + // + // labelInvText + // + this.labelInvText.AutoSize = true; + this.labelInvText.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelInvText.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); + this.labelInvText.Location = new System.Drawing.Point(8, 12); + this.labelInvText.Name = "labelInvText"; + this.labelInvText.Size = new System.Drawing.Size(70, 25); + this.labelInvText.TabIndex = 39; + this.labelInvText.Text = "label1"; + this.labelInvText.Visible = false; + this.labelInvText.Click += new System.EventHandler(this.labelInvText_Click); + // + // UCInventur + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.BackColor = System.Drawing.SystemColors.Control; + this.Controls.Add(this.panelButtons); + this.Controls.Add(this.groupBoxInventur); + this.Margin = new System.Windows.Forms.Padding(5); + this.Name = "UCInventur"; + this.Padding = new System.Windows.Forms.Padding(3); + this.Size = new System.Drawing.Size(989, 541); + this.Load += new System.EventHandler(this.UCInventur_Load); + this.SizeChanged += new System.EventHandler(this.UCInventur_SizeChanged); + this.groupBoxInventur.ResumeLayout(false); + this.groupBoxInventur.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxClose)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dGArtikel)).EndInit(); + this.panelButtons.ResumeLayout(false); + this.panelButtons.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBoxInventur; + private System.Windows.Forms.DataGridView dGArtikel; + private System.Windows.Forms.Button buttonFreigeben; + private System.Windows.Forms.PictureBox pictureBoxPlus; + private System.Windows.Forms.DateTimePicker dTPInvDatum; + private System.Windows.Forms.PictureBox pictureBoxClose; + private System.Windows.Forms.Panel panelButtons; + private System.Windows.Forms.Label labelInvText; + private System.Windows.Forms.DataGridViewTextBoxColumn Column1; + private System.Windows.Forms.DataGridViewTextBoxColumn Column2; + private System.Windows.Forms.DataGridViewTextBoxColumn Column3; + private System.Windows.Forms.DataGridViewTextBoxColumn Column4; + private System.Windows.Forms.DataGridViewTextBoxColumn Column5; + private System.Windows.Forms.DataGridViewTextBoxColumn Column6; + private System.Windows.Forms.DataGridViewTextBoxColumn Column7; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button buttonSpeichern; + private System.Windows.Forms.Label labelLieferDat; + private System.Windows.Forms.DateTimePicker dTPLieferDat; + private System.Windows.Forms.Label labelInvDat; + } +} diff --git a/UserControls/UCInventur.cs b/UserControls/UCInventur.cs new file mode 100644 index 0000000..1af7d5f --- /dev/null +++ b/UserControls/UCInventur.cs @@ -0,0 +1,550 @@ +using DatenDB; +using Microsoft.VisualBasic; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Configuration; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using static System.Windows.Forms.LinkLabel; + +namespace Deckungsbeitrag.UserControls +{ + public partial class UCInventur : UserControl + { + public FormAuftragDetail formAuftragDetail; + private object Sender; + private Auftrag auftrag; + private Benutzer user; + private Kunde kunde; + private List artikelListe; + private int controlHeight; + private bool neueinventur = false; + private string[] lines; + private bool formLoading = false; + private bool _tosave = false; + public event Action SizeChangedForParent; + public event Action UCInventur_Update; + private Point uci_loc; + public bool tosave + { + get { return _tosave; } + set + { + _tosave = value; + if (_tosave) + { + buttonSpeichern.Enabled = true; + buttonSpeichern.BackColor = Color.FromArgb(0, 192, 0); + } + else + { + buttonSpeichern.Enabled = false; + buttonSpeichern.BackColor = Color.Gray; + } + } + } + + public UCInventur() + { + formLoading = true; + InitializeComponent(); + } + + public UCInventur(Kunde kunde, Benutzer benutzer) : this() + { + this.kunde = kunde; + this.user = benutzer; + } + + public UCInventur(string[] lines, Benutzer benutzer, object sender) : this() + { + this.lines = lines; + this.user = benutzer; + this.Sender = sender; + this.kunde = Kunde.GetKunde(lines[1].Split(':')[1].Trim(), null, null); + this.auftrag = Auftrag.GetAuftrag(int.Parse(lines[3].Split(':')[1].Trim())); + } + + private void UCInventur_Load(object sender, EventArgs e) + { + if (this.user.Rolle == BenutzerRolle.Verwaltung || this.user.Rolle == BenutzerRolle.Admin) { this.buttonFreigeben.Enabled = true; this.buttonFreigeben.BackColor = Color.Turquoise; } + string kundeName = this.kunde.Suchtext == null ? this.kunde.KundeName : this.kunde.Suchtext; + this.groupBoxInventur.Text = $"Inventur-{this.kunde.KundeNummer} {kundeName}"; + + if (lines == null || lines.Length == 0) { this.dTPInvDatum.Value = DateTime.Today.Date; } + else { this.dTPInvDatum.Value = DateTime.Parse(lines[4].Split(':')[1]); this.dTPInvDatum.Enabled = true; } + if (auftrag != null) this.dTPLieferDat.Value = auftrag.Liefertag; + Load_DGV(); + if (lines != null & Sender is FormMain) pictureBoxClose_Click(sender, e); + + if (Sender is FormAuftragDetail) + { + formAuftragDetail = sender as FormAuftragDetail; + pictureBoxClose.Visible = pictureBoxClose.Enabled = false; + pictureBoxPlus.Visible = pictureBoxPlus.Enabled = false; + } + formLoading = false; + } + + + private void Load_DGV() + { + this.dGArtikel.AutoGenerateColumns = false; + artikelListe = KundeArtikel.GetInventurList(this.kunde.KundeID); + //this.dGArtikel.DataSource = artikelListe; + this.dGArtikel.AllowUserToAddRows = false; + this.dGArtikel.Rows.Clear(); + if (lines != null) + { + string[] aufID = lines[3].Split(':'); + if (aufID.Length > 1) auftrag = Auftrag.GetAuftrag(int.Parse(aufID[1])); + // Artikelbezeichnungn für SpaltenHeader = 8. Zeile + string[] headerCols = lines[7].Split(';'); // oder "," je nach Trennzeichen + // Spalten hinzufügen oder bestehende Spalte ignorieren + foreach (string header in headerCols) + { + string cleanHeader = header.Trim(); + if (cleanHeader == "Status" || string.IsNullOrWhiteSpace(cleanHeader)) continue; + + // prüfen, ob Spalte mit diesem Header schon existiert + if (FindColumnByHeaderText(dGArtikel, cleanHeader) == null) + { + DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn + { + HeaderText = cleanHeader, + Name = "col_" + cleanHeader.Replace("-", "_").Replace(" ", ""), + ReadOnly = false + }; + dGArtikel.Columns.Add(col); + } + } + } + // Zeilen manuell aus artikelListe und CSV laden + int idx = 0; + int index = 8; + foreach (KundeArtikel ka in artikelListe) + { + var row = new DataGridViewRow(); + row.CreateCells(dGArtikel); + + row.Cells[0].Value = ka.ArtikelNR; + row.Cells[1].Value = ka.ArtikelName; + row.Cells[2].Value = ka.Stand; + row.Cells[3].Value = ka.Reklamation; + row.Cells[4].Value = ka.Fehlmenge; + row.Cells[6].Value = ka.Korrektur; + + if (lines != null) + { + // CSV‑Zahlen ab dt.Columns.Count + string line = lines[index]; + string[] fields = line.Split(';'); + for (int j = 0; j < fields.Length; j++) + { + if (j != 0) + { + if (string.IsNullOrWhiteSpace(fields[j])) continue; + if (j == 6) row.Cells[5].Value = fields[6]; + row.Cells[j - 1].Value = fields[j]; + } + } + index++; + idx++; + } + dGArtikel.Rows.Add(row); + } + dGArtikel_DataBindingComplete(this.dGArtikel, null); + this.dGArtikel.Refresh(); + } + private DataGridViewColumn FindColumnByHeaderText(DataGridView dgv, string headerText) + { + foreach (DataGridViewColumn col in dgv.Columns) + { + if (string.Equals(col.HeaderText, headerText, StringComparison.OrdinalIgnoreCase)) + { + return col; + } + } + return null; + } + + /// + /// Bei Click wird neue Spalte eingefügt. Titel wird durch Inputfeld erfasst und DisplayIndex ist Columns - 1 + /// + /// + /// + private void pictureBoxPlus_Click(object sender, EventArgs e) + { + string text = Interaction.InputBox($"Bitte gib hier den Spaltentitel ein.\n\nTitel:", "Spaltentitel", ""); + int cols = this.dGArtikel.Columns.Count; + DataGridViewTextBoxColumn column = new DataGridViewTextBoxColumn() + { + HeaderText = text, + ReadOnly = false, + }; + this.dGArtikel.Columns.Add(column); + DataGridView_GetNewSize(this.dGArtikel); + } + private void groupBoxInventur_Paint(object sender, PaintEventArgs e) + { + GroupBox gb = (GroupBox)sender; + base.OnPaint(e); + Funktionen.GetGroupBoxBoarder(gb, e); + } + + private void buttonFreigeben_Click(object sender, EventArgs e) + { + if (this.auftrag == null) return; + this.auftrag.Liefertag = dTPLieferDat.Value; + foreach (DataGridViewRow row in this.dGArtikel.Rows) + { + // KundeArtikel updaten. Neuen Stand eintragen, Reklamation & Fehlmenge auf Null setzten und Korrektur als InventruAusgleich speichern. + KundeArtikel art = (KundeArtikel)artikelListe[row.Index]; + + art.Reklamation = 0; + art.Fehlmenge = 0; + art.StandBearbeitet = this.user.BenutzerName + " am " + DateTime.Now; + art.FehlmengeBearbeitet = this.user.BenutzerName + " am " + DateTime.Now; + art.KorrekturBearbeitet = this.user.BenutzerName + " am " + DateTime.Now; + art.Stand = int.Parse(row.Cells[2].Value.ToString()); + art.Korrektur = int.Parse(row.Cells[6].Value.ToString()); + art.Save(); + + // AuftragArtikel erstellen. + if (int.Parse(row.Cells[6].Value.ToString()) != 0) + { + AuftragArtikel auf = new AuftragArtikel(); + auf.ArtikelID = art.ArtikelID; + auf.AuftragID = auftrag.AuftragID; + auf.Anzahl = art.Korrektur; + auf.ArtikelName = art.ArtikelName; + auf.Gesamt = art.Korrektur; + auf.Save(); + } + + } + auftrag.Status = AuftragStatus.Herrichten; + auftrag.Save(); + + GetInventurCSV(sender, auftrag.AuftragID); + + UCInventur_Update(); + } + + /// + /// DataGridView wird geladen. + /// Wenn Inventurdatei vorhanden werden Spalten hinzugefügt und Zeilen aufgefüllt. + /// + /// + private void GetInventurCSV(object sender, int? auftragID) + { + Button btn = (Button)sender; + Kunde _knd = this.kunde; + Benutzer _user = this.user; + List _artikelliste = this.artikelListe; + string status = string.Empty; + string savePath = Path.Combine(ConfigurationManager.AppSettings["DateiSavePfad"], "Listen\\Inventuren") ?? "Inventuren"; + + // Inventur Status Warten wenn noch Zahlen fehlen und Herrichten wenn alle vorhanden. + if (btn.Text.ToString() == "Speichern") status = "Warten"; + else + { + status = "Herrichten"; + string delPath = Path.Combine(savePath, $"Warten-{auftragID.ToString()}-{_knd.KundeNummer}.csv"); + if (File.Exists(delPath)) File.Delete(delPath); + } + + + + string artikel = string.Empty; + string cols = string.Empty; + string fileName = $"{status}-{auftragID.ToString()}-{_knd.KundeNummer}.csv"; // Immer gleiche Datei! + string csvPath; + csvPath = Path.Combine(savePath, fileName); + // Prüfen ob Header schon existiert + bool headerExists = File.Exists(csvPath); + + + // Artikelbezeichnungen in string convertieren + foreach (KundeArtikel art in _artikelliste) artikel += art.ArtikelName + ";"; + foreach (var col in dGArtikel.Columns.Cast().Where(c => c.Visible).OrderBy(c => c.DisplayIndex)) + { + if (col.Visible) cols += col.HeaderText + ";"; + } + + // Prüfen ob Inventur neu ist + if (headerExists) neueinventur = NeueInventur(csvPath, cols); + + // Nur Header bei NEUER Datei + var csv = new StringBuilder(); + if (!headerExists || !neueinventur) + { + csv.AppendLine("=== INVENTUR INFO ==="); + csv.AppendLine($"KundeNr: {_knd.KundeNummer}"); + csv.AppendLine($"Kunde: {_knd.KundeName}"); + csv.AppendLine($"Auftrag: {auftragID.ToString()}"); + csv.AppendLine($"Letzte Inventur: {dTPInvDatum.Value.Date.ToString("yyyy-MM-dd")}"); + csv.AppendLine(); + csv.AppendLine(new string('=', 30)); + csv.AppendLine($"Status;{cols}"); + //File.WriteAllText(csvPath, csv.ToString(), Encoding.UTF8); + } + // NEUE Artikel ANHÄNGEN (ohne Header) + var appendCsv = new StringBuilder(); + + foreach (DataGridViewRow row in this.dGArtikel.Rows) + { + // Nur sichtbare Spalten auslesen + var values = new List(); + for (int i = 0; i < row.Cells.Count; i++) + { + if (row.Cells[i].Visible) + { + if (i == 0) + { + if (artikelListe[row.Index].Korrektur == 0) values.Add("Erledigt"); + else values.Add("Offen"); + } + values.Add(row.Cells[i].Value?.ToString() ?? "0"); + } + } + // Eine Zeile pro Row, mit allen Werten getrennt durch ";" + appendCsv.AppendLine(string.Join(";", values)); + } + + // ANHÄNGEN statt überschreiben + if (neueinventur) + { + File.AppendAllText(csvPath, appendCsv.ToString(), Encoding.UTF8); + } + else + { + File.WriteAllText(csvPath, csv.ToString(), Encoding.UTF8); + File.AppendAllText(csvPath, appendCsv.ToString(), Encoding.UTF8); + } + } + + /// + /// Nachdem die DataGridView fertig ist werden Spalten entfernt, die Größe neu berechnet und auf GroupBox und UserControl übertragen. + /// + /// + /// + private void dGArtikel_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e) + { + // Alle Spaltenbreiten an den Zellinhalt anpassen + this.dGArtikel.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; + // Alle Zeilenhöhen an Zellinhalt anpassen + this.dGArtikel.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; + + + DataGridView_GetNewSize(this.dGArtikel); + } + + /// + /// Die Größe von GroupBox und UserControl wird an die aktuelle und neue Größe der DataGridView angepasst. + /// + /// + private void DataGridView_GetNewSize(DataGridView dgv) + { + int totalWidth = dgv.RowHeadersVisible ? dgv.RowHeadersWidth : 0; + foreach (DataGridViewColumn col in dgv.Columns) + { + if (col.Visible) totalWidth += col.Width; + } + int totalHeight = dgv.ColumnHeadersVisible ? dgv.ColumnHeadersHeight : 0; + foreach (DataGridViewRow row in dGArtikel.Rows) + { + if (row.Visible) totalHeight += row.Height; + } + totalHeight += dgv.ColumnHeadersHeight; + + dgv.ClientSize = new Size(totalWidth, totalHeight); + this.groupBoxInventur.ClientSize = new Size(dgv.ClientSize.Width, dgv.Height + pictureBoxPlus.Bottom + 10); + this.ClientSize = new Size(this.groupBoxInventur.ClientSize.Width + 10, this.groupBoxInventur.Height + panelButtons.Height + 10); + + } + + /// + /// Größe des UserControls wird verringert. + /// + /// + /// + private void pictureBoxClose_Click(object sender, EventArgs e) + { + if (tosave) if (MessageBox.Show("Du hast die Zahlen geändert. Möchtest du die Inventur so speichern?", "INVENTUR SPEICHERN", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) buttonSpeichern_Click(this.buttonSpeichern, null); + if (groupBoxInventur.Visible) + { + this.buttonFreigeben.Visible = false; + this.buttonSpeichern.Visible = false; + this.labelInvText.Text = groupBoxInventur.Text; + this.groupBoxInventur.Visible = false; + this.labelInvText.Visible = true; + this.Height = panelButtons.Height + 6; + this.Width = labelInvText.Right + 10; + this.Location = uci_loc; + } + } + private bool NeueInventur(string csvPath, string cols) + { + DateTime? letzteInventur = null; + bool result = false; + + int lineNumber = 0; + string[] lines = new string[lineNumber]; + foreach (string line in File.ReadLines(csvPath, Encoding.UTF8)) + { + Array.Resize(ref lines, lineNumber + 1); + lines[lineNumber] = line; + lineNumber++; + if (lineNumber == 5) + { + letzteInventur = DateTime.Parse(line.Split(':')[1]); + result = dTPInvDatum.Value.Date > letzteInventur.Value.Date; + if (result == true) lines[lineNumber - 1] = $"Letzte Inventur: {dTPInvDatum.Value.Date.ToString("yyyy-MM-dd")}"; + } + if (lineNumber == 8) + { + lines[lineNumber - 1] = cols; + } + } + File.WriteAllLines(csvPath, lines, Encoding.UTF8); + + return result; + } + + /// + /// Location der Controls im UserControl wird berechnet. + /// + /// + /// + private void UCInventur_SizeChanged(object sender, EventArgs e) + { + int label_y = this.pictureBoxPlus.Location.Y + ((this.pictureBoxPlus.Height - this.label1.Height) / 2); + int x = 0; + this.pictureBoxClose.Location = new Point(this.Width - pictureBoxClose.Width + this.Margin.All, 0); + this.pictureBoxPlus.Location = new Point(this.groupBoxInventur.Width - pictureBoxPlus.Width - this.groupBoxInventur.Margin.Right - this.Margin.Right, this.pictureBoxPlus.Location.Y); + this.label1.Location = new Point(this.pictureBoxPlus.Left - this.label1.Width - 10, this.pictureBoxPlus.Location.Y + ((this.pictureBoxPlus.Height - this.label1.Height) / 2)); + this.labelInvDat.Location = new Point(x = this.dGArtikel.Left, label_y); + this.dTPInvDatum.Location = new Point(x = x + labelInvDat.Width, this.pictureBoxPlus.Location.Y); + this.labelLieferDat.Location = new Point(x = x + dTPInvDatum.Width + 10, label_y); + this.dTPLieferDat.Location = new Point(x + labelLieferDat.Width, this.pictureBoxPlus.Location.Y); + this.buttonSpeichern.Location = new Point(buttonFreigeben.Left - buttonSpeichern.Width - buttonSpeichern.Margin.Left, buttonSpeichern.Top); + if (Sender is FormAuftragDetail) SizeChangedForParent?.Invoke(); + } + + /// + /// Größe des UserControls wird wiederhergestellt. + /// + /// + /// + private void labelInvText_Click(object sender, EventArgs e) + { + if (!groupBoxInventur.Visible) + { + uci_loc = this.Location; + DataGridView_GetNewSize(this.dGArtikel); + this.buttonFreigeben.Visible = true; + this.buttonSpeichern.Visible = true; + groupBoxInventur.Visible = true; + this.labelInvText.Visible = false; + } + } + + private void dGArtikel_Leave(object sender, EventArgs e) + { + DataGridView dgv = (DataGridView)sender; + } + + private void dGArtikel_CellLeave(object sender, DataGridViewCellEventArgs e) + { + + } + + private void dGArtikel_CellEndEdit(object sender, DataGridViewCellEventArgs e) + { + int iststand = 0; int invausgleich = 0; int schwund = 0; int sollstand = 0; int fehlmenge = 0; + DataGridView dgv = (DataGridView)sender; + if (int.TryParse(dgv.CurrentCell.Value.ToString(), out int n)) + { + var row = dgv.Rows[e.RowIndex]; + sollstand = int.Parse(row.Cells[2].Value.ToString()); + fehlmenge = int.Parse(row.Cells[3].Value.ToString()) + int.Parse(row.Cells[4].Value.ToString()); + for (int j = 7; j < row.Cells.Count; j++) + { + if (row.Cells[j].Value == null) row.Cells[j].Value = 0; + iststand += int.TryParse(row.Cells[j].Value.ToString(), out int r) ? r : 0; + } + + if (e.ColumnIndex >= 7) + { + row.Cells[5].Value = sollstand - fehlmenge - iststand; + row.Cells[6].Value = artikelListe[e.RowIndex].Korrektur = sollstand - iststand; + } + if (e.ColumnIndex == 2) + { + row.Cells[6].Value = artikelListe[e.RowIndex].Korrektur = sollstand - iststand; + } + } + else return; + dgv.Refresh(); + } + + private void dGArtikel_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + if (!formLoading) { tosave = true; } + else tosave = false; + } + + private void buttonSpeichern_Click(object sender, EventArgs e) + { + this.dGArtikel.EndEdit(); // beendet aktuelle Zell‑Bearbeitung + + if (tosave) + { + if (auftrag == null) + { + auftrag = new Auftrag() + { + KundeID = (int)this.kunde.KundeID, + Liefertag = this.dTPLieferDat.Value, + Erstellt = DateTime.Now, + ErstelltVon = (int)this.user.BenutzerID, + Status = AuftragStatus.Warten, + Container = 0, + ContainerClean = 0, + Typ = AuftragTyp.Inventur, + }; + auftrag.Save(); + } + GetInventurCSV(sender, auftrag.AuftragID); + } + this.dTPLieferDat.Focus(); + tosave = false; + } + + private void dGArtikel_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) + { + DataGridView dgv = (DataGridView)sender; + + if (e.ColumnIndex == 2) + { + if (MessageBox.Show("Möchtest du den Stand wirklich verändern?", "FRAGE", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return; + else + { + dgv.Columns[e.ColumnIndex].ReadOnly = false; + } + } + } + } +} +//TODO: CLick auf Inventur freigeben Dateiname von "Warten" auf "Herrichten" ändern. +//TODO: Inventur freigeben nur für Admin oder Verwaltung. +//TODO: Inventur für Expedit zugänglich machen. diff --git a/UserControls/UCInventur.resx b/UserControls/UCInventur.resx new file mode 100644 index 0000000..65189f0 --- /dev/null +++ b/UserControls/UCInventur.resx @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wQAADsEBuJFr7QAAALtJREFUOE/tkTEKAjEQRdNbCJ7Eq+h2gngd9QwWyp5it/IoabRYQaKwvx35iyOT + mE1p5cAnw8z/j5A4EXFUWgDO3f0pFPt0/8mVANP1Sag/4FcAAHMAnucYwHoiAAd9j7DctXLpwuNtjACc + cVftW6FXIQrwi20jrjrIbFMrxBuA54w7eujlLLqBNfC83sIQptjbnd7y6w1SyGR1HDQWjgD6SBZiZcPZ + X9DKQdJwEZBCcmFWEcBSSC7M0twLBeEEF8s9ZFEAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wQAADsEBuJFr7QAAAKxJREFUOE9j+P//PwM2/O3bN4Nv3759gGIDdHkYxhBA1hwzYd9/EMZnCIYAsmaG + 4DlgjM8QgpoJGUKUZnyG4NSMj41sCE7N3759g/NBbCzyYENABky4/uj1f77YheiSKAYgWwJSC9ID0gvz + woIT15/+z551GG4yFgPALgWpAakF6UEPxAXIfkM3ADmsYJpRDIAqUEBiYxiArgbDADTDsBqAjjEEhpkB + yBhdHoYBkN/zh5bcpfIAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wQAADsEBuJFr7QAAAKxJREFUOE9j+P//PwM2/O3bN4Nv3759gGIDdHkYxhBA1hwzYd9/EMZnCIYAsmaG + 4DlgjM8QgpoJGUKUZnyG4NSMj41sCE7N3759g/NBbCzyYENABky4/uj1f77YheiSKAYgWwJSC9ID0gvz + woIT15/+z551GG4yFgPALgWpAakF6UEPxAXIfkM3ADmsYJpRDIAqUEBiYxiArgbDADTDsBqAjjEEhpkB + yBhdHoYBkN/zh5bcpfIAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAFZJREFUOE+9kEEKACEMxHxb//+eXruwbGEwHhwKK+QSaqSuqloTIFwgXCBcKL6T + maW0xzyEBCLixQroqxpo9vljoC/u/BcYrTD+RA0o1wEXCBcIFwiXB07Nzd/k/DvRAAAAAElFTkSuQmCC + + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/Verwaltung.csproj b/Verwaltung.csproj index f7e6de8..5968d67 100644 --- a/Verwaltung.csproj +++ b/Verwaltung.csproj @@ -419,6 +419,12 @@ UCFeedback.cs + + UserControl + + + UCInventur.cs + UserControl @@ -563,6 +569,9 @@ UCFeedback.cs + + UCInventur.cs + UCKunde.cs diff --git a/Verwaltung_ReadMe.txt b/Verwaltung_ReadMe.txt index 5b9f8c3..9495a3a 100644 --- a/Verwaltung_ReadMe.txt +++ b/Verwaltung_ReadMe.txt @@ -4,7 +4,7 @@ NEUIGKEITEN - Version 1.0.8.3 Build-Info: - Build-Typ: Release Build -- Erledigte TODOs: 15 +- Erledigte TODOs: 16 - Offene TODOs: 46 - Install-Reminders: 4 - Changes: 15 @@ -34,7 +34,7 @@ Build-Info: - ✨ Winter und Sommer wird getrennt geändert und gespeichert. [UCTabPageLKW.cs] -=== ✅ ERLEDIGTE TODOs (15) === +=== ✅ ERLEDIGTE TODOs (16) === - ✅ : Auftrag über FormListe holen und daraus den Kunden für Fehlmenge holen. [FormFehlmengeCount.cs] - ✅ : Auftragliste bei Fahrer anzeigen wenn Login. [FormMain.cs] - ✅ : Bei Transport wir ein Fach mit Aktuellem Auftrag erstellt. Das Alte wird bei Transport gespeichert. [FormAusschlager.cs] @@ -42,6 +42,7 @@ Build-Info: - ✅ : Container schmutzig bearbeitbar machen [FormAuftragDetail.cs] - ✅ : Feedback Button hinzufügen [FormAuftragDetail.cs] - ✅ : HILFE zeigt OnBoarding. [FormMain.cs] +- ✅ : Korrigiere Bestand: Wenn -Zahl dann Stand - Zahl. [FormAuftragDetail.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] - ✅ : Mit AddFehler können Fehler aus try/chatch in Obsidian eingefügt werden. (Timestamp, PC-Name, Ex-Message) [Program.cs] - ✅ : Neue Aufgabe Screen erstellen. [FormNeueAufgabe.cs] @@ -62,19 +63,21 @@ Build-Info: - 🔄 Auftragauswahl aufrufen statt NeuerAuftrag. (Wenn Fahrer Aufträge erstellen) [FormWSVerfolgung.cs] - 🔄 Aufträge zusammenführen wenn gleicher Kunde und Liefertag. [FormNeuerAuftrag.cs] - 🔄 Ausprobieren ob die Ausrichtung jetzt richtig ist. Sowohl beim ersten wie auch zweiten Mal. [Funktionen.cs] +- 🔄 Bestand von allen Artikeln speichern und für Druck vorbereiten. [FormAuftragDetail.cs] +- 🔄 CLick auf Inventur freigeben Dateiname von "Warten" auf "Herrichten" ändern. [UCInventur.cs] - 🔄 Dateinamen aus Tikos anschauen. Eventuell Datum von letztem Import über Dateiname wählen? [FormMain.cs] - 🔄 Deaktivieren wenn SPS funktioniert. Transport wird simuliert. [FormWSVerfolgung.cs] - 🔄 Design des Controls anpassen. Eventuell im Designer erstellen. [UCKunde.cs] - 🔄 Eingabemöglichkeit von Tour Start und Ende muss erledigt werden. [Tour.cs] - 🔄 Erstellen von SonderAuftrag und Drucken von Etikett testen. [FormAuftragDetail.cs] - 🔄 Eventuell auch andere ListViews einbinden? [Funktionen.cs] -- 🔄 Form AuftragDetail muss überarbeitet werden. [FormNeuerAuftrag.cs] +- 🔄 Eventuell die Zahlen in CSV speichern und von dort für Druck verwenden?! [FormAuftragDetail.cs] - 🔄 Funktioniert mehrere KundenControls auf einmal DragDrop? [FormTourenplanung.cs] - 🔄 Gesamt soll immer 100% sein. [Funktionen.cs] -- 🔄 Grund immer abfragen oder nur wenn Fahrer die Zuteilung ändert? [FormNeuerAuftrag.cs] - 🔄 Hier Settings speichern mit UserSettingsManager Klasse. [FormEinstellung.cs] +- 🔄 Inventur freigeben nur für Admin oder Verwaltung. [UCInventur.cs] +- 🔄 Inventur für Expedit zugänglich machen. [UCInventur.cs] - 🔄 JSON nach angemeldeten Fahrer durchsuchen und Kundenliste des aktuellen Wochentag anzeigen. [FormMain.cs] -- 🔄 Korrigiere Bestand: Wenn -Zahl dann Stand - Zahl. [FormAuftragDetail.cs] - 🔄 Kundenanzahl bei Tourenliste erstellen vergleichen und anpassen. [Tour.cs] - 🔄 Liste vorher/nachher durchdenken [FormAuftragDetail.cs] - 🔄 Mit AddFehler in Obsidian eine Fehlerliste betreiben. (Wichtige Infos feststellen und bereitstellen) [Program.cs] @@ -87,10 +90,8 @@ Build-Info: - 🔄 Settings hier ändern auf UserSettingsManager Klasse. [FormEinstellung.cs] - 🔄 Soll hier ebenfalls der nächste Liefertag laut Rhythmus vorgeschlagen werden? [FormExpedit.cs] - 🔄 Speichern etc. durchgehen und adaptieren [FormAuftragDetail.cs] -- 🔄 Standerhöhung funktioniert soweit Standverringerung soll nur auf Stand gehen [FormAuftragDetail.cs] - 🔄 Standverminderung und Standerhöhung mit einem Aufruf (Standveränderung?) Bei Verminderung -Zahlen sonst Plus. [FormAuftragDetail.cs] - 🔄 TourenListe Entwurf muss überarbeitet werden. [FormNeuerAuftrag.cs] -- 🔄 Umbau in Switch. [FormAufleger.cs] - 🔄 Umbau in Switch. [FormWSVerfolgung.cs] - 🔄 UserSetting Properties eintragen und in EinstellungsScreen abrufen. [UserSettingsManager.cs] - 🔄 Warum der falsche Path? Immer mit \\ [UCFeedback.cs] @@ -100,5 +101,5 @@ Build-Info: - 🔄 Wenn Nachwäsche oder Müllwäsche alle Artikel anzeigen. [FormFehlmengeCount.cs] - 🔄 Zuweisung zu Fahrer muss geklärt werden. [Funktionen.cs] -Installation: 24.03.2026 18:31 +Installation: 30.03.2026 18:41 =====================================