Merge branch 'Development'

This commit is contained in:
Kilian Wirl 2025-12-11 10:32:38 +01:00
commit 4f63040a6a
12 changed files with 261 additions and 152 deletions

View File

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

View File

@ -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<string> list = Kunde.GetServiceDistinct();
this.comboBoxService.DataSource = list;
//Aufgaben Liste erstellen und mit ComboBox verknüpfen.
List<Aufgabe> 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
/// <param name="objectListe"></param>
private void Load_Gridview(List<KundeArtikel> 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;
}
}
/// <summary>
@ -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();
}
}
}
}

View File

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

View File

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

View File

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

View File

@ -162,6 +162,36 @@
<metadata name="KorrekturBearbeitet.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="KundeArtikelID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="KundeID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ArtikelNR.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ArtikelName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Stand.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Fehlmenge.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Korrektur.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="StandBearbeitet.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="FehlmengeBearbeitet.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="KorrekturBearbeitet.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAAAAAAAEAIAC5FQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAAAFv

View File

@ -19,9 +19,13 @@ namespace DatenDB
Ausgeliefert = 8,
AufAbruf = 9
}
/// <summary>
/// Enum AuftragTyp Wenn Geschäft dann Container = Pakete.
/// </summary>
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);
}

View File

@ -68,13 +68,13 @@ namespace DatenDB
DatenbankConnection.GetConnection().Close();
return result;
}
public static List<string> GetColumns()
public static List<string> GetServiceDistinct()
{
DatenbankConnection.GetConnection().Open();
List<string> resultList = new List<string>();
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]

View File

@ -120,6 +120,16 @@ namespace Deckungsbeitrag.Properties {
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PenOne_16x {
get {
object obj = ResourceManager.GetObject("PenOne_16x", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>

View File

@ -121,6 +121,12 @@
<data name="Checkmark_blue_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Checkmark_blue_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="InformationSymbol_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\InformationSymbol_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WarningRule_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WarningRule_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="UpdatedScript_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\UpdatedScript_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -133,16 +139,13 @@
<data name="Monaco_Settings_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Monaco_Settings_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Close_WhiteNoHalo_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Close_WhiteNoHalo_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="InformationSymbol_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\InformationSymbol_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WarningRule_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WarningRule_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Exclamation_Red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\weather_warning_signal_alert_exclamation_icon_124159.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Close_WhiteNoHalo_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Close_WhiteNoHalo_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PenOne_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PenOne_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

BIN
Resources/PenOne_16x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

View File

@ -491,6 +491,7 @@
<ItemGroup>
<Content Include="ILLink\ILLink.Descriptors.LibraryBuild.xml" />
<None Include="Resources\InformationSymbol_16x.png" />
<None Include="Resources\PenOne_16x.png" />
<Content Include="wirlneu_transparent %281%29.ico" />
<None Include="Resources\Close_WhiteNoHalo_16x.png" />
<None Include="Resources\Monaco_Settings_16x.png" />