WSVerfolgung vorbereitet, In Expedit wird Aufgabe mit Icon angezeigt, Bei NeuerAuftrag wird KundenAufgabe übernommen,

This commit is contained in:
Kilian Wirl 2025-12-10 13:03:50 +01:00
parent 94ebdec1b0
commit 84e62082dd
15 changed files with 216 additions and 156 deletions

View File

@ -55,15 +55,13 @@ namespace Deckungsbeitrag
this.comboBoxSWSDrucker.Items.Add(printer); this.comboBoxSWSDrucker.Items.Add(printer);
} }
_settings.Load();
this.comboBoxEtikettDrucker.SelectedText = _settings.DruckerEtikett;
this.comboBoxSWSDrucker.SelectedText = _settings.DruckerSWS;
this.numericUpDownSWSKopien.Value = _settings.CopiesSWS;
Load_Settings(); Load_Settings();
} }
private void Load_Settings() private void Load_Settings()
{ {
_settings.Load();
//TODO: Settings hier ändern auf UserSettingsManager Klasse. //TODO: Settings hier ändern auf UserSettingsManager Klasse.
this.checkBoxMaxWert.Checked = Settings.Default.MaxChecked; this.checkBoxMaxWert.Checked = Settings.Default.MaxChecked;
this.checkBoxMinWert.Checked = Settings.Default.MinChecked; this.checkBoxMinWert.Checked = Settings.Default.MinChecked;
@ -74,14 +72,16 @@ namespace Deckungsbeitrag
this.textBoxSortiment.Text = ConfigurationManager.AppSettings["SortimentPfad"]; this.textBoxSortiment.Text = ConfigurationManager.AppSettings["SortimentPfad"];
this.textBoxRatingbild.Text = ConfigurationManager.AppSettings["BildPfad"]; this.textBoxRatingbild.Text = ConfigurationManager.AppSettings["BildPfad"];
// Ab hier wurde bereits auf UserSettingsManager umgebaut.
this.comboBoxEtikettDrucker.SelectedText = _settings.DruckerEtikett;
this.comboBoxSWSDrucker.SelectedText = _settings.DruckerSWS;
this.numericUpDownSWSKopien.Value = _settings.CopiesSWS;
foreach (Button btn in this.groupBoxFarben.Controls.OfType<Button>()) foreach (Button btn in this.groupBoxFarben.Controls.OfType<Button>())
{ {
if (btn.Name.Substring(6) == _settings.Presse.Name) btn.FlatAppearance.BorderColor = _settings.Presse;
if ((Color)Settings.Default[btn.Name.Substring(6)] == Color.Empty) btn.FlatAppearance.BorderColor = DefaultBackColor;
else
{
btn.FlatAppearance.BorderColor = (Color)Settings.Default[btn.Name.Substring(6)];
}
} }
} }

View File

@ -1,5 +1,6 @@
using BrightIdeasSoftware; using BrightIdeasSoftware;
using DatenDB; using DatenDB;
using Deckungsbeitrag.Properties;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
@ -31,6 +32,8 @@ namespace Deckungsbeitrag
Timer timer1 = new Timer(); Timer timer1 = new Timer();
private Screen[] screens; private Screen[] screens;
private Point itemlocation; private Point itemlocation;
private ImageList imagelist = new ImageList();
public FormExpedit(Benutzer benutzer) public FormExpedit(Benutzer benutzer)
{ {
@ -64,6 +67,8 @@ namespace Deckungsbeitrag
Cursor.Current = Cursors.WaitCursor; Cursor.Current = Cursors.WaitCursor;
this.SuspendLayout(); this.SuspendLayout();
imagelist.Images.Add(Resources.WarningRule_16x);
// Controls aktivieren und deaktivieren nach BenutzerRolle // Controls aktivieren und deaktivieren nach BenutzerRolle
switch (this.benutzer.Rolle) switch (this.benutzer.Rolle)
{ {
@ -523,14 +528,32 @@ namespace Deckungsbeitrag
olv.BeginUpdate(); olv.BeginUpdate();
Generator.GenerateColumns(olv, typeof(Auftrag), true); Generator.GenerateColumns(olv, typeof(Auftrag), true);
olv.SetObjects(auftraglist);
// Spalte zum Sortieren festlegen.
OLVColumn sortcolumn = (OLVColumn)olv.Columns[5]; OLVColumn sortcolumn = (OLVColumn)olv.Columns[5];
olv.Sort(sortcolumn); olv.Sort(sortcolumn);
// Spalte mit Button anzeigen.
OLVColumn buttonColumn = new OLVColumn(); OLVColumn buttonColumn = new OLVColumn();
buttonColumn = (OLVColumn)olv.Columns[10]; buttonColumn = (OLVColumn)olv.Columns[11];
buttonColumn.IsButton = true; buttonColumn.IsButton = true;
buttonColumn.ButtonSizing = OLVColumn.ButtonSizingMode.CellBounds; buttonColumn.ButtonSizing = OLVColumn.ButtonSizingMode.CellBounds;
// Liste mit Images der ObjectListView zuweisen.
olv.SmallImageList = imagelist;
// Spalte mit Image anzeigen. Wenn AufgabeID != null dann Image. KEINE UNTERSCHEIDUNG WELCHE AUFGABE.
OLVColumn iconColumn = (OLVColumn)olv.Columns[10];
iconColumn.ImageGetter = rowObject =>
{
var auftrag = rowObject as Auftrag;
if (auftrag.AufgabeID == null) return null; // kein Icon
else return 0; // Icon an Position 0
};
// Erst nach den Columns die Objecte einfügen.
olv.SetObjects(auftraglist);
olv.CheckedAspectName = "IsChecked"; olv.CheckedAspectName = "IsChecked";
@ -670,6 +693,7 @@ namespace Deckungsbeitrag
{ {
this.dGArtikel.DataSource = null; this.dGArtikel.DataSource = null;
this.dGArtikel.Rows.Clear(); this.dGArtikel.Rows.Clear();
this.dGArtikel.Visible = false;
} }
/// <summary> /// <summary>

View File

@ -212,6 +212,9 @@ namespace Deckungsbeitrag
//AUFTRAG DATEN ÜBERGEBEN //AUFTRAG DATEN ÜBERGEBEN
Auftrag.KundeID = (int)kunde.KundeID; Auftrag.KundeID = (int)kunde.KundeID;
//TODO: Überlegen ob das der richtige Weg ist. Eventuell in Expedit sowohl KundeAufgabe wie auch AuftragAufgabe anzeigen? NOTWENDIG?
if (Auftrag.AufgabeID == null) { if (kunde.Aufgabe != null) Auftrag.AufgabeID = kunde.Aufgabe; }
Auftrag.Liefertag = this.dTPLiefertag.Value; Auftrag.Liefertag = this.dTPLiefertag.Value;
Auftrag.Container = int.Parse(this.textBoxCont.Text); Auftrag.Container = int.Parse(this.textBoxCont.Text);
Auftrag.ErstelltVon = (int)this.benutzer.BenutzerID; Auftrag.ErstelltVon = (int)this.benutzer.BenutzerID;

View File

@ -28,24 +28,21 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormWSVerfolgung));
this.statusStripWSVerfolgung = new System.Windows.Forms.StatusStrip(); this.statusStripWSVerfolgung = new System.Windows.Forms.StatusStrip();
this.tableLayoutPanelWSVerfolgung = new System.Windows.Forms.TableLayoutPanel(); 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.toolStripDropDownButtonInfo = new System.Windows.Forms.ToolStripDropDownButton();
this.statusStripWSVerfolgung.SuspendLayout(); this.statusStripWSVerfolgung.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// statusStripWSVerfolgung // statusStripWSVerfolgung
// //
this.statusStripWSVerfolgung.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.statusStripWSVerfolgung.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.statusStripWSVerfolgung.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabelInfo,
this.toolStripStatusLabelInfoShortCut,
this.toolStripDropDownButtonInfo}); this.toolStripDropDownButtonInfo});
this.statusStripWSVerfolgung.Location = new System.Drawing.Point(0, 428); this.statusStripWSVerfolgung.Location = new System.Drawing.Point(0, 414);
this.statusStripWSVerfolgung.Name = "statusStripWSVerfolgung"; this.statusStripWSVerfolgung.Name = "statusStripWSVerfolgung";
this.statusStripWSVerfolgung.Size = new System.Drawing.Size(800, 22); this.statusStripWSVerfolgung.Size = new System.Drawing.Size(800, 36);
this.statusStripWSVerfolgung.SizingGrip = false;
this.statusStripWSVerfolgung.TabIndex = 0; this.statusStripWSVerfolgung.TabIndex = 0;
this.statusStripWSVerfolgung.Text = "statusStrip1"; this.statusStripWSVerfolgung.Text = "statusStrip1";
// //
@ -63,28 +60,19 @@
this.tableLayoutPanelWSVerfolgung.Size = new System.Drawing.Size(800, 422); this.tableLayoutPanelWSVerfolgung.Size = new System.Drawing.Size(800, 422);
this.tableLayoutPanelWSVerfolgung.TabIndex = 1; 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 // toolStripDropDownButtonInfo
// //
this.toolStripDropDownButtonInfo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripDropDownButtonInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.toolStripDropDownButtonInfo.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButtonInfo.Image"))); this.toolStripDropDownButtonInfo.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.toolStripDropDownButtonInfo.ForeColor = System.Drawing.Color.White;
this.toolStripDropDownButtonInfo.Image = global::Deckungsbeitrag.Properties.Resources.InformationSymbol_16x;
this.toolStripDropDownButtonInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.toolStripDropDownButtonInfo.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButtonInfo.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButtonInfo.Name = "toolStripDropDownButtonInfo"; this.toolStripDropDownButtonInfo.Name = "toolStripDropDownButtonInfo";
this.toolStripDropDownButtonInfo.Size = new System.Drawing.Size(29, 20); this.toolStripDropDownButtonInfo.Size = new System.Drawing.Size(160, 34);
this.toolStripDropDownButtonInfo.Text = "toolStripDropDownButton1"; this.toolStripDropDownButtonInfo.Text = "Info wählen";
this.toolStripDropDownButtonInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.toolStripDropDownButtonInfo.ToolTipText = "Wähle hier eine Info für die Ausschlager";
// //
// FormWSVerfolgung // FormWSVerfolgung
// //
@ -111,8 +99,6 @@
private System.Windows.Forms.StatusStrip statusStripWSVerfolgung; private System.Windows.Forms.StatusStrip statusStripWSVerfolgung;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelWSVerfolgung; private System.Windows.Forms.TableLayoutPanel tableLayoutPanelWSVerfolgung;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelInfo;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelInfoShortCut;
private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButtonInfo; private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButtonInfo;
} }
} }

View File

@ -24,6 +24,7 @@ namespace Deckungsbeitrag.AA_Forms
private Fehlermeldungen meldung = new Fehlermeldungen(); private Fehlermeldungen meldung = new Fehlermeldungen();
private Aufgabe aufgabe; private Aufgabe aufgabe;
private WSFach fach; private WSFach fach;
private Auftrag extraAuftrag;
public bool ws1transport = false; public bool ws1transport = false;
public bool ws2transport = false; public bool ws2transport = false;
@ -80,7 +81,7 @@ namespace Deckungsbeitrag.AA_Forms
} }
this.BackColor = Properties.Settings.Default.Wirlblau; this.BackColor = Color.Black;
this.WindowState = FormWindowState.Maximized; this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = FormBorderStyle.None; this.FormBorderStyle = FormBorderStyle.None;
this.tableLayoutPanelWSVerfolgung.Height = this.statusStripWSVerfolgung.Top; this.tableLayoutPanelWSVerfolgung.Height = this.statusStripWSVerfolgung.Top;
@ -102,8 +103,16 @@ namespace Deckungsbeitrag.AA_Forms
private void AufgabeAuswaehlen_Click(object sender, EventArgs e) private void AufgabeAuswaehlen_Click(object sender, EventArgs e)
{ {
ToolStripMenuItem item = (ToolStripMenuItem)sender; ToolStripMenuItem item = (ToolStripMenuItem)sender;
if (((Aufgabe)item.Tag).Bezeichnung == "Extra Kunde")
{
FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.Userid);
if (neuerAuftrag.ShowDialog() == DialogResult.OK)
{
this.extraAuftrag = neuerAuftrag.Auftrag;
}
}
this.aufgabe = (Aufgabe)item.Tag; this.aufgabe = (Aufgabe)item.Tag;
Fach_update(); Fach_speichern();
} }
private void Panel_Laden(int start) private void Panel_Laden(int start)
@ -114,8 +123,16 @@ namespace Deckungsbeitrag.AA_Forms
// Wenn erster Start dann Auftrag aus letztem Fach holen? // Wenn erster Start dann Auftrag aus letztem Fach holen?
if (start == 1) if (start == 1)
{ {
if (meldung.MaschinenStart() == DialogResult.Yes) this.auftrag = Auftrag.GetAuftrag(fachliste[0].AuftragID); if (meldung.MaschinenStart() == DialogResult.Yes)
else this.auftrag = null; {
this.auftrag = Auftrag.GetAuftrag(fachliste[0].AuftragID);
this.aufgabe = Aufgabe.GetAufgabe(null, fachliste[0].AufgabeID);
}
else
{
this.auftrag = null;
this.aufgabe = null;
}
} }
// Alle Controls aus dem Panel entfernen. // Alle Controls aus dem Panel entfernen.
@ -123,58 +140,71 @@ namespace Deckungsbeitrag.AA_Forms
// UserControls mit Daten aus Fachliste in Panel laden. // UserControls mit Daten aus Fachliste in Panel laden.
for (int row = 0; row < fachliste.Count; row++) if (fachliste.Count > 0)
{ {
Auftrag auftrag = Auftrag.GetAuftrag(fachliste[row].AuftragID); for (int row = 0; row < fachliste.Count; row++)
UCFach ucfach = new UCFach();
ucfach.Dock = DockStyle.Fill;
// Fach Name und Farbe
if (this.maschine.Bezeichnung == "Waschstrasse 1")
{ {
switch (row + 1) Auftrag auftrag = Auftrag.GetAuftrag(fachliste[row].AuftragID);
Aufgabe aufgabe = Aufgabe.GetAufgabe(null, fachliste[row].AufgabeID);
UCFach ucfach = new UCFach();
ucfach.Dock = DockStyle.Fill;
// Fach Name und Farbe
if (this.maschine.Bezeichnung == "Waschstrasse 1")
{ {
case int n when (n <= 4): switch (row + 1)
ucfach.ForeColor = Config.FarbenConfig.Farben["Beladeband"]; {
ucfach.FachName = $"F"; case int n when (n <= 4):
break; ucfach.ForeColor = Config.FarbenConfig.Farben["Beladeband"];
case int n when (n >= 5 && n <= 13): ucfach.FachName = $"F";
ucfach.ForeColor = Config.FarbenConfig.Farben["Waschstrasse"]; break;
ucfach.FachName = $"W"; case int n when (n >= 5 && n <= 13):
break; ucfach.ForeColor = Config.FarbenConfig.Farben["Waschstrasse"];
case int n when (n == 14): ucfach.FachName = $"W";
ucfach.ForeColor = Config.FarbenConfig.Farben["Presse"]; break;
ucfach.FachName = $"P"; case int n when (n == 14):
break; ucfach.ForeColor = Config.FarbenConfig.Farben["Presse"];
case int n when (n == 15): ucfach.FachName = $"P";
ucfach.ForeColor = Config.FarbenConfig.Farben["Hubband"]; break;
ucfach.FachName = $"H"; case int n when (n == 15):
break; ucfach.ForeColor = Config.FarbenConfig.Farben["Hubband"];
case int n when (n == 16): ucfach.FachName = $"H";
ucfach.ForeColor = Config.FarbenConfig.Farben["Trockner"]; break;
ucfach.FachName = $"T"; case int n when (n == 16):
break; ucfach.ForeColor = Config.FarbenConfig.Farben["Trockner"];
case int n when (n == 17): ucfach.FachName = $"T";
if (maschine.TrocknerKaputt) { ucfach.ForeColor = Config.FarbenConfig.Farben["Entladeband"]; ucfach.FachName = $"E"; } break;
else { ucfach.ForeColor = Config.FarbenConfig.Farben["Trockner"]; ucfach.FachName = $"T"; } case int n when (n == 17):
break; if (maschine.TrocknerKaputt) { ucfach.ForeColor = Config.FarbenConfig.Farben["Entladeband"]; ucfach.FachName = $"E"; }
case int n when (n == 18): else { ucfach.ForeColor = Config.FarbenConfig.Farben["Trockner"]; ucfach.FachName = $"T"; }
ucfach.ForeColor = Config.FarbenConfig.Farben["Entladeband"]; break;
ucfach.FachName = $"E"; case int n when (n == 18):
break; ucfach.ForeColor = Config.FarbenConfig.Farben["Entladeband"];
default: ucfach.FachName = $"E";
break; 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();
// Wenn Fachliste Item hat Aufgabe.
if (aufgabe != null)
{
// Wenn Aufgabe ist ein Extra Kunde.
if (aufgabe.Bezeichnung == "Extra Kunde") ucfach.Aufgabe = "Extra Kunde " + Kunde.GetKunde(null, Auftrag.GetAuftrag(fachliste[row].ExtraAuftragID).KundeID, null).Suchtext;
else ucfach.Aufgabe = aufgabe.Bezeichnung;
// Hintergrund des Fachs in der Farbe der Aufgabe. ACHTUNG WEGEN KONTRAST ZU SCHRIFTFARBE.
ucfach.BackColor = aufgabe.Farbe;
}
else ucfach.Aufgabe = null;
this.tableLayoutPanelWSVerfolgung.Controls.Add(ucfach, 0, row);
} }
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);
} }
} }
@ -188,24 +218,6 @@ namespace Deckungsbeitrag.AA_Forms
} }
} }
private void 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 = new WSFach();
this.fach.AuftragID = (int)this.auftrag.AuftragID; this.fach.AuftragID = (int)this.auftrag.AuftragID;
@ -213,7 +225,8 @@ namespace Deckungsbeitrag.AA_Forms
this.fach.Gewaschen = DateTime.Now; this.fach.Gewaschen = DateTime.Now;
this.fach.Gewicht = 0; this.fach.Gewicht = 0;
this.fach.WProgrammID = 1; this.fach.WProgrammID = 1;
this.fach.AufgabeID = this.aufgabe.AufgabeID; if (this.aufgabe != null) this.fach.AufgabeID = this.aufgabe.AufgabeID;
if (this.extraAuftrag != null) this.fach.ExtraAuftragID = this.extraAuftrag.AuftragID;
if (this.fach.Save() == 1) Panel_Laden(2); if (this.fach.Save() == 1) Panel_Laden(2);
} }
@ -237,6 +250,9 @@ namespace Deckungsbeitrag.AA_Forms
if (this.auftrag != null) if (this.auftrag != null)
{ {
Fach_speichern(); Fach_speichern();
this.fach.FachID = null;
this.aufgabe = null;
this.extraAuftrag = null;
} }
else else
{ {
@ -249,7 +265,12 @@ namespace Deckungsbeitrag.AA_Forms
//this.ResumeLayout(false); //this.ResumeLayout(false);
} //Wenn sich SPSDaten Transport ändert wird Event ausgelöst. (Bis jetzt mit Button ausgelöst) } //Wenn sich SPSDaten Transport ändert wird Event ausgelöst. (Bis jetzt mit Button ausgelöst)
/// <summary>
/// KEIN VERWEIS NOTWENDIG
/// Wenn ESC gedrückt wird schließt sich das Fenster.
/// </summary>
/// <param name="keyData"></param>
/// <returns></returns>
protected override bool ProcessDialogKey(Keys keyData) protected override bool ProcessDialogKey(Keys keyData)
{ {
//TODO: Umbau in Switch. //TODO: Umbau in Switch.
@ -265,26 +286,18 @@ namespace Deckungsbeitrag.AA_Forms
} }
if (Form.ModifierKeys == Keys.None && keyData == Keys.R) 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);
return base.ProcessDialogKey(keyData);
} }
/// <summary>
/// ShortCuts für
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void FormWSVerfolgung_KeyDown(object sender, KeyEventArgs e) private void FormWSVerfolgung_KeyDown(object sender, KeyEventArgs e)
{ {
if (e.Control && e.KeyCode == Keys.I) // Ctrl+I if (e.Control && e.KeyCode == Keys.I) // Ctrl+I
@ -292,7 +305,7 @@ namespace Deckungsbeitrag.AA_Forms
e.Handled = true; e.Handled = true;
e.SuppressKeyPress = true; e.SuppressKeyPress = true;
toolStripDropDownButtonInfo.DropDown.Show();
} }
} }
} }

View File

@ -120,20 +120,4 @@
<metadata name="statusStripWSVerfolgung.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="statusStripWSVerfolgung.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </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> </root>

View File

@ -217,7 +217,7 @@ namespace DatenDB
/// Die Aufgabe (STV, STH, INV) wird angezeigt wenn vorhanden. /// Die Aufgabe (STV, STH, INV) wird angezeigt wenn vorhanden.
/// </summary> /// </summary>
private string _auftragaufgabe; private string _auftragaufgabe;
[OLVIgnore]//[OLVColumn("Aufgabe", DisplayIndex = 6, TextAlign = System.Windows.Forms.HorizontalAlignment.Center)] [OLVColumn("Aufgabe", DisplayIndex = 10, TextAlign = System.Windows.Forms.HorizontalAlignment.Center)]
public string AuftragAufgabe public string AuftragAufgabe
{ {
get get
@ -306,7 +306,7 @@ namespace DatenDB
} }
private string _fertig; private string _fertig;
[OLVColumn("Abschließen", DisplayIndex = 10)] [OLVColumn("Abschließen", DisplayIndex = 11)]
public string Fertig public string Fertig
{ {
get get

View File

@ -143,12 +143,15 @@ namespace DatenDB
using (NpgsqlCommand command = new NpgsqlCommand()) using (NpgsqlCommand command = new NpgsqlCommand())
{ {
command.Connection = DatenbankConnection.GetConnection(); command.Connection = DatenbankConnection.GetConnection();
if (int.TryParse(nr, out int _)) if(nr != null)
{ {
command.CommandText = $"select {COLUMNS} from {TABLE} where kunde_nr = '{nr}'"; if (int.TryParse(nr, out int _))
} {
else command.CommandText = $"select {COLUMNS} from {TABLE} where suchtext = '{nr}'"; command.CommandText = $"select {COLUMNS} from {TABLE} where kunde_nr = '{nr}'";
if (id != null) command.CommandText = $"select {COLUMNS} from {TABLE} where kunde_id = {id}"; }
else command.CommandText = $"select {COLUMNS} from {TABLE} where suchtext = '{nr}'";
}
if (id != null) command.CommandText = $"select {COLUMNS} from {TABLE} where kunde_id = {id}";
if (!string.IsNullOrEmpty(name)) if (!string.IsNullOrEmpty(name))
{ {
command.CommandText = $"select {COLUMNS} from {TABLE} where LOWER(name1) = '{name}'"; command.CommandText = $"select {COLUMNS} from {TABLE} where LOWER(name1) = '{name}'";

View File

@ -6,7 +6,7 @@
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<appSettings> <appSettings>
<add key="ConnectionString" value="user id=postgres;password=Ki985941Wi;host=10.10.10.1;port=5432;database=Test_Wirl;Timeout=5" /> <add key="ConnectionString" value="user id=mswstrasse01;password=NGp5Y8Nfs2;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="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="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" /> <add key="QrPfad" value="N:\\BÜRO\\SOCOM\\Zaehlscheine\\qrweb.png" />

View File

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

View File

@ -118,9 +118,6 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<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="Checkmark_blue_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\Checkmark_blue_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -136,4 +133,13 @@
<data name="Monaco_Settings_16x" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\Monaco_Settings_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </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>
</root> </root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

View File

@ -1,4 +1,5 @@
using System; using System;
using System.Drawing;
using System.IO; using System.IO;
using System.Text.Json; using System.Text.Json;
@ -7,7 +8,16 @@ public class UserSettingsManager
public string DruckerSWS { get; set; } = ""; public string DruckerSWS { get; set; } = "";
public string DruckerEtikett { get; set; } = ""; public string DruckerEtikett { get; set; } = "";
public decimal CopiesSWS { get; set; } = 0; public decimal CopiesSWS { get; set; } = 0;
public Color Hintergrund { get; set; } = Color.Black;
public Color Beladeband { get; set; } = Color.Yellow;
public Color Waschstrasse { get; set; } = Color.White;
public Color Presse { get; set; } = Color.Red;
public Color Hubband { get; set; } = Color.LightBlue;
public Color Trockner { get; set; } = Color.Green;
public Color Entladeband { get; set; } = Color.Violet;
public Point LocationGroupBox { get; set; } = new Point(0, 0);
public Point LocationButtonNeuerUser { get; set; } = new Point(0, 0);
public Point LocationButtonNeuerAuftrag { get; set; } = new Point(0, 0);
//TODO: UserSetting Properties eintragen und in EinstellungsScreen abrufen. //TODO: UserSetting Properties eintragen und in EinstellungsScreen abrufen.
private readonly string _configPath; private readonly string _configPath;
@ -32,6 +42,16 @@ public class UserSettingsManager
DruckerSWS = loadedSettings.DruckerSWS; DruckerSWS = loadedSettings.DruckerSWS;
DruckerEtikett = loadedSettings.DruckerEtikett; DruckerEtikett = loadedSettings.DruckerEtikett;
CopiesSWS = loadedSettings.CopiesSWS; CopiesSWS = loadedSettings.CopiesSWS;
Hintergrund = loadedSettings.Hintergrund;
Beladeband = loadedSettings.Beladeband;
Waschstrasse = loadedSettings.Waschstrasse;
Presse = loadedSettings.Presse;
Hubband = loadedSettings.Hubband;
Trockner = loadedSettings.Trockner;
Entladeband = loadedSettings.Entladeband;
LocationGroupBox = loadedSettings.LocationGroupBox;
LocationButtonNeuerUser = loadedSettings.LocationButtonNeuerUser;
LocationButtonNeuerAuftrag = loadedSettings.LocationButtonNeuerAuftrag;
// Weitere Properties hier zuweisen // Weitere Properties hier zuweisen
//TODO: Weitere Properties von oben hier zuweisen //TODO: Weitere Properties von oben hier zuweisen
} }

View File

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