From 269f94c03af61f20160a851f97f6d0b4c2d74ac4 Mon Sep 17 00:00:00 2001 From: Kilian Wirl Date: Tue, 24 Mar 2026 18:41:29 +0100 Subject: [PATCH] =?UTF-8?q?Vorbereiten=20f=C3=BCr=20Vollbetrieb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AA-Forms/FormAufleger.cs | 7 +- AA-Forms/FormAuftragDetail.Designer.cs | 438 ++-- AA-Forms/FormAuftragDetail.cs | 294 ++- AA-Forms/FormAuftragDetail.resx | 119 +- AA-Forms/FormBenutzerVW.Designer.cs | 1 - AA-Forms/FormBenutzerVW.cs | 62 +- AA-Forms/FormExpedit.Designer.cs | 890 +++---- AA-Forms/FormExpedit.cs | 920 ++++---- AA-Forms/FormExpedit.resx | 30 - AA-Forms/FormFehlmengeCount.cs | 35 +- AA-Forms/FormKundeVW.cs | 7 +- AA-Forms/FormListe.cs | 50 +- AA-Forms/FormLogin.cs | 5 +- AA-Forms/FormMain.Designer.cs | 314 +-- AA-Forms/FormMain.cs | 888 ++++--- AA-Forms/FormNeuerAuftrag.Designer.cs | 260 +-- AA-Forms/FormNeuerAuftrag.cs | 186 +- AA-Forms/FormNeuerAuftrag.resx | 30 + AA-Forms/FormOnBoarding.Designer.cs | 215 ++ AA-Forms/FormOnBoarding.cs | 223 ++ AA-Forms/FormOnBoarding.resx | 219 ++ AA-Forms/FormShowGroupBox.Designer.cs | 56 + AA-Forms/FormShowGroupBox.cs | 92 + AA-Forms/FormShowGroupBox.resx | 219 ++ AA-Klassen/Artikel.cs | 13 + AA-Klassen/Auftrag.cs | 133 +- AA-Klassen/AuftragArtikel.cs | 21 +- AA-Klassen/Benutzer.cs | 57 +- AA-Klassen/Funktionen.cs | 183 +- AA-Klassen/Kunde.cs | 21 +- AA-Klassen/KundeArtikel.cs | 42 +- Program.cs | 38 +- Properties/AssemblyInfo.cs | 4 +- SetupVerwaltung/SetupVerwaltung.vdproj | 6 +- UserControls/UCArtikel.cs | 11 +- UserControls/UCAuftragListe.Designer.cs | 162 ++ UserControls/UCAuftragListe.cs | 390 ++++ UserControls/UCAuftragListe.resx | 120 + UserControls/UCAuftragSuchen.Designer.cs | 194 ++ UserControls/UCAuftragSuchen.cs | 102 + UserControls/UCAuftragSuchen.resx | 120 + UserControls/UCStatistik.Designer.cs | 294 +++ UserControls/UCStatistik.cs | 95 + UserControls/UCStatistik.resx | 120 + UserSettingsManager.cs | 3 +- Verwaltung.csproj | 54 +- Verwaltung_ReadMe.txt | 44 +- db_schema.sql | 2689 ++++++++++++++++++++++ 48 files changed, 7947 insertions(+), 2529 deletions(-) create mode 100644 AA-Forms/FormOnBoarding.Designer.cs create mode 100644 AA-Forms/FormOnBoarding.cs create mode 100644 AA-Forms/FormOnBoarding.resx create mode 100644 AA-Forms/FormShowGroupBox.Designer.cs create mode 100644 AA-Forms/FormShowGroupBox.cs create mode 100644 AA-Forms/FormShowGroupBox.resx create mode 100644 UserControls/UCAuftragListe.Designer.cs create mode 100644 UserControls/UCAuftragListe.cs create mode 100644 UserControls/UCAuftragListe.resx create mode 100644 UserControls/UCAuftragSuchen.Designer.cs create mode 100644 UserControls/UCAuftragSuchen.cs create mode 100644 UserControls/UCAuftragSuchen.resx create mode 100644 UserControls/UCStatistik.Designer.cs create mode 100644 UserControls/UCStatistik.cs create mode 100644 UserControls/UCStatistik.resx create mode 100644 db_schema.sql diff --git a/AA-Forms/FormAufleger.cs b/AA-Forms/FormAufleger.cs index 6d7449a..ba83bfd 100644 --- a/AA-Forms/FormAufleger.cs +++ b/AA-Forms/FormAufleger.cs @@ -206,11 +206,6 @@ namespace Deckungsbeitrag private void FormAufleger_Shown(object sender, EventArgs e) { - - - - - this.ResumeLayout(true); this.Cursor = Cursors.Default; @@ -262,7 +257,7 @@ namespace Deckungsbeitrag else kunde = Kunde.GetKunde(null, null, textBoxScan.Text); } - List auftList = Auftrag.FindeAuftragVonKunde(kunde, zusatz); + List auftList = Auftrag.FindeAuftragVonKunde(kunde, zusatz, null, (DateTime?)null); if (auftList.Count == 0) { meldung.GetFehler(this, "Es konnte kein Auftrag zum eingescannten Kunden gefunden werden.\nBitte Informiere deinen Vorgesetzten."); return; } // Alten Auftrag Speichern (Status Gewaschen) wenn neuer Auftrag gefunden wurde. diff --git a/AA-Forms/FormAuftragDetail.Designer.cs b/AA-Forms/FormAuftragDetail.Designer.cs index 15c87a6..42a939c 100644 --- a/AA-Forms/FormAuftragDetail.Designer.cs +++ b/AA-Forms/FormAuftragDetail.Designer.cs @@ -37,29 +37,29 @@ this.textBoxZusatz = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.listViewDavor = new System.Windows.Forms.ListView(); - this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.listViewDanach = new System.Windows.Forms.ListView(); - this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.pictureBoxMinus = new System.Windows.Forms.PictureBox(); this.pictureBoxPlus = new System.Windows.Forms.PictureBox(); this.labelContainer = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); - this.labelContDirt = new System.Windows.Forms.Label(); this.buttonSWS = new System.Windows.Forms.Button(); - this.listViewArtikel = new System.Windows.Forms.ListView(); this.buttonSpeichern = new System.Windows.Forms.Button(); + this.label7 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.comboBoxPriority = new System.Windows.Forms.ComboBox(); + this.comboBoxFahrer = new System.Windows.Forms.ComboBox(); + this.pictureBoxDirtMinus = new System.Windows.Forms.PictureBox(); + this.pictureBoxDirtPlus = new System.Windows.Forms.PictureBox(); + this.labelContDirt = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.oLVArtikel = new BrightIdeasSoftware.ObjectListView(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxDirtMinus)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxDirtPlus)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.oLVArtikel)).BeginInit(); this.SuspendLayout(); // // dTPLiefertag @@ -67,12 +67,11 @@ this.dTPLiefertag.CustomFormat = "dddd dd.MM.yyyy"; this.dTPLiefertag.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right; this.dTPLiefertag.Enabled = false; - this.dTPLiefertag.Font = new System.Drawing.Font("Microsoft Sans Serif", 19.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + 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(15, 17); - this.dTPLiefertag.Margin = new System.Windows.Forms.Padding(2); + this.dTPLiefertag.Location = new System.Drawing.Point(138, 171); this.dTPLiefertag.Name = "dTPLiefertag"; - this.dTPLiefertag.Size = new System.Drawing.Size(388, 37); + this.dTPLiefertag.Size = new System.Drawing.Size(390, 29); this.dTPLiefertag.TabIndex = 1; // // labelKundeName @@ -80,8 +79,7 @@ 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(15, 70); - this.labelKundeName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.labelKundeName.Location = new System.Drawing.Point(12, 45); this.labelKundeName.Name = "labelKundeName"; this.labelKundeName.Size = new System.Drawing.Size(179, 36); this.labelKundeName.TabIndex = 1; @@ -95,10 +93,9 @@ 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(419, 462); - this.buttonFertig.Margin = new System.Windows.Forms.Padding(2); + this.buttonFertig.Location = new System.Drawing.Point(322, 769); this.buttonFertig.Name = "buttonFertig"; - this.buttonFertig.Size = new System.Drawing.Size(200, 41); + this.buttonFertig.Size = new System.Drawing.Size(300, 63); this.buttonFertig.TabIndex = 14; this.buttonFertig.Text = "Auftrag abschließen"; this.buttonFertig.UseVisualStyleBackColor = false; @@ -112,10 +109,9 @@ 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(623, 462); - this.buttonAbbrechen.Margin = new System.Windows.Forms.Padding(2); + this.buttonAbbrechen.Location = new System.Drawing.Point(934, 769); this.buttonAbbrechen.Name = "buttonAbbrechen"; - this.buttonAbbrechen.Size = new System.Drawing.Size(200, 41); + this.buttonAbbrechen.Size = new System.Drawing.Size(300, 63); this.buttonAbbrechen.TabIndex = 0; this.buttonAbbrechen.Text = "Abbrechen"; this.buttonAbbrechen.UseVisualStyleBackColor = false; @@ -124,12 +120,11 @@ // labelRegion // this.labelRegion.AutoSize = true; - this.labelRegion.Font = new System.Drawing.Font("Microsoft Sans Serif", 22.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + 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(15, 121); - this.labelRegion.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.labelRegion.Location = new System.Drawing.Point(132, 117); this.labelRegion.Name = "labelRegion"; - this.labelRegion.Size = new System.Drawing.Size(111, 36); + this.labelRegion.Size = new System.Drawing.Size(71, 24); this.labelRegion.TabIndex = 18; this.labelRegion.Text = "Region"; // @@ -139,149 +134,41 @@ | System.Windows.Forms.AnchorStyles.Right))); 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(502, 17); - this.textBoxZusatz.Margin = new System.Windows.Forms.Padding(2); + this.textBoxZusatz.Location = new System.Drawing.Point(24, 546); this.textBoxZusatz.Multiline = true; this.textBoxZusatz.Name = "textBoxZusatz"; - this.textBoxZusatz.Size = new System.Drawing.Size(315, 141); + this.textBoxZusatz.Size = new System.Drawing.Size(504, 201); this.textBoxZusatz.TabIndex = 20; // // label1 // this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + 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(417, 17); - this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label1.Location = new System.Drawing.Point(18, 512); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(83, 26); + this.label1.Size = new System.Drawing.Size(62, 20); this.label1.TabIndex = 21; this.label1.Text = "Zusatz:"; // // label2 // this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.Color.White; - this.label2.Location = new System.Drawing.Point(338, 66); - this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label2.Location = new System.Drawing.Point(18, 382); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(106, 26); + this.label2.Size = new System.Drawing.Size(82, 20); this.label2.TabIndex = 22; - this.label2.Text = "Container"; - // - // listViewDavor - // - this.listViewDavor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - this.listViewDavor.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader3, - this.columnHeader1, - this.columnHeader2, - this.columnHeader7}); - this.listViewDavor.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.listViewDavor.ForeColor = System.Drawing.Color.White; - this.listViewDavor.FullRowSelect = true; - this.listViewDavor.GridLines = true; - this.listViewDavor.HideSelection = false; - this.listViewDavor.Location = new System.Drawing.Point(15, 217); - this.listViewDavor.Margin = new System.Windows.Forms.Padding(2); - this.listViewDavor.Name = "listViewDavor"; - this.listViewDavor.Size = new System.Drawing.Size(396, 231); - this.listViewDavor.TabIndex = 23; - this.listViewDavor.UseCompatibleStateImageBehavior = false; - this.listViewDavor.View = System.Windows.Forms.View.Details; - // - // columnHeader3 - // - this.columnHeader3.Text = "Kunde Name"; - this.columnHeader3.Width = 150; - // - // columnHeader1 - // - this.columnHeader1.Text = "Region"; - this.columnHeader1.Width = 200; - // - // columnHeader2 - // - this.columnHeader2.Text = "Container"; - this.columnHeader2.Width = 150; - // - // columnHeader7 - // - this.columnHeader7.Text = "Status"; - // - // listViewDanach - // - this.listViewDanach.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - this.listViewDanach.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader4, - this.columnHeader5, - this.columnHeader6, - this.columnHeader8}); - this.listViewDanach.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.listViewDanach.ForeColor = System.Drawing.Color.White; - this.listViewDanach.FullRowSelect = true; - this.listViewDanach.GridLines = true; - this.listViewDanach.HideSelection = false; - this.listViewDanach.Location = new System.Drawing.Point(422, 218); - this.listViewDanach.Margin = new System.Windows.Forms.Padding(2); - this.listViewDanach.Name = "listViewDanach"; - this.listViewDanach.Size = new System.Drawing.Size(396, 231); - this.listViewDanach.TabIndex = 24; - this.listViewDanach.UseCompatibleStateImageBehavior = false; - this.listViewDanach.View = System.Windows.Forms.View.Details; - // - // columnHeader4 - // - this.columnHeader4.Text = "Kunde Name"; - this.columnHeader4.Width = 150; - // - // columnHeader5 - // - this.columnHeader5.Text = "Region"; - this.columnHeader5.Width = 200; - // - // columnHeader6 - // - this.columnHeader6.Text = "Container"; - this.columnHeader6.Width = 150; - // - // columnHeader8 - // - this.columnHeader8.Text = "Status"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.ForeColor = System.Drawing.Color.White; - this.label3.Location = new System.Drawing.Point(15, 189); - this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(160, 26); - this.label3.TabIndex = 25; - this.label3.Text = "Aufträge davor:"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.ForeColor = System.Drawing.Color.White; - this.label4.Location = new System.Drawing.Point(424, 189); - this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(177, 26); - this.label4.TabIndex = 26; - this.label4.Text = "Aufträge danach:"; + this.label2.Text = "Container:"; // // 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(283, 117); - this.pictureBoxMinus.Margin = new System.Windows.Forms.Padding(2); + this.pictureBoxMinus.Location = new System.Drawing.Point(138, 434); this.pictureBoxMinus.Name = "pictureBoxMinus"; - this.pictureBoxMinus.Size = new System.Drawing.Size(38, 41); + this.pictureBoxMinus.Size = new System.Drawing.Size(57, 63); this.pictureBoxMinus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxMinus.TabIndex = 30; this.pictureBoxMinus.TabStop = false; @@ -291,10 +178,9 @@ // 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(358, 117); - this.pictureBoxPlus.Margin = new System.Windows.Forms.Padding(2); + this.pictureBoxPlus.Location = new System.Drawing.Point(250, 434); this.pictureBoxPlus.Name = "pictureBoxPlus"; - this.pictureBoxPlus.Size = new System.Drawing.Size(38, 41); + this.pictureBoxPlus.Size = new System.Drawing.Size(57, 63); this.pictureBoxPlus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxPlus.TabIndex = 29; this.pictureBoxPlus.TabStop = false; @@ -305,10 +191,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(320, 117); - this.labelContainer.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.labelContainer.Location = new System.Drawing.Point(194, 434); this.labelContainer.Name = "labelContainer"; - this.labelContainer.Size = new System.Drawing.Size(38, 41); + this.labelContainer.Size = new System.Drawing.Size(57, 63); this.labelContainer.TabIndex = 28; this.labelContainer.Text = "0"; this.labelContainer.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -319,8 +204,7 @@ 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(316, 98); - this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label5.Location = new System.Drawing.Point(188, 405); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(52, 17); this.label5.TabIndex = 31; @@ -331,25 +215,12 @@ 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(420, 98); - this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label6.Location = new System.Drawing.Point(394, 405); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(71, 17); this.label6.TabIndex = 32; this.label6.Text = "schmutzig"; // - // labelContDirt - // - this.labelContDirt.AutoSize = true; - this.labelContDirt.Font = new System.Drawing.Font("Microsoft Sans Serif", 22.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelContDirt.ForeColor = System.Drawing.Color.White; - this.labelContDirt.Location = new System.Drawing.Point(438, 118); - this.labelContDirt.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.labelContDirt.Name = "labelContDirt"; - this.labelContDirt.Size = new System.Drawing.Size(32, 36); - this.labelContDirt.TabIndex = 33; - this.labelContDirt.Text = "0"; - // // buttonSWS // this.buttonSWS.Anchor = System.Windows.Forms.AnchorStyles.Bottom; @@ -358,69 +229,194 @@ 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(11, 462); - this.buttonSWS.Margin = new System.Windows.Forms.Padding(2); + this.buttonSWS.Location = new System.Drawing.Point(16, 769); this.buttonSWS.Name = "buttonSWS"; - this.buttonSWS.Size = new System.Drawing.Size(200, 41); + this.buttonSWS.Size = new System.Drawing.Size(300, 63); this.buttonSWS.TabIndex = 34; - this.buttonSWS.Text = "Schmutzwäscheschein"; + this.buttonSWS.Text = "Sonderetikett drucken"; this.buttonSWS.UseVisualStyleBackColor = false; this.buttonSWS.Click += new System.EventHandler(this.buttonSWS_Click); // - // listViewArtikel - // - this.listViewArtikel.CheckBoxes = true; - this.listViewArtikel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.listViewArtikel.FullRowSelect = true; - this.listViewArtikel.GridLines = true; - this.listViewArtikel.HideSelection = false; - this.listViewArtikel.Location = new System.Drawing.Point(12, 189); - this.listViewArtikel.Name = "listViewArtikel"; - this.listViewArtikel.Size = new System.Drawing.Size(811, 260); - this.listViewArtikel.TabIndex = 35; - this.listViewArtikel.UseCompatibleStateImageBehavior = false; - this.listViewArtikel.View = System.Windows.Forms.View.Details; - this.listViewArtikel.Visible = false; - this.listViewArtikel.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.listViewArtikel_ItemCheck); - this.listViewArtikel.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.listViewArtikel_ItemChecked); - // // buttonSpeichern // this.buttonSpeichern.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.buttonSpeichern.BackColor = System.Drawing.Color.Lime; + 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(215, 462); - this.buttonSpeichern.Margin = new System.Windows.Forms.Padding(2); + this.buttonSpeichern.Location = new System.Drawing.Point(628, 769); this.buttonSpeichern.Name = "buttonSpeichern"; - this.buttonSpeichern.Size = new System.Drawing.Size(200, 41); + this.buttonSpeichern.Size = new System.Drawing.Size(300, 63); this.buttonSpeichern.TabIndex = 36; this.buttonSpeichern.Text = "Änderungen speichern"; this.buttonSpeichern.UseVisualStyleBackColor = false; - this.buttonSpeichern.Visible = false; this.buttonSpeichern.Click += new System.EventHandler(this.buttonSpeichern_Click); // + // 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.ForeColor = System.Drawing.Color.White; + this.label7.Location = new System.Drawing.Point(16, 249); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(60, 20); + this.label7.TabIndex = 37; + this.label7.Text = "Fahrer:"; + // + // label10 + // + 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.Name = "label10"; + this.label10.Size = new System.Drawing.Size(67, 20); + this.label10.TabIndex = 39; + this.label10.Text = "Priorität:"; + // + // comboBoxPriority + // + 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.Name = "comboBoxPriority"; + this.comboBoxPriority.Size = new System.Drawing.Size(391, 32); + this.comboBoxPriority.TabIndex = 41; + this.comboBoxPriority.SelectedValueChanged += new System.EventHandler(this.comboBox_SelectedValueChanged); + // + // comboBoxFahrer + // + 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.Name = "comboBoxFahrer"; + this.comboBoxFahrer.Size = new System.Drawing.Size(391, 32); + this.comboBoxFahrer.TabIndex = 42; + this.comboBoxFahrer.SelectedValueChanged += new System.EventHandler(this.comboBox_SelectedValueChanged); + // + // pictureBoxDirtMinus + // + 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.Name = "pictureBoxDirtMinus"; + this.pictureBoxDirtMinus.Size = new System.Drawing.Size(57, 63); + this.pictureBoxDirtMinus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBoxDirtMinus.TabIndex = 45; + this.pictureBoxDirtMinus.TabStop = false; + this.pictureBoxDirtMinus.Click += new System.EventHandler(this.Container_Click); + // + // pictureBoxDirtPlus + // + 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.Name = "pictureBoxDirtPlus"; + this.pictureBoxDirtPlus.Size = new System.Drawing.Size(57, 63); + this.pictureBoxDirtPlus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBoxDirtPlus.TabIndex = 44; + this.pictureBoxDirtPlus.TabStop = false; + this.pictureBoxDirtPlus.Click += new System.EventHandler(this.Container_Click); + // + // labelContDirt + // + 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.Name = "labelContDirt"; + this.labelContDirt.Size = new System.Drawing.Size(57, 63); + this.labelContDirt.TabIndex = 43; + this.labelContDirt.Text = "0"; + this.labelContDirt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label3 + // + 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.Name = "label3"; + this.label3.Size = new System.Drawing.Size(75, 20); + this.label3.TabIndex = 46; + this.label3.Text = "KundeNr:"; + // + // label4 + // + 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.Name = "label4"; + this.label4.Size = new System.Drawing.Size(64, 20); + this.label4.TabIndex = 47; + this.label4.Text = "Region:"; + // + // label8 + // + 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.Name = "label8"; + this.label8.Size = new System.Drawing.Size(76, 20); + this.label8.TabIndex = 48; + this.label8.Text = "Liefertag:"; + // + // oLVArtikel + // + this.oLVArtikel.AlternateRowBackColor = System.Drawing.Color.LightSteelBlue; + this.oLVArtikel.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick; + this.oLVArtikel.CellEditUseWholeCell = false; + this.oLVArtikel.CheckBoxes = true; + this.oLVArtikel.CheckedAspectName = "Erledigt"; + this.oLVArtikel.Cursor = System.Windows.Forms.Cursors.Default; + this.oLVArtikel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + 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.Name = "oLVArtikel"; + this.oLVArtikel.ShowImagesOnSubItems = true; + this.oLVArtikel.Size = new System.Drawing.Size(676, 650); + this.oLVArtikel.TabIndex = 49; + this.oLVArtikel.UseAlternatingBackColors = true; + this.oLVArtikel.UseCompatibleStateImageBehavior = false; + this.oLVArtikel.UseSubItemCheckBoxes = true; + this.oLVArtikel.View = System.Windows.Forms.View.Details; + this.oLVArtikel.CellEditFinished += new BrightIdeasSoftware.CellEditEventHandler(this.oLVArtikel_CellEditFinished); + 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); + // // FormAuftragDetail // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); 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(835, 520); - this.Controls.Add(this.buttonSpeichern); - this.Controls.Add(this.listViewArtikel); - this.Controls.Add(this.buttonSWS); + this.ClientSize = new System.Drawing.Size(1252, 858); + this.Controls.Add(this.oLVArtikel); + this.Controls.Add(this.label8); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.pictureBoxDirtMinus); + this.Controls.Add(this.pictureBoxDirtPlus); this.Controls.Add(this.labelContDirt); + this.Controls.Add(this.comboBoxFahrer); + this.Controls.Add(this.comboBoxPriority); + this.Controls.Add(this.label10); + this.Controls.Add(this.label7); + this.Controls.Add(this.buttonSpeichern); + this.Controls.Add(this.buttonSWS); this.Controls.Add(this.label6); this.Controls.Add(this.label5); this.Controls.Add(this.pictureBoxMinus); this.Controls.Add(this.pictureBoxPlus); this.Controls.Add(this.labelContainer); - this.Controls.Add(this.label4); - this.Controls.Add(this.label3); - this.Controls.Add(this.listViewDanach); - this.Controls.Add(this.listViewDavor); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Controls.Add(this.textBoxZusatz); @@ -431,14 +427,17 @@ 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(2); this.MaximizeBox = false; this.Name = "FormAuftragDetail"; this.Text = "Auftrag Detail"; this.Load += new System.EventHandler(this.FormAuftragDetail_Load); + this.Shown += new System.EventHandler(this.FormAuftragDetail_Shown); this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.FormAuftragDetail_MouseClick); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxMinus)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxDirtMinus)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxDirtPlus)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.oLVArtikel)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -454,26 +453,23 @@ private System.Windows.Forms.TextBox textBoxZusatz; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; - private System.Windows.Forms.ListView listViewDavor; - private System.Windows.Forms.ColumnHeader columnHeader3; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; - private System.Windows.Forms.ListView listViewDanach; - private System.Windows.Forms.ColumnHeader columnHeader4; - private System.Windows.Forms.ColumnHeader columnHeader5; - private System.Windows.Forms.ColumnHeader columnHeader6; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.ColumnHeader columnHeader7; - private System.Windows.Forms.ColumnHeader columnHeader8; private System.Windows.Forms.PictureBox pictureBoxMinus; private System.Windows.Forms.PictureBox pictureBoxPlus; private System.Windows.Forms.Label labelContainer; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label labelContDirt; private System.Windows.Forms.Button buttonSWS; - private System.Windows.Forms.ListView listViewArtikel; private System.Windows.Forms.Button buttonSpeichern; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.ComboBox comboBoxPriority; + private System.Windows.Forms.ComboBox comboBoxFahrer; + private System.Windows.Forms.PictureBox pictureBoxDirtMinus; + private System.Windows.Forms.PictureBox pictureBoxDirtPlus; + private System.Windows.Forms.Label labelContDirt; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label8; + private BrightIdeasSoftware.ObjectListView oLVArtikel; } } \ No newline at end of file diff --git a/AA-Forms/FormAuftragDetail.cs b/AA-Forms/FormAuftragDetail.cs index e6fce69..6f32993 100644 --- a/AA-Forms/FormAuftragDetail.cs +++ b/AA-Forms/FormAuftragDetail.cs @@ -10,7 +10,9 @@ using System.Text; using System.Threading.Tasks; using System.Web; using System.Windows.Forms; +using BrightIdeasSoftware; using DatenDB; +using Deckungsbeitrag.UserControls; namespace Deckungsbeitrag { @@ -20,6 +22,10 @@ namespace Deckungsbeitrag public Benutzer benutzer; public List artikelList; public Meldungen meldung = new Meldungen(); + public Kunde kunde; + private int diff = 0; + int[] bestand = new int[3]; // Reklamation/Fehlmenge/Standveränderung + //WENN AUFTRAG SPEICHERN private bool _tosave = false; @@ -32,7 +38,7 @@ namespace Deckungsbeitrag if (_tosave) { buttonSpeichern.Enabled = true; - buttonSpeichern.BackColor = Color.Yellow; + buttonSpeichern.BackColor = Color.FromArgb(0,192,0); } } } @@ -53,7 +59,6 @@ namespace Deckungsbeitrag } } - public FormAuftragDetail() { InitializeComponent(); @@ -71,83 +76,63 @@ namespace Deckungsbeitrag this.benutzer = benutzer; } + private void FormAuftragDetail_Load(object sender, EventArgs e) { + LadeComboBoxen(); + this.Text = this.auftrag.Typ.ToString() + "-Auftrag"; + this.kunde = Kunde.GetKunde(string.Empty, auftrag.KundeID, string.Empty); + this.dTPLiefertag.Value = auftrag.Liefertag; - this.labelKundeName.Text = Kunde.GetKunde(string.Empty, auftrag.KundeID, string.Empty).Suchtext; - this.labelRegion.Text = Kunde.GetKunde(string.Empty, auftrag.KundeID, string.Empty).Region; + this.labelKundeName.Text = string.IsNullOrWhiteSpace(this.kunde.Suchtext) ? this.kunde.KundeName : this.kunde.Suchtext; + this.labelRegion.Text = this.kunde.Region; this.labelContainer.Text = auftrag.ContainerClean.ToString(); this.labelContDirt.Text = auftrag.Container.ToString(); - //this.textBoxZusatz.Text = auftrag.ZusatzInfo; - - //WENN STATUS 3(HERRICHTEN) oder HÖHER(FERTIG, AUSGELIEFERT) DANN KEINE VORHER NACHHER LISTEN - if (auftrag.Status <= AuftragStatus.Gewaschen) - { - List davor = Auftrag.GetAuftragList("davor", auftrag); - List danach = Auftrag.GetAuftragList("danach", auftrag); + this.textBoxZusatz.Text = $"{auftrag.ZusatzInfo}\n{this.kunde.Anmerkung}\n{Aufgabe.GetAufgabe(null, this.kunde.Aufgabe).Bezeichnung}"; + if (auftrag.Fahrer == null) this.comboBoxFahrer.SelectedIndex = -1; + else this.comboBoxFahrer.SelectedValue = auftrag.Fahrer; + this.comboBoxPriority.SelectedItem = auftrag.Priority; - foreach (Auftrag auftrag in davor) - { - ListViewItem item = new ListViewItem(); - item.Tag = auftrag; - item.Text = Kunde.GetKunde(string.Empty, auftrag.KundeID, string.Empty).Suchtext; - item.SubItems.Add(Kunde.GetKunde(string.Empty, auftrag.KundeID, string.Empty).Region); - item.SubItems.Add(auftrag.Container.ToString()); - item.SubItems.Add(auftrag.Status.ToString()); + // Events nach dem Laden der Daten wieder den ComboBoxen zuweisen. + this.comboBoxPriority.SelectedValueChanged += comboBox_SelectedValueChanged; + this.comboBoxFahrer.SelectedValueChanged += comboBox_SelectedValueChanged; - this.listViewDavor.Items.Add(item); - } - foreach (Auftrag auftrag in danach) - { - ListViewItem item = new ListViewItem(); - item.Tag = auftrag; - item.Text = Kunde.GetKunde(string.Empty, auftrag.KundeID, string.Empty).Suchtext; - item.SubItems.Add(Kunde.GetKunde(string.Empty, auftrag.KundeID, string.Empty).Region); - item.SubItems.Add(auftrag.Container.ToString()); - item.SubItems.Add(auftrag.Status.ToString()); - - this.listViewDanach.Items.Add(item); - - } - int width = this.listViewDavor.Width; - this.listViewDavor = Funktionen.Columns_Resize(this.listViewDavor, null).lv; - this.listViewDanach = Funktionen.Columns_Resize(this.listViewDanach, null).lv; - this.listViewDanach.Width = this.listViewDavor.Width = width; - } - else listViewDanach.Visible = listViewDavor.Visible = label3.Visible = label4.Visible = false; - - //WENN STATUS HERRICHTEN DANN LISTVIEW-ARTIKEL LADEN UND ANZEIGEN - if(auftrag.Status == AuftragStatus.Herrichten) - { - this.listViewArtikel.Visible = true; - this.artikelList = AuftragArtikel.GetList(auftrag.AuftragID); - this.listViewArtikel.Columns.Clear(); - this.listViewArtikel.Columns.Add("ARTIKEL"); - this.listViewArtikel.Columns.Add("ANZAHL"); - - foreach(AuftragArtikel art in artikelList) - { - ListViewItem item = new ListViewItem(); - item.Tag = art; - item.Text = art.ArtikelName; - item.SubItems.Add(art.Anzahl.ToString()); - if (art.Erledigt) { item.Checked = true; } - else item.Checked = false; - - this.listViewArtikel.Items.Add(item); - - } - - this.listViewArtikel = Funktionen.Columns_Resize(this.listViewArtikel, null).lv; - } + Load_OLV(); + 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_OLV() + { + Generator.GenerateColumns(this.oLVArtikel, typeof(AuftragArtikel), true); + + this.artikelList = AuftragArtikel.GetList(auftrag.AuftragID); + + this.oLVArtikel.SetObjects(this.artikelList); + this.oLVArtikel = Funktionen.Columns_Resize(null, this.oLVArtikel).olv; + } + + private void LadeComboBoxen() + { + this.comboBoxFahrer.SelectedValueChanged -= comboBox_SelectedValueChanged; + this.comboBoxPriority.SelectedValueChanged -= comboBox_SelectedValueChanged; + + List benutzerliste = Benutzer.GetFahrerList(); + this.comboBoxFahrer.DataSource = benutzerliste; + this.comboBoxFahrer.ValueMember = "BenutzerName"; + + this.comboBoxPriority.DataSource = Enum.GetValues(typeof(AuftragPriority)); + } + private void comboBox_SelectedValueChanged(object sender, EventArgs e) + { + tosave = true; + } private void labelContainer_TextChanged(object sender, EventArgs e) { - if (this.labelContainer.Text == "0") { this.pictureBoxMinus.Enabled = false; this.pictureBoxMinus.BackColor = Color.Gray; } - else { this.pictureBoxMinus.Enabled = true; this.pictureBoxMinus.BackColor = Color.Red; } + if (this.labelContainer.Text == "0") { this.pictureBoxMinus.Enabled = this.pictureBoxDirtMinus.Enabled = false; this.pictureBoxMinus.BackColor = this.pictureBoxDirtMinus.BackColor = Color.Gray; } + else { this.pictureBoxMinus.Enabled = this.pictureBoxDirtMinus.Enabled = true; this.pictureBoxMinus.BackColor = this.pictureBoxDirtMinus.BackColor = Color.Red; } } @@ -159,13 +144,22 @@ namespace Deckungsbeitrag //BEI CLICK AUF CONTAINER +/- SPEICHERN WIRD AKITV private void Container_Click(object sender, EventArgs e) { - PictureBox pb = (PictureBox)sender; - int cont = int.Parse(this.labelContainer.Text); - if (pb.Name.ToString().Contains("Plus")) cont++; - if (pb.Name.ToString().Contains("Minus")) cont--; - this.labelContainer.Text = cont.ToString(); - + int cont = 0; + if (pb.Name.Contains("Dirt")) + { + cont = int.Parse(this.labelContDirt.Text); + if (pb.Name.ToString().Contains("Plus")) cont++; + if (pb.Name.ToString().Contains("Minus")) cont--; + this.labelContDirt.Text = cont.ToString(); + } + else + { + cont = int.Parse(this.labelContainer.Text); + if (pb.Name.ToString().Contains("Plus")) cont++; + if (pb.Name.ToString().Contains("Minus")) cont--; + this.labelContainer.Text = cont.ToString(); + } tosave = true; } @@ -184,15 +178,10 @@ namespace Deckungsbeitrag } //WENN LISTVIEW NICHT FOCUSED (FORM.LOAD) TOSAVE BLEIBT FALSE - private void listViewArtikel_ItemCheck(object sender, ItemCheckEventArgs e) + private void oLVArtikel_ItemCheck(object sender, ItemCheckEventArgs e) { - ListView listView = (ListView)sender; - - if (listView.Focused) - { - if (e.NewValue != e.CurrentValue) { tosave = true; } - } - + ObjectListView olv = (ObjectListView)sender; + if (e.NewValue != e.CurrentValue) { tosave = true; } } @@ -200,10 +189,16 @@ namespace Deckungsbeitrag /// /// TOCLOSE /// - private void listViewArtikel_ItemChecked(object sender, ItemCheckedEventArgs e) + private void oLVArtikel_ItemChecked(object sender, ItemCheckedEventArgs e) { - ListView listView = (ListView)sender; - if(listView.Items.Count == listView.CheckedItems.Count) toclose = true; + ObjectListView olv = (ObjectListView)sender; + if (olv.Items.Count == olv.CheckedItems.Count) toclose = true; + foreach(OLVListItem item in olv.CheckedItems) + { + AuftragArtikel auftragArtikel = (AuftragArtikel)item.RowObject; + auftragArtikel.Erledigt = true; + auftragArtikel.Save(); + } } /// @@ -217,23 +212,26 @@ namespace Deckungsbeitrag { auftrag.Liefertag = dTPLiefertag.Value; auftrag.ContainerClean = int.Parse(this.labelContainer.Text); + auftrag.Container = int.Parse(this.labelContDirt.Text); + auftrag.ArbeiterID = this.comboBoxFahrer.SelectedIndex == -1 ? null : ((Benutzer)this.comboBoxFahrer.SelectedItem).BenutzerID; + auftrag.Priority = this.comboBoxPriority.SelectedIndex == -1 ? AuftragPriority.None : ((AuftragPriority)this.comboBoxPriority.SelectedItem); + auftrag.ZusatzInfo = this.textBoxZusatz.Text; auftrag.Save(); - //WENN STATUS HERRICHTEN DANN ITEMS UPDATEN - //LISTVIEWITEMS UPDATEN - if (auftrag.Typ >= AuftragTyp.Inventur) + if (auftrag.Typ == AuftragTyp.Regelmäßig) { - //LISTVIEWITEMS UPDATEN - foreach (ListViewItem item in this.listViewArtikel.Items) + foreach (OLVListItem item in this.oLVArtikel.Items) { AuftragArtikel art = (AuftragArtikel)item.Tag; if (item.Checked) art.Erledigt = true; - else art.Erledigt = false; + else art.Erledigt = false; art.Save(); } } } + + this.DialogResult = DialogResult.OK; this.Close(); @@ -251,7 +249,9 @@ namespace Deckungsbeitrag { if (toclose) { - if (int.Parse(this.labelContainer.Text) == 0) if (meldung.NoCleanContainer() == DialogResult.OK) return; + if (auftrag.Typ < AuftragTyp.Standerhöhung || auftrag.Typ > AuftragTyp.Regelmäßig) + if (int.Parse(this.labelContainer.Text) == 0) if (meldung.NoCleanContainer() == DialogResult.OK) return; + if (int.Parse(this.labelContainer.Text) != auftrag.ContainerClean) { switch (meldung.DifferentCleanContainer()) @@ -301,6 +301,8 @@ namespace Deckungsbeitrag } else { + auftrag.Erledigt = DateTime.Now; + auftrag.ErledigtVon = (int)benutzer.BenutzerID; auftrag.Status = AuftragStatus.Fertig; auftrag.Save(); } @@ -314,19 +316,13 @@ namespace Deckungsbeitrag //SCHMUTZWÄSCHESCHEIN DRUCKEN private void buttonSWS_Click(object sender, EventArgs e) { - Funktionen.SWS_Drucken(auftrag, null, this); - //PrintDialog dialog = new PrintDialog(); - //foreach (string printer in PrinterSettings.InstalledPrinters) if (printer.Contains(ConfigurationManager.AppSettings["PrinterName"])) dialog.PrinterSettings.PrinterName = printer; - - ////dialog.PrinterSettings.Copies = 10; - - //if (dialog.ShowDialog() == DialogResult.OK) - //{ - // PrintDocument printDocument = new PrintDocument(); - // printDocument.PrintPage += new PrintPageEventHandler(PrintDocument_PrintPage); - // printDocument.PrinterSettings = dialog.PrinterSettings; - // printDocument.Print(); - //} + //TODO: Bestand von allen Artikeln speichern und für Druck vorbereiten. + //TODO: Eventuell die Zahlen in CSV speichern und von dort für Druck verwenden?! + //TODO: Erstellen von SonderAuftrag und Drucken von Etikett testen. + 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); + } } @@ -346,11 +342,97 @@ namespace Deckungsbeitrag } //PRINT PAGE FÜR DRUCK - private void PrintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) + private void FormAuftragDetail_Shown(object sender, EventArgs e) { - //e.Graphics.DrawImage(Funktionen.SWS_Entwurf(auftrag), e.PageBounds); - //e.Graphics.DrawImage(bitmap, 0, 0, 790, 900); + UCFeedback 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; } + private void oLVArtikel_CellEditStarting(object sender, CellEditEventArgs e) + { + + } + + private void oLVArtikel_CellEditFinished(object sender, CellEditEventArgs e) + { + this.Cursor = Cursors.WaitCursor; + this.SuspendLayout(); + + ObjectListView olv = (ObjectListView)sender; + AuftragArtikel auftragArtikel = (AuftragArtikel)e.RowObject; + if (e.Column.Text == "Anzahl") diff = ((int)e.Value - ((int)e.NewValue)); + + auftragArtikel.Anzahl = (int)e.NewValue; + auftragArtikel.Save(); + + 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); + kndart.Reklamation = reklamation; + kndart.Fehlmenge = fehlmenge; + kndart.Stand = stand; + + + kndart.Save(); + 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) + { + + if (diff == 0) + return; + + if (diff < 0) { bestand[2] = diff; stand += diff; return; } + + int rest = diff * 1; + + // 1) Reklamation nur korrigieren, wenn sie <= diff ist + if (reklamation > 0 && reklamation <= rest) + { + rest -= reklamation; + bestand[0] = reklamation; + reklamation = 0; + } + + // 2) Fehlmenge korrigieren + if (fehlmenge > 0) + { + int abbau = Math.Min(fehlmenge, rest); + bestand[1] = abbau; + fehlmenge -= abbau; + rest -= abbau; + } + + // 3) Rest auf Stand buchen + if (rest > 0) + stand += rest; + bestand[2] = rest; + } + + private void oLVArtikel_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) + { + tosave = true; + } } } +//TODO: Standverminderung und Standerhöhung mit einem Aufruf (Standveränderung?) Bei Verminderung -Zahlen sonst Plus. +//TODO: Korrigiere Bestand: Wenn -Zahl dann Stand - Zahl. +//TODO: Speichern etc. durchgehen und adaptieren +//TODO: Liste vorher/nachher durchdenken +//DONE: Feedback Button hinzufügen +//DONE: ComboBox Fahrer und Priorität implementieren +//DONE: Container schmutzig bearbeitbar machen \ No newline at end of file diff --git a/AA-Forms/FormAuftragDetail.resx b/AA-Forms/FormAuftragDetail.resx index a51a865..0f09653 100644 --- a/AA-Forms/FormAuftragDetail.resx +++ b/AA-Forms/FormAuftragDetail.resx @@ -130,23 +130,118 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO vAAADrwBlbxySQAAAFZJREFUOE+9kEEKACEMxHxb//+eXruwbGEwHhwKK+QSaqSuqloTIFwgXCBcKL6T maW0xzyEBCLixQroqxpo9vljoC/u/BcYrTD+RA0o1wEXCBcIFwiXB07Nzd/k/DvRAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAADJJREFUOE9jYBgF1Affv393IITR9aCAb9++/SeE0fWgAJACJycnnJg+BhDC6HpG + wUADABXZimqO3LMmAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAFZJREFUOE+9kEEKACEMxHxb//+eXruwbGEwHhwKK+QSaqSuqloTIFwgXCBcKL6T + maW0xzyEBCLixQroqxpo9vljoC/u/BcYrTD+RA0o1wEXCBcIFwiXB07Nzd/k/DvRAAAAAElFTkSuQmCC - AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP// - AAD///8A//////////////////////////////////////////////////////////////////////// - ////////8AD//////////////////w//D/////////////////8PDw///////MzP////zMz/D/8P//// - //zMzP///8zMz/AA///////MzMzM//zMzMzP////////zMzMzMz8zMzMzM///////MzMzMzPzMzMzMz/ - //////zMzMzM/8zMzMzP///////MzMzMzPzMzMzMz///////zMzMzM/8zMzMzP///////MzMzMzPzMzM - zMz///////zMzMzM/8zMzMzP/Mz////MzMzMzPzMzMzMz/zMzM//zMzMzM/8zMzMzP/MzMzM/8zMzMzP - zMzMzMz8zMzMzPzMzMzM/8zMzMzP/MzMzMz8zMzMzPzMzMzMz8zMzMzMzMzMzM/MzMzMzPzMzMzMz//8 - zMzP//zMzMz//8zMzM////zM/////8zP/////Mz///////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAABAAEAAAAAAAEAIAC5FQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAAAFv + 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 + QmCC \ No newline at end of file diff --git a/AA-Forms/FormBenutzerVW.Designer.cs b/AA-Forms/FormBenutzerVW.Designer.cs index aa61915..9a16e8b 100644 --- a/AA-Forms/FormBenutzerVW.Designer.cs +++ b/AA-Forms/FormBenutzerVW.Designer.cs @@ -62,7 +62,6 @@ this.objectListViewBenutzer.CellEditFinished += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewBenutzer_CellEditFinished); this.objectListViewBenutzer.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewBenutzer_CellEditStarting); this.objectListViewBenutzer.SubItemChecking += new System.EventHandler(this.objectListViewBenutzer_SubItemChecking); - this.objectListViewBenutzer.SelectedIndexChanged += new System.EventHandler(this.objectListViewBenutzer_SelectedIndexChanged); // // buttonNewUser // diff --git a/AA-Forms/FormBenutzerVW.cs b/AA-Forms/FormBenutzerVW.cs index bc65925..cd54e96 100644 --- a/AA-Forms/FormBenutzerVW.cs +++ b/AA-Forms/FormBenutzerVW.cs @@ -49,6 +49,34 @@ namespace Deckungsbeitrag } + private void FormBenutzerVW_Shown(object sender, EventArgs e) + { + this.CenterToScreen(); + } + + + + /// + /// BUTTON CLICK EVENTS + /// + /// + /// + private void buttonNewUser_Click(object sender, EventArgs e) + { + FormNeuerBenutzer neuerBenutzer = new FormNeuerBenutzer(); + neuerBenutzer.Show(); + } + private void buttonAbbrechen_Click(object sender, EventArgs e) + { + this.Close(); + } + private void Save_Benutzer(Benutzer benutzer, bool show) + { + if (benutzer.Save() == 1) if (show) meldung.Gespeichert(); + else if (show) meldung.Speicherfehler(); + } + + #region ObjectListView-Funktionen private void Load_OLV(List alist) { Generator.GenerateColumns(this.objectListViewBenutzer, typeof(Benutzer), true); @@ -67,22 +95,6 @@ namespace Deckungsbeitrag this.objectListViewBenutzer = Funktionen.Columns_Resize(null, this.objectListViewBenutzer).olv; } - - - /// - /// BUTTON CLICK EVENTS - /// - /// - /// - private void buttonNewUser_Click(object sender, EventArgs e) - { - FormNeuerBenutzer neuerBenutzer = new FormNeuerBenutzer(); - neuerBenutzer.Show(); - } - private void buttonAbbrechen_Click(object sender, EventArgs e) - { - this.Close(); - } private void objectListViewBenutzer_CellEditFinished(object sender, CellEditEventArgs e) { Benutzer benutzer = (Benutzer)e.RowObject; @@ -96,30 +108,16 @@ namespace Deckungsbeitrag Save_Benutzer(benutzer, false); } - private void Save_Benutzer(Benutzer benutzer, bool show) - { - if (benutzer.Save() == 1) if (show) meldung.Gespeichert(); - else if (show) meldung.Speicherfehler(); - } - - private void objectListViewBenutzer_SelectedIndexChanged(object sender, EventArgs e) - { - - } - private void objectListViewBenutzer_CellEditStarting(object sender, CellEditEventArgs e) { ObjectListView olv = (ObjectListView)sender; user = e.RowObject as Benutzer; if (user == null) return; - else { this.DialogResult = DialogResult.OK; this.Close(); } } + #endregion + - private void FormBenutzerVW_Shown(object sender, EventArgs e) - { - this.CenterToScreen(); - } } } diff --git a/AA-Forms/FormExpedit.Designer.cs b/AA-Forms/FormExpedit.Designer.cs index a5ec809..b1d0a8b 100644 --- a/AA-Forms/FormExpedit.Designer.cs +++ b/AA-Forms/FormExpedit.Designer.cs @@ -34,63 +34,42 @@ System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormExpedit)); this.buttonNeuerAuftrag = new System.Windows.Forms.Button(); - 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.tabPageSonder = new System.Windows.Forms.TabPage(); - this.objectListViewSonder = new BrightIdeasSoftware.ObjectListView(); - this.tabPageAll = new System.Windows.Forms.TabPage(); - this.objectListViewAuftrag = new BrightIdeasSoftware.ObjectListView(); - this.tabControlAuftragList = new System.Windows.Forms.TabControl(); - this.tabPageGeschaeft = new System.Windows.Forms.TabPage(); - this.objectListViewGeschaeft = new BrightIdeasSoftware.ObjectListView(); - this.groupBoxStatistik = new System.Windows.Forms.GroupBox(); - this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); - this.tableLayoutPanelStatistik = new System.Windows.Forms.TableLayoutPanel(); - this.labelZahl6 = new System.Windows.Forms.Label(); - this.labelStatistik6 = new System.Windows.Forms.Label(); - this.labelZahl5 = new System.Windows.Forms.Label(); - this.labelStatistik5 = new System.Windows.Forms.Label(); - this.labelZahl4 = new System.Windows.Forms.Label(); - this.labelStatistik4 = new System.Windows.Forms.Label(); - this.labelZahl3 = new System.Windows.Forms.Label(); - this.labelStatistik3 = new System.Windows.Forms.Label(); - this.labelZahl2 = new System.Windows.Forms.Label(); - this.labelStatistik2 = new System.Windows.Forms.Label(); - this.labelZahl1 = new System.Windows.Forms.Label(); - this.labelStatistik1 = new System.Windows.Forms.Label(); this.buttonSuchen = 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(); this.chartFehlmenge = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.groupBoxKndInfo = new System.Windows.Forms.GroupBox(); this.tableLayoutPanelInfo = new System.Windows.Forms.TableLayoutPanel(); this.labelAnmerkung = new System.Windows.Forms.Label(); this.labelAufgabe = new System.Windows.Forms.Label(); this.buttonTourenListe = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.dGArtikel)).BeginInit(); - this.tabPageSonder.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.objectListViewSonder)).BeginInit(); - this.tabPageAll.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).BeginInit(); - this.tabControlAuftragList.SuspendLayout(); - this.tabPageGeschaeft.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.objectListViewGeschaeft)).BeginInit(); - this.groupBoxStatistik.SuspendLayout(); - this.tableLayoutPanelStatistik.SuspendLayout(); + this.buttonStats = new System.Windows.Forms.Button(); + this.buttonEinstellung = new System.Windows.Forms.Button(); + this.tabPageRampe = new System.Windows.Forms.TabPage(); + this.objectListViewRampe = new BrightIdeasSoftware.ObjectListView(); + this.tabPageSonder = new System.Windows.Forms.TabPage(); + this.objectListViewSonder = new BrightIdeasSoftware.ObjectListView(); + this.tabPageGeschaeft = new System.Windows.Forms.TabPage(); + this.objectListViewGeschaeft = new BrightIdeasSoftware.ObjectListView(); + this.tabPageAll = new System.Windows.Forms.TabPage(); + this.objectListViewAuftrag = new BrightIdeasSoftware.ObjectListView(); + this.tabControlAuftragList = new System.Windows.Forms.TabControl(); + this.tabPageVorbereitet = new System.Windows.Forms.TabPage(); + this.objectListViewVorbereitet = new BrightIdeasSoftware.ObjectListView(); ((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).BeginInit(); this.groupBoxKndInfo.SuspendLayout(); this.tableLayoutPanelInfo.SuspendLayout(); + this.tabPageRampe.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewRampe)).BeginInit(); + this.tabPageSonder.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewSonder)).BeginInit(); + this.tabPageGeschaeft.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewGeschaeft)).BeginInit(); + this.tabPageAll.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).BeginInit(); + this.tabControlAuftragList.SuspendLayout(); + this.tabPageVorbereitet.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewVorbereitet)).BeginInit(); this.SuspendLayout(); // // buttonNeuerAuftrag @@ -111,465 +90,6 @@ this.buttonNeuerAuftrag.UseVisualStyleBackColor = false; this.buttonNeuerAuftrag.Click += new System.EventHandler(this.buttonNeuerAuftrag_Click); // - // dGArtikel - // - this.dGArtikel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - 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(385, 43); - this.dGArtikel.Name = "dGArtikel"; - this.dGArtikel.RowHeadersVisible = false; - this.dGArtikel.RowHeadersWidth = 62; - this.dGArtikel.Size = new System.Drawing.Size(527, 592); - this.dGArtikel.TabIndex = 44; - this.dGArtikel.Visible = false; - this.dGArtikel.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.dGArtikel_CellBeginEdit); - this.dGArtikel.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dGArtikel_CellEndEdit); - this.dGArtikel.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.dGArtikel_CellValidating); - this.dGArtikel.VisibleChanged += new System.EventHandler(this.dGArtikel_VisibleChanged); - // - // KundeArtikelID - // - this.KundeArtikelID.HeaderText = "KundeArtikelID"; - this.KundeArtikelID.MinimumWidth = 8; - this.KundeArtikelID.Name = "KundeArtikelID"; - this.KundeArtikelID.ReadOnly = true; - this.KundeArtikelID.Visible = false; - this.KundeArtikelID.Width = 150; - // - // KundeID - // - this.KundeID.HeaderText = "KundeID"; - this.KundeID.MinimumWidth = 8; - this.KundeID.Name = "KundeID"; - this.KundeID.ReadOnly = true; - this.KundeID.Visible = false; - this.KundeID.Width = 150; - // - // ArtikelNR - // - this.ArtikelNR.HeaderText = "Art. Nr."; - this.ArtikelNR.MinimumWidth = 8; - this.ArtikelNR.Name = "ArtikelNR"; - this.ArtikelNR.ReadOnly = true; - this.ArtikelNR.Width = 150; - // - // ArtikelName - // - this.ArtikelName.HeaderText = "Art. Name"; - this.ArtikelName.MinimumWidth = 8; - this.ArtikelName.Name = "ArtikelName"; - this.ArtikelName.ReadOnly = true; - this.ArtikelName.Width = 150; - // - // Stand - // - this.Stand.HeaderText = "Stand"; - this.Stand.MinimumWidth = 8; - this.Stand.Name = "Stand"; - this.Stand.ReadOnly = true; - this.Stand.Width = 150; - // - // Fehlmenge - // - this.Fehlmenge.HeaderText = "NW"; - this.Fehlmenge.MinimumWidth = 8; - this.Fehlmenge.Name = "Fehlmenge"; - this.Fehlmenge.Width = 150; - // - // Korrektur - // - this.Korrektur.HeaderText = "Korr"; - this.Korrektur.MinimumWidth = 8; - this.Korrektur.Name = "Korrektur"; - this.Korrektur.Width = 150; - // - // StandBearbeitet - // - this.StandBearbeitet.HeaderText = "Stand Bearbeitet"; - this.StandBearbeitet.MinimumWidth = 8; - this.StandBearbeitet.Name = "StandBearbeitet"; - this.StandBearbeitet.Width = 150; - // - // FehlmengeBearbeitet - // - this.FehlmengeBearbeitet.HeaderText = "Fehlmenge Bearbeitet"; - this.FehlmengeBearbeitet.MinimumWidth = 8; - this.FehlmengeBearbeitet.Name = "FehlmengeBearbeitet"; - this.FehlmengeBearbeitet.Width = 150; - // - // KorrekturBearbeitet - // - this.KorrekturBearbeitet.HeaderText = "Korrektur Bearbeitet"; - this.KorrekturBearbeitet.MinimumWidth = 8; - this.KorrekturBearbeitet.Name = "KorrekturBearbeitet"; - this.KorrekturBearbeitet.Width = 150; - // - // tabPageSonder - // - this.tabPageSonder.Controls.Add(this.objectListViewSonder); - this.tabPageSonder.Location = new System.Drawing.Point(4, 34); - this.tabPageSonder.Name = "tabPageSonder"; - this.tabPageSonder.Padding = new System.Windows.Forms.Padding(3); - this.tabPageSonder.Size = new System.Drawing.Size(890, 587); - this.tabPageSonder.TabIndex = 1; - this.tabPageSonder.Text = "Sonderaufträge"; - this.tabPageSonder.UseVisualStyleBackColor = true; - // - // 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; - this.objectListViewSonder.FullRowSelect = true; - this.objectListViewSonder.GridLines = true; - 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 - // - this.tabPageAll.Controls.Add(this.objectListViewAuftrag); - this.tabPageAll.Location = new System.Drawing.Point(4, 34); - this.tabPageAll.Name = "tabPageAll"; - this.tabPageAll.Padding = new System.Windows.Forms.Padding(3); - this.tabPageAll.Size = new System.Drawing.Size(890, 587); - this.tabPageAll.TabIndex = 0; - this.tabPageAll.Text = "Aufträge heute"; - this.tabPageAll.UseVisualStyleBackColor = true; - // - // objectListViewAuftrag - // - this.objectListViewAuftrag.AllowColumnReorder = true; - this.objectListViewAuftrag.AlternateRowBackColor = System.Drawing.Color.LightBlue; - this.objectListViewAuftrag.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick; - this.objectListViewAuftrag.CellEditUseWholeCell = false; - this.objectListViewAuftrag.Cursor = System.Windows.Forms.Cursors.Default; - this.objectListViewAuftrag.Dock = System.Windows.Forms.DockStyle.Fill; - this.objectListViewAuftrag.FullRowSelect = true; - this.objectListViewAuftrag.GridLines = true; - this.objectListViewAuftrag.HideSelection = false; - 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, 581); - this.objectListViewAuftrag.Sorting = System.Windows.Forms.SortOrder.Ascending; - this.objectListViewAuftrag.TabIndex = 1; - this.objectListViewAuftrag.TintSortColumn = true; - this.objectListViewAuftrag.UnfocusedSelectedBackColor = System.Drawing.SystemColors.Highlight; - this.objectListViewAuftrag.UnfocusedSelectedForeColor = System.Drawing.SystemColors.HighlightText; - this.objectListViewAuftrag.UseAlternatingBackColors = true; - this.objectListViewAuftrag.UseCellFormatEvents = true; - this.objectListViewAuftrag.UseCompatibleStateImageBehavior = false; - this.objectListViewAuftrag.UseFiltering = true; - this.objectListViewAuftrag.UseHotControls = false; - this.objectListViewAuftrag.UseHyperlinks = true; - this.objectListViewAuftrag.View = System.Windows.Forms.View.Details; - this.objectListViewAuftrag.ButtonClick += new System.EventHandler(this.objectListViewAuftrag_ButtonClick); - this.objectListViewAuftrag.CellEditFinished += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditFinished); - this.objectListViewAuftrag.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditStarting); - this.objectListViewAuftrag.CellClick += new System.EventHandler(this.objectListViewAuftrag_CellClick); - this.objectListViewAuftrag.CellRightClick += new System.EventHandler(this.objectListViewAuftrag_CellRightClick); - this.objectListViewAuftrag.FormatCell += new System.EventHandler(this.objectListViewAuftrag_FormatCell); - // - // tabControlAuftragList - // - this.tabControlAuftragList.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.tabControlAuftragList.Controls.Add(this.tabPageAll); - this.tabControlAuftragList.Controls.Add(this.tabPageSonder); - this.tabControlAuftragList.Controls.Add(this.tabPageGeschaeft); - this.tabControlAuftragList.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabControlAuftragList.Location = new System.Drawing.Point(4, 9); - this.tabControlAuftragList.Name = "tabControlAuftragList"; - this.tabControlAuftragList.SelectedIndex = 0; - this.tabControlAuftragList.Size = new System.Drawing.Size(898, 625); - this.tabControlAuftragList.TabIndex = 0; - this.tabControlAuftragList.Visible = false; - this.tabControlAuftragList.SelectedIndexChanged += new System.EventHandler(this.tabControlAuftragList_SelectedIndexChanged); - this.tabControlAuftragList.Selected += new System.Windows.Forms.TabControlEventHandler(this.tabControlAuftragList_Selected); - // - // tabPageGeschaeft - // - this.tabPageGeschaeft.Controls.Add(this.objectListViewGeschaeft); - this.tabPageGeschaeft.Location = new System.Drawing.Point(4, 34); - this.tabPageGeschaeft.Name = "tabPageGeschaeft"; - this.tabPageGeschaeft.Padding = new System.Windows.Forms.Padding(3); - this.tabPageGeschaeft.Size = new System.Drawing.Size(890, 587); - this.tabPageGeschaeft.TabIndex = 2; - this.tabPageGeschaeft.Text = "Geschäft"; - this.tabPageGeschaeft.UseVisualStyleBackColor = true; - // - // objectListViewGeschaeft - // - this.objectListViewGeschaeft.AllowColumnReorder = true; - this.objectListViewGeschaeft.AlternateRowBackColor = System.Drawing.Color.LightBlue; - this.objectListViewGeschaeft.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick; - this.objectListViewGeschaeft.CellEditUseWholeCell = false; - this.objectListViewGeschaeft.Cursor = System.Windows.Forms.Cursors.Default; - this.objectListViewGeschaeft.Dock = System.Windows.Forms.DockStyle.Fill; - this.objectListViewGeschaeft.FullRowSelect = true; - this.objectListViewGeschaeft.GridLines = true; - this.objectListViewGeschaeft.HideSelection = false; - 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, 581); - this.objectListViewGeschaeft.Sorting = System.Windows.Forms.SortOrder.Ascending; - this.objectListViewGeschaeft.TabIndex = 2; - this.objectListViewGeschaeft.TintSortColumn = true; - this.objectListViewGeschaeft.UnfocusedSelectedBackColor = System.Drawing.SystemColors.Highlight; - this.objectListViewGeschaeft.UnfocusedSelectedForeColor = System.Drawing.SystemColors.HighlightText; - this.objectListViewGeschaeft.UseAlternatingBackColors = true; - this.objectListViewGeschaeft.UseCellFormatEvents = true; - this.objectListViewGeschaeft.UseCompatibleStateImageBehavior = false; - this.objectListViewGeschaeft.UseFiltering = true; - this.objectListViewGeschaeft.UseHotControls = false; - this.objectListViewGeschaeft.UseHyperlinks = true; - this.objectListViewGeschaeft.View = System.Windows.Forms.View.Details; - this.objectListViewGeschaeft.ButtonClick += new System.EventHandler(this.objectListViewAuftrag_ButtonClick); - this.objectListViewGeschaeft.CellEditFinished += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditFinished); - this.objectListViewGeschaeft.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditStarting); - this.objectListViewGeschaeft.CellClick += new System.EventHandler(this.objectListViewAuftrag_CellClick); - this.objectListViewGeschaeft.CellRightClick += new System.EventHandler(this.objectListViewAuftrag_CellRightClick); - this.objectListViewGeschaeft.FormatCell += new System.EventHandler(this.objectListViewAuftrag_FormatCell); - // - // groupBoxStatistik - // - this.groupBoxStatistik.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.groupBoxStatistik.Controls.Add(this.dateTimePicker1); - this.groupBoxStatistik.Controls.Add(this.tableLayoutPanelStatistik); - this.groupBoxStatistik.ForeColor = System.Drawing.Color.White; - this.groupBoxStatistik.Location = new System.Drawing.Point(908, 12); - this.groupBoxStatistik.Name = "groupBoxStatistik"; - this.groupBoxStatistik.Size = new System.Drawing.Size(301, 197); - this.groupBoxStatistik.TabIndex = 62; - this.groupBoxStatistik.TabStop = false; - this.groupBoxStatistik.Text = "STATISTIK"; - this.groupBoxStatistik.Visible = false; - // - // dateTimePicker1 - // - this.dateTimePicker1.CustomFormat = "dddd dd.MM.yyyy"; - this.dateTimePicker1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.dateTimePicker1.Location = new System.Drawing.Point(10, 19); - this.dateTimePicker1.Name = "dateTimePicker1"; - this.dateTimePicker1.Size = new System.Drawing.Size(224, 26); - this.dateTimePicker1.TabIndex = 1; - this.dateTimePicker1.CloseUp += new System.EventHandler(this.dateTimePicker1_CloseUp); - // - // tableLayoutPanelStatistik - // - this.tableLayoutPanelStatistik.ColumnCount = 2; - this.tableLayoutPanelStatistik.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanelStatistik.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl6, 1, 5); - this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik6, 0, 5); - this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl5, 1, 4); - this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik5, 0, 4); - this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl4, 1, 3); - this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik4, 0, 3); - this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl3, 1, 2); - this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik3, 0, 2); - this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl2, 1, 1); - this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik2, 0, 1); - this.tableLayoutPanelStatistik.Controls.Add(this.labelZahl1, 1, 0); - this.tableLayoutPanelStatistik.Controls.Add(this.labelStatistik1, 0, 0); - this.tableLayoutPanelStatistik.Dock = System.Windows.Forms.DockStyle.Bottom; - this.tableLayoutPanelStatistik.Location = new System.Drawing.Point(3, 51); - this.tableLayoutPanelStatistik.Name = "tableLayoutPanelStatistik"; - this.tableLayoutPanelStatistik.RowCount = 6; - this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); - this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); - this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); - this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); - this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); - this.tableLayoutPanelStatistik.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); - this.tableLayoutPanelStatistik.Size = new System.Drawing.Size(295, 143); - this.tableLayoutPanelStatistik.TabIndex = 0; - // - // labelZahl6 - // - this.labelZahl6.AutoSize = true; - this.labelZahl6.Dock = System.Windows.Forms.DockStyle.Left; - this.labelZahl6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelZahl6.ForeColor = System.Drawing.Color.White; - this.labelZahl6.Location = new System.Drawing.Point(99, 115); - this.labelZahl6.Name = "labelZahl6"; - this.labelZahl6.Size = new System.Drawing.Size(53, 28); - this.labelZahl6.TabIndex = 11; - this.labelZahl6.Text = "Zahl 6"; - this.labelZahl6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelStatistik6 - // - this.labelStatistik6.AutoSize = true; - this.labelStatistik6.Dock = System.Windows.Forms.DockStyle.Left; - this.labelStatistik6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelStatistik6.ForeColor = System.Drawing.Color.White; - this.labelStatistik6.Location = new System.Drawing.Point(3, 115); - this.labelStatistik6.Name = "labelStatistik6"; - this.labelStatistik6.Size = new System.Drawing.Size(90, 28); - this.labelStatistik6.TabIndex = 10; - this.labelStatistik6.Text = "Statistik 6"; - this.labelStatistik6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelZahl5 - // - this.labelZahl5.AutoSize = true; - this.labelZahl5.Dock = System.Windows.Forms.DockStyle.Left; - this.labelZahl5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelZahl5.ForeColor = System.Drawing.Color.White; - this.labelZahl5.Location = new System.Drawing.Point(99, 92); - this.labelZahl5.Name = "labelZahl5"; - this.labelZahl5.Size = new System.Drawing.Size(53, 23); - this.labelZahl5.TabIndex = 9; - this.labelZahl5.Text = "Zahl 5"; - this.labelZahl5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelStatistik5 - // - this.labelStatistik5.AutoSize = true; - this.labelStatistik5.Dock = System.Windows.Forms.DockStyle.Left; - this.labelStatistik5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelStatistik5.ForeColor = System.Drawing.Color.White; - this.labelStatistik5.Location = new System.Drawing.Point(3, 92); - this.labelStatistik5.Name = "labelStatistik5"; - this.labelStatistik5.Size = new System.Drawing.Size(90, 23); - this.labelStatistik5.TabIndex = 8; - this.labelStatistik5.Text = "Statistik 5"; - this.labelStatistik5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelZahl4 - // - this.labelZahl4.AutoSize = true; - this.labelZahl4.Dock = System.Windows.Forms.DockStyle.Left; - this.labelZahl4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelZahl4.ForeColor = System.Drawing.Color.White; - this.labelZahl4.Location = new System.Drawing.Point(99, 69); - this.labelZahl4.Name = "labelZahl4"; - this.labelZahl4.Size = new System.Drawing.Size(53, 23); - this.labelZahl4.TabIndex = 7; - this.labelZahl4.Text = "Zahl 4"; - this.labelZahl4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelStatistik4 - // - this.labelStatistik4.AutoSize = true; - this.labelStatistik4.Dock = System.Windows.Forms.DockStyle.Left; - this.labelStatistik4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelStatistik4.ForeColor = System.Drawing.Color.White; - this.labelStatistik4.Location = new System.Drawing.Point(3, 69); - this.labelStatistik4.Name = "labelStatistik4"; - this.labelStatistik4.Size = new System.Drawing.Size(90, 23); - this.labelStatistik4.TabIndex = 6; - this.labelStatistik4.Text = "Statistik 4"; - this.labelStatistik4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelZahl3 - // - this.labelZahl3.AutoSize = true; - this.labelZahl3.Dock = System.Windows.Forms.DockStyle.Left; - this.labelZahl3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelZahl3.ForeColor = System.Drawing.Color.White; - this.labelZahl3.Location = new System.Drawing.Point(99, 46); - this.labelZahl3.Name = "labelZahl3"; - this.labelZahl3.Size = new System.Drawing.Size(53, 23); - this.labelZahl3.TabIndex = 5; - this.labelZahl3.Text = "Zahl 3"; - this.labelZahl3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelStatistik3 - // - this.labelStatistik3.AutoSize = true; - this.labelStatistik3.Dock = System.Windows.Forms.DockStyle.Left; - this.labelStatistik3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelStatistik3.ForeColor = System.Drawing.Color.White; - this.labelStatistik3.Location = new System.Drawing.Point(3, 46); - this.labelStatistik3.Name = "labelStatistik3"; - this.labelStatistik3.Size = new System.Drawing.Size(90, 23); - this.labelStatistik3.TabIndex = 4; - this.labelStatistik3.Text = "Statistik 3"; - this.labelStatistik3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelZahl2 - // - this.labelZahl2.AutoSize = true; - this.labelZahl2.Dock = System.Windows.Forms.DockStyle.Left; - this.labelZahl2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelZahl2.ForeColor = System.Drawing.Color.White; - this.labelZahl2.Location = new System.Drawing.Point(99, 23); - this.labelZahl2.Name = "labelZahl2"; - this.labelZahl2.Size = new System.Drawing.Size(53, 23); - this.labelZahl2.TabIndex = 3; - this.labelZahl2.Text = "Zahl 2"; - this.labelZahl2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelStatistik2 - // - this.labelStatistik2.AutoSize = true; - this.labelStatistik2.Dock = System.Windows.Forms.DockStyle.Left; - this.labelStatistik2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelStatistik2.ForeColor = System.Drawing.Color.White; - this.labelStatistik2.Location = new System.Drawing.Point(3, 23); - this.labelStatistik2.Name = "labelStatistik2"; - this.labelStatistik2.Size = new System.Drawing.Size(90, 23); - this.labelStatistik2.TabIndex = 2; - this.labelStatistik2.Text = "Statistik 2"; - this.labelStatistik2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelZahl1 - // - this.labelZahl1.AutoSize = true; - this.labelZahl1.Dock = System.Windows.Forms.DockStyle.Left; - this.labelZahl1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelZahl1.ForeColor = System.Drawing.Color.White; - this.labelZahl1.Location = new System.Drawing.Point(99, 0); - this.labelZahl1.Name = "labelZahl1"; - this.labelZahl1.Size = new System.Drawing.Size(53, 23); - this.labelZahl1.TabIndex = 1; - this.labelZahl1.Text = "Zahl 1"; - this.labelZahl1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // labelStatistik1 - // - this.labelStatistik1.AutoSize = true; - this.labelStatistik1.Dock = System.Windows.Forms.DockStyle.Left; - this.labelStatistik1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelStatistik1.ForeColor = System.Drawing.Color.White; - this.labelStatistik1.Location = new System.Drawing.Point(3, 0); - this.labelStatistik1.Name = "labelStatistik1"; - this.labelStatistik1.Size = new System.Drawing.Size(90, 23); - this.labelStatistik1.TabIndex = 0; - this.labelStatistik1.Text = "Statistik 1"; - this.labelStatistik1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // // buttonSuchen // this.buttonSuchen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -584,7 +104,7 @@ this.buttonSuchen.Name = "buttonSuchen"; this.buttonSuchen.Size = new System.Drawing.Size(200, 41); this.buttonSuchen.TabIndex = 63; - this.buttonSuchen.Text = "Suchen"; + this.buttonSuchen.Text = "Auftrag Suchen"; this.buttonSuchen.UseVisualStyleBackColor = false; this.buttonSuchen.Click += new System.EventHandler(this.buttonSuchen_Click); // @@ -620,34 +140,6 @@ this.buttonSWS_Drucken.UseVisualStyleBackColor = false; this.buttonSWS_Drucken.Click += new System.EventHandler(this.buttonSWS_Drucken_Click); // - // buttonStats - // - this.buttonStats.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonStats.FlatAppearance.BorderColor = System.Drawing.Color.White; - this.buttonStats.FlatAppearance.BorderSize = 3; - this.buttonStats.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonStats.Image = global::Deckungsbeitrag.Properties.Resources.StatisticsWarning_16x; - this.buttonStats.Location = new System.Drawing.Point(1121, 650); - this.buttonStats.Name = "buttonStats"; - this.buttonStats.Size = new System.Drawing.Size(41, 41); - this.buttonStats.TabIndex = 46; - this.buttonStats.UseVisualStyleBackColor = true; - this.buttonStats.Click += new System.EventHandler(this.buttonStats_Click); - // - // buttonEinstellung - // - this.buttonEinstellung.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonEinstellung.FlatAppearance.BorderColor = System.Drawing.Color.White; - this.buttonEinstellung.FlatAppearance.BorderSize = 3; - this.buttonEinstellung.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonEinstellung.Image = global::Deckungsbeitrag.Properties.Resources.Monaco_Settings_16x; - this.buttonEinstellung.Location = new System.Drawing.Point(1168, 650); - this.buttonEinstellung.Name = "buttonEinstellung"; - this.buttonEinstellung.Size = new System.Drawing.Size(41, 41); - this.buttonEinstellung.TabIndex = 45; - this.buttonEinstellung.UseVisualStyleBackColor = true; - this.buttonEinstellung.Click += new System.EventHandler(this.buttonEinstellung_Click); - // // chartFehlmenge // this.chartFehlmenge.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -662,19 +154,20 @@ this.chartFehlmenge.ChartAreas.Add(chartArea1); legend1.Name = "Legend1"; this.chartFehlmenge.Legends.Add(legend1); - this.chartFehlmenge.Location = new System.Drawing.Point(908, 12); + this.chartFehlmenge.Location = new System.Drawing.Point(916, 43); this.chartFehlmenge.Name = "chartFehlmenge"; series1.ChartArea = "ChartArea1"; series1.Legend = "Legend1"; series1.Name = "Series1"; this.chartFehlmenge.Series.Add(series1); - this.chartFehlmenge.Size = new System.Drawing.Size(301, 434); + this.chartFehlmenge.Size = new System.Drawing.Size(293, 403); this.chartFehlmenge.TabIndex = 2; this.chartFehlmenge.Text = "chart1"; title1.Name = "Title1"; title1.Text = "Hallo Test"; this.chartFehlmenge.Titles.Add(title1); this.chartFehlmenge.Visible = false; + this.chartFehlmenge.VisibleChanged += new System.EventHandler(this.chartFehlmenge_VisibleChanged); // // groupBoxKndInfo // @@ -689,6 +182,7 @@ this.groupBoxKndInfo.TabStop = false; this.groupBoxKndInfo.Text = "INFOS"; this.groupBoxKndInfo.Visible = false; + this.groupBoxKndInfo.VisibleChanged += new System.EventHandler(this.groupBoxKndInfo_VisibleChanged); this.groupBoxKndInfo.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBoxKndInfo_Paint); // // tableLayoutPanelInfo @@ -745,6 +239,264 @@ this.buttonTourenListe.UseVisualStyleBackColor = false; this.buttonTourenListe.Click += new System.EventHandler(this.buttonTourenListe_Click); // + // buttonStats + // + this.buttonStats.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonStats.FlatAppearance.BorderColor = System.Drawing.Color.White; + this.buttonStats.FlatAppearance.BorderSize = 3; + this.buttonStats.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonStats.Image = global::Deckungsbeitrag.Properties.Resources.StatisticsWarning_16x; + this.buttonStats.Location = new System.Drawing.Point(1121, 650); + this.buttonStats.Name = "buttonStats"; + this.buttonStats.Size = new System.Drawing.Size(41, 41); + this.buttonStats.TabIndex = 46; + this.buttonStats.UseVisualStyleBackColor = true; + this.buttonStats.Click += new System.EventHandler(this.buttonStats_Click); + // + // buttonEinstellung + // + this.buttonEinstellung.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonEinstellung.FlatAppearance.BorderColor = System.Drawing.Color.White; + this.buttonEinstellung.FlatAppearance.BorderSize = 3; + this.buttonEinstellung.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonEinstellung.Image = global::Deckungsbeitrag.Properties.Resources.Monaco_Settings_16x; + this.buttonEinstellung.Location = new System.Drawing.Point(1168, 650); + this.buttonEinstellung.Name = "buttonEinstellung"; + this.buttonEinstellung.Size = new System.Drawing.Size(41, 41); + this.buttonEinstellung.TabIndex = 45; + this.buttonEinstellung.UseVisualStyleBackColor = true; + this.buttonEinstellung.Click += new System.EventHandler(this.buttonEinstellung_Click); + // + // tabPageRampe + // + this.tabPageRampe.Controls.Add(this.objectListViewRampe); + this.tabPageRampe.Location = new System.Drawing.Point(4, 34); + this.tabPageRampe.Name = "tabPageRampe"; + this.tabPageRampe.Size = new System.Drawing.Size(890, 584); + this.tabPageRampe.TabIndex = 3; + this.tabPageRampe.Text = "Rampe"; + this.tabPageRampe.UseVisualStyleBackColor = true; + // + // objectListViewRampe + // + this.objectListViewRampe.AllowColumnReorder = true; + this.objectListViewRampe.AlternateRowBackColor = System.Drawing.Color.LightBlue; + this.objectListViewRampe.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick; + this.objectListViewRampe.CellEditUseWholeCell = false; + this.objectListViewRampe.Cursor = System.Windows.Forms.Cursors.Default; + this.objectListViewRampe.Dock = System.Windows.Forms.DockStyle.Fill; + this.objectListViewRampe.FullRowSelect = true; + this.objectListViewRampe.GridLines = true; + this.objectListViewRampe.HideSelection = false; + 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.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.objectListViewRampe.TabIndex = 2; + this.objectListViewRampe.TintSortColumn = true; + this.objectListViewRampe.UnfocusedSelectedBackColor = System.Drawing.SystemColors.Highlight; + this.objectListViewRampe.UnfocusedSelectedForeColor = System.Drawing.SystemColors.HighlightText; + this.objectListViewRampe.UseAlternatingBackColors = true; + this.objectListViewRampe.UseCellFormatEvents = true; + this.objectListViewRampe.UseCompatibleStateImageBehavior = false; + this.objectListViewRampe.UseFiltering = true; + this.objectListViewRampe.UseHotControls = false; + this.objectListViewRampe.UseHyperlinks = true; + this.objectListViewRampe.View = System.Windows.Forms.View.Details; + // + // tabPageSonder + // + this.tabPageSonder.Controls.Add(this.objectListViewSonder); + this.tabPageSonder.Location = new System.Drawing.Point(4, 34); + this.tabPageSonder.Name = "tabPageSonder"; + this.tabPageSonder.Padding = new System.Windows.Forms.Padding(3); + this.tabPageSonder.Size = new System.Drawing.Size(890, 584); + this.tabPageSonder.TabIndex = 1; + this.tabPageSonder.Text = "Sonderaufträge"; + this.tabPageSonder.UseVisualStyleBackColor = true; + // + // 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; + this.objectListViewSonder.FullRowSelect = true; + this.objectListViewSonder.GridLines = true; + 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, 578); + 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.CellEditFinished += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditFinished); + this.objectListViewSonder.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditStarting); + this.objectListViewSonder.CellClick += new System.EventHandler(this.objectListViewAuftrag_CellClick); + this.objectListViewSonder.CellRightClick += new System.EventHandler(this.objectListViewAuftrag_CellRightClick); + this.objectListViewSonder.FormatCell += new System.EventHandler(this.objectListViewAuftrag_FormatCell); + // + // tabPageGeschaeft + // + this.tabPageGeschaeft.Controls.Add(this.objectListViewGeschaeft); + this.tabPageGeschaeft.Location = new System.Drawing.Point(4, 34); + this.tabPageGeschaeft.Name = "tabPageGeschaeft"; + this.tabPageGeschaeft.Padding = new System.Windows.Forms.Padding(3); + this.tabPageGeschaeft.Size = new System.Drawing.Size(890, 584); + this.tabPageGeschaeft.TabIndex = 2; + this.tabPageGeschaeft.Text = "Geschäft"; + this.tabPageGeschaeft.UseVisualStyleBackColor = true; + // + // objectListViewGeschaeft + // + this.objectListViewGeschaeft.AllowColumnReorder = true; + this.objectListViewGeschaeft.AlternateRowBackColor = System.Drawing.Color.LightBlue; + this.objectListViewGeschaeft.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick; + this.objectListViewGeschaeft.CellEditUseWholeCell = false; + this.objectListViewGeschaeft.Cursor = System.Windows.Forms.Cursors.Default; + this.objectListViewGeschaeft.Dock = System.Windows.Forms.DockStyle.Fill; + this.objectListViewGeschaeft.FullRowSelect = true; + this.objectListViewGeschaeft.GridLines = true; + this.objectListViewGeschaeft.HideSelection = false; + 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.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.objectListViewGeschaeft.TabIndex = 2; + this.objectListViewGeschaeft.TintSortColumn = true; + this.objectListViewGeschaeft.UnfocusedSelectedBackColor = System.Drawing.SystemColors.Highlight; + this.objectListViewGeschaeft.UnfocusedSelectedForeColor = System.Drawing.SystemColors.HighlightText; + this.objectListViewGeschaeft.UseAlternatingBackColors = true; + this.objectListViewGeschaeft.UseCellFormatEvents = true; + this.objectListViewGeschaeft.UseCompatibleStateImageBehavior = false; + this.objectListViewGeschaeft.UseFiltering = true; + this.objectListViewGeschaeft.UseHotControls = false; + this.objectListViewGeschaeft.UseHyperlinks = true; + this.objectListViewGeschaeft.View = System.Windows.Forms.View.Details; + this.objectListViewGeschaeft.ButtonClick += new System.EventHandler(this.objectListViewAuftrag_ButtonClick); + this.objectListViewGeschaeft.CellEditFinished += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditFinished); + this.objectListViewGeschaeft.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditStarting); + this.objectListViewGeschaeft.CellClick += new System.EventHandler(this.objectListViewAuftrag_CellClick); + this.objectListViewGeschaeft.CellRightClick += new System.EventHandler(this.objectListViewAuftrag_CellRightClick); + this.objectListViewGeschaeft.FormatCell += new System.EventHandler(this.objectListViewAuftrag_FormatCell); + // + // tabPageAll + // + this.tabPageAll.Controls.Add(this.objectListViewAuftrag); + this.tabPageAll.Location = new System.Drawing.Point(4, 34); + this.tabPageAll.Name = "tabPageAll"; + this.tabPageAll.Padding = new System.Windows.Forms.Padding(3); + this.tabPageAll.Size = new System.Drawing.Size(890, 584); + this.tabPageAll.TabIndex = 0; + this.tabPageAll.Text = "Aufträge heute"; + this.tabPageAll.UseVisualStyleBackColor = true; + // + // objectListViewAuftrag + // + this.objectListViewAuftrag.AllowColumnReorder = true; + this.objectListViewAuftrag.AlternateRowBackColor = System.Drawing.Color.LightBlue; + this.objectListViewAuftrag.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick; + this.objectListViewAuftrag.CellEditUseWholeCell = false; + this.objectListViewAuftrag.Cursor = System.Windows.Forms.Cursors.Default; + this.objectListViewAuftrag.Dock = System.Windows.Forms.DockStyle.Fill; + this.objectListViewAuftrag.FullRowSelect = true; + this.objectListViewAuftrag.GridLines = true; + this.objectListViewAuftrag.HideSelection = false; + 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.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.objectListViewAuftrag.TabIndex = 1; + this.objectListViewAuftrag.TintSortColumn = true; + this.objectListViewAuftrag.UnfocusedSelectedBackColor = System.Drawing.SystemColors.Highlight; + this.objectListViewAuftrag.UnfocusedSelectedForeColor = System.Drawing.SystemColors.HighlightText; + this.objectListViewAuftrag.UseAlternatingBackColors = true; + this.objectListViewAuftrag.UseCellFormatEvents = true; + this.objectListViewAuftrag.UseCompatibleStateImageBehavior = false; + this.objectListViewAuftrag.UseFiltering = true; + this.objectListViewAuftrag.UseHotControls = false; + this.objectListViewAuftrag.UseHyperlinks = true; + this.objectListViewAuftrag.View = System.Windows.Forms.View.Details; + this.objectListViewAuftrag.ButtonClick += new System.EventHandler(this.objectListViewAuftrag_ButtonClick); + this.objectListViewAuftrag.CellEditFinished += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditFinished); + this.objectListViewAuftrag.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditStarting); + this.objectListViewAuftrag.CellClick += new System.EventHandler(this.objectListViewAuftrag_CellClick); + this.objectListViewAuftrag.CellRightClick += new System.EventHandler(this.objectListViewAuftrag_CellRightClick); + this.objectListViewAuftrag.FormatCell += new System.EventHandler(this.objectListViewAuftrag_FormatCell); + // + // tabControlAuftragList + // + this.tabControlAuftragList.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.tabControlAuftragList.Controls.Add(this.tabPageAll); + this.tabControlAuftragList.Controls.Add(this.tabPageGeschaeft); + this.tabControlAuftragList.Controls.Add(this.tabPageSonder); + this.tabControlAuftragList.Controls.Add(this.tabPageRampe); + this.tabControlAuftragList.Controls.Add(this.tabPageVorbereitet); + this.tabControlAuftragList.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabControlAuftragList.Location = new System.Drawing.Point(4, 17); + this.tabControlAuftragList.Name = "tabControlAuftragList"; + this.tabControlAuftragList.SelectedIndex = 0; + this.tabControlAuftragList.Size = new System.Drawing.Size(898, 622); + this.tabControlAuftragList.TabIndex = 0; + this.tabControlAuftragList.Visible = false; + this.tabControlAuftragList.SelectedIndexChanged += new System.EventHandler(this.tabControlAuftragList_SelectedIndexChanged); + this.tabControlAuftragList.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControlAuftragList_MouseDown); + // + // tabPageVorbereitet + // + this.tabPageVorbereitet.Controls.Add(this.objectListViewVorbereitet); + this.tabPageVorbereitet.Location = new System.Drawing.Point(4, 34); + this.tabPageVorbereitet.Name = "tabPageVorbereitet"; + this.tabPageVorbereitet.Size = new System.Drawing.Size(890, 584); + this.tabPageVorbereitet.TabIndex = 4; + this.tabPageVorbereitet.Text = "Vorbereitet"; + this.tabPageVorbereitet.UseVisualStyleBackColor = true; + // + // objectListViewVorbereitet + // + this.objectListViewVorbereitet.AllowColumnReorder = true; + this.objectListViewVorbereitet.AlternateRowBackColor = System.Drawing.Color.LightBlue; + this.objectListViewVorbereitet.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick; + this.objectListViewVorbereitet.CellEditUseWholeCell = false; + this.objectListViewVorbereitet.CheckBoxes = true; + this.objectListViewVorbereitet.Cursor = System.Windows.Forms.Cursors.Default; + this.objectListViewVorbereitet.Dock = System.Windows.Forms.DockStyle.Fill; + this.objectListViewVorbereitet.FullRowSelect = true; + this.objectListViewVorbereitet.GridLines = true; + this.objectListViewVorbereitet.HideSelection = false; + 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.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.objectListViewVorbereitet.TabIndex = 2; + this.objectListViewVorbereitet.TintSortColumn = true; + this.objectListViewVorbereitet.UnfocusedSelectedBackColor = System.Drawing.SystemColors.Highlight; + this.objectListViewVorbereitet.UnfocusedSelectedForeColor = System.Drawing.SystemColors.HighlightText; + this.objectListViewVorbereitet.UseAlternatingBackColors = true; + this.objectListViewVorbereitet.UseCellFormatEvents = true; + this.objectListViewVorbereitet.UseCompatibleStateImageBehavior = false; + this.objectListViewVorbereitet.UseFiltering = true; + this.objectListViewVorbereitet.UseHyperlinks = true; + this.objectListViewVorbereitet.View = System.Windows.Forms.View.Details; + this.objectListViewVorbereitet.ButtonClick += new System.EventHandler(this.objectListViewAuftrag_ButtonClick); + this.objectListViewVorbereitet.CellEditFinished += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditFinished); + this.objectListViewVorbereitet.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewAuftrag_CellEditStarting); + this.objectListViewVorbereitet.CellClick += new System.EventHandler(this.objectListViewAuftrag_CellClick); + this.objectListViewVorbereitet.FormatCell += new System.EventHandler(this.objectListViewAuftrag_FormatCell); + // // FormExpedit // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -760,8 +512,6 @@ this.Controls.Add(this.buttonNeuerAuftrag); this.Controls.Add(this.buttonSWS_Drucken); this.Controls.Add(this.tabControlAuftragList); - this.Controls.Add(this.dGArtikel); - this.Controls.Add(this.groupBoxStatistik); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.HelpButton = true; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -775,21 +525,21 @@ this.Load += new System.EventHandler(this.FormExpedit_Load); this.Shown += new System.EventHandler(this.FormExpedit_Shown); this.Resize += new System.EventHandler(this.FormExpedit_Resize); - ((System.ComponentModel.ISupportInitialize)(this.dGArtikel)).EndInit(); - this.tabPageSonder.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.objectListViewSonder)).EndInit(); - this.tabPageAll.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).EndInit(); - this.tabControlAuftragList.ResumeLayout(false); - this.tabPageGeschaeft.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.objectListViewGeschaeft)).EndInit(); - this.groupBoxStatistik.ResumeLayout(false); - this.tableLayoutPanelStatistik.ResumeLayout(false); - this.tableLayoutPanelStatistik.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).EndInit(); this.groupBoxKndInfo.ResumeLayout(false); this.tableLayoutPanelInfo.ResumeLayout(false); this.tableLayoutPanelInfo.PerformLayout(); + this.tabPageRampe.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewRampe)).EndInit(); + this.tabPageSonder.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewSonder)).EndInit(); + this.tabPageGeschaeft.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewGeschaeft)).EndInit(); + this.tabPageAll.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewAuftrag)).EndInit(); + this.tabControlAuftragList.ResumeLayout(false); + this.tabPageVorbereitet.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.objectListViewVorbereitet)).EndInit(); this.ResumeLayout(false); } @@ -797,48 +547,26 @@ #endregion private System.Windows.Forms.Button buttonSWS_Drucken; private System.Windows.Forms.Button buttonNeuerAuftrag; - private System.Windows.Forms.DataGridView dGArtikel; - private System.Windows.Forms.TabPage tabPageSonder; - private BrightIdeasSoftware.ObjectListView objectListViewSonder; - private System.Windows.Forms.TabPage tabPageAll; - private BrightIdeasSoftware.ObjectListView objectListViewAuftrag; - private System.Windows.Forms.TabControl tabControlAuftragList; private System.Windows.Forms.Button buttonEinstellung; private System.Windows.Forms.Button buttonStats; - private System.Windows.Forms.GroupBox groupBoxStatistik; - private System.Windows.Forms.DateTimePicker dateTimePicker1; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanelStatistik; - private System.Windows.Forms.Label labelZahl6; - private System.Windows.Forms.Label labelStatistik6; - private System.Windows.Forms.Label labelZahl5; - private System.Windows.Forms.Label labelStatistik5; - private System.Windows.Forms.Label labelZahl4; - private System.Windows.Forms.Label labelStatistik4; - private System.Windows.Forms.Label labelZahl3; - private System.Windows.Forms.Label labelStatistik3; - private System.Windows.Forms.Label labelZahl2; - private System.Windows.Forms.Label labelStatistik2; - private System.Windows.Forms.Label labelZahl1; - private System.Windows.Forms.Label labelStatistik1; - 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.Button buttonSuchen; private System.Windows.Forms.Button buttonReklamation; - private System.Windows.Forms.TabPage tabPageGeschaeft; - private BrightIdeasSoftware.ObjectListView objectListViewGeschaeft; private System.Windows.Forms.DataVisualization.Charting.Chart chartFehlmenge; private System.Windows.Forms.GroupBox groupBoxKndInfo; private System.Windows.Forms.TableLayoutPanel tableLayoutPanelInfo; private System.Windows.Forms.Label labelAnmerkung; private System.Windows.Forms.Label labelAufgabe; private System.Windows.Forms.Button buttonTourenListe; + private System.Windows.Forms.TabPage tabPageRampe; + private BrightIdeasSoftware.ObjectListView objectListViewRampe; + private System.Windows.Forms.TabPage tabPageSonder; + private BrightIdeasSoftware.ObjectListView objectListViewSonder; + private System.Windows.Forms.TabPage tabPageGeschaeft; + private BrightIdeasSoftware.ObjectListView objectListViewGeschaeft; + private System.Windows.Forms.TabPage tabPageAll; + private BrightIdeasSoftware.ObjectListView objectListViewAuftrag; + private System.Windows.Forms.TabControl tabControlAuftragList; + private System.Windows.Forms.TabPage tabPageVorbereitet; + private BrightIdeasSoftware.ObjectListView objectListViewVorbereitet; } } \ No newline at end of file diff --git a/AA-Forms/FormExpedit.cs b/AA-Forms/FormExpedit.cs index 1e039d1..7a2e41b 100644 --- a/AA-Forms/FormExpedit.cs +++ b/AA-Forms/FormExpedit.cs @@ -1,6 +1,8 @@ using BrightIdeasSoftware; using DatenDB; +using Deckungsbeitrag.AA_Forms; using Deckungsbeitrag.Properties; +using Deckungsbeitrag.UserControls; using Microsoft.VisualBasic; using Npgsql; using System; @@ -8,6 +10,7 @@ using System.Collections.Generic; using System.Configuration; using System.Data; using System.Diagnostics; +using System.Diagnostics.Eventing.Reader; using System.Drawing; using System.Linq; using System.Net.Sockets; @@ -18,6 +21,17 @@ using System.Xml.Resolvers; namespace Deckungsbeitrag { + public enum ListenArt + { + Auftragliste = 0, + Sonderliste = 1, + Geschäftliste = 2, + Suchliste = 3, + Rampenliste = 4, + Vorbereitetliste = 5 + } + + public partial class FormExpedit : Form { #region Properties @@ -34,10 +48,13 @@ namespace Deckungsbeitrag bool nocont = false; bool nocontclicked = false; Meldungen meldung = new Meldungen(); - public List artikelListe; - public List auftraglist; - public List sonderlist; - public List geschaeftlist; + private List artikelListe; + private List auftraglist; + private List sonderlist; + private List geschaeftlist; + private List suchliste; + private List rampenlist; + private List vorbereitetliste; int beforeedit = 0; int? altecontclean = null; Timer timer1 = new Timer(); // Timer für Nachwäsche @@ -58,6 +75,7 @@ namespace Deckungsbeitrag InitializeComponent(); + this.Text += " Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString(); this.benutzer = benutzer; this.StartPosition = FormStartPosition.CenterScreen; this.tabControlAuftragList.Visible = true; @@ -75,36 +93,37 @@ namespace Deckungsbeitrag } } } + + #region Form-Funktionen private void FormExpedit_Load(object sender, EventArgs e) { //Application.UseWaitCursor = true; this.Cursor = Cursors.WaitCursor; this.SuspendLayout(); - - this.Text += " Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString(); - _settings.Load(); + + UCFeedback fb = new UCFeedback(this.benutzer); + this.Controls.Add(fb); + //Auftragslisten erstellen und in ObjectListViews laden. // DB PARALLEL im Background (NON-BLOCKING!) _ = Task.Run(async () => { try { - await Task.WhenAll(GetAuftraege(), GetSonderAuftraege()); + await Task.WhenAll(GetAuftraege(null), GetSonderAuftraege()); // UI-Update NACH Daten (Invoke!) this.Invoke(new Action(() => { // OLVs füllen - OLV_Load(objectListViewAuftrag, auftraglist); - // Lade die ListView für Sonderaufträge wie STV, STH, oder INVENTUR - if (sonderlist.Count == 0) { this.tabControlAuftragList.TabPages.Remove(tabPageSonder); } - else { OLV_Load(this.objectListViewSonder, sonderlist); if (this.tabControlAuftragList.TabPages.Count < 2) this.tabControlAuftragList.TabPages.Insert(1, tabPageSonder); } - // Lade die ListView für Geschäftaufträge - 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); } - + 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); + // Controls aktivieren und deaktivieren nach BenutzerRolle Enable_Controls(); @@ -124,110 +143,34 @@ namespace Deckungsbeitrag }); } - - - /// - /// Controls werden nach Benutzer deaktiviert. - /// - private void Enable_Controls() + private void FormExpedit_FormClosing(object sender, FormClosingEventArgs e) + { + _settings.OLV_State = this.objectListViewAuftrag.SaveState(); + _settings.Save(); + } + private void FormExpedit_Resize(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; - switch (this.benutzer.Rolle) - { - case BenutzerRolle.Verwaltung: - this.buttonNeuerAuftrag.Enabled = this.buttonSWS_Drucken.Enabled = false; - - - GetUnvisibleColumns(); - break; - case BenutzerRolle.Fahrer: - this.buttonNeuerAuftrag.Enabled = this.buttonSWS_Drucken.Enabled = false; - - - GetUnvisibleColumns(); - break; - case BenutzerRolle.Admin: - break; - case BenutzerRolle.Waschstrasse: - this.buttonNeuerAuftrag.Enabled = this.buttonSWS_Drucken.Enabled = false; - - - GetUnvisibleColumns(); - break; - case BenutzerRolle.Master: - break; - case BenutzerRolle.Expedit: - break; - case BenutzerRolle.Frottee: - 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. - - - GetUnvisibleColumns(); - break; - case BenutzerRolle.Flach: - this.buttonNeuerAuftrag.Enabled = this.buttonSWS_Drucken.Enabled = false; - - - // WENN Rolle Frottee (Expedit Frottee) dann ButtonClick deaktiviert. Nur Expedit kann abschließen - GetUnvisibleColumns(); - break; - default: - break; - } + this.tabControlAuftragList.Width = this.Width - 25; } - - /// - /// Auftragslisten erstellen und in ObjectListViews laden. - /// - private async Task GetSonderAuftraege() + private void FormExpedit_Shown(object sender, EventArgs e) { - var conn = new NpgsqlConnection(ConfigurationManager.AppSettings["ConnectionString"]); // Pro Task! - try - { - await conn.OpenAsync(); - 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 - { - if (conn.State == ConnectionState.Open) - conn.Close(); - conn.Dispose(); - } - } - private async Task GetAuftraege() - { - var conn = new NpgsqlConnection(ConfigurationManager.AppSettings["ConnectionString"]); // Pro Task! - try - { - await conn.OpenAsync(); - 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 - { - if (conn.State == ConnectionState.Open) - conn.Close(); - conn.Dispose(); - } - } + // 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); + 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; + } + #endregion #region Button_Click-Events private async void buttonNeuerAuftrag_Click(object sender, EventArgs e) @@ -236,7 +179,7 @@ namespace Deckungsbeitrag if (neuerAuftrag.ShowDialog() == DialogResult.OK) { this.letzterLiefertag = neuerAuftrag.letzterLiefertag; - await GetAuftraege(); + await GetAuftraege(null); //List auftraglist = Auftrag.GetAuftragListToday(DateTime.Today); OLV_SetObjects(this.objectListViewAuftrag, auftraglist); OLV_SetObjects(this.objectListViewGeschaeft, geschaeftlist); @@ -282,8 +225,18 @@ namespace Deckungsbeitrag objectListViewAuftrag.Focus(); } - + else + { + FormShowGroupBox showGroupBox = new FormShowGroupBox("Auftrag Suchen", this.benutzer); + if (showGroupBox.ShowDialog() == DialogResult.OK) + { + suchliste = showGroupBox.auftragliste; + AddTabPage(suchliste, ListenArt.Suchliste); + } + } } + + private void buttonReklamation_Click(object sender, EventArgs e) { FormFehlmengeCount reklamation = new FormFehlmengeCount(this.benutzer); @@ -305,10 +258,21 @@ namespace Deckungsbeitrag } } + private void buttonStats_Click(object sender, EventArgs e) + { + FormShowGroupBox showGroupBox = new FormShowGroupBox("Statistik", this.benutzer); + showGroupBox.ShowDialog(); + } #endregion #region ObjectListView-Events + + /// + /// Die ObjectListView wird komplett neu geladen. Mit Spalten etc. + /// + /// + /// private void OLV_Load(ObjectListView olv, List auftraglist) { this.Cursor = Cursors.WaitCursor; @@ -330,6 +294,9 @@ namespace Deckungsbeitrag colFrottee.Width = 50; colFrottee.AspectGetter = row => { var auftrag = (Auftrag)row; + + if (!KundeArtikel.HatKategorieArtikel(auftrag.KundeID, ArtikelKategorie.Frottee) & !KundeArtikel.HatKategorieArtikel(auftrag.KundeID, ArtikelKategorie.Spannleintuch)) return string.Empty; + int abteilungen = (int)auftrag.Abteilungen; bool begonnen = (abteilungen & (int)AbteilungsStatus.FrotteeBegonnen) != 0; @@ -348,6 +315,10 @@ namespace Deckungsbeitrag colKleinteile.Width = 50; colKleinteile.AspectGetter = row => { var auftrag = (Auftrag)row; + + if (!KundeArtikel.HatKategorieArtikel(auftrag.KundeID, ArtikelKategorie.Kleinteile)) return string.Empty; + + int abteilungen = (int)auftrag.Abteilungen; bool begonnen = (abteilungen & (int)AbteilungsStatus.KleinteileBegonnen) != 0; @@ -366,6 +337,9 @@ namespace Deckungsbeitrag colGrosseTeile.Width = 50; colGrosseTeile.AspectGetter = row => { var auftrag = (Auftrag)row; + + if (!KundeArtikel.HatKategorieArtikel(auftrag.KundeID, ArtikelKategorie.Grossteile)) return string.Empty; + int abteilungen = (int)auftrag.Abteilungen; bool begonnen = (abteilungen & (int)AbteilungsStatus.GrossteileBegonnen) != 0; @@ -387,7 +361,6 @@ namespace Deckungsbeitrag 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 @@ -395,7 +368,7 @@ namespace Deckungsbeitrag fertigColumn.HeaderImageKey = "abschließen"; fertigColumn.ShowTextInHeader = false; fertigColumn.MinimumWidth = fertigColumn.MaximumWidth = 80; - break; + break; case "Etikett": // Etikett Spalte als Button-Spalte konfigurieren OLVColumn etikettColumn = col; etikettColumn.DisplayIndex = 10; @@ -470,6 +443,8 @@ namespace Deckungsbeitrag //TODO: Reihenfolge Spalten richtig stellen. //TODO: OLV State speichern. + GetUnvisibleColumns(olv); + olv.RebuildColumns(); if (_settings.OLV_State != null) olv.RestoreState(_settings.OLV_State); @@ -566,7 +541,7 @@ namespace Deckungsbeitrag ObjectListView olv = (ObjectListView)sender; Auftrag _auftrag = (Auftrag)e.Model; - if (e.Model == null) { dGArtikel.Visible = false; chartFehlmenge.Visible = false; groupBoxKndInfo.Visible = false; return; } + if (e.Model == null) { chartFehlmenge.Visible = false; groupBoxKndInfo.Visible = false; return; } if (_auftrag.Status != AuftragStatus.Fertig) { this.auftrag = _auftrag; @@ -577,11 +552,15 @@ namespace Deckungsbeitrag var chartliste = await KundeArtikel.LoadArtikelDatenAsync(kunde); if (chartliste.Count > 0) { - if (isttest) { this.chartFehlmenge = Funktionen.Load_FehlmengeChart(chartliste, chartFehlmenge); this.chartFehlmenge.Visible = true; } - else Load_Gridview(this.auftrag); + this.chartFehlmenge = Funktionen.Load_FehlmengeChart(chartliste, chartFehlmenge); + this.chartFehlmenge.Visible = true; } this.groupBoxKndInfo.Visible = true; - if (!string.IsNullOrWhiteSpace(this.kunde.Anmerkung)) { labelAnmerkung.Visible = true; labelAnmerkung.Text = this.kunde.Anmerkung; } + if (!string.IsNullOrWhiteSpace(this.kunde.Anmerkung)) + { + labelAnmerkung.Visible = true; + labelAnmerkung.Text = this.kunde.Anmerkung; + } else labelAnmerkung.Visible = false; if (auftrag.AufgabeID != null) { @@ -590,6 +569,11 @@ namespace Deckungsbeitrag labelAufgabe.Visible = true; } else labelAufgabe.Visible = false; + + // GroupBox einblenden wenn notwendig. + if (labelAufgabe.Visible || labelAnmerkung.Visible || chartFehlmenge.Visible) this.groupBoxKndInfo.Visible = true; + else this.groupBoxKndInfo.Visible = false; + } else { @@ -638,10 +622,15 @@ namespace Deckungsbeitrag _auftrag.Save(); olv.RefreshObject(e); - 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); + if (olv.Name.Contains("Sonder")) + { + await GetSonderAuftraege(); + OLV_SetObjects(olv, sonderlist); + } + + 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); } } break; case "Aufgabe": @@ -653,6 +642,14 @@ namespace Deckungsbeitrag } break; default: + if (_auftrag.Typ == AuftragTyp.Regelmäßig || _auftrag.Typ == AuftragTyp.Standerhöhung || _auftrag.Typ == AuftragTyp.Standverminderung) + { + FormAuftragDetail auftragDetail = new FormAuftragDetail(_auftrag, this.benutzer); + if (auftragDetail.ShowDialog() == DialogResult.Yes) + { + olv.RefreshObject(olv.SelectedObject); + } + } break; } } @@ -664,88 +661,56 @@ namespace Deckungsbeitrag Auftrag _auftrag = (Auftrag)e.Model; if (e.Column.Text == "Abschließen") { - if (this.auftrag != _auftrag) altecontclean = null; - - this.auftrag = _auftrag; - //Load_Etikett_GroupBox(); - - if (this.benutzer.Rolle == BenutzerRolle.Frottee) { Auftrag_Fertig(); Neuladen_OLV(olv); return; } - if (this.auftrag.ContainerClean == 0) + if (olv.CheckedItems.Count > 0) { - switch (this.auftrag.Typ) + if (MessageBox.Show("Möchtest du wirklich alle Aufträge abschließen?", "AUFTRÄGE FERTIG", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return; + else { - case AuftragTyp.Geschäft: - break; - case AuftragTyp.Standart: - if (meldung.NoCleanContainer() == DialogResult.OK) return; - break; - case AuftragTyp.Inventur: - if (meldung.SonderNoCleanContainer() == DialogResult.Yes) - { - Auftrag_Fertig(); - } - else return; - break; - case AuftragTyp.Standverminderung: - if (meldung.SonderNoCleanContainer() == DialogResult.Yes) - { - Auftrag_Fertig(); - } - else return; - break; - case AuftragTyp.Standerhöhung: - if (meldung.SonderNoCleanContainer() == DialogResult.Yes) - { - Auftrag_Fertig(); - } - else return; - break; - default: - break; + foreach (OLVListItem item in olv.CheckedItems) + { + this.auftrag = (Auftrag)item.RowObject; + Auftrag_Fertig(); + + } + foreach (OLVColumn col in olv.Columns) if (col.HeaderCheckBox == true) olv.UncheckHeaderCheckBox(col); } } else { - if (altecontclean != null && this.auftrag.ContainerClean != altecontclean) + if (this.auftrag != _auftrag) altecontclean = null; + + this.auftrag = _auftrag; + + if (this.benutzer.Rolle == BenutzerRolle.Frottee) { Auftrag_Fertig(); Neuladen_OLV(olv); return; } + if (this.auftrag.ContainerClean == 0) { - switch (meldung.DifferentCleanContainer()) + switch (this.auftrag.Typ) { - case DialogResult.Cancel: - return; - case DialogResult.Yes: - { - //this.auftrag.ContainerClean = (int)neuecontclean; - //neuecontclean = null; - //this.auftrag.Liefertag = dTPLiefertag.Value; - //WENN BEARBEITET UND AUSGEDRUCKT WIRD GEDRUCKT VERÄNDERT UND ERSTELLT IST URSPRUNGSDATUM - this.auftrag.Gedruckt = DateTime.Now; - this.auftrag.GedrucktVon = benutzer.BenutzerID; - - bool nocont = false; - if (MessageBox.Show("Möchtest du die Containeranzahl am Etikett anzeigen?", "FRAGE", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - nocont = true; - } - else nocont = false; - - DialogResult result = Funktionen.Etikett_Drucken(auftrag, nocont); - if (result == DialogResult.OK) - { - Auftrag_Fertig(); - } - } + case AuftragTyp.Geschäft: break; - case DialogResult.No: + case AuftragTyp.Standart: + if (meldung.NoCleanContainer() == DialogResult.OK) return; + break; + case AuftragTyp.Inventur: + if (meldung.SonderNoCleanContainer() == DialogResult.Yes) { - //this.auftrag.ContainerClean = (int)neuecontclean; - //neuecontclean = null; - //this.auftrag.Liefertag = dTPLiefertag.Value; - //WENN BEARBEITET UND NICHT GEDRUCKT WIRD ERSTELLT VERÄNDERT UND GEDRUCKT IST URSPRUNGSDATUM - this.auftrag.Erstellt = DateTime.Now; - this.auftrag.ErstelltVon = (int)benutzer.BenutzerID; - Auftrag_Fertig(); } + else return; + break; + case AuftragTyp.Standverminderung: + if (meldung.SonderNoCleanContainer() == DialogResult.Yes) + { + Auftrag_Fertig(); + } + else return; + break; + case AuftragTyp.Standerhöhung: + if (meldung.SonderNoCleanContainer() == DialogResult.Yes) + { + Auftrag_Fertig(); + } + else return; break; default: break; @@ -753,7 +718,56 @@ namespace Deckungsbeitrag } else { - Auftrag_Fertig(); + if (altecontclean != null && this.auftrag.ContainerClean != altecontclean) + { + switch (meldung.DifferentCleanContainer()) + { + case DialogResult.Cancel: + return; + case DialogResult.Yes: + { + //this.auftrag.ContainerClean = (int)neuecontclean; + //neuecontclean = null; + //this.auftrag.Liefertag = dTPLiefertag.Value; + //WENN BEARBEITET UND AUSGEDRUCKT WIRD GEDRUCKT VERÄNDERT UND ERSTELLT IST URSPRUNGSDATUM + this.auftrag.Gedruckt = DateTime.Now; + this.auftrag.GedrucktVon = benutzer.BenutzerID; + + bool nocont = false; + if (MessageBox.Show("Möchtest du die Containeranzahl am Etikett anzeigen?", "FRAGE", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + nocont = true; + } + else nocont = false; + + DialogResult result = Funktionen.Etikett_Drucken(auftrag, nocont); + if (result == DialogResult.OK) + { + Auftrag_Fertig(); + } + } + break; + case DialogResult.No: + { + //this.auftrag.ContainerClean = (int)neuecontclean; + //neuecontclean = null; + //this.auftrag.Liefertag = dTPLiefertag.Value; + //WENN BEARBEITET UND NICHT GEDRUCKT WIRD ERSTELLT VERÄNDERT UND GEDRUCKT IST URSPRUNGSDATUM + this.auftrag.Erstellt = DateTime.Now; + this.auftrag.ErstelltVon = (int)benutzer.BenutzerID; + + Auftrag_Fertig(); + } + break; + default: + break; + } + } + else + { + Auftrag_Fertig(); + } + } } @@ -802,81 +816,102 @@ namespace Deckungsbeitrag Neuladen_OLV(olv); - // DataGridView ausblenden. - this.dGArtikel.DataSource = null; - this.dGArtikel.Rows.Clear(); - this.dGArtikel.Visible = false; - this.Cursor = Cursors.Default; } + + /// + /// Die Objecte der ObjectListView werden neu geladen. + /// + /// + /// 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 + this.Cursor = Cursors.WaitCursor; + this.SuspendLayout(); + if (olv.AllColumns.Count == 0) OLV_Load(olv, auftraglist); + else + { + olv.BeginUpdate(); // Stoppt Datenaktualisierungen/Redraws + olv.SetObjects(auftraglist); // Bindet die Auftragsliste an die View + olv.EndUpdate(); // Update-Pause beenden, Daten neu zeichnen + } + this.ResumeLayout(false); + this.Cursor = Cursors.Default; } + + /// + /// Die Objecte der ObjectListView werden neu geladen. Wenn Sie noch keine Spalten hat wird die ObjectListView komplett neu geladen. + /// + /// 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); - + // 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); } } /// /// Blendet die Button Spalten aus wenn der User dazu nicht berechtigt ist. /// - private void GetUnvisibleColumns() + private void GetUnvisibleColumns(ObjectListView olv) { this.Cursor = Cursors.WaitCursor; this.SuspendLayout(); - foreach (OLVColumn col in this.objectListViewAuftrag.Columns) + foreach (OLVColumn col in olv.AllColumns) { - if (this.benutzer.Rolle == BenutzerRolle.Frottee) + switch (tabControlAuftragList.SelectedTab.Text) { - if (col.Text == "Etikett" & col.IsButton) col.IsVisible = false; - } - else if (col.IsButton) col.IsVisible = false; - - switch (this.benutzer.Rolle) - { - case BenutzerRolle.Verwaltung: + case var t when t == "Vorbereitet": //Wenn Tab ist Vorbereitet wird Abschließen eingeblendet. + if (col.Text == "Abschließen" & col.IsButton) col.IsVisible = true; + if (col.Text == "Etikett" & col.IsButton) col.IsVisible = false; + if (col.Text == "Kunde") + { + col.HeaderCheckBox = true; + col.HeaderCheckBoxUpdatesRowCheckBoxes = true; + } break; - case BenutzerRolle.Fahrer: + case var t when t == "Rampe": if (col.IsButton) col.IsVisible = false; if (col.Text == "FR" || col.Text == "GT" || col.Text == "KT") col.IsVisible = false; - - break; - case BenutzerRolle.Admin: - break; - case BenutzerRolle.Waschstrasse: - break; - case BenutzerRolle.Master: - break; - case BenutzerRolle.Expedit: - break; - case BenutzerRolle.Frottee: - if (col.Text == "Etikett" & col.IsButton) col.IsVisible = false; - break; - case BenutzerRolle.Flach: break; default: + //Für alle BenutzerRollen Abschließen ausblenden. + if (col.IsButton & col.Text == "Abschließen") col.IsVisible = false; break; } + + //Für FrotteeExpedit Etiketten drucken ausblenden. + if (this.benutzer.Rolle == BenutzerRolle.Frottee) if (col.Text == "Etikett" & col.IsButton) col.IsVisible = false; + } - this.objectListViewAuftrag.RebuildColumns(); + olv.RebuildColumns(); this.ResumeLayout(false); } private void objectListViewAuftrag_CellEditFinished(object sender, CellEditEventArgs e) { - Auftrag auftrag = (Auftrag)e.RowObject; + 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(auftrag, false); + if (!string.IsNullOrWhiteSpace(e.NewValue.ToString())) Save_Auftrag(this.auftrag, false); + //Neuladen_OLV(olv); + + this.ResumeLayout(); + this.Cursor = Cursors.Default; } /// @@ -906,6 +941,112 @@ namespace Deckungsbeitrag } #endregion + + /// + /// Controls werden nach Benutzer deaktiviert. + /// + private void Enable_Controls() + { + this.Cursor = Cursors.WaitCursor; + switch (this.benutzer.Rolle) + { + case BenutzerRolle.Verwaltung: + this.buttonNeuerAuftrag.Enabled = this.buttonSWS_Drucken.Enabled = false; + + + GetUnvisibleColumns(this.objectListViewAuftrag); + break; + case BenutzerRolle.Fahrer: + this.buttonNeuerAuftrag.Enabled = this.buttonSWS_Drucken.Enabled = false; + + + GetUnvisibleColumns(this.objectListViewAuftrag); + break; + case BenutzerRolle.Admin: + break; + case BenutzerRolle.Waschstrasse: + this.buttonNeuerAuftrag.Enabled = this.buttonSWS_Drucken.Enabled = false; + + + GetUnvisibleColumns(this.objectListViewAuftrag); + break; + case BenutzerRolle.Master: + break; + case BenutzerRolle.Expedit: + break; + case BenutzerRolle.Frottee: + this.buttonNeuerAuftrag.Visible = this.buttonSWS_Drucken.Visible = false; + this.buttonStats.Visible = this.buttonEinstellung.Visible = false; // buttonReklamation einblenden wenn Frottee-Expedit auch Reklamation bearbeitet. + foreach(TabPage tab in this.tabControlAuftragList.TabPages) + { + if (tab.Text == "Vorbereitet" || tab.Text == "Rampe") tabControlAuftragList.TabPages.Remove(tab); + } + + break; + case BenutzerRolle.Flach: + this.buttonNeuerAuftrag.Enabled = this.buttonSWS_Drucken.Enabled = false; + + + // WENN Rolle Frottee (Expedit Frottee) dann ButtonClick deaktiviert. Nur Expedit kann abschließen + GetUnvisibleColumns(this.objectListViewAuftrag); + break; + default: + break; + } + + } + + /// + /// Auftragslisten erstellen und in ObjectListViews laden. + /// + private async Task GetSonderAuftraege() + { + var conn = new NpgsqlConnection(ConfigurationManager.AppSettings["ConnectionString"]); // Pro Task! + try + { + await conn.OpenAsync(); + if (this.benutzer.Rolle == BenutzerRolle.Frottee) + { + sonderlist = await Auftrag.GetSonderListsAsync((int)AuftragTyp.Inventur, conn, (int)AbteilungsStatus.FrotteeBegonnen); + } + else + { + sonderlist = await Auftrag.GetSonderListsAsync((int)AuftragTyp.Inventur, conn, null); + } + } + finally + { + if (conn.State == ConnectionState.Open) + conn.Close(); + conn.Dispose(); + } + } + private async Task GetAuftraege(ListenArt? liste) + { + var conn = new NpgsqlConnection(ConfigurationManager.AppSettings["ConnectionString"]); // Pro Task! + try + { + await conn.OpenAsync(); + if (this.benutzer.Rolle == BenutzerRolle.Frottee) + { + if (liste == null || liste == ListenArt.Auftragliste) auftraglist = await Auftrag.GetAuftragListTodayAsync(AuftragStatus.Vorbereitet, conn, null, (int)AbteilungsStatus.FrotteeBegonnen); + if (liste == null || liste == ListenArt.Geschäftliste) geschaeftlist = await Auftrag.GetAuftragListTodayAsync(null, conn, AuftragTyp.Geschäft, (int)AbteilungsStatus.FrotteeBegonnen); + } + else + { + if (liste == null || liste == ListenArt.Auftragliste) auftraglist = await Auftrag.GetAuftragListTodayAsync(AuftragStatus.Vorbereitet, conn, null, null); + if (liste == null || liste == ListenArt.Geschäftliste) geschaeftlist = await Auftrag.GetAuftragListTodayAsync(null, conn, AuftragTyp.Geschäft, null); + if (liste == null || liste == ListenArt.Rampenliste) rampenlist = await Auftrag.GetAuftragListTodayAsync(AuftragStatus.Abgeholt, conn, AuftragTyp.Standart, null); + if (liste == null || liste == ListenArt.Vorbereitetliste) vorbereitetliste = await Auftrag.GetAuftragListTodayAsync(AuftragStatus.Vorbereitet, conn, AuftragTyp.Standart, null); + } + } + finally + { + if (conn.State == ConnectionState.Open) + conn.Close(); + conn.Dispose(); + } + } /// /// Zeigt Fenster zur Eingabe von Text. @@ -918,13 +1059,11 @@ namespace Deckungsbeitrag { return Interaction.InputBox(prompt, titel, defaultText); } - private void Save_Auftrag(Auftrag auftrag, bool show) { if (auftrag.Save()[0] == 1) if (show) meldung.Gespeichert(); else if (show) meldung.Speicherfehler(); } - private void Aufgabe_erledigt(Auftrag _auftrag,Kunde _kunde, string name) { if (_kunde.AufgabeCount <= 0) _kunde.Aufgabe = null; @@ -944,237 +1083,83 @@ namespace Deckungsbeitrag else this.auftrag.Status = AuftragStatus.Fertig; this.auftrag.Save(); this.auftrag = null; - this.dGArtikel.Visible = false; - } - - - /// - /// Wenn das dritte Tab gewählt ist, wird die GroupBox Etikett ausgeblendet. 3.Tab wäre für vergangene Aufträge - weshalb kein Etikett mehr notwendig. - /// - /// - /// - private void tabControlAuftragList_Selected(object sender, TabControlEventArgs e) - { - TabControl tabControl = (TabControl)sender; } /// - /// Beim Wechsel der Tabs wird die DataGridView geleert. + /// Beim Wechsel der Tabs wird ObjectListView neu geladen und Spalten ausgeblendet. /// /// /// private void tabControlAuftragList_SelectedIndexChanged(object sender, EventArgs e) { - this.dGArtikel.DataSource = null; - this.dGArtikel.Rows.Clear(); - this.dGArtikel.Visible = false; + TabControl tabControl = sender as TabControl; + ObjectListView olv = tabControl.SelectedTab.Controls[0] as ObjectListView; + + if (olv == null) return; + GetUnvisibleColumns(olv); + + Neuladen_OLV(olv); + } - - #region DataGridView-Events - private void Load_Gridview(Auftrag auftrag) + private void AddTabPage(List liste, ListenArt listenArt) { + if (liste == null) return; + UCAuftragListe ucl = new UCAuftragListe(this.benutzer, liste); + TabPage tabPage = new TabPage(); - //Alle Einträge der DataGridView entfernen. Davor muss die DataSource entfernt werden. - this.dGArtikel.DataSource = null; - this.dGArtikel.Rows.Clear(); - - if (auftrag != null) + switch (listenArt) { - Aufgabe auf; - if (auftrag.AufgabeID.HasValue) auf = Aufgabe.GetAufgabe(null, auftrag.AufgabeID); - else auf = new Aufgabe(); - - 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 (auf.Bezeichnung == null || auf.Bezeichnung == "STA") col.Visible = true; - else col.Visible = false; - } - if (col.Name == "Korrektur") - { - if (auf.Bezeichnung != null && auf.Bezeichnung != "STA") col.Visible = true; - else col.Visible = false; - } - } - - // DataGridView mit ArtikelStand Liste verbinden und Columns automatisch generieren. - artikelListe = KundeArtikel.GetList(auftrag.KundeID.ToString()); - 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.DisplayedCells; - // Alle Zeilenhöhen an Zellinhalt anpassen - this.dGArtikel.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCells; - - this.dGArtikel = Funktionen.DGV_Size_Anpassen(this.dGArtikel); - //this.dGArtikel.Width = this.Width - dGArtikel.Left; - - // Rechter Rand von letzter Spalte berechnen. - int x = 0; - foreach (ColumnHeader col in objectListViewAuftrag.Columns) x += col.Width; // x ist jetzt die Position direkt rechts von der letzten Spalte (relativ zu client origin) - - this.dGArtikel.Location = new Point(this.objectListViewAuftrag.Left + x, this.dGArtikel.Location.Y); - if (this.dGArtikel.Rows.Count > 0) { this.dGArtikel.Visible = true; timer1.Start(); } - else this.dGArtikel.Visible = false; - } - } - /// - /// Vor Beginn der Editierung wird Wert gespeichert um nach der Editierung vergleichen und eventuell speichern zu können. - /// - /// - /// - private void dGArtikel_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e) - { - DataGridView dataGrid = sender as DataGridView; - beforeedit = int.Parse(dataGrid.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()); - } - private void dGArtikel_CellEndEdit(object sender, DataGridViewCellEventArgs e) - { - DataGridView dgV = (DataGridView)sender; - // Aktuelle Zeile holen - var row = dgV.Rows[e.RowIndex]; - var cell = row.Cells[e.ColumnIndex]; - // Werte aus der Zeile auslesen - KundeArtikel stand = KundeArtikel.GetItem((int)row.Cells[0].Value); - if (cell.ColumnIndex == 4) { stand.Stand = int.Parse(row.Cells[4].Value.ToString()); stand.StandBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString(); } - if (cell.ColumnIndex == 5) { stand.Fehlmenge = int.Parse(row.Cells[5].Value.ToString()); stand.FehlmengeBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString(); } - if (cell.ColumnIndex == 6) - { - if (int.Parse(row.Cells[6].Value.ToString()) == 0) - { - stand.Stand = stand.Stand + beforeedit; - stand.Korrektur = int.Parse(row.Cells[6].Value.ToString()); - stand.StandBearbeitet = stand.KorrekturBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString(); - } - + case ListenArt.Auftragliste: // Aufträge HEUTE + break; + case ListenArt.Sonderliste: // Sonderaufträge + break; + case ListenArt.Geschäftliste: // Aufträge Geschäftskunden + break; + case ListenArt.Suchliste: // Aufträge gesucht + string closeStr = " ×"; // Unicode X-Symbol + tabPage.Text = "Suchergebnis" + closeStr; + break; + case ListenArt.Rampenliste: // Aufträge auf Rampe + break; + case ListenArt.Vorbereitetliste: // Vorbereitete Aufträge + tabPage.Text = "Vorbereitet"; + break; + default: //Alle Listen + break; } - // Hier kannst du die Werte speichern, z.B. in Datenbank oder Liste - if (stand.Save() != 1) meldung.Speicherfehler(); - else Load_Gridview(this.auftrag); + + // if (!tabPage.Text.Contains("Suche")) return; + tabPage.Controls.Add(ucl); + ucl.Dock = DockStyle.Fill; + this.tabControlAuftragList.Controls.Add(tabPage); } - private void dGArtikel_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) + // MouseDown-Event für Klick-Erkennung + private void tabControlAuftragList_MouseDown(object sender, MouseEventArgs e) { - if (e.ColumnIndex >= 5) + if (e.Button == MouseButtons.Left) { - DataGridView dgv = (DataGridView)sender; - DataGridViewCell dgc = dgv.CurrentCell; - if (!int.TryParse(dgc.EditedFormattedValue.ToString(), out int i)) + for (int i = 0; i < tabControlAuftragList.TabCount; i++) { - meldung.Eingabefehler(); - e.Cancel = true; - } - } - } - private void dGArtikel_VisibleChanged(object sender, EventArgs e) - { - if (dGArtikel.Visible) { Load_Gridview(this.auftrag); timer1.Start(); } - else timer1.Stop(); - } - #endregion - - #region Statistik - private void buttonStats_Click(object sender, EventArgs e) - { - if (this.groupBoxStatistik.Visible) this.groupBoxStatistik.Visible = false; - else this.groupBoxStatistik.Visible = true; - } - private void GetStatistik() - { - string[] statistik = { "Container gewaschen:", "Container hergerichtet:", "Container fertig:", "Kunden gewaschen:", "Kunden hergerichtet:", "Kunden abgeschlossen:" }; - List auftraglist = Auftrag.GetAuftragStatsListToday(this.dateTimePicker1.Value.Date); - - for (int i = 1; i <= statistik.Length; i++) - { - foreach (Control ctr in this.tableLayoutPanelStatistik.Controls) - { - Label lbl; - if (ctr.GetType() == typeof(Label)) + Rectangle r = tabControlAuftragList.GetTabRect(i); + if (r.Contains(e.X, e.Y)) { - lbl = (Label)ctr; - if (lbl.Text.Contains("Statistik") && lbl.Text.Contains($"{i.ToString()}")) lbl.Text = statistik[i - 1].ToString(); - if (lbl.Name.Contains("Zahl")) + // X-Button-Bereich (rechts) + Rectangle closeRect = new Rectangle(r.Right - 18, r.Top + 4, 14, 14); + if (closeRect.Contains(e.X, e.Y)) { - - int j = 0; - switch (lbl.Name) - { - case var s when s.Contains($"1"): - foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Aufgelegt) j += a.Container; - lbl.Text = j.ToString(); - break; - case var s when s.Contains($"2"): - foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Vorbereitet) j += a.ContainerClean; - lbl.Text = j.ToString(); - break; - case var s when s.Contains($"3"): - foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Fertig) j += a.ContainerClean; - lbl.Text = j.ToString(); - break; - case var s when s.Contains($"4"): - foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Aufgelegt) j++; - lbl.Text = j.ToString(); - break; - case var s when s.Contains($"5"): - foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Vorbereitet) j++; - lbl.Text = j.ToString(); - break; - case var s when s.Contains($"{i}"): - foreach (Auftrag a in auftraglist) if (a.Status == AuftragStatus.Fertig) j++; - lbl.Text = j.ToString(); - break; - default: - break; - } + if (tabControlAuftragList.TabPages[i].Text.Contains("Suche")) tabControlAuftragList.TabPages.RemoveAt(i); + return; } + tabControlAuftragList.SelectedIndex = i; + break; } } } - //this.groupBoxStatistik.Width = this.tableLayoutPanelStatistik.Right; - - } - private void dateTimePicker1_CloseUp(object sender, EventArgs e) - { - GetStatistik(); - } - - #endregion - - private void FormExpedit_FormClosing(object sender, FormClosingEventArgs e) - { - _settings.OLV_State = this.objectListViewAuftrag.SaveState(); - _settings.Save(); - } - private void FormExpedit_Resize(object sender, EventArgs e) - { - this.Cursor = Cursors.WaitCursor; - - int chartHeight = (int)(this.tabControlAuftragList.Height * 0.75); - int gbHeight = (int)(this.tabControlAuftragList.Height * 0.25); - - chartFehlmenge.Location = new Point(this.tabControlAuftragList.Right + 10, this.tabControlAuftragList.Top); - chartFehlmenge.Size = new Size(groupBoxKndInfo.Width, chartHeight); - groupBoxKndInfo.Height = gbHeight; - groupBoxKndInfo.Location = new Point(chartFehlmenge.Left, chartHeight + 10); - } - private void FormExpedit_Shown(object sender, EventArgs e) - { - this.ResumeLayout(); - //this.Cursor = Cursors.Default; - Application.UseWaitCursor = false; - WindowState = FormWindowState.Maximized; } /// - /// Male Border der GroupBox für Anmerkungen. Farbe wechseln wenn ROT schlecht. + /// Malt Border der GroupBox für Anmerkungen. Farbe wechseln wenn ROT schlecht. /// /// /// @@ -1182,8 +1167,51 @@ namespace Deckungsbeitrag { Funktionen.GetGroupBoxBoarder(groupBoxKndInfo, e); } + private void chartFehlmenge_VisibleChanged(object sender, EventArgs e) + { + UCFeedback fb = this.Controls.Find("feedback", false)[0] as UCFeedback; + + if (chartFehlmenge.Visible) + { + this.tabControlAuftragList.Width = (int)(this.Width * 0.80); + this.chartFehlmenge.Width = (int)(this.Width * 0.20) - 20; + this.groupBoxKndInfo.Width = this.chartFehlmenge.Width - 10; + int chartHeight = (int)(this.tabControlAuftragList.Height * 0.75); + int gbHeight = (int)(this.tabControlAuftragList.Height * 0.25); + + chartFehlmenge.Location = new Point(this.tabControlAuftragList.Right + 10, this.tabControlAuftragList.Top); + chartFehlmenge.Size = new Size(groupBoxKndInfo.Width, chartHeight); + groupBoxKndInfo.Height = gbHeight; + groupBoxKndInfo.Location = new Point(chartFehlmenge.Left, chartHeight + 10); + + fb.Visible = false; + } + else + { + this.tabControlAuftragList.Width = this.Width - 25; + fb.Visible = true; + } + } + private void groupBoxKndInfo_VisibleChanged(object sender, EventArgs e) + { + if (groupBoxKndInfo.Visible) + { + this.tabControlAuftragList.Width = (int)(this.Width * 0.80); + this.groupBoxKndInfo.Width = (int)(this.Width * 0.20) - 20; + + int chartHeight = (int)(this.tabControlAuftragList.Height * 0.75); + int gbHeight = (int)(this.tabControlAuftragList.Height * 0.25); + + groupBoxKndInfo.Height = gbHeight; + groupBoxKndInfo.Location = new Point(chartFehlmenge.Left, chartHeight + 10); + + } + else + { + this.tabControlAuftragList.Width = this.Width - 25; + } + } } } -//DONE: Testen ob Scan mit Prompt bei Suchen funktioniert. Kundenummer und Text etc. (meherere QR-Codes teseten) diff --git a/AA-Forms/FormExpedit.resx b/AA-Forms/FormExpedit.resx index 4df8578..4b0fe78 100644 --- a/AA-Forms/FormExpedit.resx +++ b/AA-Forms/FormExpedit.resx @@ -117,36 +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 - diff --git a/AA-Forms/FormFehlmengeCount.cs b/AA-Forms/FormFehlmengeCount.cs index 048c490..1136c67 100644 --- a/AA-Forms/FormFehlmengeCount.cs +++ b/AA-Forms/FormFehlmengeCount.cs @@ -26,7 +26,7 @@ namespace Deckungsbeitrag Meldungen meldung = new Meldungen(); private Benutzer benutzer; private List auftragsliste; - + private ArtikelKategorie kategorie; string userid; #region Form-Konstruktor @@ -54,6 +54,10 @@ namespace Deckungsbeitrag videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); this.Text = " Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString(); + if (userid.Contains("kleinteile")) { kategorie = ArtikelKategorie.Kleinteile; } + if (userid.Contains("grossteile")) { kategorie = ArtikelKategorie.Grossteile; } + if (userid.Contains("frottee") || userid.Contains("spannleintuch")) { kategorie = ArtikelKategorie.Frottee; } + //Kunde wird durch Scan oder Handeingabe Ausgewählt. //this.kunde = Funktionen.KundenAuswahl(); Open_Liste(); @@ -98,7 +102,7 @@ namespace Deckungsbeitrag this.labelAnmerkungText.BackColor = Color.White; } //this.textBoxScann.Clear(); - this.artikelListe = KundeArtikel.GetList(kunde.KundeID.ToString()); + this.artikelListe = KundeArtikel.GetFehlmengeList(kunde.KundeID.ToString()); this.textBoxScann.Text = this.kunde.KundeNummer; this.textBoxScann.Enabled = false; if ((userid != null && userid.Contains("reklamation")) || (this.benutzer != null && this.benutzer.Rolle == BenutzerRolle.Expedit)) Reklamation_GroupBox(); @@ -121,7 +125,6 @@ namespace Deckungsbeitrag if (userid.Contains("frottee") || userid.Contains("spannleintuch")) { auftrag.Abteilungen |= AbteilungsStatus.FrotteeBegonnen; auftrag.Save(); } } } - CloseKeyboard(); } /// @@ -137,6 +140,7 @@ namespace Deckungsbeitrag // Buttons werden den Artikeln aus der Artikelliste zugewiesen. Unterschied zwischen Frotteewäsche, Spannleintüchern, Großteilen und Kleinteilen foreach (KundeArtikel artikel in artikelListe) { + // Unterschied zwischen Maschine oder Person. if(this.userid.StartsWith("ms")) { @@ -167,7 +171,7 @@ namespace Deckungsbeitrag case var nr when nr.ToString().StartsWith("6312") & nr.ToString().EndsWith("1"): //DUSCHTUCH BLAU this.buttonArt7.Tag = artikel; break; - case var nr when nr.ToString().StartsWith("61115") & (nr.ToString().EndsWith("00") || nr.ToString().EndsWith("30") || nr.ToString().EndsWith("10")): //SPANNLEINTUCH SINGLE + case var nr when nr.ToString().StartsWith("61115") & (nr.ToString().EndsWith("00") || nr.ToString().EndsWith("10")): //SPANNLEINTUCH SINGLE this.buttonArt8.Tag = artikel; break; default: @@ -322,7 +326,7 @@ namespace Deckungsbeitrag Tag = artikel, Name = $"btn_{artikel.ArtikelNR}", AutoSize = true, - Margin = new Padding(5), + Margin = new Padding(0), BackColor = Color.Turquoise, ForeColor = Color.Black, }; @@ -333,7 +337,16 @@ namespace Deckungsbeitrag flowPanel.Controls.Add(btn); } int buttons = flowPanel.Controls.OfType