From 4c5da77b428e957f651f199451c36c8e6d22db53 Mon Sep 17 00:00:00 2001 From: Kilian Wirl Date: Wed, 11 Feb 2026 13:17:17 +0100 Subject: [PATCH] =?UTF-8?q?div.=20kleinere=20=C3=84nderungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AA-Forms/FehlmengeChart.Designer.cs | 23 +- AA-Forms/FormEinstellung.Designer.cs | 208 +++++----- AA-Forms/FormExpedit.Designer.cs | 84 ++-- AA-Forms/FormExpedit.cs | 506 +++++++++++++++---------- AA-Forms/FormExpedit.resx | 30 ++ AA-Forms/FormFehlmengeCount.cs | 118 +++++- AA-Forms/FormKundeVW.cs | 4 +- AA-Forms/FormKundeVW.designer.cs | 256 +++++++------ AA-Forms/FormKundeVW.resx | 3 + AA-Forms/FormMain.Designer.cs | 67 ++-- AA-Forms/FormMain.cs | 56 ++- AA-Forms/FormTourenplanung.cs | 15 +- AA-Klassen/Auftrag.cs | 31 +- AA-Klassen/TourenDaten.cs | 11 +- Program.cs | 3 +- Properties/AssemblyInfo.cs | 4 +- SetupVerwaltung/SetupVerwaltung.vdproj | 6 +- UserControls/UCTabPageLKW.cs | 48 ++- Verwaltung_ReadMe.txt | 38 +- 19 files changed, 908 insertions(+), 603 deletions(-) diff --git a/AA-Forms/FehlmengeChart.Designer.cs b/AA-Forms/FehlmengeChart.Designer.cs index 0bc1777..158e4d9 100644 --- a/AA-Forms/FehlmengeChart.Designer.cs +++ b/AA-Forms/FehlmengeChart.Designer.cs @@ -32,6 +32,7 @@ System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // @@ -39,7 +40,7 @@ // chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Dock = System.Windows.Forms.DockStyle.Fill; + this.chart1.Dock = System.Windows.Forms.DockStyle.Top; legend1.Name = "Legend1"; this.chart1.Legends.Add(legend1); this.chart1.Location = new System.Drawing.Point(0, 0); @@ -48,26 +49,42 @@ series1.Legend = "Legend1"; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(585, 450); + this.chart1.Size = new System.Drawing.Size(585, 413); this.chart1.TabIndex = 0; this.chart1.Text = "chart1"; // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Checked = true; + this.checkBox1.CheckState = System.Windows.Forms.CheckState.Indeterminate; + this.checkBox1.Location = new System.Drawing.Point(163, 472); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(80, 17); + this.checkBox1.TabIndex = 1; + this.checkBox1.Text = "checkBox1"; + this.checkBox1.ThreeState = true; + this.checkBox1.UseVisualStyleBackColor = true; + // // FehlmengeChart // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(585, 450); + this.ClientSize = new System.Drawing.Size(585, 582); + this.Controls.Add(this.checkBox1); this.Controls.Add(this.chart1); this.Name = "FehlmengeChart"; this.Text = "FehlmengeChart"; this.Load += new System.EventHandler(this.FehlmengeChart_Load); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion private System.Windows.Forms.DataVisualization.Charting.Chart chart1; + private System.Windows.Forms.CheckBox checkBox1; } } \ No newline at end of file diff --git a/AA-Forms/FormEinstellung.Designer.cs b/AA-Forms/FormEinstellung.Designer.cs index 8ae26dd..2d811f9 100644 --- a/AA-Forms/FormEinstellung.Designer.cs +++ b/AA-Forms/FormEinstellung.Designer.cs @@ -86,6 +86,16 @@ this.tabPageDrucker = new System.Windows.Forms.TabPage(); this.tabPageTourenplanung = new System.Windows.Forms.TabPage(); this.groupBoxRegeln = new System.Windows.Forms.GroupBox(); + this.comboBox5 = new System.Windows.Forms.ComboBox(); + this.label23 = new System.Windows.Forms.Label(); + this.comboBox3 = new System.Windows.Forms.ComboBox(); + this.comboBox4 = new System.Windows.Forms.ComboBox(); + this.label22 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.label21 = new System.Windows.Forms.Label(); + this.comboBoxLT2 = new System.Windows.Forms.ComboBox(); + this.comboBoxLT1 = new System.Windows.Forms.ComboBox(); this.label17 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); @@ -95,16 +105,6 @@ this.label15 = new System.Windows.Forms.Label(); this.tabPageAllgemein = new System.Windows.Forms.TabPage(); this.panelButtons = new System.Windows.Forms.Panel(); - this.comboBoxLT1 = new System.Windows.Forms.ComboBox(); - this.comboBoxLT2 = new System.Windows.Forms.ComboBox(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.comboBox2 = new System.Windows.Forms.ComboBox(); - this.label21 = new System.Windows.Forms.Label(); - this.comboBox3 = new System.Windows.Forms.ComboBox(); - this.comboBox4 = new System.Windows.Forms.ComboBox(); - this.label22 = new System.Windows.Forms.Label(); - this.comboBox5 = new System.Windows.Forms.ComboBox(); - this.label23 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.numUpDownMinWert)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numUpDownMaxWert)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numUpDownAnzahl)).BeginInit(); @@ -735,7 +735,7 @@ this.groupBoxFarben.Controls.Add(this.buttonHubband); this.groupBoxFarben.Controls.Add(this.buttonTrockner); this.groupBoxFarben.Font = new System.Drawing.Font("Microsoft Sans Serif", 16.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.groupBoxFarben.Location = new System.Drawing.Point(24, 121); + this.groupBoxFarben.Location = new System.Drawing.Point(7, 5); this.groupBoxFarben.Margin = new System.Windows.Forms.Padding(2); this.groupBoxFarben.Name = "groupBoxFarben"; this.groupBoxFarben.Padding = new System.Windows.Forms.Padding(2); @@ -971,6 +971,99 @@ this.groupBoxRegeln.TabIndex = 48; this.groupBoxRegeln.TabStop = false; // + // comboBox5 + // + this.comboBox5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBox5.FormattingEnabled = true; + this.comboBox5.Location = new System.Drawing.Point(235, 87); + this.comboBox5.Name = "comboBox5"; + this.comboBox5.Size = new System.Drawing.Size(45, 21); + this.comboBox5.TabIndex = 58; + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(205, 90); + this.label23.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(25, 13); + this.label23.TabIndex = 57; + this.label23.Text = "und"; + // + // comboBox3 + // + this.comboBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBox3.FormattingEnabled = true; + this.comboBox3.Location = new System.Drawing.Point(155, 87); + this.comboBox3.Name = "comboBox3"; + this.comboBox3.Size = new System.Drawing.Size(45, 21); + this.comboBox3.TabIndex = 56; + // + // comboBox4 + // + this.comboBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBox4.FormattingEnabled = true; + this.comboBox4.Location = new System.Drawing.Point(75, 87); + this.comboBox4.Name = "comboBox4"; + this.comboBox4.Size = new System.Drawing.Size(45, 21); + this.comboBox4.TabIndex = 55; + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(125, 90); + this.label22.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(25, 13); + this.label22.TabIndex = 54; + this.label22.Text = "und"; + // + // comboBox1 + // + this.comboBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(155, 43); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(45, 21); + this.comboBox1.TabIndex = 53; + // + // comboBox2 + // + this.comboBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Location = new System.Drawing.Point(75, 40); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(45, 21); + this.comboBox2.TabIndex = 52; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(125, 43); + this.label21.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(25, 13); + this.label21.TabIndex = 51; + this.label21.Text = "und"; + // + // comboBoxLT2 + // + this.comboBoxLT2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBoxLT2.FormattingEnabled = true; + this.comboBoxLT2.Location = new System.Drawing.Point(155, 13); + this.comboBoxLT2.Name = "comboBoxLT2"; + this.comboBoxLT2.Size = new System.Drawing.Size(45, 21); + this.comboBoxLT2.TabIndex = 50; + // + // comboBoxLT1 + // + this.comboBoxLT1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBoxLT1.FormattingEnabled = true; + this.comboBoxLT1.Location = new System.Drawing.Point(75, 13); + this.comboBoxLT1.Name = "comboBoxLT1"; + this.comboBoxLT1.Size = new System.Drawing.Size(45, 21); + this.comboBoxLT1.TabIndex = 49; + // // label17 // this.label17.AutoSize = true; @@ -1065,99 +1158,6 @@ this.panelButtons.Size = new System.Drawing.Size(1192, 49); this.panelButtons.TabIndex = 50; // - // comboBoxLT1 - // - this.comboBoxLT1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboBoxLT1.FormattingEnabled = true; - this.comboBoxLT1.Location = new System.Drawing.Point(75, 13); - this.comboBoxLT1.Name = "comboBoxLT1"; - this.comboBoxLT1.Size = new System.Drawing.Size(45, 21); - this.comboBoxLT1.TabIndex = 49; - // - // comboBoxLT2 - // - this.comboBoxLT2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboBoxLT2.FormattingEnabled = true; - this.comboBoxLT2.Location = new System.Drawing.Point(155, 13); - this.comboBoxLT2.Name = "comboBoxLT2"; - this.comboBoxLT2.Size = new System.Drawing.Size(45, 21); - this.comboBoxLT2.TabIndex = 50; - // - // comboBox1 - // - this.comboBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Location = new System.Drawing.Point(155, 43); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(45, 21); - this.comboBox1.TabIndex = 53; - // - // comboBox2 - // - this.comboBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboBox2.FormattingEnabled = true; - this.comboBox2.Location = new System.Drawing.Point(75, 40); - this.comboBox2.Name = "comboBox2"; - this.comboBox2.Size = new System.Drawing.Size(45, 21); - this.comboBox2.TabIndex = 52; - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(125, 43); - this.label21.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(25, 13); - this.label21.TabIndex = 51; - this.label21.Text = "und"; - // - // comboBox3 - // - this.comboBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboBox3.FormattingEnabled = true; - this.comboBox3.Location = new System.Drawing.Point(155, 87); - this.comboBox3.Name = "comboBox3"; - this.comboBox3.Size = new System.Drawing.Size(45, 21); - this.comboBox3.TabIndex = 56; - // - // comboBox4 - // - this.comboBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboBox4.FormattingEnabled = true; - this.comboBox4.Location = new System.Drawing.Point(75, 87); - this.comboBox4.Name = "comboBox4"; - this.comboBox4.Size = new System.Drawing.Size(45, 21); - this.comboBox4.TabIndex = 55; - // - // label22 - // - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(125, 90); - this.label22.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(25, 13); - this.label22.TabIndex = 54; - this.label22.Text = "und"; - // - // comboBox5 - // - this.comboBox5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboBox5.FormattingEnabled = true; - this.comboBox5.Location = new System.Drawing.Point(235, 87); - this.comboBox5.Name = "comboBox5"; - this.comboBox5.Size = new System.Drawing.Size(45, 21); - this.comboBox5.TabIndex = 58; - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(205, 90); - this.label23.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(25, 13); - this.label23.TabIndex = 57; - this.label23.Text = "und"; - // // FormEinstellung // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/AA-Forms/FormExpedit.Designer.cs b/AA-Forms/FormExpedit.Designer.cs index 34bb7c7..51d2453 100644 --- a/AA-Forms/FormExpedit.Designer.cs +++ b/AA-Forms/FormExpedit.Designer.cs @@ -29,10 +29,10 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormExpedit)); - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Title title2 = new System.Windows.Forms.DataVisualization.Charting.Title(); this.label10 = new System.Windows.Forms.Label(); this.buttonDrucken = new System.Windows.Forms.Button(); this.groupBoxEtikett = new System.Windows.Forms.GroupBox(); @@ -85,7 +85,7 @@ this.labelZahl1 = new System.Windows.Forms.Label(); this.labelStatistik1 = new System.Windows.Forms.Label(); this.buttonSuchen = new System.Windows.Forms.Button(); - this.buttonNW = new System.Windows.Forms.Button(); + this.buttonReklamation = new System.Windows.Forms.Button(); this.buttonSWS_Drucken = new System.Windows.Forms.Button(); this.buttonStats = new System.Windows.Forms.Button(); this.buttonEinstellung = new System.Windows.Forms.Button(); @@ -161,7 +161,7 @@ this.groupBoxEtikett.Controls.Add(this.label10); this.groupBoxEtikett.Controls.Add(this.buttonKundeNr); this.groupBoxEtikett.ForeColor = System.Drawing.Color.White; - this.groupBoxEtikett.Location = new System.Drawing.Point(292, 650); + this.groupBoxEtikett.Location = new System.Drawing.Point(668, 650); this.groupBoxEtikett.Margin = new System.Windows.Forms.Padding(2); this.groupBoxEtikett.Name = "groupBoxEtikett"; this.groupBoxEtikett.Padding = new System.Windows.Forms.Padding(2); @@ -540,6 +540,8 @@ // // objectListViewSonder // + this.objectListViewSonder.AlternateRowBackColor = System.Drawing.Color.LightBlue; + this.objectListViewSonder.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick; this.objectListViewSonder.CellEditUseWholeCell = false; this.objectListViewSonder.Cursor = System.Windows.Forms.Cursors.Default; this.objectListViewSonder.Dock = System.Windows.Forms.DockStyle.Fill; @@ -548,13 +550,18 @@ this.objectListViewSonder.HideSelection = false; 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, 581); + this.objectListViewSonder.Sorting = System.Windows.Forms.SortOrder.Ascending; this.objectListViewSonder.TabIndex = 2; + this.objectListViewSonder.TintSortColumn = true; + this.objectListViewSonder.UseAlternatingBackColors = true; this.objectListViewSonder.UseCompatibleStateImageBehavior = false; this.objectListViewSonder.UseHotControls = false; this.objectListViewSonder.View = System.Windows.Forms.View.Details; this.objectListViewSonder.ButtonClick += new System.EventHandler(this.objectListViewAuftrag_ButtonClick); this.objectListViewSonder.CellClick += new System.EventHandler(this.objectListViewAuftrag_CellClick); + this.objectListViewSonder.FormatCell += new System.EventHandler(this.objectListViewAuftrag_FormatCell); // // tabPageAll // @@ -884,7 +891,7 @@ this.buttonSuchen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonSuchen.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonSuchen.ForeColor = System.Drawing.Color.Black; - this.buttonSuchen.Location = new System.Drawing.Point(67, 649); + this.buttonSuchen.Location = new System.Drawing.Point(209, 649); this.buttonSuchen.Margin = new System.Windows.Forms.Padding(2); this.buttonSuchen.Name = "buttonSuchen"; this.buttonSuchen.Size = new System.Drawing.Size(200, 41); @@ -893,21 +900,21 @@ this.buttonSuchen.UseVisualStyleBackColor = false; this.buttonSuchen.Click += new System.EventHandler(this.buttonSuchen_Click); // - // buttonNW + // buttonReklamation // - this.buttonNW.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonNW.FlatAppearance.BorderColor = System.Drawing.Color.White; - this.buttonNW.FlatAppearance.BorderSize = 3; - this.buttonNW.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonNW.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonNW.ForeColor = System.Drawing.Color.White; - this.buttonNW.Location = new System.Drawing.Point(4, 649); - this.buttonNW.Name = "buttonNW"; - this.buttonNW.Size = new System.Drawing.Size(58, 41); - this.buttonNW.TabIndex = 64; - this.buttonNW.Text = "NW"; - this.buttonNW.UseVisualStyleBackColor = true; - this.buttonNW.Click += new System.EventHandler(this.buttonNW_Click); + this.buttonReklamation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonReklamation.FlatAppearance.BorderColor = System.Drawing.Color.White; + this.buttonReklamation.FlatAppearance.BorderSize = 3; + this.buttonReklamation.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonReklamation.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonReklamation.ForeColor = System.Drawing.Color.White; + this.buttonReklamation.Location = new System.Drawing.Point(4, 649); + this.buttonReklamation.Name = "buttonReklamation"; + this.buttonReklamation.Size = new System.Drawing.Size(200, 41); + this.buttonReklamation.TabIndex = 64; + this.buttonReklamation.Text = "Reklamationen"; + this.buttonReklamation.UseVisualStyleBackColor = true; + this.buttonReklamation.Click += new System.EventHandler(this.buttonReklamation_Click); // // buttonSWS_Drucken // @@ -959,26 +966,26 @@ | System.Windows.Forms.AnchorStyles.Right))); this.chartFehlmenge.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); this.chartFehlmenge.BorderSkin.PageColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - chartArea1.InnerPlotPosition.Auto = false; - chartArea1.InnerPlotPosition.Height = 92.2266F; - chartArea1.InnerPlotPosition.Width = 76.05405F; - chartArea1.InnerPlotPosition.X = 20.54054F; - chartArea1.Name = "ChartArea1"; - this.chartFehlmenge.ChartAreas.Add(chartArea1); - legend1.Name = "Legend1"; - this.chartFehlmenge.Legends.Add(legend1); + chartArea2.InnerPlotPosition.Auto = false; + chartArea2.InnerPlotPosition.Height = 92.2266F; + chartArea2.InnerPlotPosition.Width = 76.05405F; + chartArea2.InnerPlotPosition.X = 20.54054F; + chartArea2.Name = "ChartArea1"; + this.chartFehlmenge.ChartAreas.Add(chartArea2); + legend2.Name = "Legend1"; + this.chartFehlmenge.Legends.Add(legend2); this.chartFehlmenge.Location = new System.Drawing.Point(908, 12); this.chartFehlmenge.Name = "chartFehlmenge"; - series1.ChartArea = "ChartArea1"; - series1.Legend = "Legend1"; - series1.Name = "Series1"; - this.chartFehlmenge.Series.Add(series1); + series2.ChartArea = "ChartArea1"; + series2.Legend = "Legend1"; + series2.Name = "Series1"; + this.chartFehlmenge.Series.Add(series2); this.chartFehlmenge.Size = new System.Drawing.Size(301, 434); this.chartFehlmenge.TabIndex = 2; this.chartFehlmenge.Text = "chart1"; - title1.Name = "Title1"; - title1.Text = "Hallo Test"; - this.chartFehlmenge.Titles.Add(title1); + title2.Name = "Title1"; + title2.Text = "Hallo Test"; + this.chartFehlmenge.Titles.Add(title2); this.chartFehlmenge.Visible = false; // // groupBoxKndInfo @@ -1039,7 +1046,7 @@ this.ClientSize = new System.Drawing.Size(1221, 703); this.Controls.Add(this.groupBoxKndInfo); this.Controls.Add(this.chartFehlmenge); - this.Controls.Add(this.buttonNW); + this.Controls.Add(this.buttonReklamation); this.Controls.Add(this.buttonSuchen); this.Controls.Add(this.buttonStats); this.Controls.Add(this.buttonEinstellung); @@ -1060,6 +1067,7 @@ this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormExpedit_FormClosing); this.Load += new System.EventHandler(this.FormExpedit_Load); + this.Shown += new System.EventHandler(this.FormExpedit_Shown); this.Resize += new System.EventHandler(this.FormExpedit_Resize); this.groupBoxEtikett.ResumeLayout(false); this.groupBoxEtikett.PerformLayout(); @@ -1139,7 +1147,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn FehlmengeBearbeitet; private System.Windows.Forms.DataGridViewTextBoxColumn KorrekturBearbeitet; private System.Windows.Forms.Button buttonSuchen; - private System.Windows.Forms.Button buttonNW; + private System.Windows.Forms.Button buttonReklamation; private System.Windows.Forms.TabPage tabPageGeschaeft; private BrightIdeasSoftware.ObjectListView objectListViewGeschaeft; private System.Windows.Forms.DataVisualization.Charting.Chart chartFehlmenge; diff --git a/AA-Forms/FormExpedit.cs b/AA-Forms/FormExpedit.cs index 8efa94f..b3430d3 100644 --- a/AA-Forms/FormExpedit.cs +++ b/AA-Forms/FormExpedit.cs @@ -85,7 +85,7 @@ namespace Deckungsbeitrag private void FormExpedit_Load(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; - //this.Visible = false; + this.Visible = false; this.SuspendLayout(); _settings.Load(); @@ -110,6 +110,11 @@ namespace Deckungsbeitrag if (geschaeftlist.Count == 0) { this.tabControlAuftragList.TabPages.Remove(tabPageGeschaeft); } else { OLV_Load(this.objectListViewGeschaeft, geschaeftlist); if (this.tabControlAuftragList.TabPages.Count < 2) this.tabControlAuftragList.TabPages.Insert(1, tabPageGeschaeft); } + // Controls aktivieren und deaktivieren nach BenutzerRolle + Enable_Controls(); + + this.Visible = true; + })); } catch (Exception ex) @@ -120,8 +125,6 @@ namespace Deckungsbeitrag } }); - // Controls aktivieren und deaktivieren nach BenutzerRolle - Enable_Controls(); //TODO: Wenn GroupBox nicht notwendig, dann löschen. //Load_Etikett_GroupBox(); @@ -132,12 +135,6 @@ namespace Deckungsbeitrag if (this.kunde != null) Funktionen.Get_RadioButtons(this.groupBoxEtikett); - - this.ResumeLayout(); - //this.Visible = true; - this.Cursor = Cursors.Default; - WindowState = FormWindowState.Maximized; - } @@ -173,7 +170,8 @@ namespace Deckungsbeitrag case BenutzerRolle.Expedit: break; case BenutzerRolle.Frottee: - this.buttonDrucken.Enabled = this.buttonNeuerAuftrag.Enabled = this.buttonSWS_Drucken.Enabled = false; + this.buttonDrucken.Visible = this.buttonNeuerAuftrag.Visible = this.buttonSWS_Drucken.Visible = false; + this.buttonStats.Visible = this.buttonEinstellung.Visible = this.buttonReklamation.Visible = false; // buttonReklamation einblenden wenn Frottee-Expedit auch Reklamation bearbeitet. this.groupBoxEtikett.Enabled = false; GetUnvisibleButtonColumn(); @@ -200,7 +198,14 @@ namespace Deckungsbeitrag try { await conn.OpenAsync(); - sonderlist = await Auftrag.GetExpeditListsAsync((int)AuftragTyp.Inventur, conn); + if (this.benutzer.Rolle == BenutzerRolle.Frottee) + { + sonderlist = await Auftrag.GetExpeditListsAsync((int)AuftragTyp.Inventur, conn, (int)AbteilungsStatus.FrotteeBegonnen); + } + else + { + sonderlist = await Auftrag.GetExpeditListsAsync((int)AuftragTyp.Inventur, conn, null); + } } finally { @@ -215,8 +220,16 @@ namespace Deckungsbeitrag try { await conn.OpenAsync(); - auftraglist = await Auftrag.GetAuftragListTodayAsync(DateTime.Today, conn, AuftragTyp.Standart); - geschaeftlist = await Auftrag.GetAuftragListTodayAsync(DateTime.Today, conn, AuftragTyp.Geschäft); + if (this.benutzer.Rolle == BenutzerRolle.Frottee) + { + auftraglist = await Auftrag.GetAuftragListTodayAsync(DateTime.Today, conn, AuftragTyp.Standart, (int)AbteilungsStatus.FrotteeBegonnen); + geschaeftlist = await Auftrag.GetAuftragListTodayAsync(DateTime.Today, conn, AuftragTyp.Geschäft, (int)AbteilungsStatus.FrotteeBegonnen); + } + else + { + auftraglist = await Auftrag.GetAuftragListTodayAsync(DateTime.Today, conn, AuftragTyp.Standart, null); + geschaeftlist = await Auftrag.GetAuftragListTodayAsync(DateTime.Today, conn, AuftragTyp.Geschäft, null); + } } finally { @@ -493,15 +506,230 @@ namespace Deckungsbeitrag } } - private void buttonNW_Click(object sender, EventArgs e) + private void buttonReklamation_Click(object sender, EventArgs e) { - if (dGArtikel.Visible) dGArtikel.Visible = false; - else dGArtikel.Visible = true; + FormFehlmengeCount reklamation = new FormFehlmengeCount(this.benutzer); + reklamation.ShowDialog(); } #endregion #region ObjectListView-Events + private void OLV_Load(ObjectListView olv, List auftraglist) + { + // Cursor auf Warte-Status setzen, um Benutzerfeedback zu geben + this.Cursor = Cursors.WaitCursor; + + // Layout- und Update-Änderungen pausieren, um Flackern zu verhindern + olv.SuspendLayout(); // Stoppt Layout-Berechnungen (Anchor/Dock) + + // SpaltenHeader-Design anpassen + //this.objectListViewAuftrag.HeaderFormatStyle = Funktionen.GetHeader(); + + // Automatisch alle Properties von Auftrag als Spalten generieren + Generator.GenerateColumns(olv, typeof(Auftrag), true); + + // ========== CHECKBOX COLUMNS FÜR ABTEILUNGEN =========== + // Spalten-Setup + var colFrottee = new OLVColumn("Frottee", "Frottee"); + colFrottee.Text = "FR"; + colFrottee.DisplayIndex = 6; + colFrottee.TextAlign = HorizontalAlignment.Center; + colFrottee.Width = 50; + colFrottee.AspectGetter = row => { + var auftrag = (Auftrag)row; + int abteilungen = (int)auftrag.Abteilungen; + + bool begonnen = (abteilungen & (int)AbteilungsStatus.FrotteeBegonnen) != 0; + bool beendet = (abteilungen & (int)AbteilungsStatus.FrotteeBeendet) != 0; + + if (beendet) return "☑"; // Status 1 ✓ + if (begonnen) return "☐"; // Status 2 ✓ + return "☒"; // Status 0 ✓ + }; + + + var colKleinteile = new OLVColumn("Kleinteile", "Kleinteile"); + colKleinteile.Text = "KT"; + colKleinteile.DisplayIndex = 7; + colKleinteile.TextAlign = HorizontalAlignment.Center; + colKleinteile.Width = 50; + colKleinteile.AspectGetter = row => { + var auftrag = (Auftrag)row; + int abteilungen = (int)auftrag.Abteilungen; + + bool begonnen = (abteilungen & (int)AbteilungsStatus.KleinteileBegonnen) != 0; + bool beendet = (abteilungen & (int)AbteilungsStatus.KleinteileBeendet) != 0; + + if (beendet) return "☑"; // Status 1 ✓ + if (begonnen) return "☐"; // Status 2 ✓ + return "☒"; // Status 0 ✓ + }; + + + var colGrosseTeile = new OLVColumn("Großteile", "Großteile"); + colGrosseTeile.Text = "GT"; + colGrosseTeile.DisplayIndex = 8; + colGrosseTeile.TextAlign = HorizontalAlignment.Center; + colGrosseTeile.Width = 50; + colGrosseTeile.AspectGetter = row => { + var auftrag = (Auftrag)row; + int abteilungen = (int)auftrag.Abteilungen; + + bool begonnen = (abteilungen & (int)AbteilungsStatus.GrossteileBegonnen) != 0; + bool beendet = (abteilungen & (int)AbteilungsStatus.GrossteileBeendet) != 0; + + if (beendet) return "☑"; // Status 1 ✓ + if (begonnen) return "☐"; // Status 2 ✓ + return "☒"; // Status 0 ✓ + }; + + + olv.AllColumns.Add(colFrottee); + olv.AllColumns.Add(colKleinteile); + olv.AllColumns.Add(colGrosseTeile); + + // ========== COLUMNS DURCHLAUFEN =========== + foreach (OLVColumn col in olv.AllColumns) + { + switch (col.Text) + { + case "Abschließen": // Abschließen Spalte als Button-Spalte konfigurieren + + OLVColumn fertigColumn = col; + fertigColumn.DisplayIndex = 11; + fertigColumn.IsButton = true; // Als Button rendern + fertigColumn.ButtonSizing = OLVColumn.ButtonSizingMode.CellBounds; // Button füllt gesamte Zelle + fertigColumn.HeaderImageKey = "abschließen"; + fertigColumn.ShowTextInHeader = false; + fertigColumn.MinimumWidth = fertigColumn.MaximumWidth = 80; + break; + case "Etikett": // Etikett Spalte als Button-Spalte konfigurieren + OLVColumn etikettColumn = col; + etikettColumn.DisplayIndex = 10; + etikettColumn.IsButton = true; // Als Button rendern + etikettColumn.ButtonSizing = OLVColumn.ButtonSizingMode.CellBounds; // Button füllt gesamte Zelle + etikettColumn.HeaderImageKey = "print"; + etikettColumn.ShowTextInHeader = false; + etikettColumn.MinimumWidth = etikettColumn.MaximumWidth = 80; + break; + case "Aufgabe": // Aufgabe Spalte als Icon-Spalte: zeigt Icon wenn AufgabeID vorhanden + OLVColumn iconColumn = col; + iconColumn.DisplayIndex = 9; + iconColumn.ImageGetter = rowObject => + { + var auftrag = rowObject as Auftrag; + if (auftrag.AufgabeID == null) return null; // null = kein Icon anzeigen + else return 0; // Index 0 aus SmallImageList + }; + break; + case "Kunde": // Kunde Spalte als Icon-Spalte: zeigt Icon und Kundename wenn Anmerkung vorhanden + OLVColumn iColumn = col; + iColumn.DisplayIndex = 0; + iColumn.ImageGetter = rowObject => + { + var _auftrag = rowObject as Auftrag; + if (string.IsNullOrWhiteSpace(Kunde.GetKunde(null, _auftrag.KundeID, null).Anmerkung)) return null; // null = kein Icon anzeigen + else return 1; // Index 0 aus SmallImageList + }; + break; + case "Liefertag": // Liefertag Spalte Zeigt Liefertag als String an. + OLVColumn dateColumn = col; + dateColumn.DisplayIndex = 1; + dateColumn.AspectToStringFormat = "{0:ddd dd.MM.}"; + // DateTime-Filter für Spalte 2 + dateColumn.ClusteringStrategy = new DateTimeClusteringStrategy(DateTimePortion.Day, "ddd dd.MM."); // DateTimeClustering damit Datum gefiltert werden kann + olv.SecondarySortColumn = dateColumn; // Primary Sortiert nach Spalte 5 (Status) Secundary Sortiert nach Spalte 2 (Liefertag) + break; + case "Status": // Spalte 5 als primäre Sortier-Spalte festlegen (nach Datenbindung!) + OLVColumn sortcolumn = col; + sortcolumn.DisplayIndex = 4; + olv.PrimarySortColumn = sortcolumn; // Primary Sortiert nach Spalte 5 (Status) Secundary Sortiert nach Spalte 2 (Liefertag) + break; + case "Auswählen": + col.IsVisible = false; + break; + case "Erstellt": + col.IsVisible = false; + break; + case "Gedruckt": + col.IsVisible = false; + break; + case "Erledigt": + col.IsVisible = false; + break; + case "schmutzig": + col.HeaderImageKey = "dirt"; + col.ShowTextInHeader = false; + col.MinimumWidth = col.MaximumWidth = 80; + col.DisplayIndex = 2; + break; + case "sauber": + col.HeaderImageKey = "clean"; + col.ShowTextInHeader = false; + col.MinimumWidth = col.MaximumWidth = 80; + col.DisplayIndex = 3; + break; + default: + break; + } + + } + //TODO: Reihenfolge Spalten richtig stellen. + //TODO: OLV State speichern. + + olv.RebuildColumns(); + if (_settings.OLV_State != null) olv.RestoreState(_settings.OLV_State); + + // ========== IMAGE-LIST ZUWEISEN ========== + // SmallImageList für Icons in Detail-View (24x24 Pixel standard) + Program.imagelist.ImageSize = new Size(24, 24); + olv.SmallImageList = Program.imagelist; // Voraussetzung: imagelist mit Icon Index 0 gefüllt + + // ========== TOOLTIP FÜR ICON-SPALTEN ========== + // Automatischer Cell-Tooltip bei Mouse-Hover über Spalte 10 und 1 + olv.CellToolTipShowing += (s, e) => + { + // Nur für Icon-Spalte (Index 10) und gültiges Model + if (e.Column.Text == "Aufgabe" && e.Model is Auftrag auftrag) + { + // Lade Bezeichnung der Aufgabe als Tooltip-Text + e.Text = Aufgabe.GetAufgabe(null, auftrag.AufgabeID).Bezeichnung; + } + // Nur für Icon-Spalte (Index 1) und gültiges Model + if (e.Column.Text == "Kunde" && e.Model is Auftrag _auftrag) + { + if (!string.IsNullOrWhiteSpace(Kunde.GetKunde(null, _auftrag.KundeID, null).Anmerkung)) + { + // Lade Anmerkung als Tooltip-Text + e.Text = Kunde.GetKunde(null, _auftrag.KundeID, null).Anmerkung; + } + } + //TODO: Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? + if (e.Column.Text == "Fahrer" && e.Model is Auftrag auftrag1) + { + e.Text = auftrag1.ZusatzInfo; + } + }; + + // ========== DATEN LADEN ========== + // WICHTIG: SetObjects NACH Column-Konfiguration aufrufen! + OLV_SetObjects(olv, auftraglist); + olv.RefreshObjects(auftraglist); + // ========== SORTIERUNG ========== + olv.Sort(); + + // ========== SPALTEN ANPASSEN ========== + Funktionen.Columns_Resize(olv); // Externe Funktion für responsive Spaltenbreiten + + olv.FilterMenuBuildStrategy = new MeinFilterMenu(); + // ========== AUFRÄUMEN & AKTIVIEREN ========== + olv.ResumeLayout(); // Layout-Pause beenden, Positionen neu berechnen + olv.Focus(); // OLV fokussieren (Tastaturbedienung aktivieren) + + // Cursor zurücksetzen + this.Cursor = Cursors.Default; + } private void objectListViewAuftrag_FormatCell(object sender, FormatCellEventArgs e) { @@ -520,6 +748,27 @@ namespace Deckungsbeitrag } } + if (e.Column.Text == "FR" || e.Column.Text == "KT" || e.Column.Text == "GT") + { + if (e.CellValue.ToString() == "☑") + { + e.SubItem.Font = new Font("Segoe UI Symbol", 14F, FontStyle.Bold); + e.SubItem.ForeColor = Color.YellowGreen; + } + if (e.CellValue.ToString() == "☐") + { + e.SubItem.Font = new Font("Segoe UI Symbol", 14F, FontStyle.Bold); + e.SubItem.ForeColor = Color.Yellow; + } + if (e.CellValue.ToString() == "☒") + { + e.SubItem.Font = new Font("Segoe UI Symbol", 14F, FontStyle.Bold); + e.SubItem.ForeColor = Color.Red; + } + + } + + } private async void objectListViewAuftrag_CellClick(object sender, CellClickEventArgs e) { @@ -621,7 +870,7 @@ namespace Deckungsbeitrag break; } } - private async void objectListViewAuftrag_ButtonClick(object sender, BrightIdeasSoftware.CellClickEventArgs e) + private void objectListViewAuftrag_ButtonClick(object sender, BrightIdeasSoftware.CellClickEventArgs e) { Cursor.Current = Cursors.WaitCursor; @@ -634,6 +883,7 @@ namespace Deckungsbeitrag this.auftrag = _auftrag; //Load_Etikett_GroupBox(); + if (this.benutzer.Rolle == BenutzerRolle.Frottee) { Auftrag_Fertig(); Neuladen_OLV(olv); return; } if (this.auftrag.ContainerClean == 0) { switch (this.auftrag.Typ) @@ -768,11 +1018,7 @@ namespace Deckungsbeitrag } } - // Neu-Laden der ObjectListView - await GetAuftraege(); - if (olv.Name.Contains("Sonder")) OLV_SetObjects(olv, sonderlist); - if (olv.Name.Contains("Geschaeft")) OLV_SetObjects(olv, geschaeftlist); - if (olv.Name.Contains("Auftrag")) OLV_SetObjects(olv, auftraglist); + Neuladen_OLV(olv); // DataGridView ausblenden. this.dGArtikel.DataSource = null; @@ -781,203 +1027,35 @@ namespace Deckungsbeitrag this.Cursor = Cursors.Default; } - private void OLV_Load(ObjectListView olv, List auftraglist) - { - // Cursor auf Warte-Status setzen, um Benutzerfeedback zu geben - this.Cursor = Cursors.WaitCursor; - - // Layout- und Update-Änderungen pausieren, um Flackern zu verhindern - olv.SuspendLayout(); // Stoppt Layout-Berechnungen (Anchor/Dock) - - // SpaltenHeader-Design anpassen - //this.objectListViewAuftrag.HeaderFormatStyle = Funktionen.GetHeader(); - - // Automatisch alle Properties von Auftrag als Spalten generieren - Generator.GenerateColumns(olv, typeof(Auftrag), true); - - // ========== CHECKBOX COLUMNS FÜR ABTEILUNGEN =========== - // Spalten-Setup - var colFrottee = new OLVColumn("Frottee", "Frottee"); - colFrottee.Text = "FR"; - colFrottee.DisplayIndex = 6; - colFrottee.TextAlign = HorizontalAlignment.Center; - colFrottee.CheckBoxes = true; - colFrottee.Width = 50; - colFrottee.AspectGetter = row => ((Auftrag)row).Abteilungen.HasFlag(AbteilungsStatus.Frottee); - - var colKleinteile = new OLVColumn("Kleinteile", "Kleinteile"); - colKleinteile.Text = "KT"; - colKleinteile.DisplayIndex = 7; - colKleinteile.TextAlign = HorizontalAlignment.Center; - colKleinteile.CheckBoxes = true; - colKleinteile.Width = 50; - colKleinteile.AspectGetter = row => ((Auftrag)row).Abteilungen.HasFlag(AbteilungsStatus.Kleinteile); - - var colGrosseTeile = new OLVColumn("Großteile", "Großteile"); - colGrosseTeile.Text = "GT"; - colGrosseTeile.DisplayIndex = 8; - colGrosseTeile.TextAlign = HorizontalAlignment.Center; - colGrosseTeile.CheckBoxes = true; - colGrosseTeile.Width = 50; - colGrosseTeile.AspectGetter = row => ((Auftrag)row).Abteilungen.HasFlag(AbteilungsStatus.Großteile); - - olv.AllColumns.Add(colFrottee); - olv.AllColumns.Add(colKleinteile); - olv.AllColumns.Add(colGrosseTeile); - - // ========== COLUMNS DURCHLAUFEN =========== - foreach (OLVColumn col in olv.AllColumns) - { - switch (col.Text) - { - case "Abschließen": // Abschließen Spalte als Button-Spalte konfigurieren - - OLVColumn fertigColumn = col; - fertigColumn.DisplayIndex = 11; - fertigColumn.IsButton = true; // Als Button rendern - fertigColumn.ButtonSizing = OLVColumn.ButtonSizingMode.CellBounds; // Button füllt gesamte Zelle - fertigColumn.HeaderImageKey = "abschließen"; - fertigColumn.ShowTextInHeader = false; - fertigColumn.MinimumWidth = fertigColumn.MaximumWidth = 80; - break; - case "Etikett": // Etikett Spalte als Button-Spalte konfigurieren - OLVColumn etikettColumn = col; - etikettColumn.DisplayIndex = 10; - etikettColumn.IsButton = true; // Als Button rendern - etikettColumn.ButtonSizing = OLVColumn.ButtonSizingMode.CellBounds; // Button füllt gesamte Zelle - etikettColumn.HeaderImageKey = "print"; - etikettColumn.ShowTextInHeader = false; - etikettColumn.MinimumWidth = etikettColumn.MaximumWidth = 80; - break; - case "Aufgabe": // Aufgabe Spalte als Icon-Spalte: zeigt Icon wenn AufgabeID vorhanden - OLVColumn iconColumn = col; - iconColumn.DisplayIndex = 9; - iconColumn.ImageGetter = rowObject => - { - var auftrag = rowObject as Auftrag; - if (auftrag.AufgabeID == null) return null; // null = kein Icon anzeigen - else return 0; // Index 0 aus SmallImageList - }; - break; - case "Kunde": // Kunde Spalte als Icon-Spalte: zeigt Icon und Kundename wenn Anmerkung vorhanden - OLVColumn iColumn = col; - iColumn.DisplayIndex = 0; - iColumn.ImageGetter = rowObject => - { - var _auftrag = rowObject as Auftrag; - if (string.IsNullOrWhiteSpace(Kunde.GetKunde(null, _auftrag.KundeID, null).Anmerkung)) return null; // null = kein Icon anzeigen - else return 1; // Index 0 aus SmallImageList - }; - break; - case "Liefertag": // Liefertag Spalte Zeigt Liefertag als String an. - OLVColumn dateColumn = col; - dateColumn.DisplayIndex = 1; - dateColumn.AspectToStringFormat = "{0:ddd dd.MM.}"; - // DateTime-Filter für Spalte 2 - dateColumn.ClusteringStrategy = new DateTimeClusteringStrategy(DateTimePortion.Day, "ddd dd.MM."); // DateTimeClustering damit Datum gefiltert werden kann - olv.SecondarySortColumn = dateColumn; // Primary Sortiert nach Spalte 5 (Status) Secundary Sortiert nach Spalte 2 (Liefertag) - break; - case "Status": // Spalte 5 als primäre Sortier-Spalte festlegen (nach Datenbindung!) - OLVColumn sortcolumn = col; - sortcolumn.DisplayIndex = 4; - olv.PrimarySortColumn = sortcolumn; // Primary Sortiert nach Spalte 5 (Status) Secundary Sortiert nach Spalte 2 (Liefertag) - break; - case "Auswählen": - col.IsVisible = false; - break; - case "Erstellt": - col.IsVisible = false; - break; - case "Gedruckt": - col.IsVisible = false; - break; - case "Erledigt": - col.IsVisible = false; - break; - case "schmutzig": - col.HeaderImageKey = "dirt"; - col.ShowTextInHeader = false; - col.MinimumWidth = col.MaximumWidth = 80; - col.DisplayIndex = 2; - break; - case "sauber": - col.HeaderImageKey = "clean"; - col.ShowTextInHeader = false; - col.MinimumWidth = col.MaximumWidth = 80; - col.DisplayIndex = 3; - break; - default: - break; - } - - } - //TODO: Reihenfolge Spalten richtig stellen. - //TODO: OLV State speichern. - - olv.RebuildColumns(); - if (_settings.OLV_State != null) olv.RestoreState(_settings.OLV_State); - - // ========== IMAGE-LIST ZUWEISEN ========== - // SmallImageList für Icons in Detail-View (24x24 Pixel standard) - Program.imagelist.ImageSize = new Size(24, 24); - olv.SmallImageList = Program.imagelist; // Voraussetzung: imagelist mit Icon Index 0 gefüllt - - // ========== TOOLTIP FÜR ICON-SPALTEN ========== - // Automatischer Cell-Tooltip bei Mouse-Hover über Spalte 10 und 1 - olv.CellToolTipShowing += (s, e) => - { - // Nur für Icon-Spalte (Index 10) und gültiges Model - if (e.Column.Text == "Aufgabe" && e.Model is Auftrag auftrag) - { - // Lade Bezeichnung der Aufgabe als Tooltip-Text - e.Text = Aufgabe.GetAufgabe(null, auftrag.AufgabeID).Bezeichnung; - } - // Nur für Icon-Spalte (Index 1) und gültiges Model - if (e.Column.Text == "Kunde" && e.Model is Auftrag _auftrag) - { - if (!string.IsNullOrWhiteSpace(Kunde.GetKunde(null, _auftrag.KundeID, null).Anmerkung)) - { - // Lade Anmerkung als Tooltip-Text - e.Text = Kunde.GetKunde(null, _auftrag.KundeID, null).Anmerkung; - } - } - //TODO: Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? - if (e.Column.Text == "Fahrer" && e.Model is Auftrag auftrag1) - { - e.Text = auftrag1.ZusatzInfo; - } - }; - - // ========== DATEN LADEN ========== - // WICHTIG: SetObjects NACH Column-Konfiguration aufrufen! - OLV_SetObjects(olv, auftraglist); - - // ========== SORTIERUNG ========== - olv.Sort(); - - // ========== SPALTEN ANPASSEN ========== - Funktionen.Columns_Resize(olv); // Externe Funktion für responsive Spaltenbreiten - - olv.FilterMenuBuildStrategy = new MeinFilterMenu(); - // ========== AUFRÄUMEN & AKTIVIEREN ========== - olv.ResumeLayout(); // Layout-Pause beenden, Positionen neu berechnen - olv.Focus(); // OLV fokussieren (Tastaturbedienung aktivieren) - - // Cursor zurücksetzen - this.Cursor = Cursors.Default; - } private void OLV_SetObjects(ObjectListView olv, List auftraglist) { olv.BeginUpdate(); // Stoppt Datenaktualisierungen/Redraws olv.SetObjects(auftraglist); // Bindet die Auftragsliste an die View olv.EndUpdate(); // Update-Pause beenden, Daten neu zeichnen } + private async void Neuladen_OLV(ObjectListView olv) + { + // Neu-Laden der ObjectListView + await GetAuftraege(); + if (olv.Name.Contains("Sonder")) OLV_SetObjects(olv, sonderlist); + if (olv.Name.Contains("Geschaeft")) OLV_SetObjects(olv, geschaeftlist); + if (olv.Name.Contains("Auftrag")) OLV_SetObjects(olv, auftraglist); + + } + /// /// Blendet die Button Spalten aus wenn der User dazu nicht berechtigt ist. /// private void GetUnvisibleButtonColumn() { - foreach (OLVColumn col in this.objectListViewAuftrag.Columns) if (col.IsButton) col.IsVisible = false; + foreach (OLVColumn col in this.objectListViewAuftrag.Columns) + { + if (this.benutzer.Rolle == BenutzerRolle.Frottee) + { + if (col.Text == "Etikett" & col.IsButton) col.IsVisible = false; + } + else if (col.IsButton) col.IsVisible = false; + } } private void objectListViewAuftrag_CellEditFinished(object sender, CellEditEventArgs e) { @@ -1046,7 +1124,8 @@ namespace Deckungsbeitrag /// private void Auftrag_Fertig() { - this.auftrag.Status = AuftragStatus.Fertig; + if (this.benutzer.Rolle == BenutzerRolle.Frottee) this.auftrag.Abteilungen |= AbteilungsStatus.FrotteeBeendet; + else this.auftrag.Status = AuftragStatus.Fertig; this.auftrag.Save(); this.auftrag = null; this.dGArtikel.Visible = false; @@ -1318,9 +1397,18 @@ namespace Deckungsbeitrag Funktionen.GetGroupBoxBoarder(groupBoxKndInfo, e); } + private void FormExpedit_Shown(object sender, EventArgs e) + { + this.ResumeLayout(); + this.Cursor = Cursors.Default; + WindowState = FormWindowState.Maximized; + } } } //INSTALL-REMINDER: Spalte Abteilungen in Auftrag muss in Wirl_DB_17012023 eingefügt werden. +//CHANGES: Expedit hat Button für Reklamation statt Nachwäsche. Dadurch kann Mirka die Reklamation bearbeiten und eingeben. (AKTUELL NUR MIRKA) +//CHANGES: Frottee Expedit zeigt Aufträge die bei Frottee nicht Beendet wurden. +//CHANGES: Frottee Expedit alle Buttons werden ausgeblendet. //CHANGES: Chart statt GridView für Fehlmengen. //CHANGES: Bei DoppelClick auf Kundename wird KundenVW geöffnet. //CHANGES: Es wird der zuständige Fahrer angezeigt. ToolTip zeigt den Grund falls vorhanden(Bei Sonderzuteilung). diff --git a/AA-Forms/FormExpedit.resx b/AA-Forms/FormExpedit.resx index 1d9ef7c..1b1f7ae 100644 --- a/AA-Forms/FormExpedit.resx +++ b/AA-Forms/FormExpedit.resx @@ -162,6 +162,36 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + AAABAAEAAAAAAAEAIAC5FQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAAAFv diff --git a/AA-Forms/FormFehlmengeCount.cs b/AA-Forms/FormFehlmengeCount.cs index eff993a..020c697 100644 --- a/AA-Forms/FormFehlmengeCount.cs +++ b/AA-Forms/FormFehlmengeCount.cs @@ -12,6 +12,7 @@ using System.Text; using System.Threading.Tasks; using System.Web.UI.WebControls.WebParts; using System.Windows.Forms; +using ZXing; namespace Deckungsbeitrag { @@ -22,6 +23,7 @@ namespace Deckungsbeitrag Auftrag auftrag; List artikelListe; Meldungen meldung = new Meldungen(); + private Benutzer benutzer; private List auftragsliste; string userid; @@ -37,7 +39,7 @@ namespace Deckungsbeitrag } public FormFehlmengeCount(Benutzer ben) : this() { - //benutzer = ben; + this.benutzer = ben; } public FormFehlmengeCount(string uid) : this() { @@ -98,15 +100,25 @@ namespace Deckungsbeitrag this.artikelListe = KundeArtikel.GetList(kunde.KundeID.ToString()); this.textBoxScann.Text = this.kunde.KundeNummer; this.textBoxScann.Enabled = false; - GroupBox_Load(); + if (userid.Contains("reklamation") || (this.benutzer != null && this.benutzer.Rolle == BenutzerRolle.Expedit)) Reklamation_GroupBox(); + else GroupBox_Load(); - if(kunde.Aufgabe != null) + if (kunde.Aufgabe != null) { string n = kunde.Suchtext == null ? kunde.KundeName : kunde.Suchtext; meldung.GetInfo(this, $"Bei Kunde {n} solltest du folgendes beachten: {Aufgabe.GetAufgabe(null, kunde.Aufgabe).Bezeichnung}", false); } } + if(this.benutzer == null || !userid.Contains("reklamation")) + { + // AbteilungsStatus Begonnen wird hier gesetzt. + if (userid.Contains("kleinteile")) { auftrag.Abteilungen |= AbteilungsStatus.KleinteileBegonnen; auftrag.Save(); } + if (userid.Contains("grossteile")) { auftrag.Abteilungen |= AbteilungsStatus.GrossteileBegonnen; auftrag.Save(); } + if (userid.Contains("frottee")) { auftrag.Abteilungen |= AbteilungsStatus.FrotteeBegonnen; auftrag.Save(); } + + } + CloseKeyboard(); } @@ -284,6 +296,51 @@ namespace Deckungsbeitrag } } + private void Reklamation_GroupBox() + { + this.groupBoxArtikel.Controls.Clear(); + FlowLayoutPanel flowPanel = new FlowLayoutPanel + { + Dock = DockStyle.Fill, + FlowDirection = FlowDirection.LeftToRight, + WrapContents = true, + AutoSize = true + }; + this.groupBoxArtikel.Controls.Add(flowPanel); + + foreach (KundeArtikel artikel in artikelListe) + { + int index = artikel.ArtikelName.IndexOf(" "); + string name = string.Empty; + if (index > 0) name = artikel.ArtikelName.Substring(0, index) + "\n" + artikel.ArtikelName.Substring(index); + else name = artikel.ArtikelName; + Button btn = new Button + { + Text = name, + Tag = artikel, + Name = $"btn_{artikel.ArtikelNR}", + AutoSize = true, + Margin = new Padding(5), + BackColor = Color.Turquoise, + ForeColor = Color.Black, + }; + btn.Click += Button_Click; + btn.MouseUp += Button_MouseUp; + btn.MouseDown += Button_MouseDown; + + flowPanel.Controls.Add(btn); + } + int buttons = flowPanel.Controls.OfType