Liste Timer, Liste KundeName und Suchtext Suche, Etikett-Entwurf verbessern, NeuerAuftrag-TextBoxKundeName, Refresh und Speichern nach Liefertagänderung

This commit is contained in:
Kilian Wirl 2025-12-09 17:33:16 +01:00
parent a3e029a3f0
commit f6fd5d2623
25 changed files with 975 additions and 222 deletions

View File

@ -29,31 +29,43 @@
private void InitializeComponent()
{
this.tableLayoutPanelWS = new System.Windows.Forms.TableLayoutPanel();
this.statusStripAusschlager = new System.Windows.Forms.StatusStrip();
this.SuspendLayout();
//
// tableLayoutPanelWS
//
this.tableLayoutPanelWS.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.tableLayoutPanelWS.ColumnCount = 2;
this.tableLayoutPanelWS.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelWS.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelWS.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanelWS.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanelWS.Name = "tableLayoutPanelWS";
this.tableLayoutPanelWS.RowCount = 2;
this.tableLayoutPanelWS.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelWS.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelWS.Size = new System.Drawing.Size(600, 366);
this.tableLayoutPanelWS.Size = new System.Drawing.Size(600, 341);
this.tableLayoutPanelWS.TabIndex = 0;
//
// statusStripAusschlager
//
this.statusStripAusschlager.Location = new System.Drawing.Point(0, 344);
this.statusStripAusschlager.Name = "statusStripAusschlager";
this.statusStripAusschlager.Size = new System.Drawing.Size(600, 22);
this.statusStripAusschlager.TabIndex = 1;
this.statusStripAusschlager.Text = "statusStrip1";
//
// FormAusschlager
//
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(600, 366);
this.Controls.Add(this.statusStripAusschlager);
this.Controls.Add(this.tableLayoutPanelWS);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Margin = new System.Windows.Forms.Padding(2);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FormAusschlager";
@ -62,14 +74,14 @@
this.Text = "FormAusschlager";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.FormAusschlager_Load);
this.ResizeEnd += new System.EventHandler(this.FormAusschlager_ResizeEnd);
this.SizeChanged += new System.EventHandler(this.FormAusschlager_SizeChanged);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelWS;
private System.Windows.Forms.StatusStrip statusStripAusschlager;
}
}

View File

@ -21,6 +21,7 @@ namespace Deckungsbeitrag
{
private Fehlermeldungen meldung = new Fehlermeldungen();
private Auftrag auftrag;
private WSFach fach;
public Maschine maschine;
public List<Fach> fachliste;
bool maximised = false;
@ -73,17 +74,31 @@ namespace Deckungsbeitrag
List<WSFach> fachliste = WSFach.GetFachliste(this.maschine);
if (fachliste.Count > 0)
{
foreach (WSFach f in fachliste)
{
Auftrag auftrag = Auftrag.GetAuftrag(f.AuftragID);
// Alle Zellen einer Spalte durchlaufen
int columnIndex = 1;
for (int col = 0; col < tableLayoutPanelWS.ColumnCount; col++)
{
if (col == 1 || col == 2 || col == 3)
{
for (int row = 0; row < tlp.RowCount; row++)
{
Control cellControl = tlp.GetControlFromPosition(columnIndex, row);
Control cellControl = tlp.GetControlFromPosition(col, row);
if (cellControl != null && cellControl is Label lbl)
{
// Label in Zelle (col=2, row) bearbeiten
lbl.BackColor = Color.LightBlue;
lbl.Text = $"Col {columnIndex} Row {row}";
if (col == 1) lbl.Text = Kunde.GetKunde(string.Empty, auftrag.KundeID, string.Empty).Suchtext;
if (col == 2) lbl.Text = auftrag.Liefertag.DayOfWeek.ToString();
if (auftrag.AufgabeID != null)
{
if (col == 3) lbl.Text = Aufgabe.GetAufgabe(string.Empty, (int?)auftrag.AufgabeID).Bezeichnung;
}
}
}
}
}
}
}
@ -112,7 +127,7 @@ namespace Deckungsbeitrag
for (int col = 0; col < cols; col++)
{
tlp.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute));
//tlp.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute));
Label lbl = new Label();
lbl.Name = $"Zeile {row}, Spalte {col}";
lbl.Dock = DockStyle.Fill;
@ -226,17 +241,21 @@ namespace Deckungsbeitrag
}
}
}
private void Fach_Laden()
{
fach = new WSFach();
fach.AuftragID = (int)this.auftrag.AufgabeID;
fach.MaschineID = (int)this.maschine.MaschineID;
fach.Gewaschen = DateTime.Now;
fach.Gewicht = 0;
}
private void Fach_Speichern()
{
}
public void Form_Refresh(Maschine ms, SPSDaten spsdaten)
{
}
private void FormAusschlager_SizeChanged(object sender, EventArgs e)
{
}
private void FormAusschlager_ResizeEnd(object sender, EventArgs e)
{
}
/// <summary>
/// Umrechnen der Prozentgröße der Zeile in Pixelhöhe (int).
@ -250,13 +269,12 @@ namespace Deckungsbeitrag
float colPercent = 0;
float rowPercent = tlp.RowStyles[0].Height;
int pixelWidth = colPercent == 0 ? 0 : (int)(tlp.Width * (colPercent / 100f));
int pixelWidth = (int)colPercent;
int pixelHeight = rowPercent == 0 ? 0 : (int)(tlp.Height * (rowPercent / 100f));
return new Size(pixelWidth, pixelHeight);
}
/// <summary>
/// KEIN VERWEIS NOTWENDIG
/// Wenn ESC gedrückt wird schließt sich das Fenster.
@ -277,12 +295,15 @@ namespace Deckungsbeitrag
}
return base.ProcessDialogKey(keyData);
}
private void Open_NeuerAuftrag()
{
FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.Userid);
if (neuerAuftrag.ShowDialog() == DialogResult.OK)
{
this.auftrag = neuerAuftrag.Auftrag;
Fach_Laden();
}
}

View File

@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="statusStripAusschlager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -467,6 +467,7 @@
this.label4.Size = new System.Drawing.Size(172, 31);
this.label4.TabIndex = 41;
this.label4.Text = "Artikelstände";
this.label4.Visible = false;
//
// buttonNeuerAuftrag
//
@ -518,11 +519,12 @@
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dGArtikel.DefaultCellStyle = dataGridViewCellStyle2;
this.dGArtikel.Location = new System.Drawing.Point(631, 43);
this.dGArtikel.Location = new System.Drawing.Point(638, 42);
this.dGArtikel.Name = "dGArtikel";
this.dGArtikel.RowHeadersWidth = 62;
this.dGArtikel.Size = new System.Drawing.Size(527, 679);
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);
@ -610,7 +612,7 @@
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(617, 675);
this.tabPageSonder.Size = new System.Drawing.Size(1153, 675);
this.tabPageSonder.TabIndex = 1;
this.tabPageSonder.Text = "Sonderaufträge";
this.tabPageSonder.UseVisualStyleBackColor = true;
@ -625,7 +627,7 @@
this.objectListViewSonder.HideSelection = false;
this.objectListViewSonder.Location = new System.Drawing.Point(3, 3);
this.objectListViewSonder.Name = "objectListViewSonder";
this.objectListViewSonder.Size = new System.Drawing.Size(611, 669);
this.objectListViewSonder.Size = new System.Drawing.Size(1147, 669);
this.objectListViewSonder.TabIndex = 2;
this.objectListViewSonder.UseCompatibleStateImageBehavior = false;
this.objectListViewSonder.UseHotControls = false;
@ -639,7 +641,7 @@
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(617, 675);
this.tabPageAll.Size = new System.Drawing.Size(1153, 675);
this.tabPageAll.TabIndex = 0;
this.tabPageAll.Text = "Aufträge heute";
this.tabPageAll.UseVisualStyleBackColor = true;
@ -654,7 +656,7 @@
this.objectListViewAuftrag.HideSelection = false;
this.objectListViewAuftrag.Location = new System.Drawing.Point(3, 3);
this.objectListViewAuftrag.Name = "objectListViewAuftrag";
this.objectListViewAuftrag.Size = new System.Drawing.Size(611, 669);
this.objectListViewAuftrag.Size = new System.Drawing.Size(1147, 669);
this.objectListViewAuftrag.TabIndex = 1;
this.objectListViewAuftrag.UseCompatibleStateImageBehavior = false;
this.objectListViewAuftrag.UseHotControls = false;
@ -673,7 +675,7 @@
this.tabControlAuftragList.Location = new System.Drawing.Point(4, 9);
this.tabControlAuftragList.Name = "tabControlAuftragList";
this.tabControlAuftragList.SelectedIndex = 0;
this.tabControlAuftragList.Size = new System.Drawing.Size(625, 713);
this.tabControlAuftragList.Size = new System.Drawing.Size(1161, 713);
this.tabControlAuftragList.TabIndex = 0;
this.tabControlAuftragList.Visible = false;
this.tabControlAuftragList.SelectedIndexChanged += new System.EventHandler(this.tabControlAuftragList_SelectedIndexChanged);

View File

@ -30,6 +30,7 @@ namespace Deckungsbeitrag
int? altecontclean = null;
Timer timer1 = new Timer();
private Screen[] screens;
private Point itemlocation;
public FormExpedit(Benutzer benutzer)
{
@ -49,11 +50,11 @@ namespace Deckungsbeitrag
public FormExpedit(Benutzer benutzer, Screen[] screens) : this(benutzer)
{
this.screens = screens;
foreach(Screen screen in screens)
foreach (Screen screen in screens)
{
if (screen.Primary)
{
if (screens[0].WorkingArea.Width < 1500) { this.objectListViewAuftrag.Font = new Font(this.objectListViewAuftrag.Font.FontFamily, 10); }
if (screen.WorkingArea.Width < 1500) { this.objectListViewAuftrag.Font = new Font(this.objectListViewAuftrag.Font.FontFamily, 10); }
}
}
}
@ -251,6 +252,11 @@ namespace Deckungsbeitrag
// Alle Zeilenhöhen an Zellinhalt anpassen
this.dGArtikel.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
this.dGArtikel = Funktionen.DGV_Size_Anpassen(this.dGArtikel);
this.dGArtikel.Location = new Point(this.tabControlAuftragList.Right - dGArtikel.Width, this.dGArtikel.Location.Y);
if (this.dGArtikel.Rows.Count > 0) this.dGArtikel.Visible = true;
else this.dGArtikel.Visible = false;
}
@ -367,6 +373,7 @@ namespace Deckungsbeitrag
/// </summary>
private void objectListViewAuftrag_CellClick(object sender, CellClickEventArgs e)
{
itemlocation = new Point(e.Location.X, e.Location.Y);
if(e.Model == null) return;
ObjectListView olv = (ObjectListView)sender;
Auftrag _auftrag = (Auftrag)e.Model;
@ -563,6 +570,7 @@ namespace Deckungsbeitrag
}
private void Liefertag_rB_Checked(object sender, EventArgs e)
{
//TODO: OLV-Item refresh. Neuer Liefertag speichern.
foreach (RadioButton radioButton in this.groupBoxEtikett.Controls.OfType<RadioButton>())
{
if (radioButton.Checked) radioButton.BackColor = Color.Yellow;
@ -585,7 +593,9 @@ namespace Deckungsbeitrag
if (this.auftrag != null)
{
this.auftrag.Liefertag = this.dTPLiefertag.Value;
this.auftrag.Save();
Load_Etikett_GroupBox();
this.objectListViewAuftrag.RefreshObject(this.auftrag);
}
}
@ -667,5 +677,6 @@ namespace Deckungsbeitrag
FormEinstellung einstellung = new FormEinstellung(this);
einstellung.ShowDialog();
}
}
}

View File

@ -39,6 +39,7 @@ namespace Deckungsbeitrag
string auf_col = "Aufgabe,Beschreibung";
string progFiles = @"C:\Program Files\Common Files\Microsoft Shared\ink";
string keyboardPath;
private Timer timer;
//QR-Code Scan mit integrierter Kamera
@ -62,6 +63,12 @@ namespace Deckungsbeitrag
}
private void FormListe_Load(object sender, EventArgs e)
{
// Timer für Wartezeit bis TextChanged eintritt.
timer = new Timer();
timer.Interval = 1000; // 1 Sekunden
timer.Tick += Timer_Tick;
this.buttonOK.Visible = this.buttonOK.Enabled = false;
listViewKunde_Load();
@ -200,19 +207,29 @@ namespace Deckungsbeitrag
}
private void textBoxKunde_TextChanged(object sender, EventArgs e)
{
// TextChanged tritt nur ein wenn x Sekunden keine Eingabe erfolgt. Logik befindet sich in Timer_Tick
timer.Stop(); // Alten Timer beenden
timer.Start(); // Neuen Timer starten
}
private void Timer_Tick(object sender, EventArgs e)
{
timer.Stop(); // Timer stoppen
// Wenn kein Fragezeichen am Anfang und die Textlänge ist größer 3 wird Kundenliste erstellt.
if (!textBoxKunde.Text.StartsWith("?") && textBoxKunde.TextLength > 3)
{
Kundenliste = Kunde.GetTmpList(this.textBoxKunde.Text);
listViewKunde_Load();
}
// Wenn Fragezeichen am Anfang wird OK-Button aktiviert.
if (textBoxKunde.Text.StartsWith("?"))
{
this.listViewKunde.Visible = this.listViewKunde.Enabled = false;
this.buttonOK.Visible = this.buttonOK.Enabled = true;
this.Height = this.buttonOK.Bottom + 100;
}
}
private void listViewKunde_MouseClick(object sender, MouseEventArgs e)
{

View File

@ -118,7 +118,8 @@ namespace Deckungsbeitrag
private void DatenLaden()
{
this.textBoxKndNr.Text = kunde.KundeNummer;
this.textBoxKundeName.Text = kunde.Suchtext;
if (string.IsNullOrWhiteSpace(kunde.Suchtext)) this.textBoxKundeName.Text = kunde.KundeName;
else this.textBoxKundeName.Text = kunde.Suchtext;
if (letzterLiefertag.HasValue) this.dTPLiefertag.Value = letzterLiefertag.Value;
else this.dTPLiefertag.Value = DateTime.Today.AddDays(1);
@ -343,17 +344,9 @@ namespace Deckungsbeitrag
}
}
// Wenn Waschstrasse bleibt Fenster offen.
if(benutzer.Rolle != BenutzerRolle.Waschstrasse)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
Auftrag = new Auftrag();
FormNeuerAuftrag_Load(this, e);
}
}
private void Container_Click(object sender, EventArgs e)
{

118
AA-Forms/FormWSVerfolgung.Designer.cs generated Normal file
View File

@ -0,0 +1,118 @@
namespace Deckungsbeitrag.AA_Forms
{
partial class FormWSVerfolgung
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormWSVerfolgung));
this.statusStripWSVerfolgung = new System.Windows.Forms.StatusStrip();
this.tableLayoutPanelWSVerfolgung = new System.Windows.Forms.TableLayoutPanel();
this.toolStripStatusLabelInfo = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabelInfoShortCut = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripDropDownButtonInfo = new System.Windows.Forms.ToolStripDropDownButton();
this.statusStripWSVerfolgung.SuspendLayout();
this.SuspendLayout();
//
// statusStripWSVerfolgung
//
this.statusStripWSVerfolgung.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabelInfo,
this.toolStripStatusLabelInfoShortCut,
this.toolStripDropDownButtonInfo});
this.statusStripWSVerfolgung.Location = new System.Drawing.Point(0, 428);
this.statusStripWSVerfolgung.Name = "statusStripWSVerfolgung";
this.statusStripWSVerfolgung.Size = new System.Drawing.Size(800, 22);
this.statusStripWSVerfolgung.TabIndex = 0;
this.statusStripWSVerfolgung.Text = "statusStrip1";
//
// tableLayoutPanelWSVerfolgung
//
this.tableLayoutPanelWSVerfolgung.BackColor = System.Drawing.Color.Transparent;
this.tableLayoutPanelWSVerfolgung.ColumnCount = 1;
this.tableLayoutPanelWSVerfolgung.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelWSVerfolgung.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanelWSVerfolgung.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanelWSVerfolgung.Name = "tableLayoutPanelWSVerfolgung";
this.tableLayoutPanelWSVerfolgung.RowCount = 2;
this.tableLayoutPanelWSVerfolgung.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelWSVerfolgung.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelWSVerfolgung.Size = new System.Drawing.Size(800, 422);
this.tableLayoutPanelWSVerfolgung.TabIndex = 1;
//
// toolStripStatusLabelInfo
//
this.toolStripStatusLabelInfo.BackColor = System.Drawing.SystemColors.Control;
this.toolStripStatusLabelInfo.Name = "toolStripStatusLabelInfo";
this.toolStripStatusLabelInfo.Size = new System.Drawing.Size(72, 17);
this.toolStripStatusLabelInfo.Text = "Info wählen:";
//
// toolStripStatusLabelInfoShortCut
//
this.toolStripStatusLabelInfoShortCut.BackColor = System.Drawing.SystemColors.Control;
this.toolStripStatusLabelInfoShortCut.Name = "toolStripStatusLabelInfoShortCut";
this.toolStripStatusLabelInfoShortCut.Size = new System.Drawing.Size(55, 17);
this.toolStripStatusLabelInfoShortCut.Text = "[Strg]+[I]";
//
// toolStripDropDownButtonInfo
//
this.toolStripDropDownButtonInfo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripDropDownButtonInfo.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButtonInfo.Image")));
this.toolStripDropDownButtonInfo.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButtonInfo.Name = "toolStripDropDownButtonInfo";
this.toolStripDropDownButtonInfo.Size = new System.Drawing.Size(29, 20);
this.toolStripDropDownButtonInfo.Text = "toolStripDropDownButton1";
//
// FormWSVerfolgung
//
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(800, 450);
this.Controls.Add(this.tableLayoutPanelWSVerfolgung);
this.Controls.Add(this.statusStripWSVerfolgung);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.KeyPreview = true;
this.Name = "FormWSVerfolgung";
this.Text = "WSVerfolgung";
this.Load += new System.EventHandler(this.WSVerfolgung_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FormWSVerfolgung_KeyDown);
this.statusStripWSVerfolgung.ResumeLayout(false);
this.statusStripWSVerfolgung.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.StatusStrip statusStripWSVerfolgung;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelWSVerfolgung;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelInfo;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelInfoShortCut;
private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButtonInfo;
}
}

View File

@ -0,0 +1,299 @@
using DatenDB;
using Deckungsbeitrag.AA_Klassen;
using HarfBuzzSharp;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Font = System.Drawing.Font;
namespace Deckungsbeitrag.AA_Forms
{
public partial class FormWSVerfolgung : Form
{
private readonly SPSDaten _monitor; //Ziel der Eventanfragen für die SPS.
private string Userid;
private Maschine maschine;
private Auftrag auftrag;
private Fehlermeldungen meldung = new Fehlermeldungen();
private Aufgabe aufgabe;
private WSFach fach;
public bool ws1transport = false;
public bool ws2transport = false;
public FormWSVerfolgung()
{
InitializeComponent();
}
public FormWSVerfolgung(string userid) : this()
{
this.Userid = userid;
if (userid.Contains("01")) this.maschine = Maschine.GetMaschine(null, "Waschstrasse 1");
if (userid.Contains("02")) this.maschine = Maschine.GetMaschine(null, "Waschstrasse 2");
this._monitor = new SPSDaten();
//Je nach Maschine werden die richtigen Events erstellt.
if (maschine.MaschineID == 1)
{
_monitor.WS1Transport += Transport_ValueChanged;
//_monitor.Presse1Leer += WS1_Value_Changed;
//_monitor.Trockner1Beladen += WS1_Value_Changed;
//_monitor.Trockner1Entladen += WS1_Value_Changed;
//_monitor.TischSummaryWS1_print += TischSummary_print;
//_monitor.BegleitzettelWS1_print += Begleitzettel_print;
} //Maschine 1
else
{
_monitor.WS2Transport += Transport_ValueChanged;
//_monitor.Presse2Leer += WS2_Value_Changed;
//_monitor.Trockner2Beladen += WS2_Value_Changed;
//_monitor.Trockner2Entladen += WS2_Value_Changed;
//_monitor.TischSummaryWS2_print += TischSummary_print;
//_monitor.BegleitzettelWS2_print += Begleitzettel_print;
} //Maschine 2
}
private void WSVerfolgung_Load(object sender, EventArgs e)
{
// WaitCursor und Controls ausblenden.
this.Cursor = Cursors.WaitCursor;
//Funktionen.HideControls(this.Controls);
// StatusStrip DropDown
this.toolStripDropDownButtonInfo.DropDownItems.Clear();
List<Aufgabe> aufgabenliste = Aufgabe.GetList((int)Kategorie.Waschstrasse);
foreach(Aufgabe auf in aufgabenliste)
{
ToolStripMenuItem item = new ToolStripMenuItem(auf.Bezeichnung);
item.Tag = auf;
item.Click += AufgabeAuswaehlen_Click;
toolStripDropDownButtonInfo.DropDownItems.Add(item);
}
this.BackColor = Properties.Settings.Default.Wirlblau;
this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = FormBorderStyle.None;
this.tableLayoutPanelWSVerfolgung.Height = this.statusStripWSVerfolgung.Top;
if (maschine.TrocknerKaputt) this.tableLayoutPanelWSVerfolgung.RowCount = maschine.Faecher - 1;
else this.tableLayoutPanelWSVerfolgung.RowCount = maschine.Faecher;
this.tableLayoutPanelWSVerfolgung.RowStyles.Clear();
for (int i = 0; i < tableLayoutPanelWSVerfolgung.RowCount; i++)
{
tableLayoutPanelWSVerfolgung.RowStyles.Add(new RowStyle(SizeType.Percent, 100f / tableLayoutPanelWSVerfolgung.RowCount));
}
Panel_Laden(1);
//DefaultCursor und Controls einblenden.
//Funktionen.ShowControls(this.Controls);
this.Cursor = Cursors.Default;
}
private void AufgabeAuswaehlen_Click(object sender, EventArgs e)
{
ToolStripMenuItem item = (ToolStripMenuItem)sender;
this.aufgabe = (Aufgabe)item.Tag;
Fach_update();
}
private void Panel_Laden(int start)
{
List<WSFach> fachliste = WSFach.GetFachliste(maschine);
// Wenn erster Start dann Auftrag aus letztem Fach holen?
if (start == 1)
{
if (meldung.MaschinenStart() == DialogResult.Yes) this.auftrag = Auftrag.GetAuftrag(fachliste[0].AuftragID);
else this.auftrag = null;
}
// Alle Controls aus dem Panel entfernen.
this.tableLayoutPanelWSVerfolgung.Controls.Clear();
// UserControls mit Daten aus Fachliste in Panel laden.
for (int row = 0; row < fachliste.Count; row++)
{
Auftrag auftrag = Auftrag.GetAuftrag(fachliste[row].AuftragID);
UCFach ucfach = new UCFach();
ucfach.Dock = DockStyle.Fill;
// Fach Name und Farbe
if (this.maschine.Bezeichnung == "Waschstrasse 1")
{
switch (row + 1)
{
case int n when (n <= 4):
ucfach.ForeColor = Config.FarbenConfig.Farben["Beladeband"];
ucfach.FachName = $"F";
break;
case int n when (n >= 5 && n <= 13):
ucfach.ForeColor = Config.FarbenConfig.Farben["Waschstrasse"];
ucfach.FachName = $"W";
break;
case int n when (n == 14):
ucfach.ForeColor = Config.FarbenConfig.Farben["Presse"];
ucfach.FachName = $"P";
break;
case int n when (n == 15):
ucfach.ForeColor = Config.FarbenConfig.Farben["Hubband"];
ucfach.FachName = $"H";
break;
case int n when (n == 16):
ucfach.ForeColor = Config.FarbenConfig.Farben["Trockner"];
ucfach.FachName = $"T";
break;
case int n when (n == 17):
if (maschine.TrocknerKaputt) { ucfach.ForeColor = Config.FarbenConfig.Farben["Entladeband"]; ucfach.FachName = $"E"; }
else { ucfach.ForeColor = Config.FarbenConfig.Farben["Trockner"]; ucfach.FachName = $"T"; }
break;
case int n when (n == 18):
ucfach.ForeColor = Config.FarbenConfig.Farben["Entladeband"];
ucfach.FachName = $"E";
break;
default:
break;
}
}
ucfach.KundeName = Kunde.GetKunde(null, auftrag.KundeID, null).Suchtext;
CultureInfo deCult = new CultureInfo("de-DE");
ucfach.LieferTag = ((Liefertag)auftrag.Liefertag.DayOfWeek).ToString();
//TODO: Aufgabe Text
if (aufgabe != null) ucfach.Aufgabe = aufgabe.Bezeichnung;
this.tableLayoutPanelWSVerfolgung.Controls.Add(ucfach, 0, row);
}
}
private void Open_NeuerAuftrag()
{
FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.Userid);
if (neuerAuftrag.ShowDialog() == DialogResult.OK)
{
this.auftrag = neuerAuftrag.Auftrag;
Fach_speichern();
}
}
private void Fach_speichern()
{
WSFach wsfach = new WSFach();
wsfach.AuftragID = (int)this.auftrag.AuftragID;
wsfach.MaschineID = (int)this.maschine.MaschineID;
wsfach.Gewaschen = DateTime.Now;
wsfach.Gewicht = 0;
wsfach.WProgrammID = 1;
wsfach.AufgabeID = this.aufgabe.AufgabeID;
if (wsfach.Save() == 1)
{
this.fach = wsfach;
wsfach = null;
Panel_Laden(2);
}
}
private void Fach_update()
{
this.fach = new WSFach();
this.fach.AuftragID = (int)this.auftrag.AuftragID;
this.fach.MaschineID = (int)this.maschine.MaschineID;
this.fach.Gewaschen = DateTime.Now;
this.fach.Gewicht = 0;
this.fach.WProgrammID = 1;
this.fach.AufgabeID = this.aufgabe.AufgabeID;
if (this.fach.Save() == 1) Panel_Laden(2);
}
/// <summary>
/// Value für Transport hat sich geändert und Fach wird gespeichert.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Transport_ValueChanged(object sender, EventArgs e)
{
//this.SuspendLayout();
// Warten bis erster Transport durchgeführt wurde.
while (_monitor.WS_1_Transport == true & _monitor.WS_2_Transport == true)
{
}
if (_monitor.WS_1_Transport || _monitor.WS_2_Transport)
{
Maschine ms = (Maschine)this.maschine;
if (this.auftrag != null)
{
Fach_speichern();
}
else
{
MessageBox.Show($"Kein Auftrag erstellt. LEERFACH wird eingegeben. Bitte in BB1 bearbeiten.");
} //WENN kein Kunde gewählt dann Fach mit KundeID 0.
_monitor.WS_2_Transport = _monitor.WS_1_Transport = false;
}
//this.ResumeLayout(false);
} //Wenn sich SPSDaten Transport ändert wird Event ausgelöst. (Bis jetzt mit Button ausgelöst)
protected override bool ProcessDialogKey(Keys keyData)
{
//TODO: Umbau in Switch.
if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape)
{
this.Close();
return true;
}
if (Form.ModifierKeys == Keys.None && keyData == Keys.Insert)
{
Open_NeuerAuftrag();
return true;
}
if (Form.ModifierKeys == Keys.None && keyData == Keys.R)
{
Cursor.Current = Cursors.WaitCursor;
//this.SuspendLayout();
if (((Maschine)this.maschine).MaschineID == 1)
{
if (this.auftrag == null) MessageBox.Show($"Kein Kunde ausgewählt. Bitte JETZT erledigen.", "ACHTUNG", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else _monitor.WS_1_Transport = true;
}
if (((Maschine)this.maschine).MaschineID == 2)
{
if (this.auftrag == null) MessageBox.Show($"Kein Kunde ausgewählt. Bitte JETZT erledigen.", "ACHTUNG", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else _monitor.WS_2_Transport = true;
}
//this.ResumeLayout();
Cursor.Current = Cursors.Default;
return true;
}
return base.ProcessDialogKey(keyData);
}
private void FormWSVerfolgung_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.I) // Ctrl+I
{
e.Handled = true;
e.SuppressKeyPress = true;
}
}
}
}

View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="statusStripWSVerfolgung.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStripDropDownButtonInfo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
cX79DFKrHHD5d9D26hvicx4pABt2lpg10zYzU0zr7+e3xXGcrkEB2O2TNec9nJFwB3alZn5jZorfeDZh
6Q3g8s06BeCoKF4MRURoH1+BY2oNCbeb0TIclIYxOhzf8frTOuo7FxCbbVIAzpni0iceEc8vhzEwGkJD
lx83ymxifejdKjRNk/8PWnyIyTQqAJek0jqHwfEVscu31baIu8+90sTE4nY025dQ2/5FIPpnXlzKuK8A
HBUzHot52djqQ6HZhfR7IwK4mKpHtvEDMqvfCiQ6zaAAXM8x94aIWTNrLLG4kVUzgaTSPlzLtyJOZxbb
1wtfyg4Q+AfA3aZlButjSfxGcUJBk4g5tuP3haQKRKXcUQDOmbvNTpPOJeFFjordZmbWTNvMTHFUcpUC
nOccAdABIDXXE1nzAAAAAElFTkSuQmCC
</value>
</data>
</root>

View File

@ -273,5 +273,18 @@ namespace DatenDB
MessageBoxIcon icon = MessageBoxIcon.Error;
MessageBox.Show(s, caption, buttons, icon);
}
internal DialogResult MaschinenStart()
{
DialogResult result = DialogResult.Cancel;
string s = $"Möchtest du den Auftrag des letzten Faches wiederherstellen?";
string caption = "ACHTUNG";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
MessageBoxIcon icon = MessageBoxIcon.Exclamation;
result = MessageBox.Show(s, caption, buttons, icon);
return result;
}
}
}

View File

@ -50,6 +50,19 @@ namespace Deckungsbeitrag
return headerFormat;
}
public static Font Get_Font_Size(Font font, string text, float height)
{
Font f = font;
if (!string.IsNullOrEmpty(text))
{
while (height > TextRenderer.MeasureText(text, f).Height)
{
f = new Font(font.FontFamily, f.Size + 1);
}
}
return f;
}
public static Font Get_Label_Font(Font font, string text, Size size)
{
Font f = font;
@ -742,7 +755,7 @@ namespace Deckungsbeitrag
Image qrweb = Image.FromFile(ConfigurationManager.AppSettings["QrPfad"]);
qrweb.RotateFlip(RotateFlipType.Rotate270FlipNone);
Bitmap bitmap = new Bitmap(1200, 340);
Bitmap bitmap = new Bitmap(1200, 300);
//bitmap.SetResolution(100, 100);
Graphics g = Graphics.FromImage(bitmap);
Font font1 = new Font("Arial", 50, FontStyle.Bold);
@ -1057,5 +1070,30 @@ namespace Deckungsbeitrag
return gb;
}
/// <summary>
/// Bei DataGridView die Größe an Zeilen und Spalten anpassen.
/// </summary>
/// <param name="g"></param>
/// <returns></returns>
public static DataGridView DGV_Size_Anpassen( DataGridView g)
{
int totalWidth = g.RowHeadersVisible ? g.RowHeadersWidth : 0;
foreach (DataGridViewColumn col in g.Columns)
{
if (col.Visible) totalWidth += col.Width;
}
int totalHeight = g.ColumnHeadersVisible ? g.ColumnHeadersHeight : 0;
foreach (DataGridViewRow row in g.Rows)
{
if (row.Visible) totalHeight += row.Height;
}
totalHeight += g.ColumnHeadersHeight;
g.ClientSize = new Size(totalWidth, totalHeight);
return g;
}
}
}

View File

@ -36,7 +36,7 @@ namespace DatenDB
if (!endsWithSpecial)
{
if (int.TryParse(text, out _)) command.CommandText = $"select {COLUMNS} from {TABLE} where kunde_nr::varchar ~* '{text}'";
else command.CommandText = $"select {COLUMNS} from {TABLE} where suchtext ~* '{text}'";
else command.CommandText = $"select {COLUMNS} from {TABLE} where suchtext ~* '{text}' or name1 ~* '{text}'";
}
else if (int.TryParse(text, out _)) command.CommandText = $"select {COLUMNS} from {TABLE} where kunde_nr::varchar ~* '{text.Substring(0, 6)}'";
//TODO: Testen ob SWS-QRCodes gelesen werden können. Nur notwendig bis alle SWS-QRCodes richtig gedruckt und gelesen werden.

View File

@ -10,7 +10,7 @@ namespace Deckungsbeitrag.AA_Klassen
{
public class WSFach
{
private const string COLUMNS = "fach_id, auftrag_id, maschine_id, gewaschen, extraauftrag_id, gewicht, wprogramm_id";
private const string COLUMNS = "fach_id, auftrag_id, maschine_id, gewaschen, extraauftrag_id, gewicht, wprogramm_id, aufgabe_id";
private const string TABLE = "kundenverwaltung.wsfach";
public WSFach()
@ -25,6 +25,7 @@ namespace Deckungsbeitrag.AA_Klassen
public int? ExtraAuftragID { get; set; }
public double Gewicht { get; set; } = 0;
public int? WProgrammID { get; set; }
public int? AufgabeID { get; set; }
internal static List<WSFach> GetFachliste(Maschine maschine)
{
@ -52,6 +53,7 @@ namespace Deckungsbeitrag.AA_Klassen
this.ExtraAuftragID = reader.IsDBNull(4) ? null : (int?)reader.GetInt32(4);
this.Gewicht = reader.GetDouble(5);
this.WProgrammID = reader.IsDBNull(6) ? null : (int?)reader.GetInt32(6);
this.AufgabeID = reader.IsDBNull(7) ? null : (int?)reader.GetInt32(7);
}
public int Save()
{
@ -61,13 +63,13 @@ namespace Deckungsbeitrag.AA_Klassen
if (this.FachID.HasValue & this.FachID != 0)
{
command.CommandText = $"update {TABLE} set auftrag_id = :p1, maschine_id = :p2, gewaschen = :p3, extraauftrag_id = :p4, gewicht = :p5, wprogramm_id = :p6 where fach_id = :p0";
command.CommandText = $"update {TABLE} set auftrag_id = :p1, maschine_id = :p2, gewaschen = :p3, extraauftrag_id = :p4, gewicht = :p5, wprogramm_id = :p6, aufgabe_id = :p7 where fach_id = :p0";
}
else
{
command.CommandText = "select nextval('kundenverwaltung.wsfach_seq')";
this.FachID = (int)(long)command.ExecuteScalar();
command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6)";
command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7)";
}
command.Parameters.AddWithValue("p0", this.FachID);
command.Parameters.AddWithValue("p1", this.AuftragID);
@ -76,6 +78,7 @@ namespace Deckungsbeitrag.AA_Klassen
command.Parameters.AddWithValue("p4", this.ExtraAuftragID.HasValue ? this.ExtraAuftragID.Value : (object)DBNull.Value);
command.Parameters.AddWithValue("p5", this.Gewicht);
command.Parameters.AddWithValue("p6", this.WProgrammID.HasValue ? this.WProgrammID.Value : (object)DBNull.Value);
command.Parameters.AddWithValue("p7", this.AufgabeID.HasValue ? this.AufgabeID.Value : (object)DBNull.Value);
int result = command.ExecuteNonQuery();
DatenbankConnection.GetConnection().Close();

View File

@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<appSettings>
<add key="ConnectionString" value="user id=postgres;password=Ki985941Wi;host=10.10.10.1;port=5432;database=Wirl_DB_17012023;Timeout=5" />
<add key="ConnectionString" value="user id=postgres;password=Ki985941Wi;host=10.10.10.1;port=5432;database=Test_Wirl;Timeout=5" />
<add key="SortimentPfad" value="N:\\BÜRO\\SOCOM\\Zaehlscheine\\Kundensortiment.txt" />
<add key="BildPfad" value="C:\\Users\\KilianWirl\\OneDrive - gehgassi GmbH\\Wäscherei Wirl\\Programme\\Deckungsbeitrag\\Deckungsbeitrag\\Star.png" />
<add key="QrPfad" value="N:\\BÜRO\\SOCOM\\Zaehlscheine\\qrweb.png" />

View File

@ -1,4 +1,5 @@
using DatenDB;
using Deckungsbeitrag.AA_Forms;
using System;
using System.Collections.Generic;
using System.Configuration;
@ -29,7 +30,7 @@ namespace Deckungsbeitrag
//TODO: Wenn mit Anmeldung dann if-Clause entfernen und Switch alleine verwenden.
if (userid.StartsWith("ms") | userid.StartsWith("ps"))
{
if (userid.Contains("wstrasse")) Application.Run(new FormAusschlager(userid));
if (userid.Contains("wstrasse")) Application.Run(new FormWSVerfolgung(userid));
else Application.Run(new FormFehlmengeCount(userid));
}
else

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.1.1")]
[assembly: AssemblyFileVersion("1.0.1.1")]
[assembly: AssemblyVersion("1.0.1.3")]
[assembly: AssemblyFileVersion("1.0.1.3")]

View File

@ -213,6 +213,12 @@
}
"Entry"
{
"MsmKey" = "8:_52990414836E4CF7BD50C1245D0F9B6F"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_5CDE0A18B0E8657CBCF9143673DB464A"
"OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72"
"MsmSig" = "8:_UNDEFINED"
@ -363,12 +369,6 @@
}
"Entry"
{
"MsmKey" = "8:_C9B6A80501F441EF8F136C44B8658363"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_CC6E1B525578AF50C3DD3123399882F3"
"OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332"
"MsmSig" = "8:_UNDEFINED"
@ -987,6 +987,26 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_52990414836E4CF7BD50C1245D0F9B6F"
{
"SourcePath" = "8:..\\wirlneu_transparent (1).ico"
"TargetName" = "8:wirlneu_transparent (1).ico"
"Tag" = "8:"
"Folder" = "8:_C848DFB5E4D140A7A7F5E1F129613626"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5CDE0A18B0E8657CBCF9143673DB464A"
{
"AssemblyRegister" = "3:1"
@ -1421,26 +1441,6 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C9B6A80501F441EF8F136C44B8658363"
{
"SourcePath" = "8:..\\..\\..\\..\\OneDrive - gehgassi GmbH\\Wäscherei Wirl\\Programme\\Verwaltung\\wirlneu_transparent (1).ico"
"TargetName" = "8:wirlneu_transparent (1).ico"
"Tag" = "8:"
"Folder" = "8:_C848DFB5E4D140A7A7F5E1F129613626"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CC6E1B525578AF50C3DD3123399882F3"
{
"AssemblyRegister" = "3:1"
@ -1595,7 +1595,7 @@
}
"{3C67513D-01DD-4637-8A68-80971EB9504F}:_C848DFB5E4D140A7A7F5E1F129613626"
{
"DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]"
"DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\Verwaltung"
"Name" = "8:#1925"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
@ -1621,15 +1621,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:SetupVerwaltung"
"ProductCode" = "8:{CE862A37-F37D-4715-B78F-AC14E938FCB5}"
"PackageCode" = "8:{DFF6C8EF-A6C5-4718-89BC-8ABB66EE614B}"
"ProductCode" = "8:{9E8C033A-6762-4108-957E-1D834D568DC0}"
"PackageCode" = "8:{B5ED7236-241E-4943-A031-B70E366CC2D5}"
"UpgradeCode" = "8:{2DC7CE56-8D1C-42EB-B326-2E887EBB7F5A}"
"AspNetVersion" = "8:"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:FALSE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.0.7"
"ProductVersion" = "8:1.0.9"
"Manufacturer" = "8:Kilian Wirl GmbH"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
@ -1639,7 +1639,7 @@
"Keywords" = "8:"
"ARPCOMMENTS" = "8:"
"ARPURLINFOABOUT" = "8:"
"ARPPRODUCTICON" = "8:_C9B6A80501F441EF8F136C44B8658363"
"ARPPRODUCTICON" = "8:_52990414836E4CF7BD50C1245D0F9B6F"
"ARPIconIndex" = "3:0"
"SearchPath" = "8:"
"UseSystemSearchPath" = "11:TRUE"
@ -1742,34 +1742,6 @@
}
"Shortcut"
{
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_B7B8A605AC67476DAC62238B39B0AB87"
{
"Name" = "8:wirlneu_transparent (1).ico"
"Arguments" = "8:"
"Description" = "8:"
"ShowCmd" = "3:1"
"IconIndex" = "3:0"
"Transitive" = "11:FALSE"
"Target" = "8:_C9B6A80501F441EF8F136C44B8658363"
"Folder" = "8:_7771382F74F540C291805EF69D4901EA"
"WorkingFolder" = "8:_C848DFB5E4D140A7A7F5E1F129613626"
"Icon" = "8:"
"Feature" = "8:"
}
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_D94F927914784F6FA176F30378DE1E35"
{
"Name" = "8:wirlneu_transparent (1).ico"
"Arguments" = "8:"
"Description" = "8:"
"ShowCmd" = "3:1"
"IconIndex" = "3:0"
"Transitive" = "11:FALSE"
"Target" = "8:_C9B6A80501F441EF8F136C44B8658363"
"Folder" = "8:_78ADD2548EB14913852C3FD3BBF1389C"
"WorkingFolder" = "8:_C848DFB5E4D140A7A7F5E1F129613626"
"Icon" = "8:"
"Feature" = "8:"
}
}
"UserInterface"
{

70
UCArtikel.Designer.cs generated
View File

@ -1,70 +0,0 @@
namespace Deckungsbeitrag
{
partial class UCArtikel
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.tBAnzahl = new System.Windows.Forms.TextBox();
this.cBArtikel = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// tBAnzahl
//
this.tBAnzahl.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tBAnzahl.Location = new System.Drawing.Point(177, 5);
this.tBAnzahl.Name = "tBAnzahl";
this.tBAnzahl.Size = new System.Drawing.Size(105, 31);
this.tBAnzahl.TabIndex = 0;
//
// cBArtikel
//
this.cBArtikel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cBArtikel.FormattingEnabled = true;
this.cBArtikel.Location = new System.Drawing.Point(3, 3);
this.cBArtikel.Name = "cBArtikel";
this.cBArtikel.Size = new System.Drawing.Size(168, 33);
this.cBArtikel.TabIndex = 1;
//
// UCArtikel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.cBArtikel);
this.Controls.Add(this.tBAnzahl);
this.Name = "UCArtikel";
this.Size = new System.Drawing.Size(287, 40);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox tBAnzahl;
private System.Windows.Forms.ComboBox cBArtikel;
}
}

View File

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Deckungsbeitrag
{
public partial class UCArtikel : UserControl
{
public UCArtikel()
{
InitializeComponent();
}
}
}

125
UCFach.Designer.cs generated Normal file
View File

@ -0,0 +1,125 @@
namespace Deckungsbeitrag
{
partial class UCFach
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.labelFach = new System.Windows.Forms.Label();
this.labelKunde = new System.Windows.Forms.Label();
this.labelLiefertag = new System.Windows.Forms.Label();
this.labelAufgabe = new System.Windows.Forms.Label();
this.tableLayoutPanelUCFach = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanelUCFach.SuspendLayout();
this.SuspendLayout();
//
// labelFach
//
this.labelFach.AutoSize = true;
this.labelFach.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelFach.Location = new System.Drawing.Point(3, 0);
this.labelFach.Name = "labelFach";
this.labelFach.Size = new System.Drawing.Size(189, 50);
this.labelFach.TabIndex = 0;
this.labelFach.Text = "Fach";
this.labelFach.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// labelKunde
//
this.labelKunde.AutoSize = true;
this.labelKunde.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelKunde.Location = new System.Drawing.Point(198, 0);
this.labelKunde.Name = "labelKunde";
this.labelKunde.Size = new System.Drawing.Size(189, 50);
this.labelKunde.TabIndex = 1;
this.labelKunde.Text = "Kunde";
this.labelKunde.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labelLiefertag
//
this.labelLiefertag.AutoSize = true;
this.labelLiefertag.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelLiefertag.Location = new System.Drawing.Point(393, 0);
this.labelLiefertag.Name = "labelLiefertag";
this.labelLiefertag.Size = new System.Drawing.Size(59, 50);
this.labelLiefertag.TabIndex = 2;
this.labelLiefertag.Text = "Liefertag";
this.labelLiefertag.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelAufgabe
//
this.labelAufgabe.AutoSize = true;
this.labelAufgabe.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelAufgabe.Location = new System.Drawing.Point(458, 0);
this.labelAufgabe.Name = "labelAufgabe";
this.labelAufgabe.Size = new System.Drawing.Size(190, 50);
this.labelAufgabe.TabIndex = 3;
this.labelAufgabe.Text = "Aufgabe";
this.labelAufgabe.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tableLayoutPanelUCFach
//
this.tableLayoutPanelUCFach.ColumnCount = 4;
this.tableLayoutPanelUCFach.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanelUCFach.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanelUCFach.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanelUCFach.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanelUCFach.Controls.Add(this.labelFach, 0, 0);
this.tableLayoutPanelUCFach.Controls.Add(this.labelAufgabe, 3, 0);
this.tableLayoutPanelUCFach.Controls.Add(this.labelKunde, 1, 0);
this.tableLayoutPanelUCFach.Controls.Add(this.labelLiefertag, 2, 0);
this.tableLayoutPanelUCFach.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanelUCFach.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanelUCFach.Name = "tableLayoutPanelUCFach";
this.tableLayoutPanelUCFach.RowCount = 1;
this.tableLayoutPanelUCFach.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanelUCFach.Size = new System.Drawing.Size(651, 50);
this.tableLayoutPanelUCFach.TabIndex = 4;
//
// UCFach
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.tableLayoutPanelUCFach);
this.Name = "UCFach";
this.Size = new System.Drawing.Size(651, 50);
this.Load += new System.EventHandler(this.UCFach_Load);
this.tableLayoutPanelUCFach.ResumeLayout(false);
this.tableLayoutPanelUCFach.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label labelFach;
private System.Windows.Forms.Label labelKunde;
private System.Windows.Forms.Label labelLiefertag;
private System.Windows.Forms.Label labelAufgabe;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelUCFach;
}
}

67
UCFach.cs Normal file
View File

@ -0,0 +1,67 @@
using DatenDB;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Deckungsbeitrag
{
public partial class UCFach : UserControl
{
public string FachName
{
get => labelFach.Text;
set => labelFach.Text = value;
}
public string KundeName
{
get => labelKunde.Text;
set => labelKunde.Text = value;
}
public string LieferTag
{
get => labelLiefertag.Text;
set => labelLiefertag.Text = value;
}
public string Aufgabe
{
get => labelAufgabe.Text;
set => labelAufgabe.Text = value;
}
public UCFach()
{
InitializeComponent();
}
private void UCFach_Load(object sender, EventArgs e)
{
foreach(Label lbl in this.tableLayoutPanelUCFach.Controls)
{
lbl.Font = Funktionen.Get_Font_Size(lbl.Font, lbl.Text, GetCellSizeInPixels(tableLayoutPanelUCFach, 4, 1).Height);
}
}
/// <summary>
/// Umrechnen der Prozentgröße der Zeile in Pixelhöhe (int).
/// </summary>
/// <param name="tlp"></param>
/// <param name="column"></param>
/// <param name="row"></param>
/// <returns></returns>
public static Size GetCellSizeInPixels(TableLayoutPanel tlp, int column, int row)
{
float colPercent = 0;
float rowPercent = tlp.RowStyles[0].Height;
int pixelWidth = (int)colPercent;
int pixelHeight = rowPercent == 0 ? 0 : (int)(tlp.Height * (rowPercent / 100f));
return new Size(pixelWidth, pixelHeight);
}
}
}

View File

@ -158,6 +158,12 @@
<Compile Include="AA-Forms\FormNeuerBenutzer.Designer.cs">
<DependentUpon>FormNeuerBenutzer.cs</DependentUpon>
</Compile>
<Compile Include="AA-Forms\FormWSVerfolgung.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AA-Forms\FormWSVerfolgung.Designer.cs">
<DependentUpon>FormWSVerfolgung.cs</DependentUpon>
</Compile>
<Compile Include="AA-Klassen\Artikel.cs" />
<Compile Include="AA-Klassen\Aufgabe.cs" />
<Compile Include="AA-Klassen\Auftrag.cs" />
@ -343,12 +349,6 @@
<Compile Include="AA-Klassen\Report.cs" />
<Compile Include="AA-Klassen\Sortiment.cs" />
<Compile Include="AA-Klassen\SPSDaten.cs" />
<Compile Include="UCArtikel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UCArtikel.Designer.cs">
<DependentUpon>UCArtikel.cs</DependentUpon>
</Compile>
<Compile Include="UCAuftrag.cs">
<SubType>UserControl</SubType>
</Compile>
@ -358,6 +358,12 @@
<Compile Include="AA-Klassen\Umsatz.cs" />
<Compile Include="AA-Klassen\Views.cs" />
<Compile Include="AA-Klassen\WProgramm.cs" />
<Compile Include="UCFach.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UCFach.Designer.cs">
<DependentUpon>UCFach.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="AA-Forms\FormArtikelVW.resx">
<DependentUpon>FormArtikelVW.cs</DependentUpon>
</EmbeddedResource>
@ -436,6 +442,9 @@
<EmbeddedResource Include="AA-Forms\FormImport.resx">
<DependentUpon>FormImport.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AA-Forms\FormWSVerfolgung.resx">
<DependentUpon>FormWSVerfolgung.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@ -449,12 +458,12 @@
<EmbeddedResource Include="AA-Forms\FormKundeVW.resx">
<DependentUpon>FormKundeVW.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UCArtikel.resx">
<DependentUpon>UCArtikel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UCAuftrag.resx">
<DependentUpon>UCAuftrag.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UCFach.resx">
<DependentUpon>UCFach.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>

BIN
wirlneu_transparent (1).ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB