Merge branch 'Development'
This commit is contained in:
commit
f0c8a7c3c5
@ -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)];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
40
AA-Forms/FormExpedit.Designer.cs
generated
40
AA-Forms/FormExpedit.Designer.cs
generated
@ -29,8 +29,8 @@
|
|||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormExpedit));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormExpedit));
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
this.label10 = new System.Windows.Forms.Label();
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
this.buttonDrucken = new System.Windows.Forms.Button();
|
this.buttonDrucken = new System.Windows.Forms.Button();
|
||||||
this.buttonAbbrechen = new System.Windows.Forms.Button();
|
this.buttonAbbrechen = new System.Windows.Forms.Button();
|
||||||
@ -491,14 +491,14 @@
|
|||||||
//
|
//
|
||||||
this.dGArtikel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.dGArtikel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
dataGridViewCellStyle3.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)));
|
dataGridViewCellStyle3.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;
|
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.dGArtikel.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
this.dGArtikel.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||||
this.dGArtikel.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.dGArtikel.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.dGArtikel.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
this.dGArtikel.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
this.KundeArtikelID,
|
this.KundeArtikelID,
|
||||||
@ -511,14 +511,14 @@
|
|||||||
this.StandBearbeitet,
|
this.StandBearbeitet,
|
||||||
this.FehlmengeBearbeitet,
|
this.FehlmengeBearbeitet,
|
||||||
this.KorrekturBearbeitet});
|
this.KorrekturBearbeitet});
|
||||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
|
dataGridViewCellStyle4.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)));
|
dataGridViewCellStyle4.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;
|
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||||
this.dGArtikel.DefaultCellStyle = dataGridViewCellStyle2;
|
this.dGArtikel.DefaultCellStyle = dataGridViewCellStyle4;
|
||||||
this.dGArtikel.Location = new System.Drawing.Point(638, 42);
|
this.dGArtikel.Location = new System.Drawing.Point(638, 42);
|
||||||
this.dGArtikel.Name = "dGArtikel";
|
this.dGArtikel.Name = "dGArtikel";
|
||||||
this.dGArtikel.RowHeadersWidth = 62;
|
this.dGArtikel.RowHeadersWidth = 62;
|
||||||
@ -683,12 +683,12 @@
|
|||||||
//
|
//
|
||||||
// buttonEinstellung
|
// buttonEinstellung
|
||||||
//
|
//
|
||||||
this.buttonEinstellung.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.buttonEinstellung.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.buttonEinstellung.FlatAppearance.BorderColor = System.Drawing.Color.White;
|
this.buttonEinstellung.FlatAppearance.BorderColor = System.Drawing.Color.White;
|
||||||
this.buttonEinstellung.FlatAppearance.BorderSize = 3;
|
this.buttonEinstellung.FlatAppearance.BorderSize = 3;
|
||||||
this.buttonEinstellung.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonEinstellung.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonEinstellung.Image = global::Deckungsbeitrag.Properties.Resources.Monaco_Settings_16x;
|
this.buttonEinstellung.Image = global::Deckungsbeitrag.Properties.Resources.Monaco_Settings_16x;
|
||||||
this.buttonEinstellung.Location = new System.Drawing.Point(1431, 9);
|
this.buttonEinstellung.Location = new System.Drawing.Point(1022, 727);
|
||||||
this.buttonEinstellung.Name = "buttonEinstellung";
|
this.buttonEinstellung.Name = "buttonEinstellung";
|
||||||
this.buttonEinstellung.Size = new System.Drawing.Size(41, 41);
|
this.buttonEinstellung.Size = new System.Drawing.Size(41, 41);
|
||||||
this.buttonEinstellung.TabIndex = 45;
|
this.buttonEinstellung.TabIndex = 45;
|
||||||
|
|||||||
@ -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;
|
||||||
@ -11,6 +12,7 @@ namespace Deckungsbeitrag
|
|||||||
{
|
{
|
||||||
public partial class FormExpedit : Form
|
public partial class FormExpedit : Form
|
||||||
{
|
{
|
||||||
|
private ToolTip cellTooltip = new ToolTip();
|
||||||
public Fehlermeldungen fehlermeldung = new Fehlermeldungen();
|
public Fehlermeldungen fehlermeldung = new Fehlermeldungen();
|
||||||
public Image etikett = null;
|
public Image etikett = null;
|
||||||
public Auftrag auftrag;
|
public Auftrag auftrag;
|
||||||
@ -31,6 +33,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)
|
||||||
{
|
{
|
||||||
@ -63,6 +67,10 @@ namespace Deckungsbeitrag
|
|||||||
{
|
{
|
||||||
Cursor.Current = Cursors.WaitCursor;
|
Cursor.Current = Cursors.WaitCursor;
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
|
this.Visible = false;
|
||||||
|
|
||||||
|
imagelist.Images.Add(Resources.Exclamation_Red);
|
||||||
|
imagelist.ImageSize = new Size(24, 24);
|
||||||
|
|
||||||
// Controls aktivieren und deaktivieren nach BenutzerRolle
|
// Controls aktivieren und deaktivieren nach BenutzerRolle
|
||||||
switch (this.benutzer.Rolle)
|
switch (this.benutzer.Rolle)
|
||||||
@ -120,6 +128,7 @@ namespace Deckungsbeitrag
|
|||||||
|
|
||||||
|
|
||||||
this.ResumeLayout();
|
this.ResumeLayout();
|
||||||
|
this.Visible = true;
|
||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
WindowState = FormWindowState.Maximized;
|
WindowState = FormWindowState.Maximized;
|
||||||
}
|
}
|
||||||
@ -160,7 +169,7 @@ namespace Deckungsbeitrag
|
|||||||
if(auftrag != null)
|
if(auftrag != null)
|
||||||
{
|
{
|
||||||
Auftrag _auftrag = Auftrag.GetAuftrag(auftrag.AuftragID);
|
Auftrag _auftrag = Auftrag.GetAuftrag(auftrag.AuftragID);
|
||||||
Load_Gridview(_auftrag);
|
if(dGArtikel.Visible) Load_Gridview(_auftrag);
|
||||||
}
|
}
|
||||||
|
|
||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
@ -252,9 +261,16 @@ namespace Deckungsbeitrag
|
|||||||
// Alle Zeilenhöhen an Zellinhalt anpassen
|
// Alle Zeilenhöhen an Zellinhalt anpassen
|
||||||
this.dGArtikel.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
|
this.dGArtikel.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
|
||||||
|
|
||||||
|
//TODO: Breite der GridView festlegen.
|
||||||
this.dGArtikel = Funktionen.DGV_Size_Anpassen(this.dGArtikel);
|
this.dGArtikel = Funktionen.DGV_Size_Anpassen(this.dGArtikel);
|
||||||
|
this.dGArtikel.Width = this.Width - dGArtikel.Left;
|
||||||
|
|
||||||
this.dGArtikel.Location = new Point(this.tabControlAuftragList.Right - dGArtikel.Width, this.dGArtikel.Location.Y);
|
// Rechter Rand von letzter Spalte berechnen.
|
||||||
|
int x = 0;
|
||||||
|
foreach (ColumnHeader col in objectListViewAuftrag.Columns) x += col.Width;// x ist jetzt die Position direkt rechts von der letzten Spalte (relativ zu client origin)
|
||||||
|
|
||||||
|
|
||||||
|
this.dGArtikel.Location = new Point(this.objectListViewAuftrag.Left + x, this.dGArtikel.Location.Y);
|
||||||
if (this.dGArtikel.Rows.Count > 0) this.dGArtikel.Visible = true;
|
if (this.dGArtikel.Rows.Count > 0) this.dGArtikel.Visible = true;
|
||||||
else this.dGArtikel.Visible = false;
|
else this.dGArtikel.Visible = false;
|
||||||
}
|
}
|
||||||
@ -374,9 +390,10 @@ namespace Deckungsbeitrag
|
|||||||
private void objectListViewAuftrag_CellClick(object sender, CellClickEventArgs e)
|
private void objectListViewAuftrag_CellClick(object sender, CellClickEventArgs e)
|
||||||
{
|
{
|
||||||
itemlocation = new Point(e.Location.X, e.Location.Y);
|
itemlocation = new Point(e.Location.X, e.Location.Y);
|
||||||
if(e.Model == null) return;
|
|
||||||
ObjectListView olv = (ObjectListView)sender;
|
ObjectListView olv = (ObjectListView)sender;
|
||||||
Auftrag _auftrag = (Auftrag)e.Model;
|
Auftrag _auftrag = (Auftrag)e.Model;
|
||||||
|
|
||||||
|
if (e.Model == null) { dGArtikel.Visible = false; return; }
|
||||||
if (_auftrag.Status != AuftragStatus.Fertig)
|
if (_auftrag.Status != AuftragStatus.Fertig)
|
||||||
{
|
{
|
||||||
this.auftrag = _auftrag;
|
this.auftrag = _auftrag;
|
||||||
@ -391,6 +408,7 @@ namespace Deckungsbeitrag
|
|||||||
}
|
}
|
||||||
foreach (Control ctr in this.groupBoxEtikett.Controls) if (ctr.Enabled == false) ctr.Enabled = true;
|
foreach (Control ctr in this.groupBoxEtikett.Controls) if (ctr.Enabled == false) ctr.Enabled = true;
|
||||||
this.buttonKundeNr.Enabled = false;
|
this.buttonKundeNr.Enabled = false;
|
||||||
|
|
||||||
olv.Focus();
|
olv.Focus();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -516,48 +534,99 @@ namespace Deckungsbeitrag
|
|||||||
|
|
||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
}
|
}
|
||||||
private void OLV_Load(ObjectListView olv, List<Auftrag> auftraglist)
|
private void OLV_Load(ObjectListView olv, List<Auftrag> auftraglist)
|
||||||
|
{
|
||||||
|
// Cursor auf Warte-Status setzen, um Benutzerfeedback zu geben
|
||||||
|
Cursor.Current = Cursors.WaitCursor;
|
||||||
|
|
||||||
|
// Layout- und Update-Änderungen pausieren, um Flackern zu verhindern
|
||||||
|
olv.SuspendLayout(); // Stoppt Layout-Berechnungen (Anchor/Dock)
|
||||||
|
olv.BeginUpdate(); // Stoppt Datenaktualisierungen/Redraws
|
||||||
|
|
||||||
|
// Automatisch alle Properties von Auftrag als Spalten generieren
|
||||||
|
Generator.GenerateColumns(olv, typeof(Auftrag), true);
|
||||||
|
|
||||||
|
// ========== SPALTE 11: BUTTON-KOLUMNE ==========
|
||||||
|
// Spalte 11 (Index 11) als Button-Spalte konfigurieren
|
||||||
|
OLVColumn buttonColumn = (OLVColumn)olv.Columns[11];
|
||||||
|
buttonColumn.IsButton = true; // Als Button rendern
|
||||||
|
buttonColumn.ButtonSizing = OLVColumn.ButtonSizingMode.CellBounds; // Button füllt gesamte Zelle
|
||||||
|
|
||||||
|
// ========== IMAGE-LIST ZUWEISEN ==========
|
||||||
|
// SmallImageList für Icons in Detail-View (16x16 Pixel standard)
|
||||||
|
olv.SmallImageList = imagelist; // Voraussetzung: imagelist mit Icon Index 0 gefüllt
|
||||||
|
|
||||||
|
// ========== SPALTE 10: ICON-KOLUMNE ==========
|
||||||
|
// Spalte 10 als Icon-Spalte: zeigt Icon wenn AufgabeID vorhanden
|
||||||
|
OLVColumn iconColumn = (OLVColumn)olv.Columns[10];
|
||||||
|
iconColumn.ImageGetter = rowObject =>
|
||||||
{
|
{
|
||||||
Cursor.Current = Cursors.WaitCursor;
|
var auftrag = rowObject as Auftrag;
|
||||||
olv.SuspendLayout();
|
if (auftrag.AufgabeID == null) return null; // null = kein Icon anzeigen
|
||||||
olv.BeginUpdate();
|
else return 0; // Index 0 aus SmallImageList
|
||||||
|
};
|
||||||
|
|
||||||
Generator.GenerateColumns(olv, typeof(Auftrag), true);
|
// ========== TOOLTIP FÜR ICON-SPALTE ==========
|
||||||
olv.SetObjects(auftraglist);
|
// Automatischer Cell-Tooltip bei Mouse-Hover über Spalte 10
|
||||||
OLVColumn sortcolumn = (OLVColumn)olv.Columns[5];
|
olv.CellToolTipShowing += (s, e) =>
|
||||||
olv.Sort(sortcolumn);
|
{
|
||||||
OLVColumn buttonColumn = new OLVColumn();
|
// Nur für Icon-Spalte (Index 10) und gültiges Model
|
||||||
buttonColumn = (OLVColumn)olv.Columns[10];
|
if (e.ColumnIndex == 10 && e.Model is Auftrag auftrag)
|
||||||
buttonColumn.IsButton = true;
|
|
||||||
buttonColumn.ButtonSizing = OLVColumn.ButtonSizingMode.CellBounds;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
olv.CheckedAspectName = "IsChecked";
|
|
||||||
Funktionen.Columns_Resize(olv);
|
|
||||||
olv.Columns[0].Width = 0;
|
|
||||||
olv.Columns[7].Width = 0;
|
|
||||||
olv.Columns[8].Width = 0;
|
|
||||||
olv.Columns[9].Width = 0;
|
|
||||||
|
|
||||||
if (olv.Name.Contains("Auftrag"))
|
|
||||||
{
|
|
||||||
this.labelauftragtag.Text = olv.Items.Count.ToString();
|
|
||||||
int summe = 0;
|
|
||||||
foreach(var obj in olv.Objects)
|
|
||||||
{
|
{
|
||||||
Auftrag auf = (Auftrag)obj;
|
// Lade Bezeichnung der Aufgabe als Tooltip-Text
|
||||||
if(auf.Erstellt.Value.Date == DateTime.Now.Date) summe += auf.ContainerClean;
|
e.Text = Aufgabe.GetAufgabe(null, auftrag.AufgabeID).Bezeichnung;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// ========== DATEN LADEN ==========
|
||||||
|
// WICHTIG: SetObjects NACH Column-Konfiguration aufrufen!
|
||||||
|
olv.SetObjects(auftraglist); // Bindet die Auftragsliste an die View
|
||||||
|
|
||||||
|
// ========== SORTIERUNG ==========
|
||||||
|
// Spalte 5 als primäre Sortier-Spalte festlegen (nach Datenbindung!)
|
||||||
|
OLVColumn sortcolumn = (OLVColumn)olv.Columns[5];
|
||||||
|
olv.Sort(sortcolumn); // Sortiert aufsteigend nach Spalte 5
|
||||||
|
|
||||||
|
// ========== CHECKBOX-FUNKTIONALITÄT ==========
|
||||||
|
// Aktiviert Checkboxen basierend auf "IsChecked" Property des Auftrag-Modells
|
||||||
|
olv.CheckedAspectName = "IsChecked";
|
||||||
|
|
||||||
|
// ========== SPALTEN ANPASSEN ==========
|
||||||
|
Funktionen.Columns_Resize(olv); // Externe Funktion für responsive Spaltenbreiten
|
||||||
|
|
||||||
|
// Unsichtbare Spalten (Width = 0 = versteckt)
|
||||||
|
olv.Columns[0].Width = 0; // Spalte 0 verstecken
|
||||||
|
olv.Columns[7].Width = 0; // Spalte 7 verstecken
|
||||||
|
olv.Columns[8].Width = 0; // Spalte 8 verstecken
|
||||||
|
olv.Columns[9].Width = 0; // Spalte 9 verstecken
|
||||||
|
|
||||||
|
// ========== STATISTIKEN (nur bei Auftrags-OLV) ==========
|
||||||
|
if (olv.Name.Contains("Auftrag"))
|
||||||
|
{
|
||||||
|
// Anzahl sichtbarer Aufträge anzeigen
|
||||||
|
this.labelauftragtag.Text = olv.Items.Count.ToString();
|
||||||
|
|
||||||
|
// ContainerClean-Summe für heute berechnen
|
||||||
|
int summe = 0;
|
||||||
|
foreach (var obj in olv.Objects) // Durch alle Modelle iterieren
|
||||||
|
{
|
||||||
|
Auftrag auf = (Auftrag)obj;
|
||||||
|
// Nur Aufträge von heute zählen
|
||||||
|
if (auf.Erstellt.Value.Date == DateTime.Now.Date)
|
||||||
|
summe += auf.ContainerClean;
|
||||||
}
|
}
|
||||||
this.labelcontainertag.Text = summe.ToString();
|
this.labelcontainertag.Text = summe.ToString();
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
olv.EndUpdate();
|
|
||||||
olv.ResumeLayout();
|
|
||||||
Cursor.Current = Cursors.Default;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ========== AUFRÄUMEN & AKTIVIEREN ==========
|
||||||
|
olv.EndUpdate(); // Update-Pause beenden, Daten neu zeichnen
|
||||||
|
olv.ResumeLayout(); // Layout-Pause beenden, Positionen neu berechnen
|
||||||
|
olv.Focus(); // OLV fokussieren (Tastaturbedienung aktivieren)
|
||||||
|
|
||||||
|
// Cursor zurücksetzen
|
||||||
|
Cursor.Current = Cursors.Default;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Liefertag wird ermittelt und in Day of Week umgerechnet. RadioButtons werden Checked oder Unchecked und Click wird registriert.
|
/// Liefertag wird ermittelt und in Day of Week umgerechnet. RadioButtons werden Checked oder Unchecked und Click wird registriert.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -670,6 +739,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>
|
||||||
@ -683,5 +753,6 @@ namespace Deckungsbeitrag
|
|||||||
einstellung.ShowDialog();
|
einstellung.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,7 +128,7 @@ namespace Deckungsbeitrag
|
|||||||
case var nr when nr.ToString().StartsWith("6312") & nr.ToString().EndsWith("1"): //DUSCHTUCH BLAU
|
case var nr when nr.ToString().StartsWith("6312") & nr.ToString().EndsWith("1"): //DUSCHTUCH BLAU
|
||||||
this.buttonArt7.Tag = artikel;
|
this.buttonArt7.Tag = artikel;
|
||||||
break;
|
break;
|
||||||
case var nr when nr.ToString().StartsWith("6354"): //GESICHTSTUCH
|
case var nr when nr.ToString().StartsWith("61115") & (nr.ToString().EndsWith("00") || nr.ToString().EndsWith("30")): //SPANNLEINTUCH SINGLE
|
||||||
this.buttonArt8.Tag = artikel;
|
this.buttonArt8.Tag = artikel;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -287,9 +287,6 @@ namespace Deckungsbeitrag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Focus auf TextBox damit Kundennummer eingegeben oder gescannt werden kann
|
|
||||||
//this.textBoxScann.Focus();
|
|
||||||
|
|
||||||
//Kunde wird durch Scan oder Handeingabe Ausgewählt.
|
//Kunde wird durch Scan oder Handeingabe Ausgewählt.
|
||||||
this.kunde = Funktionen.KundenAuswahl();
|
this.kunde = Funktionen.KundenAuswahl();
|
||||||
ControlLaden();
|
ControlLaden();
|
||||||
|
|||||||
@ -68,7 +68,6 @@ namespace Deckungsbeitrag
|
|||||||
timer.Interval = 1000; // 1 Sekunden
|
timer.Interval = 1000; // 1 Sekunden
|
||||||
timer.Tick += Timer_Tick;
|
timer.Tick += Timer_Tick;
|
||||||
|
|
||||||
|
|
||||||
this.buttonOK.Visible = this.buttonOK.Enabled = false;
|
this.buttonOK.Visible = this.buttonOK.Enabled = false;
|
||||||
|
|
||||||
listViewKunde_Load();
|
listViewKunde_Load();
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
54
AA-Forms/FormWSVerfolgung.Designer.cs
generated
54
AA-Forms/FormWSVerfolgung.Designer.cs
generated
@ -28,27 +28,38 @@
|
|||||||
/// </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.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.tableLayoutPanelWSVerfolgung = new System.Windows.Forms.TableLayoutPanel();
|
||||||
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";
|
||||||
//
|
//
|
||||||
|
// toolStripDropDownButtonInfo
|
||||||
|
//
|
||||||
|
this.toolStripDropDownButtonInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
|
||||||
|
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.Name = "toolStripDropDownButtonInfo";
|
||||||
|
this.toolStripDropDownButtonInfo.Size = new System.Drawing.Size(160, 34);
|
||||||
|
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";
|
||||||
|
//
|
||||||
// tableLayoutPanelWSVerfolgung
|
// tableLayoutPanelWSVerfolgung
|
||||||
//
|
//
|
||||||
this.tableLayoutPanelWSVerfolgung.BackColor = System.Drawing.Color.Transparent;
|
this.tableLayoutPanelWSVerfolgung.BackColor = System.Drawing.Color.Transparent;
|
||||||
@ -63,29 +74,6 @@
|
|||||||
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
|
|
||||||
//
|
|
||||||
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
|
// FormWSVerfolgung
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@ -98,7 +86,9 @@
|
|||||||
this.KeyPreview = true;
|
this.KeyPreview = true;
|
||||||
this.Name = "FormWSVerfolgung";
|
this.Name = "FormWSVerfolgung";
|
||||||
this.Text = "WSVerfolgung";
|
this.Text = "WSVerfolgung";
|
||||||
|
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
this.Load += new System.EventHandler(this.WSVerfolgung_Load);
|
this.Load += new System.EventHandler(this.WSVerfolgung_Load);
|
||||||
|
this.Shown += new System.EventHandler(this.FormWSVerfolgung_Shown);
|
||||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FormWSVerfolgung_KeyDown);
|
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FormWSVerfolgung_KeyDown);
|
||||||
this.statusStripWSVerfolgung.ResumeLayout(false);
|
this.statusStripWSVerfolgung.ResumeLayout(false);
|
||||||
this.statusStripWSVerfolgung.PerformLayout();
|
this.statusStripWSVerfolgung.PerformLayout();
|
||||||
@ -111,8 +101,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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;
|
||||||
@ -31,6 +32,10 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
public FormWSVerfolgung()
|
public FormWSVerfolgung()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.BackColor = Color.Black;
|
||||||
|
this.WindowState = FormWindowState.Maximized;
|
||||||
|
this.FormBorderStyle = FormBorderStyle.None;
|
||||||
}
|
}
|
||||||
public FormWSVerfolgung(string userid) : this()
|
public FormWSVerfolgung(string userid) : this()
|
||||||
{
|
{
|
||||||
@ -64,11 +69,10 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
|
|
||||||
private void WSVerfolgung_Load(object sender, EventArgs e)
|
private void WSVerfolgung_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// WaitCursor und Controls ausblenden.
|
// WaitCursor
|
||||||
this.Cursor = Cursors.WaitCursor;
|
this.Cursor = Cursors.WaitCursor;
|
||||||
//Funktionen.HideControls(this.Controls);
|
|
||||||
|
|
||||||
// StatusStrip DropDown
|
// StatusStrip DropDown laden.
|
||||||
this.toolStripDropDownButtonInfo.DropDownItems.Clear();
|
this.toolStripDropDownButtonInfo.DropDownItems.Clear();
|
||||||
List<Aufgabe> aufgabenliste = Aufgabe.GetList((int)Kategorie.Waschstrasse);
|
List<Aufgabe> aufgabenliste = Aufgabe.GetList((int)Kategorie.Waschstrasse);
|
||||||
foreach(Aufgabe auf in aufgabenliste)
|
foreach(Aufgabe auf in aufgabenliste)
|
||||||
@ -80,142 +84,207 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.BackColor = Properties.Settings.Default.Wirlblau;
|
}
|
||||||
this.WindowState = FormWindowState.Maximized;
|
|
||||||
this.FormBorderStyle = FormBorderStyle.None;
|
/// <summary>
|
||||||
|
/// Controls werden hier bevor sie angezeigt werden berechnet. Danach werden sie Eingeblendet und der Cursor auf Default gestellt.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void FormWSVerfolgung_Shown(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// Während dem Laden wird das Layout unterdrückt und der Screen ausgeblendet.
|
||||||
|
this.SuspendLayout();
|
||||||
|
this.Visible = false;
|
||||||
|
|
||||||
|
// Größer des TabelPanels anpassen.
|
||||||
this.tableLayoutPanelWSVerfolgung.Height = this.statusStripWSVerfolgung.Top;
|
this.tableLayoutPanelWSVerfolgung.Height = this.statusStripWSVerfolgung.Top;
|
||||||
|
|
||||||
|
// Wenn bei Maschine TrocknerKaputt wird Anzahl Fächer um 1 reduziert.
|
||||||
if (maschine.TrocknerKaputt) this.tableLayoutPanelWSVerfolgung.RowCount = maschine.Faecher - 1;
|
if (maschine.TrocknerKaputt) this.tableLayoutPanelWSVerfolgung.RowCount = maschine.Faecher - 1;
|
||||||
else this.tableLayoutPanelWSVerfolgung.RowCount = maschine.Faecher;
|
else this.tableLayoutPanelWSVerfolgung.RowCount = maschine.Faecher;
|
||||||
|
|
||||||
|
// Bei TabelPanel werden die Styles gelöscht und neu ertellt. Gleichmäßige Aufteilung in Prozent.
|
||||||
this.tableLayoutPanelWSVerfolgung.RowStyles.Clear();
|
this.tableLayoutPanelWSVerfolgung.RowStyles.Clear();
|
||||||
for (int i = 0; i < tableLayoutPanelWSVerfolgung.RowCount; i++)
|
for (int i = 0; i < tableLayoutPanelWSVerfolgung.RowCount; i++)
|
||||||
{
|
{
|
||||||
tableLayoutPanelWSVerfolgung.RowStyles.Add(new RowStyle(SizeType.Percent, 100f / tableLayoutPanelWSVerfolgung.RowCount));
|
tableLayoutPanelWSVerfolgung.RowStyles.Add(new RowStyle(SizeType.Percent, 100f / tableLayoutPanelWSVerfolgung.RowCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
Panel_Laden(1);
|
// TabelPanel laden.
|
||||||
//DefaultCursor und Controls einblenden.
|
Panel_Laden(true);
|
||||||
//Funktionen.ShowControls(this.Controls);
|
|
||||||
|
// Layout unterdrücken und Screen einblenden. Cursor wird auf Default gesetzt.
|
||||||
|
this.Visible = true;
|
||||||
|
this.ResumeLayout(true);
|
||||||
this.Cursor = Cursors.Default;
|
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)
|
/// <summary>
|
||||||
|
/// ScreenControls in Panel von Fachliste laden.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="neustart"> Wenn Neustart dann true sonst false.</param>
|
||||||
|
private void Panel_Laden(bool neustart)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Fachliste holen damit letzter Auftrag vom Vortag übernommen werden kann.
|
||||||
List<WSFach> fachliste = WSFach.GetFachliste(maschine);
|
List<WSFach> fachliste = WSFach.GetFachliste(maschine);
|
||||||
|
|
||||||
// Wenn erster Start dann Auftrag aus letztem Fach holen?
|
// Wenn erster Start dann Auftrag aus letztem Fach holen?
|
||||||
if (start == 1)
|
if (neustart)
|
||||||
{
|
{
|
||||||
if (meldung.MaschinenStart() == DialogResult.Yes) this.auftrag = Auftrag.GetAuftrag(fachliste[0].AuftragID);
|
this.fach = new WSFach();
|
||||||
else this.auftrag = null;
|
|
||||||
|
if (meldung.MaschinenStart() == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
// Wenn holen, dann Auftrag und aufgabe aus fachliste holen.
|
||||||
|
this.auftrag = Auftrag.GetAuftrag(fachliste[0].AuftragID);
|
||||||
|
this.aufgabe = Aufgabe.GetAufgabe(null, fachliste[0].AufgabeID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Wenn nicht holen, dann Auftrag und Aufgabe enfernen.
|
||||||
|
this.auftrag = null;
|
||||||
|
this.aufgabe = null;
|
||||||
|
|
||||||
|
// Neuen Auftrag eingeben. Wenn kein ExtraKunde wird false als extra weitergegeben.
|
||||||
|
Open_NeuerAuftrag(false);
|
||||||
|
|
||||||
|
// Fachliste neu laden damit neuer Auftrag in erstes Fach geladen werden kann.
|
||||||
|
fachliste = WSFach.GetFachliste(maschine);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alle Controls aus dem Panel entfernen.
|
// Alle Controls aus dem Panel entfernen.
|
||||||
this.tableLayoutPanelWSVerfolgung.Controls.Clear();
|
this.tableLayoutPanelWSVerfolgung.Controls.Clear();
|
||||||
|
|
||||||
|
|
||||||
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// Wenn Kunde hat keinen Suchtext, dann Kundename anzeigen.
|
||||||
|
if(string.IsNullOrWhiteSpace(Kunde.GetKunde(null, auftrag.KundeID, null).Suchtext))ucfach.KundeName = Kunde.GetKunde(null, auftrag.KundeID, null).KundeName;
|
||||||
|
else 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Open_NeuerAuftrag()
|
/// <summary>
|
||||||
|
/// Wenn eine Info von der Statusleiste gewählt wurde.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void AufgabeAuswaehlen_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ToolStripMenuItem item = (ToolStripMenuItem)sender;
|
||||||
|
|
||||||
|
// Aufgabe wird aus dem StatusStripItem geholt.
|
||||||
|
this.aufgabe = (Aufgabe)item.Tag;
|
||||||
|
|
||||||
|
// Wenn Aufgabe ist ExtraKunde wird NeuerAuftrag geöffnet.
|
||||||
|
if (((Aufgabe)item.Tag).Bezeichnung == "Extra Kunde")
|
||||||
|
{
|
||||||
|
// Wenn ExtraKunde wird true als extra weitergegeben.
|
||||||
|
Open_NeuerAuftrag(true);
|
||||||
|
}
|
||||||
|
Fach_speichern(); // Gleiches Fach mit neuem Auftrag = Update.
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NeuerAuftrag wird geöffnet und Ergebnis verarbeitet.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="extra">Wenn ExtraKunde in Fach dann true, sonst false</param>
|
||||||
|
private void Open_NeuerAuftrag(bool extra)
|
||||||
{
|
{
|
||||||
FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.Userid);
|
FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.Userid);
|
||||||
if (neuerAuftrag.ShowDialog() == DialogResult.OK)
|
if (neuerAuftrag.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
this.auftrag = neuerAuftrag.Auftrag;
|
if (extra) this.extraAuftrag = neuerAuftrag.Auftrag;
|
||||||
Fach_speichern();
|
else this.auftrag = neuerAuftrag.Auftrag;
|
||||||
|
Fach_speichern(); // Gleiches Fach mit neuem Auftrag = Update.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fach wird gespeichert. Bei Änderungen wird Fach überschrieben. Wenn FachID = 0 oder null wird neues Fach erstellt, sonst überschrieben.
|
||||||
|
/// </summary>
|
||||||
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.AuftragID = (int)this.auftrag.AuftragID;
|
this.fach.AuftragID = (int)this.auftrag.AuftragID;
|
||||||
this.fach.MaschineID = (int)this.maschine.MaschineID;
|
this.fach.MaschineID = (int)this.maschine.MaschineID;
|
||||||
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;
|
||||||
|
else this.fach.AufgabeID = null;
|
||||||
|
if (this.extraAuftrag != null) this.fach.ExtraAuftragID = this.extraAuftrag.AuftragID;
|
||||||
|
else this.fach.ExtraAuftragID = null;
|
||||||
|
|
||||||
if (this.fach.Save() == 1) Panel_Laden(2);
|
if (this.fach.Save() == 1) Panel_Laden(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -225,8 +294,6 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void Transport_ValueChanged(object sender, EventArgs e)
|
private void Transport_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//this.SuspendLayout();
|
|
||||||
|
|
||||||
// Warten bis erster Transport durchgeführt wurde.
|
// Warten bis erster Transport durchgeführt wurde.
|
||||||
while (_monitor.WS_1_Transport == true & _monitor.WS_2_Transport == true)
|
while (_monitor.WS_1_Transport == true & _monitor.WS_2_Transport == true)
|
||||||
{
|
{
|
||||||
@ -234,13 +301,21 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
if (_monitor.WS_1_Transport || _monitor.WS_2_Transport)
|
if (_monitor.WS_1_Transport || _monitor.WS_2_Transport)
|
||||||
{
|
{
|
||||||
Maschine ms = (Maschine)this.maschine;
|
Maschine ms = (Maschine)this.maschine;
|
||||||
|
|
||||||
|
// Fehlermeldung falls kein Auftrag erstellt wurde.
|
||||||
if (this.auftrag != null)
|
if (this.auftrag != null)
|
||||||
{
|
{
|
||||||
|
// Nach Transport wird FachAufgabe und FachExtraAuftrag entfernt da diese nur für ein Fach gelten.
|
||||||
|
this.aufgabe = null;
|
||||||
|
this.extraAuftrag = null;
|
||||||
|
|
||||||
|
// Wenn Fach nicht null ist wird für ein neues Fach die ID entfernt. Dadurch wird bei Save() neues Fach erzeugt.
|
||||||
|
if (this.fach != null) this.fach.FachID = null;
|
||||||
Fach_speichern();
|
Fach_speichern();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show($"Kein Auftrag erstellt. LEERFACH wird eingegeben. Bitte in BB1 bearbeiten.");
|
MessageBox.Show($"Kein Auftrag erstellt. LEERFACH wird eingegeben. Fach bitte im nachhinein bearbeiten.");
|
||||||
} //WENN kein Kunde gewählt dann Fach mit KundeID 0.
|
} //WENN kein Kunde gewählt dann Fach mit KundeID 0.
|
||||||
|
|
||||||
_monitor.WS_2_Transport = _monitor.WS_1_Transport = false;
|
_monitor.WS_2_Transport = _monitor.WS_1_Transport = false;
|
||||||
@ -249,24 +324,36 @@ 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.
|
||||||
|
|
||||||
|
// Escape [ESC] schließt den Screen.
|
||||||
if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape)
|
if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape)
|
||||||
{
|
{
|
||||||
this.Close();
|
this.Close();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Insert [Einfg] öffnet neuen Auftrag.
|
||||||
if (Form.ModifierKeys == Keys.None && keyData == Keys.Insert)
|
if (Form.ModifierKeys == Keys.None && keyData == Keys.Insert)
|
||||||
{
|
{
|
||||||
Open_NeuerAuftrag();
|
// Neuer Auftrag wird geöffnet. Wenn nicht ExtraKunde wird false weitergegeben, sonst true.
|
||||||
|
Open_NeuerAuftrag(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// R-Taste [R] simuliert Transport. Sollte wenn SPS angeschlossen ist nicht mehr notwendig sein und deaktiviert werden.
|
||||||
|
//TODO: Deaktivieren wenn SPS funktioniert. Transport wird simuliert.
|
||||||
if (Form.ModifierKeys == Keys.None && keyData == Keys.R)
|
if (Form.ModifierKeys == Keys.None && keyData == Keys.R)
|
||||||
{
|
{
|
||||||
Cursor.Current = Cursors.WaitCursor;
|
Cursor.Current = Cursors.WaitCursor;
|
||||||
//this.SuspendLayout();
|
|
||||||
if (((Maschine)this.maschine).MaschineID == 1)
|
if (((Maschine)this.maschine).MaschineID == 1)
|
||||||
{
|
{
|
||||||
if (this.auftrag == null) MessageBox.Show($"Kein Kunde ausgewählt. Bitte JETZT erledigen.", "ACHTUNG", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
if (this.auftrag == null) MessageBox.Show($"Kein Kunde ausgewählt. Bitte JETZT erledigen.", "ACHTUNG", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
@ -277,7 +364,6 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
if (this.auftrag == null) MessageBox.Show($"Kein Kunde ausgewählt. Bitte JETZT erledigen.", "ACHTUNG", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
if (this.auftrag == null) MessageBox.Show($"Kein Kunde ausgewählt. Bitte JETZT erledigen.", "ACHTUNG", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
else _monitor.WS_2_Transport = true;
|
else _monitor.WS_2_Transport = true;
|
||||||
}
|
}
|
||||||
//this.ResumeLayout();
|
|
||||||
Cursor.Current = Cursors.Default;
|
Cursor.Current = Cursors.Default;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -285,6 +371,11 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
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,8 +383,9 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
|
||||||
|
toolStripDropDownButtonInfo.DropDown.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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>
|
||||||
@ -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
|
||||||
|
|||||||
@ -278,7 +278,7 @@ namespace DatenDB
|
|||||||
{
|
{
|
||||||
DialogResult result = DialogResult.Cancel;
|
DialogResult result = DialogResult.Cancel;
|
||||||
|
|
||||||
string s = $"Möchtest du den Auftrag des letzten Faches wiederherstellen?";
|
string s = $"Möchtest du den Auftrag des letzten Faches wiederherstellen? Wenn NEIN erstelle einen neuen Auftrag.";
|
||||||
string caption = "ACHTUNG";
|
string caption = "ACHTUNG";
|
||||||
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
|
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
|
||||||
MessageBoxIcon icon = MessageBoxIcon.Exclamation;
|
MessageBoxIcon icon = MessageBoxIcon.Exclamation;
|
||||||
|
|||||||
@ -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}'";
|
||||||
|
|||||||
30
Properties/Resources.Designer.cs
generated
30
Properties/Resources.Designer.cs
generated
@ -90,6 +90,26 @@ namespace Deckungsbeitrag.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Exclamation_Red {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Exclamation_Red", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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 +139,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));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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,16 @@
|
|||||||
<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>
|
||||||
|
<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>
|
||||||
</root>
|
</root>
|
||||||
@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user