Umbau Fahrer und Tour

This commit is contained in:
Kilian Wirl 2026-04-22 13:37:22 +02:00
parent 62f39cad51
commit 85cf30420a
21 changed files with 634 additions and 566 deletions

View File

@ -175,7 +175,7 @@ namespace Deckungsbeitrag
this.comboBoxFahrer.DataSource = benutzerliste; this.comboBoxFahrer.DataSource = benutzerliste;
this.comboBoxFahrer.ValueMember = "BenutzerName"; this.comboBoxFahrer.ValueMember = "BenutzerName";
this.comboBoxPriority.DataSource = Enum.GetValues(typeof(AuftragPriority)); this.comboBoxPriority.DataSource = Enum.GetValues(typeof(Priority));
} }
private void comboBox_SelectedValueChanged(object sender, EventArgs e) private void comboBox_SelectedValueChanged(object sender, EventArgs e)
{ {
@ -266,7 +266,7 @@ namespace Deckungsbeitrag
auftrag.ContainerClean = int.Parse(this.labelContainer.Text); auftrag.ContainerClean = int.Parse(this.labelContainer.Text);
auftrag.Container = int.Parse(this.labelContDirt.Text); auftrag.Container = int.Parse(this.labelContDirt.Text);
auftrag.ArbeiterID = this.comboBoxFahrer.SelectedIndex == -1 ? null : ((Benutzer)this.comboBoxFahrer.SelectedItem).BenutzerID; auftrag.ArbeiterID = this.comboBoxFahrer.SelectedIndex == -1 ? null : ((Benutzer)this.comboBoxFahrer.SelectedItem).BenutzerID;
auftrag.Priority = this.comboBoxPriority.SelectedIndex == -1 ? AuftragPriority.None : ((AuftragPriority)this.comboBoxPriority.SelectedItem); auftrag.Priority = this.comboBoxPriority.SelectedIndex == -1 ? Priority.None : ((Priority)this.comboBoxPriority.SelectedItem);
auftrag.ZusatzInfo = this.textBoxZusatz.Text; auftrag.ZusatzInfo = this.textBoxZusatz.Text;
auftrag.Save(); auftrag.Save();

View File

@ -39,9 +39,6 @@
this.buttonSWS_Drucken = new System.Windows.Forms.Button(); this.buttonSWS_Drucken = new System.Windows.Forms.Button();
this.chartFehlmenge = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.chartFehlmenge = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.groupBoxKndInfo = new System.Windows.Forms.GroupBox(); this.groupBoxKndInfo = new System.Windows.Forms.GroupBox();
this.tableLayoutPanelInfo = new System.Windows.Forms.TableLayoutPanel();
this.labelAnmerkung = new System.Windows.Forms.Label();
this.labelAufgabe = new System.Windows.Forms.Label();
this.buttonTourenListe = new System.Windows.Forms.Button(); this.buttonTourenListe = new System.Windows.Forms.Button();
this.buttonStats = new System.Windows.Forms.Button(); this.buttonStats = new System.Windows.Forms.Button();
this.buttonEinstellung = new System.Windows.Forms.Button(); this.buttonEinstellung = new System.Windows.Forms.Button();
@ -57,9 +54,12 @@
this.tabPageVorbereitet = new System.Windows.Forms.TabPage(); this.tabPageVorbereitet = new System.Windows.Forms.TabPage();
this.objectListViewVorbereitet = new BrightIdeasSoftware.ObjectListView(); this.objectListViewVorbereitet = new BrightIdeasSoftware.ObjectListView();
this.buttonNW = new System.Windows.Forms.Button(); this.buttonNW = new System.Windows.Forms.Button();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.labelAnmerkung = new System.Windows.Forms.Label();
this.labelAufgabe = new System.Windows.Forms.Label();
this.labelZusatz = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).BeginInit();
this.groupBoxKndInfo.SuspendLayout(); this.groupBoxKndInfo.SuspendLayout();
this.tableLayoutPanelInfo.SuspendLayout();
this.tabPageRampe.SuspendLayout(); this.tabPageRampe.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.objectListViewRampe)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.objectListViewRampe)).BeginInit();
this.tabPageSonder.SuspendLayout(); this.tabPageSonder.SuspendLayout();
@ -71,6 +71,7 @@
this.tabControlAuftragList.SuspendLayout(); this.tabControlAuftragList.SuspendLayout();
this.tabPageVorbereitet.SuspendLayout(); this.tabPageVorbereitet.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.objectListViewVorbereitet)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.objectListViewVorbereitet)).BeginInit();
this.flowLayoutPanel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// buttonNeuerAuftrag // buttonNeuerAuftrag
@ -173,7 +174,7 @@
// groupBoxKndInfo // groupBoxKndInfo
// //
this.groupBoxKndInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.groupBoxKndInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxKndInfo.Controls.Add(this.tableLayoutPanelInfo); this.groupBoxKndInfo.Controls.Add(this.flowLayoutPanel1);
this.groupBoxKndInfo.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupBoxKndInfo.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBoxKndInfo.ForeColor = System.Drawing.Color.Red; this.groupBoxKndInfo.ForeColor = System.Drawing.Color.Red;
this.groupBoxKndInfo.Location = new System.Drawing.Point(916, 452); this.groupBoxKndInfo.Location = new System.Drawing.Point(916, 452);
@ -186,42 +187,6 @@
this.groupBoxKndInfo.VisibleChanged += new System.EventHandler(this.GroupBoxKndInfo_VisibleChanged); this.groupBoxKndInfo.VisibleChanged += new System.EventHandler(this.GroupBoxKndInfo_VisibleChanged);
this.groupBoxKndInfo.Paint += new System.Windows.Forms.PaintEventHandler(this.GroupBoxKndInfo_Paint); this.groupBoxKndInfo.Paint += new System.Windows.Forms.PaintEventHandler(this.GroupBoxKndInfo_Paint);
// //
// tableLayoutPanelInfo
//
this.tableLayoutPanelInfo.ColumnCount = 1;
this.tableLayoutPanelInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelInfo.Controls.Add(this.labelAnmerkung, 0, 0);
this.tableLayoutPanelInfo.Controls.Add(this.labelAufgabe, 0, 1);
this.tableLayoutPanelInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanelInfo.Location = new System.Drawing.Point(3, 26);
this.tableLayoutPanelInfo.Name = "tableLayoutPanelInfo";
this.tableLayoutPanelInfo.RowCount = 2;
this.tableLayoutPanelInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelInfo.Size = new System.Drawing.Size(287, 154);
this.tableLayoutPanelInfo.TabIndex = 0;
//
// labelAnmerkung
//
this.labelAnmerkung.AutoSize = true;
this.labelAnmerkung.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelAnmerkung.ForeColor = System.Drawing.Color.Red;
this.labelAnmerkung.Location = new System.Drawing.Point(3, 0);
this.labelAnmerkung.Name = "labelAnmerkung";
this.labelAnmerkung.Size = new System.Drawing.Size(281, 77);
this.labelAnmerkung.TabIndex = 0;
this.labelAnmerkung.Text = "label2";
//
// labelAufgabe
//
this.labelAufgabe.AutoSize = true;
this.labelAufgabe.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelAufgabe.Location = new System.Drawing.Point(3, 77);
this.labelAufgabe.Name = "labelAufgabe";
this.labelAufgabe.Size = new System.Drawing.Size(281, 77);
this.labelAufgabe.TabIndex = 1;
this.labelAufgabe.Text = "label3";
//
// buttonTourenListe // buttonTourenListe
// //
this.buttonTourenListe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.buttonTourenListe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -516,6 +481,49 @@
this.buttonNW.UseVisualStyleBackColor = true; this.buttonNW.UseVisualStyleBackColor = true;
this.buttonNW.Click += new System.EventHandler(this.ButtonNW_Click); this.buttonNW.Click += new System.EventHandler(this.ButtonNW_Click);
// //
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.labelAnmerkung);
this.flowLayoutPanel1.Controls.Add(this.labelAufgabe);
this.flowLayoutPanel1.Controls.Add(this.labelZusatz);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 26);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(287, 154);
this.flowLayoutPanel1.TabIndex = 0;
//
// labelAnmerkung
//
this.labelAnmerkung.AutoSize = true;
this.labelAnmerkung.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelAnmerkung.ForeColor = System.Drawing.Color.Red;
this.labelAnmerkung.Location = new System.Drawing.Point(3, 0);
this.labelAnmerkung.Name = "labelAnmerkung";
this.labelAnmerkung.Size = new System.Drawing.Size(70, 25);
this.labelAnmerkung.TabIndex = 2;
this.labelAnmerkung.Text = "label2";
//
// labelAufgabe
//
this.labelAufgabe.AutoSize = true;
this.labelAufgabe.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelAufgabe.Location = new System.Drawing.Point(3, 25);
this.labelAufgabe.Name = "labelAufgabe";
this.labelAufgabe.Size = new System.Drawing.Size(70, 25);
this.labelAufgabe.TabIndex = 3;
this.labelAufgabe.Text = "label3";
//
// labelZusatz
//
this.labelZusatz.AutoSize = true;
this.labelZusatz.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelZusatz.Location = new System.Drawing.Point(3, 50);
this.labelZusatz.Name = "labelZusatz";
this.labelZusatz.Size = new System.Drawing.Size(70, 25);
this.labelZusatz.TabIndex = 4;
this.labelZusatz.Text = "label4";
//
// FormExpedit // FormExpedit
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@ -547,8 +555,6 @@
this.Resize += new System.EventHandler(this.FormExpedit_Resize); this.Resize += new System.EventHandler(this.FormExpedit_Resize);
((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.chartFehlmenge)).EndInit();
this.groupBoxKndInfo.ResumeLayout(false); this.groupBoxKndInfo.ResumeLayout(false);
this.tableLayoutPanelInfo.ResumeLayout(false);
this.tableLayoutPanelInfo.PerformLayout();
this.tabPageRampe.ResumeLayout(false); this.tabPageRampe.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.objectListViewRampe)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.objectListViewRampe)).EndInit();
this.tabPageSonder.ResumeLayout(false); this.tabPageSonder.ResumeLayout(false);
@ -560,6 +566,8 @@
this.tabControlAuftragList.ResumeLayout(false); this.tabControlAuftragList.ResumeLayout(false);
this.tabPageVorbereitet.ResumeLayout(false); this.tabPageVorbereitet.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.objectListViewVorbereitet)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.objectListViewVorbereitet)).EndInit();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -573,9 +581,6 @@
private System.Windows.Forms.Button buttonReklamation; private System.Windows.Forms.Button buttonReklamation;
private System.Windows.Forms.DataVisualization.Charting.Chart chartFehlmenge; private System.Windows.Forms.DataVisualization.Charting.Chart chartFehlmenge;
private System.Windows.Forms.GroupBox groupBoxKndInfo; private System.Windows.Forms.GroupBox groupBoxKndInfo;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelInfo;
private System.Windows.Forms.Label labelAnmerkung;
private System.Windows.Forms.Label labelAufgabe;
private System.Windows.Forms.Button buttonTourenListe; private System.Windows.Forms.Button buttonTourenListe;
private System.Windows.Forms.TabPage tabPageRampe; private System.Windows.Forms.TabPage tabPageRampe;
private BrightIdeasSoftware.ObjectListView objectListViewRampe; private BrightIdeasSoftware.ObjectListView objectListViewRampe;
@ -589,5 +594,9 @@
private System.Windows.Forms.TabPage tabPageVorbereitet; private System.Windows.Forms.TabPage tabPageVorbereitet;
private BrightIdeasSoftware.ObjectListView objectListViewVorbereitet; private BrightIdeasSoftware.ObjectListView objectListViewVorbereitet;
private System.Windows.Forms.Button buttonNW; private System.Windows.Forms.Button buttonNW;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label labelAnmerkung;
private System.Windows.Forms.Label labelAufgabe;
private System.Windows.Forms.Label labelZusatz;
} }
} }

View File

@ -491,9 +491,15 @@ namespace Deckungsbeitrag
labelAufgabe.Visible = true; labelAufgabe.Visible = true;
} }
else { labelAufgabe.Visible = false; } else { labelAufgabe.Visible = false; }
if (auftrag.ZusatzInfo != null)
{
labelZusatz.Text = auftrag.ZusatzInfo;
labelZusatz.Visible = true;
}
else { labelZusatz.Visible = false; }
// GroupBox einblenden wenn notwendig. // GroupBox einblenden wenn notwendig.
if (labelAufgabe.Visible || labelAnmerkung.Visible || chartFehlmenge.Visible) this.groupBoxKndInfo.Visible = true; if (labelAufgabe.Visible || labelAnmerkung.Visible || chartFehlmenge.Visible || labelZusatz.Visible) this.groupBoxKndInfo.Visible = true;
else this.groupBoxKndInfo.Visible = false; else this.groupBoxKndInfo.Visible = false;
} }
@ -916,12 +922,12 @@ namespace Deckungsbeitrag
} }
} }
break; break;
case var t when t == "Fahrer": case var t when t == "Tour":
{ { //TODO: Mit Tour statt Fahrer durchgehen.
if (e.NewValue != null) if (e.NewValue != null)
{ {
this.auftrag.ArbeiterID = ((Benutzer)e.NewValue).BenutzerID; this.auftrag.TourID = ((Tour)e.NewValue).TourID;
this.auftrag.Priority = Funktionen.GetPriority((Benutzer)e.NewValue); this.auftrag.Priority = ((Tour)e.NewValue).Priority;
} }
} }
break; break;
@ -961,17 +967,18 @@ namespace Deckungsbeitrag
} }
else if (meldung.GetFrage(this, $"Möchtest du die gewählte Zelle wirklich bearbeiten?", false) == DialogResult.No) { e.Cancel = true; return; } else if (meldung.GetFrage(this, $"Möchtest du die gewählte Zelle wirklich bearbeiten?", false) == DialogResult.No) { e.Cancel = true; return; }
if (e.Column.AspectName == "Fahrer") if (e.Column.AspectName == "Tour")
{ {
List<Benutzer> list = Benutzer.GetFahrerList(); Saison saison = Saison.GetAktivSaison();
ComboBox fahrer = new ComboBox List<Tour> list = Tour.GetSaisonListe(saison);
ComboBox touren = new ComboBox
{ {
Bounds = e.CellBounds, Bounds = e.CellBounds,
DropDownStyle = ComboBoxStyle.DropDownList, DropDownStyle = ComboBoxStyle.DropDownList,
DisplayMember = "BenutzerName", DisplayMember = "Bezeichnung",
DataSource = list DataSource = list
}; };
e.Control = fahrer; e.Control = touren;
} }
if (e.Control is NumericUpDown num) num.Select(0, int.MaxValue); if (e.Control is NumericUpDown num) num.Select(0, int.MaxValue);
} }
@ -1062,14 +1069,14 @@ namespace Deckungsbeitrag
{ {
if (liste == null || liste == ListenArt.Auftragliste) listAuftragToday = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Vorbereitet, minStatusFilter: AuftragStatus.Gewaschen); if (liste == null || liste == ListenArt.Auftragliste) listAuftragToday = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Vorbereitet, minStatusFilter: AuftragStatus.Gewaschen);
if (liste == null || liste == ListenArt.Geschäftliste) listAuftragGeschaeft = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Fertig, minStatusFilter: AuftragStatus.Abgeholt, typFilter: AuftragTyp.Geschäft); if (liste == null || liste == ListenArt.Geschäftliste) listAuftragGeschaeft = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Fertig, minStatusFilter: AuftragStatus.Abgeholt, typFilter: AuftragTyp.Geschäft);
if (liste == null || liste == ListenArt.Vorbereitetliste) listVorbereitet = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Vorbereitet); if (liste == null || liste == ListenArt.Vorbereitetliste) listVorbereitet = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Vorbereitet, minTypFilter: AuftragTyp.Geschäft);
if (liste == null || liste == ListenArt.Sonderliste) listSonderAuftrag = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Fertig, minStatusFilter: AuftragStatus.Herrichten, typFilter: AuftragTyp.Einmalig, minTypFilter: AuftragTyp.Inventur); if (liste == null || liste == ListenArt.Sonderliste) listSonderAuftrag = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Fertig, minStatusFilter: AuftragStatus.Herrichten, typFilter: AuftragTyp.Laufzettel, minTypFilter: AuftragTyp.Inventur);
if (liste == null || liste == ListenArt.Rampenliste) listRampe = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Abgeholt, typFilter: AuftragTyp.Standart); if (liste == null || liste == ListenArt.Rampenliste) listRampe = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Abgeholt, typFilter: AuftragTyp.Standart);
} }
else else
{ {
if (liste == null || liste == ListenArt.Auftragliste) listAuftragToday = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Vorbereitet, minStatusFilter: AuftragStatus.Gewaschen, frottee: true); if (liste == null || liste == ListenArt.Auftragliste) listAuftragToday = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Vorbereitet, minStatusFilter: AuftragStatus.Gewaschen, frottee: true);
if (liste == null || liste == ListenArt.Sonderliste) listSonderAuftrag = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Fertig, minStatusFilter: AuftragStatus.Herrichten, typFilter: AuftragTyp.Einmalig, minTypFilter: AuftragTyp.Inventur, frottee: true); if (liste == null || liste == ListenArt.Sonderliste) listSonderAuftrag = await View_Auftrag_Expedit.GetAuftragExpeditAsync(statusFilter: AuftragStatus.Fertig, minStatusFilter: AuftragStatus.Herrichten, typFilter: AuftragTyp.Laufzettel, minTypFilter: AuftragTyp.Inventur, frottee: true);
} }
} }

View File

@ -7,6 +7,7 @@ using System.Data;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
@ -25,10 +26,10 @@ namespace Deckungsbeitrag
public FormLogin() public FormLogin()
{ {
InitializeComponent(); InitializeComponent();
this.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
} private void buttonAnmelden_Click(object sender, EventArgs e)
private void buttonAnmelden_Click(object sender, EventArgs e)
{ {
if(string.IsNullOrWhiteSpace(this.textBoxPasswort.Text)) textBoxBenutzer_Leave(sender, e); if(string.IsNullOrWhiteSpace(this.textBoxPasswort.Text)) textBoxBenutzer_Leave(sender, e);
try try
@ -60,7 +61,6 @@ namespace Deckungsbeitrag
break; break;
case -3: case -3:
MessageBox.Show(lex.Message, "Registrieren", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); MessageBox.Show(lex.Message, "Registrieren", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
if (Program.ShowOnBoarding(string.Empty, onBoardingArt) == DialogResult.Cancel) Application.Exit();
this.buttonRegistrieren.Visible = true; this.buttonRegistrieren.Visible = true;
this.buttonAnmelden.Enabled = false; this.buttonAnmelden.Enabled = false;
this.groupBox1.Height = 146; this.groupBox1.Height = 146;
@ -112,7 +112,7 @@ namespace Deckungsbeitrag
if (MessageBox.Show($"Benutzer {this.textBoxBenutzer.Text} wurde erfolgreich angelegt.\n\nMöchtest du einen eigenen Benutzername angeben?\n\n[JA] -> Neuen Benutzername anlegen\n[NEIN] -> Alten Benutzername behalten", "Hinweis", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) if (MessageBox.Show($"Benutzer {this.textBoxBenutzer.Text} wurde erfolgreich angelegt.\n\nMöchtest du einen eigenen Benutzername angeben?\n\n[JA] -> Neuen Benutzername anlegen\n[NEIN] -> Alten Benutzername behalten", "Hinweis", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{ {
string eingabe = Interaction.InputBox("Welchen Benutzername möchtest du verwenden?\n\nBenutzername:", "Neuer Benutzername", ""); string eingabe = Interaction.InputBox("Welchen Benutzername möchtest du verwenden?\n\nBenutzername:", "Neuer Benutzername", "");
person.BenutzerName = eingabe; if (!string.IsNullOrWhiteSpace(eingabe)) person.BenutzerName = eingabe;
if (person.Save() != 1) MessageBox.Show("Benutzername konnte nicht gespeichert werden. Melde dich bei deinem Vorgesetzten.", "SPEICHERFEHLER", MessageBoxButtons.OK, MessageBoxIcon.Information); if (person.Save() != 1) MessageBox.Show("Benutzername konnte nicht gespeichert werden. Melde dich bei deinem Vorgesetzten.", "SPEICHERFEHLER", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
this.textBoxBenutzer.Focus(); this.textBoxBenutzer.Focus();

View File

@ -53,9 +53,11 @@ namespace Deckungsbeitrag
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.ForeColor = System.Drawing.Color.White; this.groupBox1.ForeColor = System.Drawing.Color.White;
this.groupBox1.Location = new System.Drawing.Point(18, 21); this.groupBox1.Location = new System.Drawing.Point(27, 32);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(463, 100); this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox1.Size = new System.Drawing.Size(694, 154);
this.groupBox1.TabIndex = 0; this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "Login-Daten"; this.groupBox1.Text = "Login-Daten";
@ -63,9 +65,10 @@ namespace Deckungsbeitrag
// textBoxPwdWh // textBoxPwdWh
// //
this.textBoxPwdWh.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBoxPwdWh.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxPwdWh.Location = new System.Drawing.Point(185, 110); this.textBoxPwdWh.Location = new System.Drawing.Point(278, 169);
this.textBoxPwdWh.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBoxPwdWh.Name = "textBoxPwdWh"; this.textBoxPwdWh.Name = "textBoxPwdWh";
this.textBoxPwdWh.Size = new System.Drawing.Size(264, 26); this.textBoxPwdWh.Size = new System.Drawing.Size(394, 35);
this.textBoxPwdWh.TabIndex = 5; this.textBoxPwdWh.TabIndex = 5;
this.textBoxPwdWh.UseSystemPasswordChar = true; this.textBoxPwdWh.UseSystemPasswordChar = true;
// //
@ -74,18 +77,20 @@ namespace Deckungsbeitrag
this.labelPwdWh.AutoSize = true; this.labelPwdWh.AutoSize = true;
this.labelPwdWh.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelPwdWh.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelPwdWh.ForeColor = System.Drawing.Color.White; this.labelPwdWh.ForeColor = System.Drawing.Color.White;
this.labelPwdWh.Location = new System.Drawing.Point(26, 113); this.labelPwdWh.Location = new System.Drawing.Point(39, 174);
this.labelPwdWh.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelPwdWh.Name = "labelPwdWh"; this.labelPwdWh.Name = "labelPwdWh";
this.labelPwdWh.Size = new System.Drawing.Size(153, 20); this.labelPwdWh.Size = new System.Drawing.Size(230, 29);
this.labelPwdWh.TabIndex = 4; this.labelPwdWh.TabIndex = 4;
this.labelPwdWh.Text = "Passwort bestätigen"; this.labelPwdWh.Text = "Passwort bestätigen";
// //
// textBoxPasswort // textBoxPasswort
// //
this.textBoxPasswort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBoxPasswort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxPasswort.Location = new System.Drawing.Point(185, 62); this.textBoxPasswort.Location = new System.Drawing.Point(278, 95);
this.textBoxPasswort.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBoxPasswort.Name = "textBoxPasswort"; this.textBoxPasswort.Name = "textBoxPasswort";
this.textBoxPasswort.Size = new System.Drawing.Size(264, 26); this.textBoxPasswort.Size = new System.Drawing.Size(394, 35);
this.textBoxPasswort.TabIndex = 3; this.textBoxPasswort.TabIndex = 3;
this.textBoxPasswort.UseSystemPasswordChar = true; this.textBoxPasswort.UseSystemPasswordChar = true;
this.textBoxPasswort.Enter += new System.EventHandler(this.textBoxPasswort_Enter); this.textBoxPasswort.Enter += new System.EventHandler(this.textBoxPasswort_Enter);
@ -96,18 +101,20 @@ namespace Deckungsbeitrag
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.Color.White; this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(105, 65); this.label2.Location = new System.Drawing.Point(158, 100);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(74, 20); this.label2.Size = new System.Drawing.Size(112, 29);
this.label2.TabIndex = 2; this.label2.TabIndex = 2;
this.label2.Text = "Passwort"; this.label2.Text = "Passwort";
// //
// textBoxBenutzer // textBoxBenutzer
// //
this.textBoxBenutzer.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBoxBenutzer.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxBenutzer.Location = new System.Drawing.Point(185, 30); this.textBoxBenutzer.Location = new System.Drawing.Point(278, 46);
this.textBoxBenutzer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBoxBenutzer.Name = "textBoxBenutzer"; this.textBoxBenutzer.Name = "textBoxBenutzer";
this.textBoxBenutzer.Size = new System.Drawing.Size(264, 26); this.textBoxBenutzer.Size = new System.Drawing.Size(394, 35);
this.textBoxBenutzer.TabIndex = 1; this.textBoxBenutzer.TabIndex = 1;
this.textBoxBenutzer.Enter += new System.EventHandler(this.textBoxBenutzer_Enter); this.textBoxBenutzer.Enter += new System.EventHandler(this.textBoxBenutzer_Enter);
this.textBoxBenutzer.Leave += new System.EventHandler(this.textBoxBenutzer_Leave); this.textBoxBenutzer.Leave += new System.EventHandler(this.textBoxBenutzer_Leave);
@ -117,9 +124,10 @@ namespace Deckungsbeitrag
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.White; this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(105, 33); this.label1.Location = new System.Drawing.Point(158, 51);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(74, 20); this.label1.Size = new System.Drawing.Size(108, 29);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "Benutzer"; this.label1.Text = "Benutzer";
// //
@ -132,10 +140,11 @@ namespace Deckungsbeitrag
this.buttonAnmelden.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonAnmelden.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonAnmelden.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonAnmelden.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAnmelden.ForeColor = System.Drawing.Color.White; this.buttonAnmelden.ForeColor = System.Drawing.Color.White;
this.buttonAnmelden.Location = new System.Drawing.Point(330, 138); this.buttonAnmelden.Location = new System.Drawing.Point(495, 212);
this.buttonAnmelden.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.buttonAnmelden.Name = "buttonAnmelden"; this.buttonAnmelden.Name = "buttonAnmelden";
this.buttonAnmelden.Padding = new System.Windows.Forms.Padding(2); this.buttonAnmelden.Padding = new System.Windows.Forms.Padding(3);
this.buttonAnmelden.Size = new System.Drawing.Size(150, 41); this.buttonAnmelden.Size = new System.Drawing.Size(225, 63);
this.buttonAnmelden.TabIndex = 1; this.buttonAnmelden.TabIndex = 1;
this.buttonAnmelden.Text = "Anmelden"; this.buttonAnmelden.Text = "Anmelden";
this.buttonAnmelden.UseVisualStyleBackColor = false; this.buttonAnmelden.UseVisualStyleBackColor = false;
@ -151,9 +160,10 @@ namespace Deckungsbeitrag
this.buttonAbbrechen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonAbbrechen.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonAbbrechen.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonAbbrechen.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAbbrechen.ForeColor = System.Drawing.Color.White; this.buttonAbbrechen.ForeColor = System.Drawing.Color.White;
this.buttonAbbrechen.Location = new System.Drawing.Point(174, 138); this.buttonAbbrechen.Location = new System.Drawing.Point(261, 212);
this.buttonAbbrechen.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.buttonAbbrechen.Name = "buttonAbbrechen"; this.buttonAbbrechen.Name = "buttonAbbrechen";
this.buttonAbbrechen.Size = new System.Drawing.Size(150, 41); this.buttonAbbrechen.Size = new System.Drawing.Size(225, 63);
this.buttonAbbrechen.TabIndex = 2; this.buttonAbbrechen.TabIndex = 2;
this.buttonAbbrechen.Text = "Abbrechen"; this.buttonAbbrechen.Text = "Abbrechen";
this.buttonAbbrechen.UseVisualStyleBackColor = false; this.buttonAbbrechen.UseVisualStyleBackColor = false;
@ -167,9 +177,10 @@ namespace Deckungsbeitrag
this.buttonRegistrieren.FlatAppearance.BorderSize = 0; this.buttonRegistrieren.FlatAppearance.BorderSize = 0;
this.buttonRegistrieren.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonRegistrieren.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonRegistrieren.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonRegistrieren.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonRegistrieren.Location = new System.Drawing.Point(18, 139); this.buttonRegistrieren.Location = new System.Drawing.Point(27, 214);
this.buttonRegistrieren.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.buttonRegistrieren.Name = "buttonRegistrieren"; this.buttonRegistrieren.Name = "buttonRegistrieren";
this.buttonRegistrieren.Size = new System.Drawing.Size(150, 41); this.buttonRegistrieren.Size = new System.Drawing.Size(225, 63);
this.buttonRegistrieren.TabIndex = 3; this.buttonRegistrieren.TabIndex = 3;
this.buttonRegistrieren.Text = "Registrieren"; this.buttonRegistrieren.Text = "Registrieren";
this.buttonRegistrieren.UseVisualStyleBackColor = false; this.buttonRegistrieren.UseVisualStyleBackColor = false;
@ -178,11 +189,11 @@ namespace Deckungsbeitrag
// FormLogin // FormLogin
// //
this.AcceptButton = this.buttonAnmelden; this.AcceptButton = this.buttonAnmelden;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101))))); this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.CancelButton = this.buttonAbbrechen; this.CancelButton = this.buttonAbbrechen;
this.ClientSize = new System.Drawing.Size(492, 191); this.ClientSize = new System.Drawing.Size(738, 294);
this.Controls.Add(this.buttonRegistrieren); this.Controls.Add(this.buttonRegistrieren);
this.Controls.Add(this.buttonAbbrechen); this.Controls.Add(this.buttonAbbrechen);
this.Controls.Add(this.buttonAnmelden); this.Controls.Add(this.buttonAnmelden);
@ -190,10 +201,12 @@ namespace Deckungsbeitrag
this.ForeColor = System.Drawing.SystemColors.ControlText; this.ForeColor = System.Drawing.SystemColors.ControlText;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FormLogin"; this.Name = "FormLogin";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "LOGIN Version: ";
this.Load += new System.EventHandler(this.FormLogin_Load); this.Load += new System.EventHandler(this.FormLogin_Load);
this.Shown += new System.EventHandler(this.FormLogin_Shown); this.Shown += new System.EventHandler(this.FormLogin_Shown);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);

View File

@ -111,6 +111,7 @@ namespace Deckungsbeitrag
this.textBoxScannTest = new System.Windows.Forms.TextBox(); this.textBoxScannTest = new System.Windows.Forms.TextBox();
this.buttonScannTest = new System.Windows.Forms.Button(); this.buttonScannTest = new System.Windows.Forms.Button();
this.labelScannTest = new System.Windows.Forms.Label(); this.labelScannTest = new System.Windows.Forms.Label();
this.buttonSonderAuftrag = new System.Windows.Forms.Button();
this.toolStripMenu.SuspendLayout(); this.toolStripMenu.SuspendLayout();
this.panelMain.SuspendLayout(); this.panelMain.SuspendLayout();
this.groupBoxAuftrag.SuspendLayout(); this.groupBoxAuftrag.SuspendLayout();
@ -474,6 +475,7 @@ namespace Deckungsbeitrag
// //
this.panelMain.AllowDrop = true; this.panelMain.AllowDrop = true;
this.panelMain.BackColor = System.Drawing.Color.White; this.panelMain.BackColor = System.Drawing.Color.White;
this.panelMain.Controls.Add(this.buttonSonderAuftrag);
this.panelMain.Controls.Add(this.groupBoxAuftrag); this.panelMain.Controls.Add(this.groupBoxAuftrag);
this.panelMain.Controls.Add(this.buttonNeuerRegAuft); this.panelMain.Controls.Add(this.buttonNeuerRegAuft);
this.panelMain.Controls.Add(this.panelProgress); this.panelMain.Controls.Add(this.panelProgress);
@ -732,7 +734,7 @@ namespace Deckungsbeitrag
this.buttonTourenliste.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonTourenliste.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonTourenliste.ForeColor = System.Drawing.Color.Black; this.buttonTourenliste.ForeColor = System.Drawing.Color.Black;
this.buttonTourenliste.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.buttonTourenliste.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.buttonTourenliste.Location = new System.Drawing.Point(11, 80); this.buttonTourenliste.Location = new System.Drawing.Point(11, 141);
this.buttonTourenliste.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); this.buttonTourenliste.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.buttonTourenliste.Name = "buttonTourenliste"; this.buttonTourenliste.Name = "buttonTourenliste";
this.buttonTourenliste.Size = new System.Drawing.Size(333, 50); this.buttonTourenliste.Size = new System.Drawing.Size(333, 50);
@ -1271,7 +1273,7 @@ namespace Deckungsbeitrag
this.buttonNeueAufgabe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonNeueAufgabe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonNeueAufgabe.ForeColor = System.Drawing.Color.Black; this.buttonNeueAufgabe.ForeColor = System.Drawing.Color.Black;
this.buttonNeueAufgabe.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.buttonNeueAufgabe.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.buttonNeueAufgabe.Location = new System.Drawing.Point(11, 206); this.buttonNeueAufgabe.Location = new System.Drawing.Point(11, 265);
this.buttonNeueAufgabe.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); this.buttonNeueAufgabe.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.buttonNeueAufgabe.Name = "buttonNeueAufgabe"; this.buttonNeueAufgabe.Name = "buttonNeueAufgabe";
this.buttonNeueAufgabe.Size = new System.Drawing.Size(333, 50); this.buttonNeueAufgabe.Size = new System.Drawing.Size(333, 50);
@ -1313,7 +1315,7 @@ namespace Deckungsbeitrag
this.buttonNeuerUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonNeuerUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonNeuerUser.ForeColor = System.Drawing.Color.Black; this.buttonNeuerUser.ForeColor = System.Drawing.Color.Black;
this.buttonNeuerUser.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.buttonNeuerUser.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.buttonNeuerUser.Location = new System.Drawing.Point(11, 143); this.buttonNeuerUser.Location = new System.Drawing.Point(11, 203);
this.buttonNeuerUser.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); this.buttonNeuerUser.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.buttonNeuerUser.Name = "buttonNeuerUser"; this.buttonNeuerUser.Name = "buttonNeuerUser";
this.buttonNeuerUser.Size = new System.Drawing.Size(333, 50); this.buttonNeuerUser.Size = new System.Drawing.Size(333, 50);
@ -1502,6 +1504,27 @@ namespace Deckungsbeitrag
this.labelScannTest.TabIndex = 11; this.labelScannTest.TabIndex = 11;
this.labelScannTest.Text = "label1"; this.labelScannTest.Text = "label1";
// //
// buttonSonderAuftrag
//
this.buttonSonderAuftrag.BackColor = System.Drawing.Color.CadetBlue;
this.buttonSonderAuftrag.Enabled = false;
this.buttonSonderAuftrag.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.buttonSonderAuftrag.FlatAppearance.BorderSize = 0;
this.buttonSonderAuftrag.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonSonderAuftrag.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonSonderAuftrag.ForeColor = System.Drawing.Color.Black;
this.buttonSonderAuftrag.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.buttonSonderAuftrag.Location = new System.Drawing.Point(11, 79);
this.buttonSonderAuftrag.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.buttonSonderAuftrag.Name = "buttonSonderAuftrag";
this.buttonSonderAuftrag.Size = new System.Drawing.Size(333, 50);
this.buttonSonderAuftrag.TabIndex = 72;
this.buttonSonderAuftrag.Text = "Neuer Sonderauftrag";
this.buttonSonderAuftrag.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.buttonSonderAuftrag.UseVisualStyleBackColor = false;
this.buttonSonderAuftrag.Visible = false;
this.buttonSonderAuftrag.Click += new System.EventHandler(this.buttonSonderAuftrag_Click);
//
// FormMain // FormMain
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@ -1629,6 +1652,7 @@ namespace Deckungsbeitrag
private System.Windows.Forms.ProgressBar progressBarKundeArtikelUpdate; private System.Windows.Forms.ProgressBar progressBarKundeArtikelUpdate;
private System.Windows.Forms.Panel panelProgress; private System.Windows.Forms.Panel panelProgress;
private System.Windows.Forms.Button buttonNeuerRegAuft; private System.Windows.Forms.Button buttonNeuerRegAuft;
private System.Windows.Forms.Button buttonSonderAuftrag;
} }
} }

View File

@ -55,6 +55,7 @@ namespace Deckungsbeitrag
private UCInventur uCInventur; private UCInventur uCInventur;
private readonly Screen screen = Screen.PrimaryScreen; private readonly Screen screen = Screen.PrimaryScreen;
private Kunde kunde; private Kunde kunde;
private Tour tour;
#endregion #endregion
public FormMain() public FormMain()
{ {
@ -104,6 +105,18 @@ namespace Deckungsbeitrag
GetInventuren(); GetInventuren();
GetSaison(); GetSaison();
} }
else
{
if (this.benutzer.Rolle == BenutzerRolle.Fahrer)
{
Saison saison = Saison.GetAktivSaison();
if (saison.Bezeichnung == "Zwischensaison")
{
var data = ShowTourenplan();
tour = Tour.GetTour(saison.SaisonId, data.tour);
}
}
}
if (this.groupBoxContAnz.Visible) if (this.groupBoxContAnz.Visible)
{ {
@ -127,17 +140,18 @@ namespace Deckungsbeitrag
private void FormMain_Shown(object sender, EventArgs e) private void FormMain_Shown(object sender, EventArgs e)
{ {
// Meldung wenn Updates oder Imports erledigt wurden. if (this.benutzer.Rolle != BenutzerRolle.Fahrer)
if (Program.Artikelliste_Importiert | Program.Kundenliste_Importiert | Program.Software_Updated)
{ {
string[] updates = new string[3]; // Meldung wenn Updates oder Imports erledigt wurden.
updates[0] = Program.Artikelliste_Importiert ? "Artikelliste: ✅" : "Artikelliste: ❌"; if (Program.Artikelliste_Importiert | Program.Kundenliste_Importiert | Program.Software_Updated)
updates[1] = Program.Kundenliste_Importiert ? "Kundenliste: ✅" : "Kundenliste: ❌"; {
updates[2] = Program.Software_Updated ? "Software: ✅" : "Sofware: ❌"; string[] updates = new string[3];
MessageBox.Show($"Folgende Updates wurden heute durchgeführt:\n\n{updates[0]}\n{updates[1]}\n{updates[2]}", "UPDATES DURCHGEFÜHRT", MessageBoxButtons.OK, MessageBoxIcon.Information); updates[0] = Program.Artikelliste_Importiert ? "Artikelliste: ✅" : "Artikelliste: ❌";
updates[1] = Program.Kundenliste_Importiert ? "Kundenliste: ✅" : "Kundenliste: ❌";
updates[2] = Program.Software_Updated ? "Software: ✅" : "Sofware: ❌";
MessageBox.Show($"Folgende Updates wurden heute durchgeführt:\n\n{updates[0]}\n{updates[1]}\n{updates[2]}", "UPDATES DURCHGEFÜHRT", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
} }
// OnBoarding nur bei den Fahrern anzeigen. Bis die anderen Fertig sind.
if (this.benutzer.Rolle == BenutzerRolle.Fahrer) ZeigeOnboarding();
this.ResumeLayout(); this.ResumeLayout();
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
@ -194,6 +208,16 @@ namespace Deckungsbeitrag
} }
#endregion #endregion
private (DateTime? datum, string[] touren, string tour) ShowTourenplan()
{
FormShowUserControl showUserControl = new FormShowUserControl("Tourenplan", this.benutzer, this.kunde);
if (showUserControl.ShowDialog() == DialogResult.OK)
{
var data = showUserControl.lieferDaten;
return (data.datum, data.touren, data.text);
}
return (null, null, null);
}
#region ToolStripButton-Events #region ToolStripButton-Events
private void Get_Border_Paint(object sender, PaintEventArgs e) private void Get_Border_Paint(object sender, PaintEventArgs e)
@ -341,8 +365,8 @@ namespace Deckungsbeitrag
/// <param name="e"></param> /// <param name="e"></param>
private void ButtonNeuerAuftrag_Click(object sender, EventArgs e) private void ButtonNeuerAuftrag_Click(object sender, EventArgs e)
{ {
onBoardingArt = OnboardingSchritt.NeuerAuftrag; //onBoardingArt = OnboardingSchritt.NeuerAuftrag;
if (this.benutzer.Rolle == BenutzerRolle.Fahrer) ZeigeOnboarding(); //if (this.benutzer.Rolle == BenutzerRolle.Fahrer) ZeigeOnboarding();
FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.benutzer, AuftragTyp.Standart); FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.benutzer, AuftragTyp.Standart);
if (neuerAuftrag.ShowDialog() == DialogResult.Abort) { this.kunde = neuerAuftrag.kunde; ButtonNeueInventur_Click(this.buttonNeueInventur, null); } if (neuerAuftrag.ShowDialog() == DialogResult.Abort) { this.kunde = neuerAuftrag.kunde; ButtonNeueInventur_Click(this.buttonNeueInventur, null); }
@ -416,7 +440,7 @@ namespace Deckungsbeitrag
++tosave; ++tosave;
Auftrag a = (Auftrag)item.RowObject; Auftrag a = (Auftrag)item.RowObject;
a.ArbeiterID = this.benutzer.BenutzerID;
a.Erledigt = DateTime.Now; a.Erledigt = DateTime.Now;
a.ErledigtVon = this.benutzer.BenutzerID; a.ErledigtVon = this.benutzer.BenutzerID;
a.Status = AuftragStatus.Ausgeliefert; a.Status = AuftragStatus.Ausgeliefert;
@ -441,6 +465,7 @@ namespace Deckungsbeitrag
newAuftrag.Status = AuftragStatus.Herrichten; newAuftrag.Status = AuftragStatus.Herrichten;
newAuftrag.ErstelltVon = (int)this.benutzer.BenutzerID; newAuftrag.ErstelltVon = (int)this.benutzer.BenutzerID;
newAuftrag.Erstellt = DateTime.Now; newAuftrag.Erstellt = DateTime.Now;
newAuftrag.TourID = a.TourID;
// Werte des alten Auftrags zurücksetzen. // Werte des alten Auftrags zurücksetzen.
newAuftrag.Erledigt = null; newAuftrag.Erledigt = null;
@ -549,6 +574,11 @@ namespace Deckungsbeitrag
FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.benutzer, AuftragTyp.Regelmäßig); FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.benutzer, AuftragTyp.Regelmäßig);
neuerAuftrag.ShowDialog(); neuerAuftrag.ShowDialog();
} }
private void buttonSonderAuftrag_Click(object sender, EventArgs e)
{
FormNeuerAuftrag neuerAuftrag = new FormNeuerAuftrag(this.benutzer, null);
if (neuerAuftrag.ShowDialog() == DialogResult.Abort) { this.kunde = neuerAuftrag.kunde; ButtonNeueInventur_Click(this.buttonNeueInventur, null); }
}
#endregion #endregion
@ -606,7 +636,8 @@ namespace Deckungsbeitrag
try try
{ {
await conn.OpenAsync(); await conn.OpenAsync();
if (status == null & this.benutzer.Rolle == BenutzerRolle.Fahrer) alist = await Auftrag.GetFahrerListAsync(this.benutzer.BenutzerID, conn); //TODO: Richtige Liste holen, wahrscheinlich mit TourID von ShowTourenplan.
if (status == null & this.benutzer.Rolle == BenutzerRolle.Fahrer) alist = await Auftrag.GetFahrerListAsync(tour.TourID, conn);
else alist = await Auftrag.GetStatusListAsync(status, conn); else alist = await Auftrag.GetStatusListAsync(status, conn);
} }
finally finally
@ -1469,6 +1500,7 @@ namespace Deckungsbeitrag
textBox1.Width = (int)size.Width + 10; // +10 als Puffer textBox1.Width = (int)size.Width + 10; // +10 als Puffer
} }
} }
} }
} }
//CHANGES: Fahrer können abgeholte Aufträge erstellen und ausgelieferte Aufträge markieren. //CHANGES: Fahrer können abgeholte Aufträge erstellen und ausgelieferte Aufträge markieren.

View File

@ -51,10 +51,11 @@ namespace Deckungsbeitrag
this.comboBoxFahrer = new System.Windows.Forms.ComboBox(); this.comboBoxFahrer = new System.Windows.Forms.ComboBox();
this.buttonEinstellung = new System.Windows.Forms.Button(); this.buttonEinstellung = new System.Windows.Forms.Button();
this.panelRegAuftrag = new System.Windows.Forms.Panel(); this.panelRegAuftrag = new System.Windows.Forms.Panel();
this.textBoxText = new System.Windows.Forms.TextBox();
this.pictureBoxAddArtikel = new System.Windows.Forms.PictureBox(); this.pictureBoxAddArtikel = new System.Windows.Forms.PictureBox();
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.comboBoxArtikel = new System.Windows.Forms.ComboBox(); this.comboBoxArtikel = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label(); this.labelText = new System.Windows.Forms.Label();
this.comboBoxRhythmus = new System.Windows.Forms.ComboBox(); this.comboBoxRhythmus = new System.Windows.Forms.ComboBox();
this.fLPArtikel = new System.Windows.Forms.FlowLayoutPanel(); this.fLPArtikel = new System.Windows.Forms.FlowLayoutPanel();
this.pictureBoxMinus = new System.Windows.Forms.PictureBox(); this.pictureBoxMinus = new System.Windows.Forms.PictureBox();
@ -172,7 +173,7 @@ namespace Deckungsbeitrag
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(7, 340); this.label5.Location = new System.Drawing.Point(7, 407);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(196, 25); this.label5.Size = new System.Drawing.Size(196, 25);
this.label5.TabIndex = 24; this.label5.TabIndex = 24;
@ -311,7 +312,7 @@ namespace Deckungsbeitrag
// textBoxCont // textBoxCont
// //
this.textBoxCont.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBoxCont.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxCont.Location = new System.Drawing.Point(281, 316); this.textBoxCont.Location = new System.Drawing.Point(281, 383);
this.textBoxCont.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.textBoxCont.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBoxCont.Name = "textBoxCont"; this.textBoxCont.Name = "textBoxCont";
this.textBoxCont.Size = new System.Drawing.Size(50, 49); this.textBoxCont.Size = new System.Drawing.Size(50, 49);
@ -324,11 +325,11 @@ namespace Deckungsbeitrag
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(8, 409); this.label1.Location = new System.Drawing.Point(7, 333);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(125, 25); this.label1.Size = new System.Drawing.Size(59, 25);
this.label1.TabIndex = 33; this.label1.TabIndex = 33;
this.label1.Text = "Zustellfahrer:"; this.label1.Text = "Tour:";
// //
// comboBoxFahrer // comboBoxFahrer
// //
@ -337,10 +338,10 @@ namespace Deckungsbeitrag
this.comboBoxFahrer.FlatStyle = System.Windows.Forms.FlatStyle.System; this.comboBoxFahrer.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.comboBoxFahrer.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxFahrer.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.comboBoxFahrer.FormattingEnabled = true; this.comboBoxFahrer.FormattingEnabled = true;
this.comboBoxFahrer.Location = new System.Drawing.Point(157, 393); this.comboBoxFahrer.Location = new System.Drawing.Point(92, 320);
this.comboBoxFahrer.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.comboBoxFahrer.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.comboBoxFahrer.Name = "comboBoxFahrer"; this.comboBoxFahrer.Name = "comboBoxFahrer";
this.comboBoxFahrer.Size = new System.Drawing.Size(224, 38); this.comboBoxFahrer.Size = new System.Drawing.Size(291, 38);
this.comboBoxFahrer.TabIndex = 34; this.comboBoxFahrer.TabIndex = 34;
this.comboBoxFahrer.Validating += new System.ComponentModel.CancelEventHandler(this.ComboBoxFahrer_Validating); this.comboBoxFahrer.Validating += new System.ComponentModel.CancelEventHandler(this.ComboBoxFahrer_Validating);
// //
@ -363,10 +364,11 @@ namespace Deckungsbeitrag
// //
// panelRegAuftrag // panelRegAuftrag
// //
this.panelRegAuftrag.Controls.Add(this.textBoxText);
this.panelRegAuftrag.Controls.Add(this.pictureBoxAddArtikel); this.panelRegAuftrag.Controls.Add(this.pictureBoxAddArtikel);
this.panelRegAuftrag.Controls.Add(this.label8); this.panelRegAuftrag.Controls.Add(this.label8);
this.panelRegAuftrag.Controls.Add(this.comboBoxArtikel); this.panelRegAuftrag.Controls.Add(this.comboBoxArtikel);
this.panelRegAuftrag.Controls.Add(this.label7); this.panelRegAuftrag.Controls.Add(this.labelText);
this.panelRegAuftrag.Controls.Add(this.comboBoxRhythmus); this.panelRegAuftrag.Controls.Add(this.comboBoxRhythmus);
this.panelRegAuftrag.Controls.Add(this.fLPArtikel); this.panelRegAuftrag.Controls.Add(this.fLPArtikel);
this.panelRegAuftrag.Enabled = false; this.panelRegAuftrag.Enabled = false;
@ -378,6 +380,16 @@ namespace Deckungsbeitrag
this.panelRegAuftrag.Visible = false; this.panelRegAuftrag.Visible = false;
this.panelRegAuftrag.EnabledChanged += new System.EventHandler(this.PanelRegAuftrag_EnabledChanged); this.panelRegAuftrag.EnabledChanged += new System.EventHandler(this.PanelRegAuftrag_EnabledChanged);
// //
// textBoxText
//
this.textBoxText.Location = new System.Drawing.Point(25, 52);
this.textBoxText.Multiline = true;
this.textBoxText.Name = "textBoxText";
this.textBoxText.Size = new System.Drawing.Size(518, 459);
this.textBoxText.TabIndex = 48;
this.textBoxText.Visible = false;
this.textBoxText.VisibleChanged += new System.EventHandler(this.textBoxText_VisibleChanged);
//
// pictureBoxAddArtikel // pictureBoxAddArtikel
// //
this.pictureBoxAddArtikel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pictureBoxAddArtikel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -418,15 +430,15 @@ namespace Deckungsbeitrag
this.comboBoxArtikel.TabIndex = 37; this.comboBoxArtikel.TabIndex = 37;
this.comboBoxArtikel.SelectedIndexChanged += new System.EventHandler(this.ComboBoxArtikel_SelectedIndexChanged); this.comboBoxArtikel.SelectedIndexChanged += new System.EventHandler(this.ComboBoxArtikel_SelectedIndexChanged);
// //
// label7 // labelText
// //
this.label7.AutoSize = true; this.labelText.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelText.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(20, 25); this.labelText.Location = new System.Drawing.Point(20, 25);
this.label7.Name = "label7"; this.labelText.Name = "labelText";
this.label7.Size = new System.Drawing.Size(105, 25); this.labelText.Size = new System.Drawing.Size(105, 25);
this.label7.TabIndex = 36; this.labelText.TabIndex = 36;
this.label7.Text = "Rhythmus:"; this.labelText.Text = "Rhythmus:";
// //
// comboBoxRhythmus // comboBoxRhythmus
// //
@ -459,7 +471,7 @@ namespace Deckungsbeitrag
// //
this.pictureBoxMinus.BackColor = System.Drawing.Color.Red; this.pictureBoxMinus.BackColor = System.Drawing.Color.Red;
this.pictureBoxMinus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxMinus.Image"))); this.pictureBoxMinus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxMinus.Image")));
this.pictureBoxMinus.Location = new System.Drawing.Point(232, 315); this.pictureBoxMinus.Location = new System.Drawing.Point(232, 382);
this.pictureBoxMinus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxMinus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBoxMinus.Name = "pictureBoxMinus"; this.pictureBoxMinus.Name = "pictureBoxMinus";
this.pictureBoxMinus.Size = new System.Drawing.Size(51, 50); this.pictureBoxMinus.Size = new System.Drawing.Size(51, 50);
@ -472,7 +484,7 @@ namespace Deckungsbeitrag
// //
this.pictureBoxPlus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.pictureBoxPlus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.pictureBoxPlus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxPlus.Image"))); this.pictureBoxPlus.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxPlus.Image")));
this.pictureBoxPlus.Location = new System.Drawing.Point(332, 315); this.pictureBoxPlus.Location = new System.Drawing.Point(332, 382);
this.pictureBoxPlus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBoxPlus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBoxPlus.Name = "pictureBoxPlus"; this.pictureBoxPlus.Name = "pictureBoxPlus";
this.pictureBoxPlus.Size = new System.Drawing.Size(51, 50); this.pictureBoxPlus.Size = new System.Drawing.Size(51, 50);
@ -561,10 +573,11 @@ namespace Deckungsbeitrag
private System.Windows.Forms.Button buttonEinstellung; private System.Windows.Forms.Button buttonEinstellung;
private System.Windows.Forms.Panel panelRegAuftrag; private System.Windows.Forms.Panel panelRegAuftrag;
private System.Windows.Forms.FlowLayoutPanel fLPArtikel; private System.Windows.Forms.FlowLayoutPanel fLPArtikel;
private System.Windows.Forms.Label label7; private System.Windows.Forms.Label labelText;
private System.Windows.Forms.ComboBox comboBoxRhythmus; private System.Windows.Forms.ComboBox comboBoxRhythmus;
private System.Windows.Forms.PictureBox pictureBoxAddArtikel; private System.Windows.Forms.PictureBox pictureBoxAddArtikel;
private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label8;
private System.Windows.Forms.ComboBox comboBoxArtikel; private System.Windows.Forms.ComboBox comboBoxArtikel;
private System.Windows.Forms.TextBox textBoxText;
} }
} }

View File

@ -38,11 +38,11 @@ namespace Deckungsbeitrag
public DateTime? letzterLiefertag; public DateTime? letzterLiefertag;
public DataGridViewCell aktivCell; public DataGridViewCell aktivCell;
private readonly string userid; private readonly string userid;
private readonly AuftragTyp auftragtyp = AuftragTyp.Standart; private readonly AuftragTyp? auftragtyp = AuftragTyp.Standart;
private string eingabe = string.Empty; private string eingabe = string.Empty;
private readonly OnboardingSchritt onBoardingArt = OnboardingSchritt.NeuerAuftrag; private readonly OnboardingSchritt onBoardingArt = OnboardingSchritt.NeuerAuftrag;
string[] touren; string[] touren;
string tour; private Tour tour;
string kundeName = string.Empty; string kundeName = string.Empty;
#endregion #endregion
@ -58,7 +58,7 @@ namespace Deckungsbeitrag
this.benutzer = benutzer; this.benutzer = benutzer;
} }
public FormNeuerAuftrag(Benutzer benutzer, AuftragTyp auftragTyp) : this(benutzer) public FormNeuerAuftrag(Benutzer benutzer, AuftragTyp? auftragTyp) : this(benutzer)
{ {
this.auftragtyp = auftragTyp; this.auftragtyp = auftragTyp;
} }
@ -83,7 +83,8 @@ namespace Deckungsbeitrag
if (this.auftragtyp == AuftragTyp.Regelmäßig) {kndService = "Geschäft"; labelLiefertag.Text = "Erster Liefertag:"; } if (this.auftragtyp == AuftragTyp.Regelmäßig) {kndService = "Geschäft"; labelLiefertag.Text = "Erster Liefertag:"; }
if (this.benutzer.Rolle == BenutzerRolle.Fahrer) kndService = "Geschäft"; if (this.benutzer.Rolle == BenutzerRolle.Fahrer) kndService = "Geschäft";
DatenLaden(kndService); if (this.auftragtyp == null) SonderDatenLaden(kndService);
else DatenLaden(kndService);
} }
private async void FormNeuerAuftrag_HelpButtonClicked(object sender, CancelEventArgs e) private async void FormNeuerAuftrag_HelpButtonClicked(object sender, CancelEventArgs e)
{ {
@ -92,9 +93,15 @@ namespace Deckungsbeitrag
ZeigeOnboarding(); ZeigeOnboarding();
} }
/// <summary> private void SonderDatenLaden(string kndService)
/// Kundendaten Liefertag werden eingefügt. {
/// </summary> // Kunde laden
GetKunde(kndService);
// ComboBox Typ & Fahrer wird mit Items geladen
ComboBoxTyp_Load();
ComboBoxFahrer_Load();
}
private void DatenLaden(string kndService) private void DatenLaden(string kndService)
{ {
// Kunde laden // Kunde laden
@ -109,14 +116,6 @@ namespace Deckungsbeitrag
// ComboBox Typ & Fahrer wird mit Items geladen // ComboBox Typ & Fahrer wird mit Items geladen
ComboBoxTyp_Load(); ComboBoxTyp_Load();
ComboBoxFahrer_Load(); ComboBoxFahrer_Load();
if (this.benutzer.Rolle == BenutzerRolle.Fahrer)
{
if (this.benutzer.Tour == tour) this.comboBoxFahrer.SelectedItem = this.comboBoxFahrer.Items.Cast<Benutzer>().FirstOrDefault(t => t.Tour == tour);
else this.comboBoxFahrer.SelectedItem = this.comboBoxFahrer.Items.Cast<Benutzer>().FirstOrDefault(t => t.Tour == tour);
}
else this.comboBoxFahrer.SelectedIndex = -1;
} }
private void GetNextLiefertag() private void GetNextLiefertag()
{ {
@ -157,7 +156,7 @@ namespace Deckungsbeitrag
{ {
// Wenn ShowTourenplan Daten retour gibt, werden diese geladen. // Wenn ShowTourenplan Daten retour gibt, werden diese geladen.
nextLiefertag = (DateTime)data.datum; nextLiefertag = (DateTime)data.datum;
tour = data.tour ?? null; tour = Tour.GetTour(Saison.SaisonId, data.tour);
} }
} }
@ -175,6 +174,11 @@ namespace Deckungsbeitrag
try try
{ {
this.kunde = Funktionen.Open_List(kndService); this.kunde = Funktionen.Open_List(kndService);
if (this.kunde == null)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
this.textBoxKndNr.Text = kunde.KundeNummer; this.textBoxKndNr.Text = kunde.KundeNummer;
this.kundeName = this.textBoxKundeName.Text = this.kunde.Suchtext ?? this.kunde.KundeName; this.kundeName = this.textBoxKundeName.Text = this.kunde.Suchtext ?? this.kunde.KundeName;
@ -221,17 +225,15 @@ namespace Deckungsbeitrag
// Items werden von AuftragTyp geladen. // Items werden von AuftragTyp geladen.
this.comboBoxTyp.DataSource = Enum.GetValues(typeof(AuftragTyp)); this.comboBoxTyp.DataSource = Enum.GetValues(typeof(AuftragTyp));
// Wenn der Kunde ein Geschäftskunde ist, wird AuftragTyp.Geschäft ausgewählt. Andernfalls wird der AuftragTyp aus dem Konstruktor gewählt. // Wenn der Kunde ein Geschäftskunde ist, wird AuftragTyp.Geschäft ausgewählt. Andernfalls wird der AuftragTyp aus dem Konstruktor gewählt.
this.comboBoxTyp.SelectedValueChanged += ComboBoxTyp_SelectedValueChanged; this.comboBoxTyp.SelectedValueChanged += ComboBoxTyp_SelectedValueChanged;
if (kunde.Service == "Geschäft") this.comboBoxTyp.SelectedItem = AuftragTyp.Geschäft; if (this.auftragtyp == null) this.comboBoxTyp.SelectedIndex = -1;
else this.comboBoxTyp.SelectedItem = auftragtyp; else
{
if (kunde.Service == "Geschäft") this.comboBoxTyp.SelectedItem = AuftragTyp.Geschäft;
else this.comboBoxTyp.SelectedItem = auftragtyp;
}
//if (this.benutzer.Rolle == BenutzerRolle.Fahrer)
//{
// this.comboBoxTyp.Enabled = true;
//}
//else this.comboBoxTyp.Enabled = false;
this.ResumeLayout(false); this.ResumeLayout(false);
} }
catch (Exception ex) catch (Exception ex)
@ -248,12 +250,19 @@ namespace Deckungsbeitrag
/// </summary> /// </summary>
private void ComboBoxFahrer_Load() private void ComboBoxFahrer_Load()
{ {
List<Benutzer> benutzerliste = Benutzer.GetFahrerList();
this.comboBoxFahrer.DataSource = benutzerliste;
Saison saison = Saison.GetAktivSaison(); Saison saison = Saison.GetAktivSaison();
if (saison.Bezeichnung == "Zwischensaison") this.comboBoxFahrer.DisplayMember = "BenutzerName"; this.comboBoxFahrer.Validating -= ComboBoxFahrer_Validating;
else this.comboBoxFahrer.DisplayMember = "Tour"; List<Tour> tourliste = Tour.GetSaisonListe(saison);
this.comboBoxFahrer.DataSource = tourliste;
this.comboBoxFahrer.DisplayMember = "Bezeichnung";
// ComboBox-Auswahl vordefinieren.
if (this.benutzer.Rolle == BenutzerRolle.Fahrer)
{
this.comboBoxFahrer.SelectedItem = tour;
}
else this.comboBoxFahrer.SelectedIndex = -1;
this.comboBoxFahrer.Validating += ComboBoxFahrer_Validating;
} }
private void ComboBoxTyp_SelectedValueChanged(object sender, EventArgs e) private void ComboBoxTyp_SelectedValueChanged(object sender, EventArgs e)
{ {
@ -266,7 +275,9 @@ namespace Deckungsbeitrag
return; return;
} }
} }
switch ((AuftragTyp)comboBoxTyp.SelectedValue) if (comboBoxTyp.SelectedValue != null)
{
switch ((AuftragTyp)comboBoxTyp.SelectedValue)
{ {
case AuftragTyp.Geschäft: // Wird derzeit wenig verwendet da die Auswahl in DatenLaden nach KundenService erfolgt. case AuftragTyp.Geschäft: // Wird derzeit wenig verwendet da die Auswahl in DatenLaden nach KundenService erfolgt.
this.Width = textBoxKundeName.Right + 30; this.Width = textBoxKundeName.Right + 30;
@ -306,15 +317,22 @@ namespace Deckungsbeitrag
this.Width = textBoxKundeName.Right + 30; this.Width = textBoxKundeName.Right + 30;
this.Height = 470; this.Height = 470;
break; break;
case AuftragTyp.Einmalig: case AuftragTyp.Laufzettel:
this.panelRegAuftrag.Enabled = this.panelRegAuftrag.Visible = true; this.panelRegAuftrag.Enabled = this.panelRegAuftrag.Visible = true;
this.pictureBoxPlus.Enabled = this.pictureBoxMinus.Enabled = this.textBoxCont.Enabled = false; this.textBoxText.Visible = true;
this.labelText.Text = "Laufzetteltext:";
this.Width = this.panelRegAuftrag.Right + 25; this.Width = this.panelRegAuftrag.Right + 25;
this.Height = 470; this.Height = 470;
break; break;
default: default:
break; break;
} }
}
else
{
this.Width = textBoxKundeName.Right + 30;
this.Height = 470;
}
} }
private void ComboBoxArtikel_SelectedIndexChanged(object sender, EventArgs e) private void ComboBoxArtikel_SelectedIndexChanged(object sender, EventArgs e)
{ {
@ -338,15 +356,15 @@ namespace Deckungsbeitrag
} }
private void ComboBoxFahrer_Validating(object sender, CancelEventArgs e) private void ComboBoxFahrer_Validating(object sender, CancelEventArgs e)
{ {
if (((ComboBox)sender).SelectedIndex == -1) return; ComboBox cb = sender as ComboBox;
if (((Benutzer)((ComboBox)sender).SelectedItem).BenutzerID == this.benutzer.BenutzerID) return; if (cb.SelectedIndex == -1) return;
if (cb.SelectedItem is Tour selected && selected.TourID == tour.TourID) return;
if (this.benutzer.Rolle == BenutzerRolle.Verwaltung || this.benutzer.Rolle == BenutzerRolle.Admin || this.benutzer.Rolle == BenutzerRolle.Expedit) return; if (this.benutzer.Rolle == BenutzerRolle.Verwaltung || this.benutzer.Rolle == BenutzerRolle.Admin || this.benutzer.Rolle == BenutzerRolle.Expedit) return;
if (meldung.GetFrage(this, "Möchtest du den Auftrag wirklich einem anderen Fahrer zuteilen?", false) == DialogResult.No) { ((ComboBox)sender).SelectedIndex = -1; e.Cancel = true; } if (meldung.GetFrage(this, "Möchtest du den Auftrag wirklich einer anderen Tour zuteilen?", false) == DialogResult.No) { ((ComboBox)sender).SelectedIndex = -1; e.Cancel = true; }
else else
{ {
eingabe = Interaction.InputBox("Warum möchtest du den Auftrag einem anderen Fahrer zuteilen?\n\nGrund:", "Sonderzuteilung", ""); eingabe = Interaction.InputBox("Warum möchtest du den Auftrag einem anderen Fahrer zuteilen?\n\nGrund:", "Sonderzuteilung", "");
if (string.IsNullOrWhiteSpace(eingabe)) e.Cancel = true; if (string.IsNullOrWhiteSpace(eingabe)) e.Cancel = true;
else eingabe += " / ";
} }
} }
#endregion #endregion
@ -365,7 +383,7 @@ namespace Deckungsbeitrag
int dropdownWidth = comboBoxArtikel.DropDownWidth; int dropdownWidth = comboBoxArtikel.DropDownWidth;
if (panel.Enabled) if (panel.Enabled)
{ {
if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Regelmäßig || (AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Einmalig) if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Regelmäßig)
{ {
List<Artikel> artikelListe; List<Artikel> artikelListe;
if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Regelmäßig) artikelListe = Artikel.GetRegArtikelList(); if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Regelmäßig) artikelListe = Artikel.GetRegArtikelList();
@ -383,7 +401,6 @@ namespace Deckungsbeitrag
comboBoxRhythmus.DataSource = Enum.GetValues(typeof(RegRhythmen)); comboBoxRhythmus.DataSource = Enum.GetValues(typeof(RegRhythmen));
comboBoxRhythmus.SelectedIndex = -1; comboBoxRhythmus.SelectedIndex = -1;
if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Einmalig) comboBoxRhythmus.Enabled = false;
} }
if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Standerhöhung || (AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Standverminderung) if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Standerhöhung || (AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Standverminderung)
{ {
@ -425,7 +442,7 @@ namespace Deckungsbeitrag
this.Auftrag = Aktualisieren(kunde); this.Auftrag = Aktualisieren(kunde);
// Wenn Fahrer den Auftrag speichert // Wenn Fahrer den Auftrag speichert
if (this.benutzer.Rolle == BenutzerRolle.Fahrer) { FahrerAuftraegeSpeichern(this.Auftrag); } if (this.benutzer.Rolle == BenutzerRolle.Fahrer) { FahrerAuftraegeSpeichern(this.Auftrag); return; }
// Wenn Expedit/Waschstrasse/Verwaltung/Admin den Auftrag speichert // Wenn Expedit/Waschstrasse/Verwaltung/Admin den Auftrag speichert
switch ((AuftragTyp)comboBoxTyp.SelectedItem) switch ((AuftragTyp)comboBoxTyp.SelectedItem)
@ -436,8 +453,6 @@ namespace Deckungsbeitrag
return; return;
case AuftragTyp.Regelmäßig: SpezialAuftragSpeichern(Auftrag); case AuftragTyp.Regelmäßig: SpezialAuftragSpeichern(Auftrag);
return; return;
case AuftragTyp.Einmalig: SpezialAuftragSpeichern(Auftrag);
return;
default: default:
break; break;
} }
@ -540,19 +555,23 @@ namespace Deckungsbeitrag
private Auftrag Aktualisieren(Kunde knd) private Auftrag Aktualisieren(Kunde knd)
{ {
int? arbeiterID;
DateTime liefertag; DateTime liefertag;
string zusatz = string.Empty; string zusatz = string.Empty;
// Wenn Kundennummer ist Div.Barzahler(in FormListe wenn mit ? am Anfang) wird individueller Kundename als Zusatzinfo gespeichert. // ZusatzInfo wird geladen.
if (knd.KundeNummer == "2320000") zusatz = string.IsNullOrWhiteSpace(knd.Suchtext) ? "Kunde: " + knd.KundeName : "Kunde: " + knd.Suchtext; // Wenn textBoxText wurde eingetragen (Auftrag Laufzettel)
else if (!string.IsNullOrWhiteSpace(eingabe)) zusatz = "Fahrerwechsel: " + eingabe; if (!string.IsNullOrWhiteSpace(textBoxText.Text)) zusatz = textBoxText.Text;
// Wenn Kundennummer ist Div.Barzahler(in FormListe wenn mit ? am Anfang) wird individueller Kundename eingetrage
// Wenn Fahrerwechsel durchgeführt wird Grund eingetragen
if (knd.KundeNummer == "2320000") zusatz += string.IsNullOrWhiteSpace(knd.Suchtext) ? "Kunde: " + knd.KundeName : "Kunde: " + knd.Suchtext;
else if (!string.IsNullOrWhiteSpace(eingabe)) zusatz += "Fahrerwechsel: " + eingabe;
Tour selectedTour = this.comboBoxFahrer.SelectedIndex == -1 ? null : (Tour)this.comboBoxFahrer.SelectedItem;
Auftrag _auftrag = new Auftrag Auftrag _auftrag = new Auftrag
{ {
AuftragID = this.Auftrag?.AuftragID, AuftragID = this.Auftrag?.AuftragID,
KundeID = (int)knd.KundeID, KundeID = (int)knd.KundeID,
ArbeiterID = arbeiterID = this.comboBoxFahrer.SelectedIndex == -1 ? null : ((Benutzer)this.comboBoxFahrer.SelectedItem).BenutzerID,
AufgabeID = knd.Aufgabe != null ? knd.Aufgabe : null, AufgabeID = knd.Aufgabe != null ? knd.Aufgabe : null,
Liefertag = liefertag = this.dTPLiefertag.Value, Liefertag = liefertag = this.dTPLiefertag.Value,
Container = int.TryParse(this.textBoxCont.Text, out int i) ? i : 0, Container = int.TryParse(this.textBoxCont.Text, out int i) ? i : 0,
@ -560,28 +579,28 @@ namespace Deckungsbeitrag
Erstellt = DateTime.Now, Erstellt = DateTime.Now,
Typ = (AuftragTyp)comboBoxTyp.SelectedItem, Typ = (AuftragTyp)comboBoxTyp.SelectedItem,
Abteilungen = AbteilungsStatus.Keine, Abteilungen = AbteilungsStatus.Keine,
Priority = Funktionen.GetPriority((Benutzer)this.comboBoxFahrer.SelectedItem), Status = this.benutzer.Rolle == BenutzerRolle.Fahrer ? AuftragStatus.Abgeholt : AuftragStatus.Herrichten, // Wenn Fahrer Auftrag erstellt dann abgeholt sonst Herrichten.
Status = this.benutzer.Rolle == BenutzerRolle.Fahrer ? AuftragStatus.Abgeholt : AuftragStatus.Herrichten, Rhythmus = this.comboBoxRhythmus.Enabled ? (RegRhythmen)this.comboBoxRhythmus.SelectedItem : RegRhythmen.Unbekannt, // Wenn Rhythmus ist nicht Enabled dann RegRhythmus Unbekannt.
Rhythmus = this.comboBoxRhythmus.Enabled ? (RegRhythmen)this.comboBoxRhythmus.SelectedItem : RegRhythmen.Unbekannt, TourID = selectedTour?.TourID, // Wenn Tour hinterlegt dann TourID speichern.
//TourID = this.Auftrag == null ? GetTour(arbeiterID, liefertag) : this.Auftrag.TourID, ArbeiterID = selectedTour?.BenutzerID, // Wenn Tour hinterlegt dann BenutzerID der Tour speichern. KANN AUCH null SEIN!!
Priority = selectedTour.Priority, // Wenn Tour hinterlegt dann Priority der Tour speichern.
ZusatzInfo = zusatz, ZusatzInfo = zusatz,
}; };
return _auftrag; return _auftrag;
} }
private int? GetTour(int? arbeiterID, DateTime liefertag) //private int? GetTour(int? arbeiterID, DateTime liefertag)
{ //{
Tour tour; // Tour tour;
do // do
{ // {
tour = Tour.FindeTour(null, arbeiterID, liefertag); // tour = Tour.FindeTour(null, arbeiterID, liefertag);
if (tour == null) Funktionen.UpdateOrSaveTour(Auftrag.TourID, Auftrag); // if (tour == null) Funktionen.UpdateOrSaveTour(Auftrag.TourID, Auftrag);
} while (tour == null); // } while (tour == null);
return tour.TourID; // return tour.TourID;
} //}
private void SpezialAuftragSpeichern(Auftrag Auftrag) private void SpezialAuftragSpeichern(Auftrag Auftrag)
{ {
if (Auftrag.FindeAuftrag(true).Gefunden) if (Auftrag.FindeAuftrag(true).Gefunden)
@ -662,7 +681,6 @@ namespace Deckungsbeitrag
if (this.benutzer.Rolle == BenutzerRolle.Fahrer) if (this.benutzer.Rolle == BenutzerRolle.Fahrer)
{ {
this.Auftrag = null; this.Auftrag = null;
DatenLaden(string.Empty); DatenLaden(string.Empty);
} }
} }
@ -725,6 +743,14 @@ namespace Deckungsbeitrag
//this.Close(); // Onboarding beendet //this.Close(); // Onboarding beendet
} }
} }
private void textBoxText_VisibleChanged(object sender, EventArgs e)
{
if (textBoxText.Visible)
{
foreach (Control ctr in this.panelRegAuftrag.Controls) if (!ctr.Name.Contains("Text")) ctr.Enabled = false;
}
}
} }
} }
//TODO: TourenListe Entwurf muss überarbeitet werden. //TODO: TourenListe Entwurf muss überarbeitet werden.

View File

@ -54,8 +54,15 @@ namespace Deckungsbeitrag.AA_Forms
public FormShowUserControl(string groupBox, Benutzer user, Kunde kunde) : this(groupBox, user) public FormShowUserControl(string groupBox, Benutzer user, Kunde kunde) : this(groupBox, user)
{ {
this.Text = string.IsNullOrWhiteSpace(kunde.Suchtext) ? kunde.KundeName : kunde.Suchtext; if (kunde != null)
this.Text += " " + kunde.Ort; {
this.Text = string.IsNullOrWhiteSpace(kunde.Suchtext) ? kunde.KundeName : kunde.Suchtext;
this.Text += " " + kunde.Ort;
}
else
{
this.Text = "HEUTIGE TOUR WÄHLEN";
}
} }
private void FormShowUserControl_Load(object sender, EventArgs e) private void FormShowUserControl_Load(object sender, EventArgs e)
@ -103,6 +110,11 @@ namespace Deckungsbeitrag.AA_Forms
UCTourenplan uc = (UCTourenplan)form.Controls[0]; UCTourenplan uc = (UCTourenplan)form.Controls[0];
lieferDaten = uc.lieferDaten; lieferDaten = uc.lieferDaten;
} }
//TODO: Wenn Cancel...
if (form.ActiveControl.Name == "UCTourenplan")
{
}
} }
} }
} }

View File

@ -18,17 +18,6 @@ using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace DatenDB namespace DatenDB
{ {
#region Enums #region Enums
public enum AuftragPriority
{
None = 0,
First = 1,
Second = 2,
Third = 3,
Fourth = 4,
Fifth = 5
}
/// <summary> /// <summary>
/// Enum AuftragStatus /// Enum AuftragStatus
/// </summary> /// </summary>
@ -58,7 +47,7 @@ namespace DatenDB
Standverminderung = 4, Standverminderung = 4,
Regelmäßig = 5, Regelmäßig = 5,
AufAbruf = 6, AufAbruf = 6,
Einmalig = 7 Laufzettel = 7
} }
[Flags] [Flags]
@ -97,67 +86,6 @@ namespace DatenDB
} }
#region async Tasks #region async Tasks
public static async Task<List<Auftrag>> GetAuftragListTodayAsync(AuftragStatus? status, NpgsqlConnection conn, AuftragTyp? typ, int? abtstatus)
{
List<Auftrag> resultList = new List<Auftrag>();
bool isExpedit = true;
using (var command = new NpgsqlCommand())
{
command.Connection = conn;
// Listen für FROTTEE EXPEDIT
if (abtstatus != null)
{
if (status != null) command.CommandText = $"SELECT {ACOLUMNS}, k.name1 as kunde_name, k.suchtext as suchtext, u.benutzer_name as fahrer FROM {TABLE} a left join kundenverwaltung.kunde k on a.kunde_id = k.kunde_id left join kundenverwaltung.benutzer u on a.benutzer_id = u.benutzer_id WHERE status < {(int)status} AND status > {(int)AuftragStatus.Aufgelegt} AND (a.abteilungen_status & 2) = 0 ORDER BY liefertag ASC";
else command.CommandText = $"SELECT {ACOLUMNS}, k.name1 as kunde_name, k.suchtext as suchtext, u.benutzer_name as fahrer FROM {TABLE} a left join kundenverwaltung.kunde k on a.kunde_id = k.kunde_id left join kundenverwaltung.benutzer u on a.benutzer_id = u.benutzer_id WHERE typ = {(int)typ} and status < {(int)AuftragStatus.Vorbereitet} AND (a.abteilungen_status & 2) <> 0 ORDER BY liefertag ASC";
}
else
{
// Liste für EXPEDIT AUFTRÄGE HEUTE
if (typ == null) command.CommandText = $"SELECT {ACOLUMNS}, k.name1 as kunde_name, k.suchtext as suchtext, u.benutzer_name as fahrer FROM {TABLE} a left join kundenverwaltung.kunde k on a.kunde_id = k.kunde_id left join kundenverwaltung.benutzer u on a.benutzer_id = u.benutzer_id WHERE status < {(int)status} AND status > {(int)AuftragStatus.Aufgelegt} ORDER BY liefertag ASC";
else
{
// Liste für EXPEDIT GESCHÄFT
if (status == null) command.CommandText = $"SELECT {ACOLUMNS}, k.name1 as kunde_name, k.suchtext as suchtext, u.benutzer_name as fahrer FROM {TABLE} a left join kundenverwaltung.kunde k on a.kunde_id = k.kunde_id left join kundenverwaltung.benutzer u on a.benutzer_id = u.benutzer_id WHERE typ = {(int)typ} and status < {(int)AuftragStatus.Fertig} ORDER BY liefertag ASC";
else
{ // Liste für EXPEDIT VORBEREITET
command.CommandText = $"SELECT {ACOLUMNS}, k.name1 as kunde_name, k.suchtext as suchtext, u.benutzer_name as fahrer FROM {TABLE} a left join kundenverwaltung.kunde k on a.kunde_id = k.kunde_id left join kundenverwaltung.benutzer u on a.benutzer_id = u.benutzer_id WHERE typ = {(int)typ} AND status = {(int)status} ORDER BY liefertag ASC";
}
}
}
using (var reader = await command.ExecuteReaderAsync())
{
while (await reader.ReadAsync())
resultList.Add(new Auftrag(reader, isExpedit));
}
}
//isExpedit1 = false;
return resultList;
}
public static async Task<List<Auftrag>> GetSonderListsAsync(int? typ, NpgsqlConnection conn, int? abtstatus)
{
List<Auftrag> resultList = new List<Auftrag>();
isExpedit = true;
using (var command = new NpgsqlCommand())
{
command.Connection = conn;
if (abtstatus != null) command.CommandText = $"SELECT {ACOLUMNS}, k.name1 as kunde_name, k.suchtext as suchtext, u.benutzer_name as fahrer FROM {TABLE} a left join Kundenverwaltung.kunde k on a.kunde_id = k.kunde_id left join kundenverwaltung.benutzer u on a.benutzer_id = u.benutzer_id WHERE typ >= @typ AND status < {(int)AuftragStatus.Fertig} AND a.abteilungen_status <= {abtstatus} ORDER BY status DESC, liefertag ASC";
else command.CommandText = $"SELECT {ACOLUMNS}, k.name1 as kunde_name, k.suchtext as suchtext, u.benutzer_name as fahrer FROM {TABLE} a left join Kundenverwaltung.kunde k on a.kunde_id = k.kunde_id left join kundenverwaltung.benutzer u on a.benutzer_id = u.benutzer_id WHERE typ >= @typ AND status < {(int)AuftragStatus.Fertig} ORDER BY status DESC, liefertag ASC";
command.Parameters.AddWithValue("@typ", typ ?? 0); // Parameterized + Null-Handling
using (var reader = await command.ExecuteReaderAsync())
{
while (await reader.ReadAsync())
resultList.Add(new Auftrag(reader, isExpedit));
}
}
//isExpedit = false;
return resultList;
}
public static async Task<List<Auftrag>> GetStatusListAsync(int? status, NpgsqlConnection conn) public static async Task<List<Auftrag>> GetStatusListAsync(int? status, NpgsqlConnection conn)
{ {
List<Auftrag> resultList = new List<Auftrag>(); List<Auftrag> resultList = new List<Auftrag>();
@ -178,7 +106,7 @@ namespace DatenDB
//isExpedit = false; //isExpedit = false;
return resultList; return resultList;
} }
public static async Task<List<Auftrag>> GetFahrerListAsync(int? fahrerID, NpgsqlConnection conn) public static async Task<List<Auftrag>> GetFahrerListAsync(int? tourID, NpgsqlConnection conn)
{ {
List<Auftrag> resultList = new List<Auftrag>(); List<Auftrag> resultList = new List<Auftrag>();
isExpedit = true; isExpedit = true;
@ -186,7 +114,7 @@ namespace DatenDB
{ {
command.Connection = conn; command.Connection = conn;
command.CommandText = $"SELECT {ACOLUMNS}, k.name1 as kunde_name, k.suchtext as suchtext, u.benutzer_name as fahrer FROM {TABLE} a left join kundenverwaltung.kunde k on a.kunde_id = k.kunde_id left join kundenverwaltung.benutzer u on a.benutzer_id = u.benutzer_id WHERE a.benutzer_id = {fahrerID} and liefertag = CURRENT_DATE and status < {(int)AuftragStatus.Ausgeliefert} ORDER BY status DESC"; command.CommandText = $"SELECT {ACOLUMNS}, k.name1 as kunde_name, k.suchtext as suchtext, u.benutzer_name as fahrer FROM {TABLE} a left join kundenverwaltung.kunde k on a.kunde_id = k.kunde_id left join kundenverwaltung.benutzer u on a.benutzer_id = u.benutzer_id WHERE a.tour_id = {tourID} and liefertag = CURRENT_DATE and status < {(int)AuftragStatus.Ausgeliefert} ORDER BY status DESC";
using (var reader = await command.ExecuteReaderAsync()) using (var reader = await command.ExecuteReaderAsync())
{ {
@ -594,7 +522,7 @@ namespace DatenDB
this.AufgabeErledigt = !reader.IsDBNull(18) && reader.GetBoolean(18); this.AufgabeErledigt = !reader.IsDBNull(18) && reader.GetBoolean(18);
this.Abteilungen = reader.IsDBNull(19) ? AbteilungsStatus.Keine : (AbteilungsStatus)reader.GetInt16(19); this.Abteilungen = reader.IsDBNull(19) ? AbteilungsStatus.Keine : (AbteilungsStatus)reader.GetInt16(19);
this.Rhythmus = reader.IsDBNull(20) ? RegRhythmen.Unbekannt : (RegRhythmen)reader.GetInt32(20); this.Rhythmus = reader.IsDBNull(20) ? RegRhythmen.Unbekannt : (RegRhythmen)reader.GetInt32(20);
this.Priority = (AuftragPriority)reader.GetInt32(21); this.Priority = (Priority)reader.GetInt32(21);
if (isExpedit) if (isExpedit)
{ {
@ -629,7 +557,7 @@ namespace DatenDB
this.AufgabeErledigt = !reader.IsDBNull(18) && reader.GetBoolean(18); this.AufgabeErledigt = !reader.IsDBNull(18) && reader.GetBoolean(18);
this.Abteilungen = reader.IsDBNull(19) ? AbteilungsStatus.Keine : (AbteilungsStatus)reader.GetInt16(19); this.Abteilungen = reader.IsDBNull(19) ? AbteilungsStatus.Keine : (AbteilungsStatus)reader.GetInt16(19);
this.Rhythmus = reader.IsDBNull(20) ? RegRhythmen.Unbekannt : (RegRhythmen)reader.GetInt32(20); this.Rhythmus = reader.IsDBNull(20) ? RegRhythmen.Unbekannt : (RegRhythmen)reader.GetInt32(20);
this.Priority = (AuftragPriority)reader.GetInt32(21); this.Priority = (Priority)reader.GetInt32(21);
} }
#region Properties #region Properties
@ -821,7 +749,7 @@ namespace DatenDB
[OLVIgnore] [OLVIgnore]
public RegRhythmen Rhythmus { get; set; } public RegRhythmen Rhythmus { get; set; }
[OLVIgnore] [OLVIgnore]
public AuftragPriority Priority { get; set; } = 0; public Priority Priority { get; set; } = 0;
#endregion #endregion
private void SpeicherStatus() private void SpeicherStatus()

View File

@ -167,6 +167,14 @@ namespace Deckungsbeitrag.AA_Klassen
parameters.Add(new NpgsqlParameter("@typ", (int)typFilter.Value)); parameters.Add(new NpgsqlParameter("@typ", (int)typFilter.Value));
} }
} }
else
{
if (minTypFilter.HasValue)
{
conditions.Add("typ > @typ");
parameters.Add(new NpgsqlParameter("@typ", (int)minTypFilter.Value));
}
}
// Frottee-Filter // Frottee-Filter
if (frottee.HasValue && frottee.Value) if (frottee.HasValue && frottee.Value)
@ -199,11 +207,11 @@ namespace Deckungsbeitrag.AA_Klassen
AufgabeErledigt = SafeBool(reader, "aufgabe_erledigt"), AufgabeErledigt = SafeBool(reader, "aufgabe_erledigt"),
AbteilungenStatus = (AbteilungsStatus)SafeInt(reader, "abteilungen_status"), AbteilungenStatus = (AbteilungsStatus)SafeInt(reader, "abteilungen_status"),
Rhythmus = (RegRhythmen)SafeInt(reader, "rhythmus"), Rhythmus = (RegRhythmen)SafeInt(reader, "rhythmus"),
Priority = (AuftragPriority)SafeInt(reader, "priority"), Priority = (Priority)SafeInt(reader, "priority"),
Gedruckt = SafeDateTime(reader, "gedruckt"), Gedruckt = SafeDateTime(reader, "gedruckt"),
AufgabeBezeichnung = SafeString(reader, "aufgabe_bez"), AufgabeBezeichnung = SafeString(reader, "aufgabe_bez"),
KundeName = SafeString(reader, "suchtext"), KundeName = SafeString(reader, "suchtext"),
Fahrer = SafeString(reader, "fahrer"), Tour = SafeString(reader, "tour"),
FrotteeStatus = SafeInt(reader, "frottee_status"), FrotteeStatus = SafeInt(reader, "frottee_status"),
KleinteileStatus = SafeInt(reader, "kleinteile_status"), KleinteileStatus = SafeInt(reader, "kleinteile_status"),
GrossteileStatus = SafeInt(reader, "grossteile_status") GrossteileStatus = SafeInt(reader, "grossteile_status")
@ -232,24 +240,24 @@ namespace Deckungsbeitrag.AA_Klassen
[OLVIgnore]public int BenutzerID { get; set; } [OLVIgnore]public int BenutzerID { get; set; }
[OLVIgnore]public int? AufgabeID { get; set; } [OLVIgnore]public int? AufgabeID { get; set; }
[OLVIgnore]public int KundeID { get; set; } [OLVIgnore]public int KundeID { get; set; }
[OLVIgnore]public string Zusatz { get; set; }
[OLVColumn("Liefertag", AspectToStringFormat = "{0:ddd dd.MM}", DisplayIndex = 10)]public DateTime? Liefertag { get; set; }
[OLVColumn("Status", DisplayIndex = 40)]public AuftragStatus Status { get; set; }
[OLVIgnore]public int? TourID { get; set; } [OLVIgnore]public int? TourID { get; set; }
[OLVColumn("Schmutzig", DisplayIndex = 20, TextAlign = HorizontalAlignment.Center)]public int ContainerDirt { get; set; }
[OLVColumn("Sauber", DisplayIndex = 30, TextAlign = HorizontalAlignment.Center)]public int ContainerClean { get; set; }
[OLVColumn("Typ", DisplayIndex = 50, IsEditable = false)]public AuftragTyp Typ { get; set; }
[OLVIgnore]public bool AufgabeErledigt { get; set; } [OLVIgnore]public bool AufgabeErledigt { get; set; }
[OLVIgnore]public AbteilungsStatus AbteilungenStatus { get; set; } [OLVIgnore]public AbteilungsStatus AbteilungenStatus { get; set; }
[OLVIgnore]public RegRhythmen Rhythmus { get; set; } [OLVIgnore]public RegRhythmen Rhythmus { get; set; }
[OLVColumn("Priority", DisplayIndex = 15)]public AuftragPriority Priority { get; set; }
[OLVIgnore]private DateTime? Gedruckt { get; set; } [OLVIgnore]private DateTime? Gedruckt { get; set; }
[OLVIgnore]public string Zusatz { get; set; }
[OLVColumn("Liefertag", AspectToStringFormat = "{0:ddd dd.MM}", DisplayIndex = 10)]public DateTime? Liefertag { get; set; }
[OLVColumn("Status", DisplayIndex = 40)]public AuftragStatus Status { get; set; }
[OLVColumn("Schmutzig", DisplayIndex = 20, TextAlign = HorizontalAlignment.Center)]public int ContainerDirt { get; set; }
[OLVColumn("Sauber", DisplayIndex = 30, TextAlign = HorizontalAlignment.Center)]public int ContainerClean { get; set; }
[OLVColumn("Typ", DisplayIndex = 50, IsEditable = false)]public AuftragTyp Typ { get; set; }
[OLVColumn("Priority", DisplayIndex = 15)]public Priority Priority { get; set; }
// Join-Felder aus Table kunde & benutzer // Join-Felder aus Table kunde & benutzer
[OLVColumn("Aufgabe", DisplayIndex = 55)]public string AufgabeBezeichnung { get; set; } [OLVColumn("Aufgabe", DisplayIndex = 55)]public string AufgabeBezeichnung { get; set; }
[OLVColumn("Kunde", DisplayIndex = 0)]public string KundeName { get; set; } [OLVColumn("Kunde", DisplayIndex = 0)]public string KundeName { get; set; }
[OLVColumn("Fahrer", DisplayIndex = 70)]public string Fahrer { get; set; } [OLVColumn("Tour", DisplayIndex = 70)]public string Tour { get; set; }
// **3 Status-Spalten statt 12 Flags** // **3 Status-Spalten statt 12 Flags**
[OLVIgnore]public int FrotteeStatus { get; set; } [OLVIgnore]public int FrotteeStatus { get; set; }

View File

@ -1011,10 +1011,14 @@ namespace Deckungsbeitrag
if (auftragliste != null) _auftragliste = auftragliste; if (auftragliste != null) _auftragliste = auftragliste;
if (fahrer != null) _fahrer = fahrer; if (fahrer != null) _fahrer = fahrer;
if (benutzer != null) _benutzer = benutzer; if (benutzer != null) _benutzer = benutzer;
string dateiName = $"{_auftragliste[0].Liefertag}_{_fahrer.BenutzerName}";
currentPage = 0; // WICHTIG: reset vor jedem Druck currentPage = 0; // WICHTIG: reset vor jedem Druck
string tmpPdf = @"C:\tmp\output2.pdf"; string path = ConfigurationManager.AppSettings["DateiSavePfad"];
string tmpPdf = Path.Combine(path, "Tourenlisten", dateiName);
//string tmpPdf = @"C:\tmp\output2.pdf";
PrintDialog dialog = new PrintDialog(); PrintDialog dialog = new PrintDialog();
PrintPreviewDialog preview = new PrintPreviewDialog(); PrintPreviewDialog preview = new PrintPreviewDialog();
@ -1074,42 +1078,6 @@ namespace Deckungsbeitrag
if (IsPhysicalPrint) if (IsPhysicalPrint)
{ {
GeneratePdfFromPrintDocument(tmpPdf); GeneratePdfFromPrintDocument(tmpPdf);
if (WaitForFileReady(tmpPdf))
{
Tour tour = null;
if (_auftragliste[0].TourID != null) tour = Tour.GetTour(_auftragliste[0].TourID);
else tour = Tour.FindeTour(_auftragliste[0].TourID, _fahrer.BenutzerID, _auftragliste[0].Liefertag);
if (tour == null)
{
UpdateOrSaveTour(_auftragliste[0].TourID, _auftragliste[0]);
tour = Tour.FindeTour(_auftragliste[0].TourID, _fahrer.BenutzerID, _auftragliste[0].Liefertag);
}
int kndanzahl = 0;
int contanzahl = 0;
int dirtanzahl = 0;
foreach (Auftrag _auftrag in _auftragliste)
{
contanzahl += _auftrag.ContainerClean;
dirtanzahl += _auftrag.Container;
_auftrag.TourID = tour.TourID;
_auftrag.Save();
kndanzahl++;
}
tour.ContainerClean = contanzahl;
tour.ContainerDirt = dirtanzahl;
tour.Tourenliste = File.ReadAllBytes(tmpPdf);
tour.Kundenanzahl = kndanzahl;
tour.ListeGedruckt = DateTime.Now;
tour.GedrucktVon = _benutzer.BenutzerID;
if (tour.Save() == 0) meldung.GetFehler(null, "PDF konnte nicht gespeichert werden. Bitte melde dich bei einem Vorgesetzten.");
}
File.Delete(tmpPdf);
} }
} }
} }
@ -1627,48 +1595,48 @@ namespace Deckungsbeitrag
} }
} }
public static void UpdateOrSaveTour(int? tourid, Auftrag auftrag) //public static void UpdateOrSaveTour(int? tourid, Auftrag auftrag)
{ //{
int? arbeiterID = null; // int? arbeiterID = null;
DateTime? liefertag = null; // DateTime? liefertag = null;
int? tourID = tourid; // int? tourID = tourid;
Tour tour = null; // Tour tour = null;
if (auftrag != null) // if (auftrag != null)
{ // {
arbeiterID = auftrag.ArbeiterID; // arbeiterID = auftrag.ArbeiterID;
liefertag = auftrag.Liefertag; // liefertag = auftrag.Liefertag;
tourID = auftrag.TourID; // tourID = auftrag.TourID;
} // }
if (tourID != null) tour = Tour.GetTour(tourID); // if (tourID != null) tour = Tour.GetTour(tourID);
if (tour == null) // if (tour == null)
{ // {
tour = new Tour(); // tour = new Tour();
tour.TourID = null; // tour.TourID = null;
tour.BenutzerID = auftrag.ArbeiterID; // tour.BenutzerID = auftrag.ArbeiterID;
tour.Liefertag = auftrag.Liefertag; // tour.Liefertag = auftrag.Liefertag;
tour.SaisonID = Saison.GetAktivSaison().SaisonId; // tour.SaisonID = Saison.GetAktivSaison().SaisonId;
} // }
tour.Kundenanzahl++; // tour.Kundenanzahl++;
tour.ContainerDirt += auftrag.Container; // tour.ContainerDirt += auftrag.Container;
tour.ContainerClean += auftrag.ContainerClean; // tour.ContainerClean += auftrag.ContainerClean;
if (tour.Save() == 0) meldung.GetFehler(null, "Speichern oder Updaten der Tour war nicht möglich.\nBitte informiere deinen Vorgesetzten."); // if (tour.Save() == 0) meldung.GetFehler(null, "Speichern oder Updaten der Tour war nicht möglich.\nBitte informiere deinen Vorgesetzten.");
} //}
internal static AuftragPriority GetPriority(Benutzer user) internal static Priority GetPriority(Benutzer user)
{ {
string vorname; string vorname;
if (user == null) vorname = string.Empty; if (user == null) vorname = string.Empty;
else vorname = user.Vorname; else vorname = user.Vorname;
switch (vorname) switch (vorname)
{ {
case var n when n == "Gerald": return AuftragPriority.First; case var n when n == "Gerald": return Priority.First;
case var n when n == "Jochen": return AuftragPriority.Second; case var n when n == "Jochen": return Priority.Second;
case var n when n == "Thomas": return AuftragPriority.Third; case var n when n == "Thomas": return Priority.Third;
case var n when n == "Alil": return AuftragPriority.Fourth; case var n when n == "Alil": return Priority.Fourth;
default: return AuftragPriority.None; default: return Priority.None;
} }
} }

View File

@ -4,6 +4,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using ZXing; using ZXing;
@ -11,8 +12,8 @@ namespace Deckungsbeitrag.AA_Klassen
{ {
public class Tour public class Tour
{ {
// 0 1 2 3 4 5 6 7 8 9 10 11 // 0 1 2 3 4
public const string COLUMNS = "tour_id, benutzer_id, kundenanzahl, liefertag, start, ende, container_dirt, container_clean, saison_id, tourenliste, listegedruckt, gedruckt_von"; public const string COLUMNS = "tour_id, benutzer_id, saison_id, bezeichnung, priority";
public const string TABLE = "kundenverwaltung.tour"; public const string TABLE = "kundenverwaltung.tour";
#region Class-Standarts (Properties, Save, reader) #region Class-Standarts (Properties, Save, reader)
@ -21,15 +22,8 @@ namespace Deckungsbeitrag.AA_Klassen
public int? TourID { get; set; } public int? TourID { get; set; }
public int? BenutzerID { get; set; } public int? BenutzerID { get; set; }
public int? SaisonID { get; set; } public int? SaisonID { get; set; }
public int? Kundenanzahl { get; set; } public string Bezeichnung { get; set; }
public DateTime Liefertag { get; set; } public Priority Priority { get; set; }
public DateTime? Start { get; set; }
public DateTime? Ende { get; set; }
public int ContainerDirt { get; set; }
public int ContainerClean { get; set; }
public byte[] Tourenliste { get; set; }
public DateTime? ListeGedruckt { get; set; }
public int? GedrucktVon { get; set; }
public int? Save() public int? Save()
{ {
@ -42,28 +36,23 @@ namespace Deckungsbeitrag.AA_Klassen
int? result; int? result;
if (this.TourID.HasValue & this.TourID != 0) if (this.TourID.HasValue & this.TourID != 0)
{ {
command.CommandText = $"update {TABLE} set benutzer_id = :p1, kundenanzahl = :p2, liefertag = :p3, start = :p4, ende = :p5, container_dirt = :p6, container_clean = :p7, saison_id = :p8, tourenliste = :p9, listegedruckt = :p10, gedruckt_von = :p11 WHERE tour_id = :p0"; command.CommandText = $"update {TABLE} set benutzer_id = :p1, saison_id = :p2, bezeichnung = :p3, priority = :p4 WHERE tour_id = :p0";
} }
else else
{ {
command.CommandText = "select nextval('kundenverwaltung.tour_seq')"; command.CommandText = "select nextval('kundenverwaltung.tour_seq')";
this.TourID = (int)(long)command.ExecuteScalar(); this.TourID = (int)(long)command.ExecuteScalar();
command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9, :p10, :p11)"; command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4)";
} }
command.Parameters.AddWithValue("p0", this.TourID); Match match = Regex.Match(this.Bezeichnung ?? "", @"\d+");
command.Parameters.AddWithValue("p1", this.BenutzerID); int zahl = match.Success ? int.Parse(match.Value) : 0; // oder throw bei Fehler
command.Parameters.AddWithValue("p2", this.Kundenanzahl ?? 0);
command.Parameters.AddWithValue("p3", this.Liefertag);
command.Parameters.AddWithValue("p4", this.Start ?? (object)DBNull.Value);
command.Parameters.AddWithValue("p5", this.Ende ?? (object)DBNull.Value);
command.Parameters.AddWithValue("p6", this.ContainerDirt);
command.Parameters.AddWithValue("p7", this.ContainerClean);
command.Parameters.AddWithValue("p8", this.SaisonID ?? (object)DBNull.Value);
command.Parameters.AddWithValue("p9", this.Tourenliste ?? (object)DBNull.Value);
command.Parameters.AddWithValue("p10", this.ListeGedruckt.HasValue ? (DateTime?)this.ListeGedruckt.Value : (DateTime?)DateTime.Now);
command.Parameters.AddWithValue("p11", this.GedrucktVon ?? (object)DBNull.Value);
command.Parameters.AddWithValue("p0", this.TourID);
command.Parameters.AddWithValue("p1", this.BenutzerID.HasValue ? this.BenutzerID.Value : (object)DBNull.Value);
command.Parameters.AddWithValue("p2", this.SaisonID ?? (object)DBNull.Value);
command.Parameters.AddWithValue("p3", this.Bezeichnung);
command.Parameters.AddWithValue("p4", zahl);
result = command.ExecuteNonQuery(); result = command.ExecuteNonQuery();
DatenbankConnection.GetConnection().Close(); DatenbankConnection.GetConnection().Close();
@ -75,17 +64,10 @@ namespace Deckungsbeitrag.AA_Klassen
public Tour(NpgsqlDataReader reader) public Tour(NpgsqlDataReader reader)
{ {
this.TourID = reader.GetInt32(0); this.TourID = reader.GetInt32(0);
this.BenutzerID = reader.GetInt32(1); this.BenutzerID = reader.IsDBNull(1) ? (int?)null : reader.GetInt32(1);
this.Kundenanzahl = reader.GetInt32(2); this.SaisonID = reader.GetInt32(2);
this.Liefertag = reader.GetDateTime(3); this.Bezeichnung = reader.IsDBNull(3) ? string.Empty : reader.GetString(3);
this.Start = reader.IsDBNull(4) ? (DateTime?)null : reader.GetDateTime(4); this.Priority = reader.IsDBNull(4) ? Priority.None : (Priority)reader.GetInt32(4);
this.Ende = reader.IsDBNull(5) ? (DateTime?)null : reader.GetDateTime(5);
this.ContainerDirt = reader.IsDBNull(6) ? 0 : reader.GetInt32(6);
this.ContainerClean = reader.IsDBNull(7) ? 0 : reader.GetInt32(7);
this.SaisonID = reader.GetInt32(8);
this.Tourenliste = reader.IsDBNull(9) ? null : (byte[])reader[9];
this.ListeGedruckt = reader.IsDBNull(10) ? (DateTime?)null : reader.GetDateTime(10);
this.GedrucktVon = reader.IsDBNull(11) ? (int?)null : reader.GetInt32(11);
} }
#endregion #endregion
@ -122,14 +104,14 @@ namespace Deckungsbeitrag.AA_Klassen
return result; return result;
} }
internal static Tour GetTour(int? tourID) internal static Tour GetTour(int? saison, string bez)
{ {
Tour result = null; Tour result = null;
DatenbankConnection.GetConnection().Open(); DatenbankConnection.GetConnection().Open();
using (NpgsqlCommand command = new NpgsqlCommand()) using (NpgsqlCommand command = new NpgsqlCommand())
{ {
command.Connection = DatenbankConnection.GetConnection(); command.Connection = DatenbankConnection.GetConnection();
command.CommandText = $"select {COLUMNS} from {TABLE} where tour_id = {tourID}"; command.CommandText = $"select {COLUMNS} from {TABLE} where saison_id = {saison} and bezeichnung = '{bez}'";
NpgsqlDataReader reader = command.ExecuteReader(); NpgsqlDataReader reader = command.ExecuteReader();
while (reader.Read()) result = new Tour(reader); while (reader.Read()) result = new Tour(reader);
reader.Close(); reader.Close();
@ -140,6 +122,25 @@ namespace Deckungsbeitrag.AA_Klassen
return result; return result;
} }
internal static List<Tour> GetSaisonListe(Saison saison)
{
List<Tour> resultList = new List<Tour>();
DatenbankConnection.GetConnection().Open();
using (NpgsqlCommand command = new NpgsqlCommand())
{
command.Connection = DatenbankConnection.GetConnection();
command.CommandText = $"select {COLUMNS} from {TABLE} where saison_id = {saison.SaisonId}";
using (var reader = command.ExecuteReader())
{
while (reader.Read())
resultList.Add(new Tour(reader));
}
}
DatenbankConnection.GetConnection().Close();
return resultList;
}
#endregion #endregion
} }
public class TDaten public class TDaten
@ -155,11 +156,3 @@ namespace Deckungsbeitrag.AA_Klassen
} }
} }
//INSTALL-REMINDER: Tabelle Tour in Datenbank einfügen
//CHANGES: Class Tour wurde erstellt. Speichern, Laden und Bearbeiten von Touren sollte möglich sein.
//DONE: Wenn Fahrer neuen Auftrag erstellt, wird Tour (BenutzerID & Liefertag) gesucht und gespeichert oder upgedatet. Dabei werden die Containerzahlen schmutzig addiert und die Kundenanzahl um 1 erhöht.
//TODO: Wenn Auftrag abgeschlossen wird muss die Containerzahl sauber addiert werden. Kundenanzahl und Containeranzahl schmutzig darf nicht erhöht werden.
//TODO: !!ÜBERLEGE!! Tour Start und Ende automatisch erfassen. (Beladenscan und Entladescan?)
//TODO: Eingabemöglichkeit von Tour Start und Ende muss erledigt werden.
//TODO: Kundenanzahl bei Tourenliste erstellen vergleichen und anpassen.
//TODO: !!ÜBERLEGE!! DB-Query für Kundenanzahl und Containeranzahl Abgleich. (Aufträge haben TourID hinterlegt. So sollte alles vergleichbar sein.)

View File

@ -26,7 +26,17 @@ using System.Windows.Forms;
namespace Deckungsbeitrag namespace Deckungsbeitrag
{ {
static class Program public enum Priority
{
None = 0,
First = 1,
Second = 2,
Third = 3,
Fourth = 4,
Fifth = 5
}
static class Program
{ {
public static Color Wirlblau = Settings.Default.Wirlblau; public static Color Wirlblau = Settings.Default.Wirlblau;
public static ImageList imagelist = new ImageList(); public static ImageList imagelist = new ImageList();
@ -537,11 +547,11 @@ namespace Deckungsbeitrag
foreach (Process p in Process.GetProcessesByName("SetupVerwaltung")) foreach (Process p in Process.GetProcessesByName("SetupVerwaltung"))
p.Kill(); p.Kill();
// 3. 2 Sekunden warten (Restart Manager) // 3. 10 Sekunden warten (Restart Manager)
Thread.Sleep(2000); //Thread.Sleep(10000);
Process.Start(psi)?.Dispose(); //Process.Start(psi)?.Dispose();
return true; return true;
} }
catch (Exception ex) catch (Exception ex)

View File

@ -84,7 +84,7 @@ namespace Deckungsbeitrag.UserControls
{ {
this.SuspendLayout(); this.SuspendLayout();
if (!this.groupBoxSuchen.Visible) return; if (!this.groupBoxSuchen.Visible) return;
this.comboBoxTyp.DataSource = Enum.GetValues(typeof(AuftragPriority)); this.comboBoxTyp.DataSource = Enum.GetValues(typeof(Priority));
this.comboBoxTyp.SelectedIndex = -1; this.comboBoxTyp.SelectedIndex = -1;
this.comboBoxStatus.DataSource = Enum.GetValues(typeof(AuftragStatus)); this.comboBoxStatus.DataSource = Enum.GetValues(typeof(AuftragStatus));
this.comboBoxStatus.SelectedIndex = -1; this.comboBoxStatus.SelectedIndex = -1;

View File

@ -38,6 +38,10 @@
this.dTPInvDatum = new System.Windows.Forms.DateTimePicker(); this.dTPInvDatum = new System.Windows.Forms.DateTimePicker();
this.pictureBoxPlus = new System.Windows.Forms.PictureBox(); this.pictureBoxPlus = new System.Windows.Forms.PictureBox();
this.dGArtikel = new System.Windows.Forms.DataGridView(); this.dGArtikel = new System.Windows.Forms.DataGridView();
this.buttonFreigeben = new System.Windows.Forms.Button();
this.panelButtons = new System.Windows.Forms.Panel();
this.buttonAbbrechen = new System.Windows.Forms.Button();
this.labelInvText = new System.Windows.Forms.Label();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -45,11 +49,6 @@
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.buttonFreigeben = new System.Windows.Forms.Button();
this.panelButtons = new System.Windows.Forms.Panel();
this.buttonAbbrechen = new System.Windows.Forms.Button();
this.buttonSpeichern = new System.Windows.Forms.Button();
this.labelInvText = new System.Windows.Forms.Label();
this.groupBoxInventur.SuspendLayout(); this.groupBoxInventur.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxClose)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxClose)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).BeginInit();
@ -187,6 +186,69 @@
this.dGArtikel.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.DGArtikel_CellValueChanged); this.dGArtikel.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.DGArtikel_CellValueChanged);
this.dGArtikel.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(this.DGArtikel_DataBindingComplete); this.dGArtikel.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(this.DGArtikel_DataBindingComplete);
// //
// buttonFreigeben
//
this.buttonFreigeben.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonFreigeben.BackColor = System.Drawing.Color.Gray;
this.buttonFreigeben.CausesValidation = false;
this.buttonFreigeben.Enabled = false;
this.buttonFreigeben.FlatAppearance.BorderSize = 0;
this.buttonFreigeben.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonFreigeben.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonFreigeben.ForeColor = System.Drawing.Color.Black;
this.buttonFreigeben.Location = new System.Drawing.Point(849, 5);
this.buttonFreigeben.Margin = new System.Windows.Forms.Padding(0);
this.buttonFreigeben.Name = "buttonFreigeben";
this.buttonFreigeben.Size = new System.Drawing.Size(250, 40);
this.buttonFreigeben.TabIndex = 38;
this.buttonFreigeben.Text = "Speichern/Freigeben";
this.buttonFreigeben.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.buttonFreigeben.UseVisualStyleBackColor = false;
this.buttonFreigeben.Click += new System.EventHandler(this.ButtonFreigeben_Click);
//
// panelButtons
//
this.panelButtons.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelButtons.Controls.Add(this.buttonAbbrechen);
this.panelButtons.Controls.Add(this.labelInvText);
this.panelButtons.Controls.Add(this.buttonFreigeben);
this.panelButtons.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelButtons.Location = new System.Drawing.Point(3, 570);
this.panelButtons.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panelButtons.Name = "panelButtons";
this.panelButtons.Size = new System.Drawing.Size(1106, 52);
this.panelButtons.TabIndex = 43;
//
// buttonAbbrechen
//
this.buttonAbbrechen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAbbrechen.BackColor = System.Drawing.Color.Red;
this.buttonAbbrechen.FlatAppearance.BorderSize = 0;
this.buttonAbbrechen.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonAbbrechen.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAbbrechen.ForeColor = System.Drawing.Color.Black;
this.buttonAbbrechen.Location = new System.Drawing.Point(594, 5);
this.buttonAbbrechen.Margin = new System.Windows.Forms.Padding(0, 0, 5, 0);
this.buttonAbbrechen.Name = "buttonAbbrechen";
this.buttonAbbrechen.Size = new System.Drawing.Size(250, 40);
this.buttonAbbrechen.TabIndex = 41;
this.buttonAbbrechen.Text = "Abbrechen";
this.buttonAbbrechen.UseVisualStyleBackColor = false;
this.buttonAbbrechen.Click += new System.EventHandler(this.ButtonAbbrechen_Click);
//
// labelInvText
//
this.labelInvText.AutoSize = true;
this.labelInvText.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelInvText.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.labelInvText.Location = new System.Drawing.Point(3, 15);
this.labelInvText.Name = "labelInvText";
this.labelInvText.Size = new System.Drawing.Size(70, 25);
this.labelInvText.TabIndex = 39;
this.labelInvText.Text = "label1";
this.labelInvText.Visible = false;
this.labelInvText.Click += new System.EventHandler(this.LabelInvText_Click);
//
// Column1 // Column1
// //
this.Column1.DataPropertyName = "ArtikelNR"; this.Column1.DataPropertyName = "ArtikelNR";
@ -208,11 +270,11 @@
// Column3 // Column3
// //
this.Column3.DataPropertyName = "Stand"; this.Column3.DataPropertyName = "Stand";
this.Column3.HeaderText = "Ist-Stand"; this.Column3.HeaderText = "Soll-Stand";
this.Column3.MinimumWidth = 6; this.Column3.MinimumWidth = 6;
this.Column3.Name = "Column3"; this.Column3.Name = "Column3";
this.Column3.ReadOnly = true; this.Column3.ReadOnly = true;
this.Column3.Width = 129; this.Column3.Width = 143;
// //
// Column4 // Column4
// //
@ -249,90 +311,6 @@
this.Column7.ReadOnly = true; this.Column7.ReadOnly = true;
this.Column7.Width = 171; this.Column7.Width = 171;
// //
// buttonFreigeben
//
this.buttonFreigeben.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonFreigeben.BackColor = System.Drawing.Color.Gray;
this.buttonFreigeben.CausesValidation = false;
this.buttonFreigeben.Enabled = false;
this.buttonFreigeben.FlatAppearance.BorderSize = 0;
this.buttonFreigeben.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonFreigeben.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonFreigeben.ForeColor = System.Drawing.Color.Black;
this.buttonFreigeben.Location = new System.Drawing.Point(899, 5);
this.buttonFreigeben.Margin = new System.Windows.Forms.Padding(0);
this.buttonFreigeben.Name = "buttonFreigeben";
this.buttonFreigeben.Size = new System.Drawing.Size(200, 40);
this.buttonFreigeben.TabIndex = 38;
this.buttonFreigeben.Text = "Inventur freigeben";
this.buttonFreigeben.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.buttonFreigeben.UseVisualStyleBackColor = false;
this.buttonFreigeben.Click += new System.EventHandler(this.ButtonFreigeben_Click);
//
// panelButtons
//
this.panelButtons.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelButtons.Controls.Add(this.buttonAbbrechen);
this.panelButtons.Controls.Add(this.buttonSpeichern);
this.panelButtons.Controls.Add(this.labelInvText);
this.panelButtons.Controls.Add(this.buttonFreigeben);
this.panelButtons.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelButtons.Location = new System.Drawing.Point(3, 570);
this.panelButtons.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panelButtons.Name = "panelButtons";
this.panelButtons.Size = new System.Drawing.Size(1106, 52);
this.panelButtons.TabIndex = 43;
//
// buttonAbbrechen
//
this.buttonAbbrechen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAbbrechen.BackColor = System.Drawing.Color.Red;
this.buttonAbbrechen.FlatAppearance.BorderSize = 0;
this.buttonAbbrechen.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonAbbrechen.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAbbrechen.ForeColor = System.Drawing.Color.Black;
this.buttonAbbrechen.Location = new System.Drawing.Point(489, 5);
this.buttonAbbrechen.Margin = new System.Windows.Forms.Padding(0);
this.buttonAbbrechen.Name = "buttonAbbrechen";
this.buttonAbbrechen.Size = new System.Drawing.Size(200, 40);
this.buttonAbbrechen.TabIndex = 41;
this.buttonAbbrechen.Text = "Abbrechen";
this.buttonAbbrechen.UseVisualStyleBackColor = false;
this.buttonAbbrechen.Click += new System.EventHandler(this.ButtonAbbrechen_Click);
//
// buttonSpeichern
//
this.buttonSpeichern.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonSpeichern.BackColor = System.Drawing.Color.Gray;
this.buttonSpeichern.CausesValidation = false;
this.buttonSpeichern.Enabled = false;
this.buttonSpeichern.FlatAppearance.BorderSize = 0;
this.buttonSpeichern.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonSpeichern.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonSpeichern.ForeColor = System.Drawing.Color.Black;
this.buttonSpeichern.Location = new System.Drawing.Point(694, 5);
this.buttonSpeichern.Margin = new System.Windows.Forms.Padding(5);
this.buttonSpeichern.Name = "buttonSpeichern";
this.buttonSpeichern.Size = new System.Drawing.Size(200, 40);
this.buttonSpeichern.TabIndex = 40;
this.buttonSpeichern.Text = "Speichern";
this.buttonSpeichern.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.buttonSpeichern.UseVisualStyleBackColor = false;
this.buttonSpeichern.Click += new System.EventHandler(this.ButtonSpeichern_Click);
//
// labelInvText
//
this.labelInvText.AutoSize = true;
this.labelInvText.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelInvText.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(53)))), ((int)(((byte)(101)))));
this.labelInvText.Location = new System.Drawing.Point(3, 15);
this.labelInvText.Name = "labelInvText";
this.labelInvText.Size = new System.Drawing.Size(70, 25);
this.labelInvText.TabIndex = 39;
this.labelInvText.Text = "label1";
this.labelInvText.Visible = false;
this.labelInvText.Click += new System.EventHandler(this.LabelInvText_Click);
//
// UCInventur // UCInventur
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@ -366,6 +344,11 @@
private System.Windows.Forms.PictureBox pictureBoxClose; private System.Windows.Forms.PictureBox pictureBoxClose;
private System.Windows.Forms.Panel panelButtons; private System.Windows.Forms.Panel panelButtons;
private System.Windows.Forms.Label labelInvText; private System.Windows.Forms.Label labelInvText;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label labelLieferDat;
private System.Windows.Forms.DateTimePicker dTPLieferDat;
private System.Windows.Forms.Label labelInvDat;
private System.Windows.Forms.Button buttonAbbrechen;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1; private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2; private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3; private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
@ -373,11 +356,5 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column5; private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewTextBoxColumn Column6; private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
private System.Windows.Forms.DataGridViewTextBoxColumn Column7; private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
private System.Windows.Forms.Label label1; }
private System.Windows.Forms.Button buttonSpeichern;
private System.Windows.Forms.Label labelLieferDat;
private System.Windows.Forms.DateTimePicker dTPLieferDat;
private System.Windows.Forms.Label labelInvDat;
private System.Windows.Forms.Button buttonAbbrechen;
}
} }

View File

@ -41,14 +41,11 @@ namespace Deckungsbeitrag.UserControls
_tosave = value; _tosave = value;
if (_tosave) if (_tosave)
{ {
buttonSpeichern.Enabled = true; buttonFreigeben.Enabled = true;
buttonSpeichern.BackColor = Color.FromArgb(0, 192, 0); buttonFreigeben.BackColor = Color.Turquoise;
if ((this.user.Rolle == BenutzerRolle.Verwaltung) || (this.user.Rolle == BenutzerRolle.Admin)) { this.buttonFreigeben.Enabled = true; this.buttonFreigeben.BackColor = Color.Turquoise; }
} }
else else
{ {
buttonSpeichern.Enabled = false;
buttonSpeichern.BackColor = Color.Gray;
buttonFreigeben.Enabled = false; buttonFreigeben.Enabled = false;
buttonFreigeben.BackColor = Color.Gray; buttonFreigeben.BackColor = Color.Gray;
} }
@ -80,12 +77,11 @@ namespace Deckungsbeitrag.UserControls
private void UCInventur_Load(object sender, EventArgs e) private void UCInventur_Load(object sender, EventArgs e)
{ {
if ((this.user.Rolle == BenutzerRolle.Verwaltung & Tosave) || (this.user.Rolle == BenutzerRolle.Admin & Tosave)) { this.buttonFreigeben.Enabled = true; this.buttonFreigeben.BackColor = Color.Turquoise; }
string kundeName = this.kunde.Suchtext ?? this.kunde.KundeName; string kundeName = this.kunde.Suchtext ?? this.kunde.KundeName;
this.groupBoxInventur.Text = $"Inventur-{this.kunde.KundeNummer} {kundeName}"; this.groupBoxInventur.Text = $"Inventur-{this.kunde.KundeNummer} {kundeName}";
if (lines == null || lines.Length == 0) { this.dTPInvDatum.Value = DateTime.Today.Date; } if (lines == null || lines.Length == 0) { this.dTPInvDatum.Value = DateTime.Today.Date; }
else { this.dTPInvDatum.Value = DateTime.Parse(lines[4].Split(':')[1]); this.dTPInvDatum.Enabled = true; } else { this.dTPInvDatum.Value = DateTime.Parse(lines[4].Split(':')[1]); this.dTPInvDatum.Enabled = true; this.buttonAbbrechen.Visible = false; }
if (auftrag != null) this.dTPLieferDat.Value = auftrag.Liefertag; if (auftrag != null) this.dTPLieferDat.Value = auftrag.Liefertag;
Load_DGV(); Load_DGV();
if (lines != null & Sender is FormMain) PictureBoxClose_Click(sender, e); if (lines != null & Sender is FormMain) PictureBoxClose_Click(sender, e);
@ -205,45 +201,57 @@ namespace Deckungsbeitrag.UserControls
Funktionen.GetGroupBoxBoarder(gb, e); Funktionen.GetGroupBoxBoarder(gb, e);
} }
/// <summary>
/// Speichern oder Freigeben der Inventur. Wenn kein Auftrag vorhanden wird davor ButtonSpeichern_Click aufgerufen.
/// Wenn User ist Expedit kann NUR gespeichert werden.
/// Wenn User NICHT Expedit wird abgefragt ob Speichern oder Freigeben. (Speichern wenn noch Zahlen fehlen)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonFreigeben_Click(object sender, EventArgs e) private void ButtonFreigeben_Click(object sender, EventArgs e)
{ {
if (this.auftrag == null) return; if (this.user.Rolle == BenutzerRolle.Expedit) { ButtonSpeichern_Click("Speichern", null); return; }
this.auftrag.Liefertag = dTPLieferDat.Value; DialogResult result = MessageBox.Show("Möchtest du die Inventur Speichern oder Freigeben?\n\n[JA] => Speichern (es fehlen noch Zahlen)\n[NEIN] => Freigeben (alle Zahlen vorhanden)", "FRAGE", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
foreach (DataGridViewRow row in this.dGArtikel.Rows) if (result == DialogResult.Yes) { ButtonSpeichern_Click("Speichern", null); return; }
if (result == DialogResult.Cancel) return;
if (result == DialogResult.No)
{ {
// KundeArtikel updaten. Neuen Stand eintragen, Reklamation & Fehlmenge auf Null setzten und Korrektur als InventruAusgleich speichern. if (this.auftrag == null) ButtonSpeichern_Click("Speichern", null);
KundeArtikel art = (KundeArtikel)artikelListe[row.Index]; this.auftrag.Liefertag = dTPLieferDat.Value;
foreach (DataGridViewRow row in this.dGArtikel.Rows)
art.Reklamation = 0;
art.Fehlmenge = 0;
art.StandBearbeitet = this.user.BenutzerName + " am " + DateTime.Now;
art.FehlmengeBearbeitet = this.user.BenutzerName + " am " + DateTime.Now;
art.KorrekturBearbeitet = this.user.BenutzerName + " am " + DateTime.Now;
art.Stand = int.Parse(row.Cells[2].Value.ToString());
art.Korrektur = int.Parse(row.Cells[6].Value.ToString());
art.Save();
// AuftragArtikel erstellen.
if (int.Parse(row.Cells[6].Value.ToString()) != 0)
{ {
AuftragArtikel auf = new AuftragArtikel // KundeArtikel updaten. Neuen Stand eintragen, Reklamation & Fehlmenge auf Null setzten und Korrektur als InventruAusgleich speichern.
KundeArtikel art = (KundeArtikel)artikelListe[row.Index];
art.Reklamation = 0;
art.Fehlmenge = 0;
art.StandBearbeitet = this.user.BenutzerName + " am " + DateTime.Now;
art.FehlmengeBearbeitet = this.user.BenutzerName + " am " + DateTime.Now;
art.KorrekturBearbeitet = this.user.BenutzerName + " am " + DateTime.Now;
art.Stand = int.Parse(row.Cells[2].Value.ToString());
art.Korrektur = int.Parse(row.Cells[6].Value.ToString());
art.Save();
// AuftragArtikel erstellen.
if (int.Parse(row.Cells[6].Value.ToString()) != 0)
{ {
ArtikelID = art.ArtikelID, AuftragArtikel auf = new AuftragArtikel
AuftragID = auftrag.AuftragID, {
Anzahl = art.Korrektur, ArtikelID = art.ArtikelID,
ArtikelName = art.ArtikelName, AuftragID = auftrag.AuftragID,
Gesamt = art.Korrektur Anzahl = art.Korrektur,
}; ArtikelName = art.ArtikelName,
auf.Save(); Gesamt = art.Korrektur
};
auf.Save();
}
} }
auftrag.Status = AuftragStatus.Herrichten;
auftrag.Save();
GetInventurCSV(sender, auftrag.AuftragID);
UCInventur_Update();
} }
auftrag.Status = AuftragStatus.Herrichten;
auftrag.Save();
GetInventurCSV(sender, auftrag.AuftragID);
UCInventur_Update();
} }
/// <summary> /// <summary>
@ -388,12 +396,11 @@ namespace Deckungsbeitrag.UserControls
/// <param name="e"></param> /// <param name="e"></param>
private void PictureBoxClose_Click(object sender, EventArgs e) private void PictureBoxClose_Click(object sender, EventArgs e)
{ {
if (Tosave) if (MessageBox.Show("Du hast die Zahlen geändert. Möchtest du die Inventur so speichern?", "INVENTUR SPEICHERN", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) ButtonSpeichern_Click(this.buttonSpeichern, null); if (Tosave) if (MessageBox.Show("Du hast die Zahlen geändert. Möchtest du die Inventur so speichern?", "INVENTUR SPEICHERN", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) ButtonSpeichern_Click("Speichern", null);
if (groupBoxInventur.Visible) if (groupBoxInventur.Visible)
{ {
this.buttonFreigeben.Visible = false; this.buttonFreigeben.Visible = false;
this.buttonSpeichern.Visible = false;
this.labelInvText.Text = groupBoxInventur.Text; this.labelInvText.Text = groupBoxInventur.Text;
this.groupBoxInventur.Visible = false; this.groupBoxInventur.Visible = false;
this.labelInvText.Visible = true; this.labelInvText.Visible = true;
@ -445,7 +452,6 @@ namespace Deckungsbeitrag.UserControls
this.dTPInvDatum.Location = new Point(x += labelInvDat.Width, this.pictureBoxPlus.Location.Y); this.dTPInvDatum.Location = new Point(x += labelInvDat.Width, this.pictureBoxPlus.Location.Y);
this.labelLieferDat.Location = new Point(x = x + dTPInvDatum.Width + 10, label_y); this.labelLieferDat.Location = new Point(x = x + dTPInvDatum.Width + 10, label_y);
this.dTPLieferDat.Location = new Point(x + labelLieferDat.Width, this.pictureBoxPlus.Location.Y); this.dTPLieferDat.Location = new Point(x + labelLieferDat.Width, this.pictureBoxPlus.Location.Y);
this.buttonSpeichern.Location = new Point(buttonFreigeben.Left - buttonSpeichern.Width - buttonSpeichern.Margin.Left, buttonSpeichern.Top);
if (Sender is FormAuftragDetail) SizeChangedForParent?.Invoke(); if (Sender is FormAuftragDetail) SizeChangedForParent?.Invoke();
} }
@ -461,7 +467,6 @@ namespace Deckungsbeitrag.UserControls
uci_loc = this.Location; uci_loc = this.Location;
DataGridView_GetNewSize(this.dGArtikel); DataGridView_GetNewSize(this.dGArtikel);
this.buttonFreigeben.Visible = true; this.buttonFreigeben.Visible = true;
this.buttonSpeichern.Visible = true;
groupBoxInventur.Visible = true; groupBoxInventur.Visible = true;
this.labelInvText.Visible = false; this.labelInvText.Visible = false;
} }
@ -482,15 +487,11 @@ namespace Deckungsbeitrag.UserControls
iststand += int.TryParse(row.Cells[j].Value.ToString(), out int r) ? r : 0; iststand += int.TryParse(row.Cells[j].Value.ToString(), out int r) ? r : 0;
} }
if (e.ColumnIndex >= 7) if (e.ColumnIndex >= 7 || e.ColumnIndex == 2)
{ {
row.Cells[5].Value = sollstand - fehlmenge - iststand; row.Cells[5].Value = sollstand - fehlmenge - iststand;
row.Cells[6].Value = artikelListe[e.RowIndex].Korrektur = sollstand - iststand; row.Cells[6].Value = artikelListe[e.RowIndex].Korrektur = sollstand - iststand;
} }
if (e.ColumnIndex == 2)
{
row.Cells[6].Value = artikelListe[e.RowIndex].Korrektur = sollstand - iststand;
}
} }
else return; else return;
dgv.Refresh(); dgv.Refresh();
@ -502,6 +503,11 @@ namespace Deckungsbeitrag.UserControls
else Tosave = false; else Tosave = false;
} }
/// <summary>
/// Wird über den buttonFreigeben aufgerufen.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonSpeichern_Click(object sender, EventArgs e) private void ButtonSpeichern_Click(object sender, EventArgs e)
{ {
this.dGArtikel.EndEdit(); // beendet aktuelle ZellBearbeitung this.dGArtikel.EndEdit(); // beendet aktuelle ZellBearbeitung
@ -543,10 +549,23 @@ namespace Deckungsbeitrag.UserControls
} }
} }
/// <summary>
/// Wenn lines existieren (CSV-Datei) dann wird das Speichern der Änderungen abgefragt.
/// Wenn lines nicht existieren (Neue Inventur) wird die Inventur verworfen.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonAbbrechen_Click(object sender, EventArgs e) private void ButtonAbbrechen_Click(object sender, EventArgs e)
{ {
if (Tosave) { if (MessageBox.Show("Möchtest du wirklich Abbrechen und die Inventur verwerfen?", "FRAGE", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) UCInventur_Delete(); } if (lines == null)
else UCInventur_Delete(); {
if (Tosave) { if (MessageBox.Show("Möchtest du wirklich Abbrechen und die Inventur verwerfen?", "FRAGE", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) UCInventur_Delete(); }
else UCInventur_Delete();
}
else
{
PictureBoxClose_Click(this.pictureBoxClose, null);
}
} }
} }
} }

View File

@ -173,4 +173,25 @@
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>

View File

@ -35,7 +35,21 @@ namespace Deckungsbeitrag.UserControls
{ {
ReadCSV(); ReadCSV();
GetTouren();
}
private void GetTouren()
{
Saison saison = Saison.GetAktivSaison();
foreach (string t in touren)
{
Tour tour = Tour.GetTour(saison.SaisonId, t) ?? new Tour
{
SaisonID = saison.SaisonId,
Bezeichnung = t
};
tour.Save();
}
} }
/// <summary> /// <summary>
@ -48,7 +62,6 @@ namespace Deckungsbeitrag.UserControls
string row; string row;
string[] rows; string[] rows;
try try
{ {
if (File.Exists(Path.Combine(updatePath, dateiName))) if (File.Exists(Path.Combine(updatePath, dateiName)))

View File

@ -4,19 +4,17 @@ NEUIGKEITEN - Version 1.0.9.4
Build-Info: Build-Info:
- Build-Typ: Release Build - Build-Typ: Release Build
- Erledigte TODOs: 15 - Erledigte TODOs: 14
- Offene TODOs: 31 - Offene TODOs: 29
- Install-Reminders: 2 - Install-Reminders: 1
- Changes: 16 - Changes: 15
=== ⚙️ INSTALL-REMINDER (2) === === ⚙️ INSTALL-REMINDER (1) ===
- ⚙️ DB anpassen. (Priority in Auftrag etc.) [Auftrag.cs] - ⚙️ DB anpassen. (Priority in Auftrag etc.) [Auftrag.cs]
- ⚙️ Tabelle Tour in Datenbank einfügen [Tour.cs]
=== ✨ CHANGES (16) === === ✨ CHANGES (15) ===
- ✨ Artikelliste und Kundenliste werden automatisch importiert wenn vorhanden. [FormMain.cs] - ✨ Artikelliste und Kundenliste werden automatisch importiert wenn vorhanden. [FormMain.cs]
- ✨ Class Tour wurde erstellt. Speichern, Laden und Bearbeiten von Touren sollte möglich sein. [Tour.cs]
- ✨ Es kann nach der Kontrolle der Lieferrhythmus geändert werden. Dazu muss auch die Anzahl der Liefertage gewählt werden. [FormTourenplanung.cs] - ✨ Es kann nach der Kontrolle der Lieferrhythmus geändert werden. Dazu muss auch die Anzahl der Liefertage gewählt werden. [FormTourenplanung.cs]
- ✨ Es können nur so viele Clone erstellt werden wie Liefertag im Lieferrhythmus hinterlegt sind. [FormTourenplanung.cs] - ✨ Es können nur so viele Clone erstellt werden wie Liefertag im Lieferrhythmus hinterlegt sind. [FormTourenplanung.cs]
- ✨ Es wir kontrolliert ob der gewählte Liefertag zum hinterlegten Lieferrhythmus passt. [FormTourenplanung.cs] - ✨ Es wir kontrolliert ob der gewählte Liefertag zum hinterlegten Lieferrhythmus passt. [FormTourenplanung.cs]
@ -33,7 +31,7 @@ Build-Info:
- ✨ Wenn ein anderer Fahrer ausgewählt wird, wird auch die Priority laut dem Fahrer geändert. [FormExpedit.cs] - ✨ Wenn ein anderer Fahrer ausgewählt wird, wird auch die Priority laut dem Fahrer geändert. [FormExpedit.cs]
=== ✅ ERLEDIGTE TODOs (15) === === ✅ ERLEDIGTE TODOs (14) ===
- ✅ : Bei Transport wir ein Fach mit Aktuellem Auftrag erstellt. Das Alte wird bei Transport gespeichert. [FormAusschlager.cs] - ✅ : Bei Transport wir ein Fach mit Aktuellem Auftrag erstellt. Das Alte wird bei Transport gespeichert. [FormAusschlager.cs]
- ✅ : CLick auf Inventur freigeben Dateiname von "Warten" auf "Herrichten" ändern. [UCInventur.cs] - ✅ : CLick auf Inventur freigeben Dateiname von "Warten" auf "Herrichten" ändern. [UCInventur.cs]
- ✅ : ComboBox Fahrer und Priorität implementieren [FormAuftragDetail.cs] - ✅ : ComboBox Fahrer und Priorität implementieren [FormAuftragDetail.cs]
@ -45,15 +43,12 @@ Build-Info:
- ✅ : Korrigiere Bestand: Wenn -Zahl dann Stand - Zahl. [FormAuftragDetail.cs] - ✅ : Korrigiere Bestand: Wenn -Zahl dann Stand - Zahl. [FormAuftragDetail.cs]
- ✅ : Mit AddFehler können Fehler aus try/chatch in Obsidian eingefügt werden. (Timestamp, PC-Name, Ex-Message) [Program.cs] - ✅ : Mit AddFehler können Fehler aus try/chatch in Obsidian eingefügt werden. (Timestamp, PC-Name, Ex-Message) [Program.cs]
- ✅ : Speichern etc. durchgehen und adaptieren [FormAuftragDetail.cs] - ✅ : Speichern etc. durchgehen und adaptieren [FormAuftragDetail.cs]
- ✅ : Wenn Fahrer neuen Auftrag erstellt, wird Tour (BenutzerID & Liefertag) gesucht und gespeichert oder upgedatet. Dabei werden die Containerzahlen schmutzig addiert und die Kundenanzahl um 1 erhöht. [Tour.cs]
- ✅ : Wenn Frottee-Expedit auch Reklamation bearbeitet, muss BenutzerRolle abgefragt werden. siehe CHANGES. [FormFehlmengeCount.cs] - ✅ : Wenn Frottee-Expedit auch Reklamation bearbeitet, muss BenutzerRolle abgefragt werden. siehe CHANGES. [FormFehlmengeCount.cs]
- ✅ : Wenn NeuerAuftrag gewählt Fach ändern nicht vergessen. [FormAusschlager.cs] - ✅ : Wenn NeuerAuftrag gewählt Fach ändern nicht vergessen. [FormAusschlager.cs]
- ✅ : Wenn NeuerAuftrag gewählt wie gehts weiter? [FormAusschlager.cs] - ✅ : Wenn NeuerAuftrag gewählt wie gehts weiter? [FormAusschlager.cs]
=== 🔄 OFFENE TODOs (31) === === 🔄 OFFENE TODOs (29) ===
- 🔄 !!ÜBERLEGE!! DB-Query für Kundenanzahl und Containeranzahl Abgleich. (Aufträge haben TourID hinterlegt. So sollte alles vergleichbar sein.) [Tour.cs]
- 🔄 !!ÜBERLEGE!! Tour Start und Ende automatisch erfassen. (Beladenscan und Entladescan?) [Tour.cs]
- 🔄 Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? [FormMain.cs] - 🔄 Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? [FormMain.cs]
- 🔄 Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? [UCAuftragListe.cs] - 🔄 Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? [UCAuftragListe.cs]
- 🔄 Auftrag richtig speichern... mit gedruckt bzw. erledigt bzw. [FormExpedit.cs] - 🔄 Auftrag richtig speichern... mit gedruckt bzw. erledigt bzw. [FormExpedit.cs]
@ -65,24 +60,24 @@ Build-Info:
- 🔄 Deaktivieren wenn SPS funktioniert. Transport wird simuliert. [FormWSVerfolgung.cs] - 🔄 Deaktivieren wenn SPS funktioniert. Transport wird simuliert. [FormWSVerfolgung.cs]
- 🔄 Design des Controls anpassen. Eventuell im Designer erstellen. [UCKunde.cs] - 🔄 Design des Controls anpassen. Eventuell im Designer erstellen. [UCKunde.cs]
- 🔄 Einbinden der NachwaescheArtikelData... [FormArtikelVW.cs] - 🔄 Einbinden der NachwaescheArtikelData... [FormArtikelVW.cs]
- 🔄 Eingabemöglichkeit von Tour Start und Ende muss erledigt werden. [Tour.cs]
- 🔄 Erstellen von SonderAuftrag und Drucken von Etikett testen. [FormAuftragDetail.cs] - 🔄 Erstellen von SonderAuftrag und Drucken von Etikett testen. [FormAuftragDetail.cs]
- 🔄 Eventuell die Zahlen in CSV speichern und von dort für Druck verwenden?! [FormAuftragDetail.cs] - 🔄 Eventuell die Zahlen in CSV speichern und von dort für Druck verwenden?! [FormAuftragDetail.cs]
- 🔄 Funktioniert mehrere KundenControls auf einmal DragDrop? [FormTourenplanung.cs] - 🔄 Funktioniert mehrere KundenControls auf einmal DragDrop? [FormTourenplanung.cs]
- 🔄 Gesamt soll immer 100% sein. [Funktionen.cs] - 🔄 Gesamt soll immer 100% sein. [Funktionen.cs]
- 🔄 Hier Settings speichern mit UserSettingsManager Klasse. [FormEinstellung.cs] - 🔄 Hier Settings speichern mit UserSettingsManager Klasse. [FormEinstellung.cs]
- 🔄 Kundenanzahl bei Tourenliste erstellen vergleichen und anpassen. [Tour.cs] - 🔄 Mit Tour statt Fahrer durchgehen. [FormExpedit.cs]
- 🔄 Nach Test und Rücksprache eventuell wieder umbauen. Benutzer.Rolle etc. [FormFehlmengeCount.cs] - 🔄 Nach Test und Rücksprache eventuell wieder umbauen. Benutzer.Rolle etc. [FormFehlmengeCount.cs]
- 🔄 nicht ganze Aufträge holen sondern nur die Zahlen? [FormMain.cs] - 🔄 nicht ganze Aufträge holen sondern nur die Zahlen? [FormMain.cs]
- 🔄 Non-Hard-Coded-Lösung für Priority finden. [Auftrag.cs] - 🔄 Non-Hard-Coded-Lösung für Priority finden. [Auftrag.cs]
- 🔄 Reg.Aufträge einbauen. Besonderheit: Die Artikel sollen ebenfalls erscheinen. [Funktionen.cs] - 🔄 Reg.Aufträge einbauen. Besonderheit: Die Artikel sollen ebenfalls erscheinen. [Funktionen.cs]
- 🔄 Richtige Liste holen, wahrscheinlich mit TourID von ShowTourenplan. [FormMain.cs]
- 🔄 Settings hier ändern auf UserSettingsManager Klasse. [FormEinstellung.cs] - 🔄 Settings hier ändern auf UserSettingsManager Klasse. [FormEinstellung.cs]
- 🔄 TourenListe Entwurf muss überarbeitet werden. [FormNeuerAuftrag.cs] - 🔄 TourenListe Entwurf muss überarbeitet werden. [FormNeuerAuftrag.cs]
- 🔄 UserSetting Properties eintragen und in EinstellungsScreen abrufen. [UserSettingsManager.cs] - 🔄 UserSetting Properties eintragen und in EinstellungsScreen abrufen. [UserSettingsManager.cs]
- 🔄 Warum der falsche Path? Immer mit \\ [UCFeedback.cs] - 🔄 Warum der falsche Path? Immer mit \\ [UCFeedback.cs]
- 🔄 Weitere Properties von oben hier zuweisen [UserSettingsManager.cs] - 🔄 Weitere Properties von oben hier zuweisen [UserSettingsManager.cs]
- 🔄 Wenn Auftrag abgeschlossen wird muss die Containerzahl sauber addiert werden. Kundenanzahl und Containeranzahl schmutzig darf nicht erhöht werden. [Tour.cs] - 🔄 Wenn Cancel... [FormShowUserControl.cs]
- 🔄 Zuweisung zu Fahrer muss geklärt werden. [Funktionen.cs] - 🔄 Zuweisung zu Fahrer muss geklärt werden. [Funktionen.cs]
Installation: 21.04.2026 14:34 Installation: 22.04.2026 13:33
===================================== =====================================