From 5af0215bd364ef7cc41bd6de2fd4a22768cb54a0 Mon Sep 17 00:00:00 2001 From: Kilian Wirl Date: Thu, 11 Dec 2025 10:32:06 +0100 Subject: [PATCH] =?UTF-8?q?AuftragTyp=20statt=20Unbekannt=3DGesch=C3=A4ft?= =?UTF-8?q?=20-=20Unterscheidung=20ob=20Container=20und=20Pakete,=20Neue?= =?UTF-8?q?=20Ressource,=20ComboBoxService=20mit=20bearbeiten=20und=20spei?= =?UTF-8?q?chern,=20Wenn=20Liste.Count=200=20-=20Enter=20Ignore,?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AA-Forms/FormExpedit.cs | 2 +- AA-Forms/FormKundeVW.cs | 67 ++++++--- AA-Forms/FormKundeVW.designer.cs | 241 ++++++++++++++++--------------- AA-Forms/FormListe.cs | 9 +- AA-Forms/FormNeuerAuftrag.cs | 17 ++- AA-Forms/FormNeuerAuftrag.resx | 30 ++++ AA-Klassen/Auftrag.cs | 8 +- AA-Klassen/Kunde.cs | 7 +- Properties/Resources.Designer.cs | 10 ++ Properties/Resources.resx | 21 +-- Resources/PenOne_16x.png | Bin 0 -> 288 bytes Verwaltung.csproj | 1 + 12 files changed, 261 insertions(+), 152 deletions(-) create mode 100644 Resources/PenOne_16x.png diff --git a/AA-Forms/FormExpedit.cs b/AA-Forms/FormExpedit.cs index a75f54b..889031e 100644 --- a/AA-Forms/FormExpedit.cs +++ b/AA-Forms/FormExpedit.cs @@ -427,7 +427,7 @@ namespace Deckungsbeitrag { switch (this.auftrag.Typ) { - case AuftragTyp.Unbekannt: + case AuftragTyp.Geschäft: break; case AuftragTyp.Standart: if (meldung.NoCleanContainer() == DialogResult.OK) return; diff --git a/AA-Forms/FormKundeVW.cs b/AA-Forms/FormKundeVW.cs index f9bb8a1..1b88e7a 100644 --- a/AA-Forms/FormKundeVW.cs +++ b/AA-Forms/FormKundeVW.cs @@ -60,17 +60,26 @@ namespace Deckungsbeitrag this.tabControlKunde.Location = new Point(this.textBoxSuchtext.Right + 10, 11); + ComboBox_Laden(); + + this.kunde = Funktionen.KundenAuswahl(); + if (this.kunde != null) DatenLesen(); + } + + private void ComboBox_Laden() + { + // Service Liste erstellen und mit ComboBox verknüpfen. + this.comboBoxService.Enabled = false; + List list = Kunde.GetServiceDistinct(); + this.comboBoxService.DataSource = list; + //Aufgaben Liste erstellen und mit ComboBox verknüpfen. List aufgabenlist1 = Aufgabe.GetList(2); this.comboBoxAufgabe.DataSource = aufgabenlist1; this.comboBoxAufgabe.DisplayMember = "Bezeichnung"; this.comboBoxAufgabe.SelectedIndex = -1; this.comboBoxAufgabe.Enabled = false; - - this.kunde = Funktionen.KundenAuswahl(); - if (this.kunde != null) DatenLesen(); } - private void DatenLesen() { //TextBoxen deaktivieren. @@ -140,6 +149,11 @@ namespace Deckungsbeitrag // ComboBox für Aufgabe wird geladen foreach (Aufgabe auf in comboBoxAufgabe.Items) if (auf.AufgabeID == this.kunde.Aufgabe) this.comboBoxAufgabe.SelectedItem = auf; if (this.comboBoxAufgabe.SelectedItem != null) this.buttonAufgEnt.Enabled = true; + if (!string.IsNullOrWhiteSpace(this.kunde.Service)) + { + foreach (string s in comboBoxService.Items) if (s == this.kunde.Service) this.comboBoxService.SelectedItem = s; + + } // Wird noch nicht verwendet this.buttonProgramm.Text = "WP 01"; @@ -300,25 +314,25 @@ namespace Deckungsbeitrag /// private void Load_Gridview(List objectListe) { + if (objectListe.Count > 0) + { + this.dGArtikel.AutoGenerateColumns = false; + foreach (DataGridViewColumn col in this.dGArtikel.Columns) + { + col.DataPropertyName = col.Name; + } - this.dGArtikel.AutoGenerateColumns = false; - foreach (DataGridViewColumn col in this.dGArtikel.Columns) - { - col.DataPropertyName = col.Name; - } + // DataGridView mit ArtikelStand Liste verbinden und Columns automatisch generieren. + this.dGArtikel.DataSource = objectListe; + this.dGArtikel.ClearSelection(); + this.dGArtikel.CurrentCell = this.dGArtikel.Rows[0].Cells[3]; - // DataGridView mit ArtikelStand Liste verbinden und Columns automatisch generieren. - this.dGArtikel.DataSource = objectListe; - - this.dGArtikel.ClearSelection(); - this.dGArtikel.CurrentCell = this.dGArtikel.Rows[0].Cells[3]; - - // Alle Spaltenbreiten an den Zellinhalt anpassen - this.dGArtikel.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; - // Alle Zeilenhöhen an Zellinhalt anpassen - this.dGArtikel.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; - + // Alle Spaltenbreiten an den Zellinhalt anpassen + this.dGArtikel.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; + // Alle Zeilenhöhen an Zellinhalt anpassen + this.dGArtikel.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; + } } /// @@ -445,5 +459,18 @@ namespace Deckungsbeitrag } } + private void buttonServiceBearbeiten_Click(object sender, EventArgs e) + { + if(this.comboBoxService.Enabled == false) this.comboBoxService.Enabled = true; + } + + private void comboBoxService_SelectedValueChanged(object sender, EventArgs e) + { + if (this.comboBoxService.Enabled == true) + { + this.kunde.Service = this.comboBoxService.SelectedValue.ToString(); + this.kunde.Save(); + } + } } } diff --git a/AA-Forms/FormKundeVW.designer.cs b/AA-Forms/FormKundeVW.designer.cs index dfc9b23..287fd7e 100644 --- a/AA-Forms/FormKundeVW.designer.cs +++ b/AA-Forms/FormKundeVW.designer.cs @@ -39,9 +39,6 @@ namespace Deckungsbeitrag System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend(); System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormKundeVW)); this.textBoxKndNr = new System.Windows.Forms.TextBox(); this.labelKundeNummer = new System.Windows.Forms.Label(); @@ -53,21 +50,19 @@ namespace Deckungsbeitrag this.labelPLZ = new System.Windows.Forms.Label(); this.textBoxOrt = new System.Windows.Forms.TextBox(); this.labelOrt = new System.Windows.Forms.Label(); - this.pictureBoxEntwurf = new System.Windows.Forms.PictureBox(); this.labelKdnName2 = new System.Windows.Forms.Label(); this.textBoxKndName2 = new System.Windows.Forms.TextBox(); this.buttonBewertung = new System.Windows.Forms.Button(); - this.pictureBoxQRCode = new System.Windows.Forms.PictureBox(); this.buttonProgramm = new System.Windows.Forms.Button(); this.textBoxSuchtext = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.comboBoxAufgabe = new System.Windows.Forms.ComboBox(); this.label2 = new System.Windows.Forms.Label(); - this.buttonAufgEnt = new System.Windows.Forms.Button(); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.nächsterKundeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.tabControlKunde = new System.Windows.Forms.TabControl(); this.tabPageVorschau = new System.Windows.Forms.TabPage(); + this.buttonSWS_Drucken = new System.Windows.Forms.Button(); this.tabPageUmsatz = new System.Windows.Forms.TabPage(); this.labelMonatsumsatz = new System.Windows.Forms.Label(); this.chartMonatsumsatz = new System.Windows.Forms.DataVisualization.Charting.Chart(); @@ -79,6 +74,7 @@ namespace Deckungsbeitrag this.chartJahresumsatz = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.olvJahresumsatz = new BrightIdeasSoftware.ObjectListView(); this.tabPageArtikel = new System.Windows.Forms.TabPage(); + this.buttonSpeichern = 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(); @@ -90,11 +86,13 @@ namespace Deckungsbeitrag this.StandBearbeitet = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.FehlmengeBearbeitet = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.KorrekturBearbeitet = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.buttonSWS_Drucken = new System.Windows.Forms.Button(); - this.buttonSpeichern = new System.Windows.Forms.Button(); this.buttonNextKunde = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxEntwurf)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxQRCode)).BeginInit(); + this.label3 = new System.Windows.Forms.Label(); + this.comboBoxService = new System.Windows.Forms.ComboBox(); + this.buttonServiceBearbeiten = new System.Windows.Forms.Button(); + this.pictureBoxEntwurf = new System.Windows.Forms.PictureBox(); + this.buttonAufgEnt = new System.Windows.Forms.Button(); + this.pictureBoxQRCode = new System.Windows.Forms.PictureBox(); this.contextMenuStrip1.SuspendLayout(); this.tabControlKunde.SuspendLayout(); this.tabPageVorschau.SuspendLayout(); @@ -107,6 +105,8 @@ namespace Deckungsbeitrag ((System.ComponentModel.ISupportInitialize)(this.olvJahresumsatz)).BeginInit(); this.tabPageArtikel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dGArtikel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxEntwurf)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxQRCode)).BeginInit(); this.SuspendLayout(); // // textBoxKndNr @@ -221,21 +221,6 @@ namespace Deckungsbeitrag this.labelOrt.TabIndex = 12; this.labelOrt.Text = "Ort"; // - // pictureBoxEntwurf - // - this.pictureBoxEntwurf.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.pictureBoxEntwurf.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); - this.pictureBoxEntwurf.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pictureBoxEntwurf.Location = new System.Drawing.Point(0, 0); - this.pictureBoxEntwurf.Margin = new System.Windows.Forms.Padding(2); - this.pictureBoxEntwurf.Name = "pictureBoxEntwurf"; - this.pictureBoxEntwurf.Size = new System.Drawing.Size(911, 631); - this.pictureBoxEntwurf.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBoxEntwurf.TabIndex = 16; - this.pictureBoxEntwurf.TabStop = false; - // // labelKdnName2 // this.labelKdnName2.AutoSize = true; @@ -261,7 +246,7 @@ namespace Deckungsbeitrag // buttonBewertung // this.buttonBewertung.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonBewertung.Location = new System.Drawing.Point(10, 419); + this.buttonBewertung.Location = new System.Drawing.Point(10, 481); this.buttonBewertung.Margin = new System.Windows.Forms.Padding(2); this.buttonBewertung.Name = "buttonBewertung"; this.buttonBewertung.Size = new System.Drawing.Size(160, 41); @@ -269,21 +254,10 @@ namespace Deckungsbeitrag this.buttonBewertung.Text = "Bewertung"; this.buttonBewertung.UseVisualStyleBackColor = true; // - // pictureBoxQRCode - // - this.pictureBoxQRCode.BackColor = System.Drawing.Color.Transparent; - this.pictureBoxQRCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pictureBoxQRCode.Location = new System.Drawing.Point(174, 342); - this.pictureBoxQRCode.Margin = new System.Windows.Forms.Padding(2); - this.pictureBoxQRCode.Name = "pictureBoxQRCode"; - this.pictureBoxQRCode.Size = new System.Drawing.Size(117, 117); - this.pictureBoxQRCode.TabIndex = 27; - this.pictureBoxQRCode.TabStop = false; - // // buttonProgramm // this.buttonProgramm.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonProgramm.Location = new System.Drawing.Point(10, 374); + this.buttonProgramm.Location = new System.Drawing.Point(10, 436); this.buttonProgramm.Margin = new System.Windows.Forms.Padding(2); this.buttonProgramm.Name = "buttonProgramm"; this.buttonProgramm.Size = new System.Drawing.Size(160, 41); @@ -320,7 +294,7 @@ namespace Deckungsbeitrag // this.comboBoxAufgabe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxAufgabe.FormattingEnabled = true; - this.comboBoxAufgabe.Location = new System.Drawing.Point(10, 342); + this.comboBoxAufgabe.Location = new System.Drawing.Point(10, 404); this.comboBoxAufgabe.Margin = new System.Windows.Forms.Padding(2); this.comboBoxAufgabe.Name = "comboBoxAufgabe"; this.comboBoxAufgabe.Size = new System.Drawing.Size(128, 28); @@ -332,23 +306,12 @@ namespace Deckungsbeitrag this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.Color.White; - this.label2.Location = new System.Drawing.Point(6, 320); + this.label2.Location = new System.Drawing.Point(6, 380); this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(120, 20); + this.label2.Size = new System.Drawing.Size(123, 20); this.label2.TabIndex = 42; - this.label2.Text = "Sonderaufgabe"; - // - // buttonAufgEnt - // - this.buttonAufgEnt.Image = global::Deckungsbeitrag.Properties.Resources.Close_red_16x; - this.buttonAufgEnt.Location = new System.Drawing.Point(142, 342); - this.buttonAufgEnt.Margin = new System.Windows.Forms.Padding(2); - this.buttonAufgEnt.Name = "buttonAufgEnt"; - this.buttonAufgEnt.Size = new System.Drawing.Size(28, 28); - this.buttonAufgEnt.TabIndex = 43; - this.buttonAufgEnt.UseVisualStyleBackColor = true; - this.buttonAufgEnt.Click += new System.EventHandler(this.buttonAufgEnt_Click); + this.label2.Text = "Kundenaufgabe"; // // contextMenuStrip1 // @@ -394,6 +357,22 @@ namespace Deckungsbeitrag this.tabPageVorschau.TabIndex = 2; this.tabPageVorschau.Text = "SWS-Vorschau"; // + // buttonSWS_Drucken + // + this.buttonSWS_Drucken.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonSWS_Drucken.BackColor = System.Drawing.Color.Yellow; + this.buttonSWS_Drucken.FlatAppearance.BorderSize = 0; + this.buttonSWS_Drucken.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonSWS_Drucken.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonSWS_Drucken.Location = new System.Drawing.Point(2, 635); + this.buttonSWS_Drucken.Margin = new System.Windows.Forms.Padding(2); + this.buttonSWS_Drucken.Name = "buttonSWS_Drucken"; + this.buttonSWS_Drucken.Size = new System.Drawing.Size(281, 41); + this.buttonSWS_Drucken.TabIndex = 36; + this.buttonSWS_Drucken.Text = "SWS-Drucken"; + this.buttonSWS_Drucken.UseVisualStyleBackColor = false; + this.buttonSWS_Drucken.Click += new System.EventHandler(this.ButtonDrucken_Click); + // // tabPageUmsatz // this.tabPageUmsatz.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); @@ -409,7 +388,7 @@ namespace Deckungsbeitrag this.tabPageUmsatz.Location = new System.Drawing.Point(4, 29); this.tabPageUmsatz.Name = "tabPageUmsatz"; this.tabPageUmsatz.Padding = new System.Windows.Forms.Padding(3); - this.tabPageUmsatz.Size = new System.Drawing.Size(920, 665); + this.tabPageUmsatz.Size = new System.Drawing.Size(907, 678); this.tabPageUmsatz.TabIndex = 0; this.tabPageUmsatz.Text = "Umsatz"; // @@ -602,19 +581,28 @@ namespace Deckungsbeitrag this.tabPageArtikel.TabIndex = 1; this.tabPageArtikel.Text = "Artikelliste"; // + // buttonSpeichern + // + this.buttonSpeichern.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + 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.White; + this.buttonSpeichern.Location = new System.Drawing.Point(2, 635); + this.buttonSpeichern.Margin = new System.Windows.Forms.Padding(2); + this.buttonSpeichern.Name = "buttonSpeichern"; + this.buttonSpeichern.Size = new System.Drawing.Size(281, 41); + this.buttonSpeichern.TabIndex = 37; + this.buttonSpeichern.Text = "Stand speichern"; + this.buttonSpeichern.UseVisualStyleBackColor = false; + this.buttonSpeichern.Click += new System.EventHandler(this.standSpeichernToolStripMenuItem_Click); + // // dGArtikel // this.dGArtikel.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))); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dGArtikel.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dGArtikel.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dGArtikel.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.KundeArtikelID, @@ -627,24 +615,8 @@ namespace Deckungsbeitrag this.StandBearbeitet, this.FehlmengeBearbeitet, this.KorrekturBearbeitet}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dGArtikel.DefaultCellStyle = dataGridViewCellStyle2; this.dGArtikel.Location = new System.Drawing.Point(3, 3); this.dGArtikel.Name = "dGArtikel"; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dGArtikel.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; this.dGArtikel.Size = new System.Drawing.Size(901, 630); this.dGArtikel.TabIndex = 11; this.dGArtikel.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.dGArtikel_CellBeginEdit); @@ -702,39 +674,6 @@ namespace Deckungsbeitrag this.KorrekturBearbeitet.HeaderText = "Korrektur Bearbeitet"; this.KorrekturBearbeitet.Name = "KorrekturBearbeitet"; // - // buttonSWS_Drucken - // - this.buttonSWS_Drucken.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonSWS_Drucken.BackColor = System.Drawing.Color.Yellow; - this.buttonSWS_Drucken.FlatAppearance.BorderSize = 0; - this.buttonSWS_Drucken.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonSWS_Drucken.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonSWS_Drucken.Location = new System.Drawing.Point(2, 635); - this.buttonSWS_Drucken.Margin = new System.Windows.Forms.Padding(2); - this.buttonSWS_Drucken.Name = "buttonSWS_Drucken"; - this.buttonSWS_Drucken.Size = new System.Drawing.Size(281, 41); - this.buttonSWS_Drucken.TabIndex = 36; - this.buttonSWS_Drucken.Text = "SWS-Drucken"; - this.buttonSWS_Drucken.UseVisualStyleBackColor = false; - this.buttonSWS_Drucken.Click += new System.EventHandler(this.ButtonDrucken_Click); - // - // buttonSpeichern - // - this.buttonSpeichern.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - 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.White; - this.buttonSpeichern.Location = new System.Drawing.Point(2, 635); - this.buttonSpeichern.Margin = new System.Windows.Forms.Padding(2); - this.buttonSpeichern.Name = "buttonSpeichern"; - this.buttonSpeichern.Size = new System.Drawing.Size(281, 41); - this.buttonSpeichern.TabIndex = 37; - this.buttonSpeichern.Text = "Stand speichern"; - this.buttonSpeichern.UseVisualStyleBackColor = false; - this.buttonSpeichern.Click += new System.EventHandler(this.standSpeichernToolStripMenuItem_Click); - // // buttonNextKunde // this.buttonNextKunde.BackColor = System.Drawing.Color.Turquoise; @@ -751,12 +690,85 @@ namespace Deckungsbeitrag this.buttonNextKunde.UseVisualStyleBackColor = false; this.buttonNextKunde.Click += new System.EventHandler(this.TSBNext_Click); // + // 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(6, 322); + this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(61, 20); + this.label3.TabIndex = 47; + this.label3.Text = "Service"; + // + // comboBoxService + // + this.comboBoxService.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBoxService.FormattingEnabled = true; + this.comboBoxService.Location = new System.Drawing.Point(10, 346); + this.comboBoxService.Name = "comboBoxService"; + this.comboBoxService.Size = new System.Drawing.Size(248, 28); + this.comboBoxService.TabIndex = 48; + this.comboBoxService.SelectedValueChanged += new System.EventHandler(this.comboBoxService_SelectedValueChanged); + // + // buttonServiceBearbeiten + // + this.buttonServiceBearbeiten.Image = global::Deckungsbeitrag.Properties.Resources.PenOne_16x; + this.buttonServiceBearbeiten.Location = new System.Drawing.Point(263, 346); + this.buttonServiceBearbeiten.Margin = new System.Windows.Forms.Padding(2); + this.buttonServiceBearbeiten.Name = "buttonServiceBearbeiten"; + this.buttonServiceBearbeiten.Size = new System.Drawing.Size(28, 28); + this.buttonServiceBearbeiten.TabIndex = 49; + this.buttonServiceBearbeiten.UseVisualStyleBackColor = true; + this.buttonServiceBearbeiten.Click += new System.EventHandler(this.buttonServiceBearbeiten_Click); + // + // pictureBoxEntwurf + // + this.pictureBoxEntwurf.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.pictureBoxEntwurf.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); + this.pictureBoxEntwurf.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pictureBoxEntwurf.Location = new System.Drawing.Point(0, 0); + this.pictureBoxEntwurf.Margin = new System.Windows.Forms.Padding(2); + this.pictureBoxEntwurf.Name = "pictureBoxEntwurf"; + this.pictureBoxEntwurf.Size = new System.Drawing.Size(911, 631); + this.pictureBoxEntwurf.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBoxEntwurf.TabIndex = 16; + this.pictureBoxEntwurf.TabStop = false; + // + // buttonAufgEnt + // + this.buttonAufgEnt.Image = global::Deckungsbeitrag.Properties.Resources.Close_red_16x; + this.buttonAufgEnt.Location = new System.Drawing.Point(142, 404); + this.buttonAufgEnt.Margin = new System.Windows.Forms.Padding(2); + this.buttonAufgEnt.Name = "buttonAufgEnt"; + this.buttonAufgEnt.Size = new System.Drawing.Size(28, 28); + this.buttonAufgEnt.TabIndex = 43; + this.buttonAufgEnt.UseVisualStyleBackColor = true; + this.buttonAufgEnt.Click += new System.EventHandler(this.buttonAufgEnt_Click); + // + // pictureBoxQRCode + // + this.pictureBoxQRCode.BackColor = System.Drawing.Color.Transparent; + this.pictureBoxQRCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pictureBoxQRCode.Location = new System.Drawing.Point(174, 404); + this.pictureBoxQRCode.Margin = new System.Windows.Forms.Padding(2); + this.pictureBoxQRCode.Name = "pictureBoxQRCode"; + this.pictureBoxQRCode.Size = new System.Drawing.Size(117, 117); + this.pictureBoxQRCode.TabIndex = 27; + this.pictureBoxQRCode.TabStop = false; + // // FormKundeVW // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 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(1224, 725); + this.Controls.Add(this.buttonServiceBearbeiten); + this.Controls.Add(this.comboBoxService); + this.Controls.Add(this.label3); this.Controls.Add(this.buttonNextKunde); this.Controls.Add(this.tabControlKunde); this.Controls.Add(this.buttonAufgEnt); @@ -788,8 +800,6 @@ namespace Deckungsbeitrag this.Text = "KUNDENVERWALTUNG"; this.Load += new System.EventHandler(this.KundeDaten_Load); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.KundeDaten_KeyDown); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxEntwurf)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxQRCode)).EndInit(); this.contextMenuStrip1.ResumeLayout(false); this.tabControlKunde.ResumeLayout(false); this.tabPageVorschau.ResumeLayout(false); @@ -803,6 +813,8 @@ namespace Deckungsbeitrag ((System.ComponentModel.ISupportInitialize)(this.olvJahresumsatz)).EndInit(); this.tabPageArtikel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dGArtikel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxEntwurf)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxQRCode)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -859,6 +871,9 @@ namespace Deckungsbeitrag private System.Windows.Forms.Button buttonSWS_Drucken; private System.Windows.Forms.Button buttonSpeichern; private System.Windows.Forms.Button buttonNextKunde; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comboBoxService; + private System.Windows.Forms.Button buttonServiceBearbeiten; } } diff --git a/AA-Forms/FormListe.cs b/AA-Forms/FormListe.cs index 7bc2096..7827abf 100644 --- a/AA-Forms/FormListe.cs +++ b/AA-Forms/FormListe.cs @@ -247,7 +247,14 @@ namespace Deckungsbeitrag kunde = Kunde.GetKunde("0", null, string.Empty); kunde.Suchtext = textBoxKunde.Text; } - else if (this.listViewKunde.SelectedItems.Count == 1) kunde = (Kunde)this.listViewKunde.SelectedItems[0].Tag; + else + { + if (this.listViewKunde.SelectedItems.Count == 1) + { + kunde = (Kunde)this.listViewKunde.SelectedItems[0].Tag; + } + else return; + } e.Handled = true; textBoxKunde_Leave(this, e); diff --git a/AA-Forms/FormNeuerAuftrag.cs b/AA-Forms/FormNeuerAuftrag.cs index ef97186..686415f 100644 --- a/AA-Forms/FormNeuerAuftrag.cs +++ b/AA-Forms/FormNeuerAuftrag.cs @@ -63,6 +63,9 @@ namespace Deckungsbeitrag // Kunde holen this.kunde = Funktionen.KundenAuswahl(); + + // ComboBox Laden unbeding vor Daten Laden. + comboBox_Load(); // Falls KundenAuswahl null liefert wird Form geschlossen oder wenn Waschstrasse neu geladen. if (this.kunde != null) DatenLaden(); @@ -82,15 +85,17 @@ namespace Deckungsbeitrag // RadioButtons und ComboBoxen laden. if(this.kunde != null) Funktionen.Get_RadioButtons(this); - comboBox_Load(); //Unterscheidung zwischen BenutzerRollen. Verschiedene Controls werden gesperrt, angezeigt oder verändert if (this.benutzer != null) { if (this.benutzer.Rolle == BenutzerRolle.Verwaltung || this.benutzer.Rolle == BenutzerRolle.Admin || this.benutzer.Rolle == BenutzerRolle.Master) { - this.comboBoxTyp.Enabled = true; - this.comboBoxTyp.SelectedIndex = 1; + if((AuftragTyp)comboBoxTyp.SelectedItem != AuftragTyp.Geschäft) + { + this.comboBoxTyp.Enabled = true; + this.comboBoxTyp.SelectedIndex = 1; + } } else { @@ -122,6 +127,12 @@ namespace Deckungsbeitrag else this.textBoxKundeName.Text = kunde.Suchtext; if (letzterLiefertag.HasValue) this.dTPLiefertag.Value = letzterLiefertag.Value; else this.dTPLiefertag.Value = DateTime.Today.AddDays(1); + if (kunde.Service == "Geschäft") + { + this.comboBoxTyp.SelectedItem = AuftragTyp.Geschäft; + this.comboBoxTyp.Enabled = false; + } + dTPLiefertag_Leave(this.dTPLiefertag, EventArgs.Empty); textBoxCont_TextChanged(this.textBoxCont, EventArgs.Empty); diff --git a/AA-Forms/FormNeuerAuftrag.resx b/AA-Forms/FormNeuerAuftrag.resx index 1d9ef7c..1b1f7ae 100644 --- a/AA-Forms/FormNeuerAuftrag.resx +++ b/AA-Forms/FormNeuerAuftrag.resx @@ -162,6 +162,36 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + AAABAAEAAAAAAAEAIAC5FQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAAAFv diff --git a/AA-Klassen/Auftrag.cs b/AA-Klassen/Auftrag.cs index 368c0ef..9d7a2e1 100644 --- a/AA-Klassen/Auftrag.cs +++ b/AA-Klassen/Auftrag.cs @@ -19,9 +19,13 @@ namespace DatenDB Ausgeliefert = 8, AufAbruf = 9 } + + /// + /// Enum AuftragTyp Wenn Geschäft dann Container = Pakete. + /// public enum AuftragTyp { - Unbekannt = 0, + Geschäft = 0, Standart = 1, Inventur = 2, Standerhöhung = 3, @@ -195,7 +199,7 @@ namespace DatenDB this.Container = reader.IsDBNull(14) ? 0 : reader.GetInt32(14); this.MaschineID = reader.IsDBNull(15) ? null : (int?)reader.GetInt32(15); this.ContainerClean = reader.IsDBNull(16) ? 0 : reader.GetInt32(16); - this.Typ =reader.IsDBNull(17) ? AuftragTyp.Unbekannt : (AuftragTyp)reader.GetInt32(17); + this.Typ =reader.IsDBNull(17) ? AuftragTyp.Standart : (AuftragTyp)reader.GetInt32(17); } diff --git a/AA-Klassen/Kunde.cs b/AA-Klassen/Kunde.cs index 981464c..ce9a2c6 100644 --- a/AA-Klassen/Kunde.cs +++ b/AA-Klassen/Kunde.cs @@ -68,13 +68,13 @@ namespace DatenDB DatenbankConnection.GetConnection().Close(); return result; } - public static List GetColumns() + public static List GetServiceDistinct() { DatenbankConnection.GetConnection().Open(); List resultList = new List(); NpgsqlCommand command = new NpgsqlCommand(); command.Connection = DatenbankConnection.GetConnection(); - command.CommandText = $"SELECT distinct kunde.suchtext FROM kundenverwaltung.kunde JOIN kundenverwaltung.auftrag ON auftrag.kunde_id = kunde.kunde_id JOIN kundenverwaltung.auftrag_artikel ON auftrag_artikel.auftrag_id = auftrag.auftrag_id where kundenverwaltung.auftrag_artikel.erledigt is false"; + command.CommandText = $"SELECT distinct service FROM {TABLE} where service is not null"; NpgsqlDataReader reader = command.ExecuteReader(); while (reader.Read()) resultList.Add(reader.GetString(0)); reader.Close(); @@ -284,7 +284,8 @@ namespace DatenDB } } - [OLVIgnore] + + [OLVIgnore] public int? KundeID { get; set; } [OLVIgnore] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 5df6570..ddcdec9 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -120,6 +120,16 @@ namespace Deckungsbeitrag.Properties { } } + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap PenOne_16x { + get { + object obj = ResourceManager.GetObject("PenOne_16x", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index f4ca72a..c0881d0 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -121,6 +121,12 @@ ..\Resources\Checkmark_blue_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\InformationSymbol_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\WarningRule_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\UpdatedScript_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -133,16 +139,13 @@ ..\Resources\Monaco_Settings_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Close_WhiteNoHalo_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\InformationSymbol_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\WarningRule_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\weather_warning_signal_alert_exclamation_icon_124159.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Close_WhiteNoHalo_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\PenOne_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Resources/PenOne_16x.png b/Resources/PenOne_16x.png new file mode 100644 index 0000000000000000000000000000000000000000..017eb0973cb46125e7e38d5c5384ced8acdb7761 GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5he4R}c>anMpx`A> z7srr_xU&=Y@*Xk}Xf@_iHfXMX@9=P1htZXV?(-UWJs#fEZc%Jdb8VV3|I!oNlSL|A zw`JAm>O_CvTV1Xflss$MZJYCXldtDQc)e^9uvxoRhw`bpGe_!F>cysGc z^Oo1YnuPO3JR0}rmazG#A9R$t*L9(@Jy5*8{jqOM3K*SK3XDwH`{h-t8J2sU{1v>p}HH0*mU ir&Q2X$RIBHk+t?>f8hzXKQn;7WAJqKb6Mw<&;$S%@^a7s literal 0 HcmV?d00001 diff --git a/Verwaltung.csproj b/Verwaltung.csproj index 2f98558..2dea8ad 100644 --- a/Verwaltung.csproj +++ b/Verwaltung.csproj @@ -491,6 +491,7 @@ +