Ablaufkorrektur MaschineTransport - FachValue korrigiert.
This commit is contained in:
parent
b2b5d31886
commit
07c755c121
@ -112,7 +112,7 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.aufgabe = (Aufgabe)item.Tag;
|
this.aufgabe = (Aufgabe)item.Tag;
|
||||||
Fach_speichern();
|
Fach_speichern(); // Gleiches Fach mit neuem Auftrag = Update.
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Panel_Laden(int start)
|
private void Panel_Laden(int start)
|
||||||
@ -127,6 +127,7 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
{
|
{
|
||||||
this.auftrag = Auftrag.GetAuftrag(fachliste[0].AuftragID);
|
this.auftrag = Auftrag.GetAuftrag(fachliste[0].AuftragID);
|
||||||
this.aufgabe = Aufgabe.GetAufgabe(null, fachliste[0].AufgabeID);
|
this.aufgabe = Aufgabe.GetAufgabe(null, fachliste[0].AufgabeID);
|
||||||
|
this.fach = new WSFach();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -214,19 +215,21 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
if (neuerAuftrag.ShowDialog() == DialogResult.OK)
|
if (neuerAuftrag.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
this.auftrag = neuerAuftrag.Auftrag;
|
this.auftrag = neuerAuftrag.Auftrag;
|
||||||
Fach_speichern();
|
Fach_speichern(); // Gleiches Fach mit neuem Auftrag = Update.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void Fach_speichern()
|
private void Fach_speichern()
|
||||||
{
|
{
|
||||||
this.fach = new WSFach();
|
//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;
|
||||||
if (this.aufgabe != null) 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;
|
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(2);
|
||||||
}
|
}
|
||||||
@ -249,10 +252,10 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
Maschine ms = (Maschine)this.maschine;
|
Maschine ms = (Maschine)this.maschine;
|
||||||
if (this.auftrag != null)
|
if (this.auftrag != null)
|
||||||
{
|
{
|
||||||
Fach_speichern();
|
|
||||||
this.fach.FachID = null;
|
|
||||||
this.aufgabe = null;
|
this.aufgabe = null;
|
||||||
this.extraAuftrag = null;
|
this.extraAuftrag = null;
|
||||||
|
if (this.fach != null) this.fach.FachID = null;
|
||||||
|
Fach_speichern(); // Neues Fach mit gleichem Inhalt =
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -287,7 +290,6 @@ namespace Deckungsbeitrag.AA_Forms
|
|||||||
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);
|
||||||
@ -298,7 +300,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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user