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;
|
||||
Fach_speichern();
|
||||
Fach_speichern(); // Gleiches Fach mit neuem Auftrag = Update.
|
||||
}
|
||||
|
||||
private void Panel_Laden(int start)
|
||||
@ -127,6 +127,7 @@ namespace Deckungsbeitrag.AA_Forms
|
||||
{
|
||||
this.auftrag = Auftrag.GetAuftrag(fachliste[0].AuftragID);
|
||||
this.aufgabe = Aufgabe.GetAufgabe(null, fachliste[0].AufgabeID);
|
||||
this.fach = new WSFach();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -214,19 +215,21 @@ namespace Deckungsbeitrag.AA_Forms
|
||||
if (neuerAuftrag.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
this.auftrag = neuerAuftrag.Auftrag;
|
||||
Fach_speichern();
|
||||
Fach_speichern(); // Gleiches Fach mit neuem Auftrag = Update.
|
||||
}
|
||||
}
|
||||
private void Fach_speichern()
|
||||
{
|
||||
this.fach = new WSFach();
|
||||
//this.fach = new WSFach();
|
||||
this.fach.AuftragID = (int)this.auftrag.AuftragID;
|
||||
this.fach.MaschineID = (int)this.maschine.MaschineID;
|
||||
this.fach.Gewaschen = DateTime.Now;
|
||||
this.fach.Gewicht = 0;
|
||||
this.fach.WProgrammID = 1;
|
||||
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);
|
||||
}
|
||||
@ -249,10 +252,10 @@ namespace Deckungsbeitrag.AA_Forms
|
||||
Maschine ms = (Maschine)this.maschine;
|
||||
if (this.auftrag != null)
|
||||
{
|
||||
Fach_speichern();
|
||||
this.fach.FachID = null;
|
||||
this.aufgabe = null;
|
||||
this.extraAuftrag = null;
|
||||
if (this.fach != null) this.fach.FachID = null;
|
||||
Fach_speichern(); // Neues Fach mit gleichem Inhalt =
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -287,7 +290,6 @@ namespace Deckungsbeitrag.AA_Forms
|
||||
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);
|
||||
@ -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);
|
||||
else _monitor.WS_2_Transport = true;
|
||||
}
|
||||
//this.ResumeLayout();
|
||||
Cursor.Current = Cursors.Default;
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user