diff --git a/AA-Forms/FormExpedit.cs b/AA-Forms/FormExpedit.cs index e4bb746..4e0505c 100644 --- a/AA-Forms/FormExpedit.cs +++ b/AA-Forms/FormExpedit.cs @@ -657,7 +657,7 @@ namespace Deckungsbeitrag break; } } - private void objectListViewAuftrag_ButtonClick(object sender, BrightIdeasSoftware.CellClickEventArgs e) + private void objectListViewAuftrag_ButtonClick(object sender, CellClickEventArgs e) { ObjectListView olv = (ObjectListView)sender; Auftrag _auftrag = (Auftrag)e.Model; @@ -920,6 +920,14 @@ namespace Deckungsbeitrag this.auftrag = (Auftrag)e.RowObject; if (e.Column.Text == "sauber") altecontclean = (int?)e.Value; if (!string.IsNullOrWhiteSpace(e.NewValue.ToString())) Save_Auftrag(this.auftrag, false); + + if (this.auftrag.Status == AuftragStatus.Vorbereitet & e.Value != e.NewValue) + { + if (MessageBox.Show("Die Containeranzahl wurde verändert. Möchtest du die Etiketten nochmals drucken?", "FRAGE", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + Funktionen.Etikett_Drucken(this.auftrag, nocont); + } + } //Neuladen_OLV(olv); } diff --git a/AA-Forms/FormListe.cs b/AA-Forms/FormListe.cs index 985ad76..200163a 100644 --- a/AA-Forms/FormListe.cs +++ b/AA-Forms/FormListe.cs @@ -133,10 +133,12 @@ namespace Deckungsbeitrag if (this.Kundenliste == null) this.Kundenliste = Kunde.GetTmpList(string.Empty, kndService); foreach (Kunde kunde in this.Kundenliste) { - ListViewItem item = new ListViewItem(); - item.Tag = kunde; - item.Text = kunde.KundeNummer; - item.SubItems.Add(kunde.Suchtext); + ListViewItem item = new ListViewItem + { + Tag = kunde, + Text = kunde.KundeNummer + }; + item.SubItems.Add(kunde.Suchtext); item.SubItems.Add(kunde.KundeName); item.SubItems.Add(kunde.Ort); diff --git a/AA-Forms/FormMain.cs b/AA-Forms/FormMain.cs index 06859b0..0a22e64 100644 --- a/AA-Forms/FormMain.cs +++ b/AA-Forms/FormMain.cs @@ -106,7 +106,7 @@ namespace Deckungsbeitrag this.labelSoftwareDatum.Text = @"N:\TECHNIK\Software\Wirl-Verwaltung\Setup\SetupVerwaltung*.msi"; this.labelArtikelDatum.Text = @"N:\TECHNIK\Software\Wirl-Verwaltung\Listen\Artikelkurzliste.csv"; - GetInventuren(); + if (this.benutzer.Rolle == BenutzerRolle.Admin || this.benutzer.Rolle == BenutzerRolle.Verwaltung || this.benutzer.Rolle == BenutzerRolle.Master) GetInventuren(); GetSaison(); if (this.groupBoxContAnz.Visible) @@ -1080,6 +1080,8 @@ namespace Deckungsbeitrag } string loadPath = Path.Combine(ConfigurationManager.AppSettings["DateiSavePfad"], "Listen\\Inventuren") ?? "Inventuren"; + if (ConfigurationManager.AppSettings["ConnectionString"].Split(';')[4].Split('=')[1] == "Test_Wirl") loadPath = Path.Combine(ConfigurationManager.AppSettings["DateiSavePfad"], "Test\\Inventuren") ?? "Inventuren"; + // Alle "Warten" Inventur Files auflisten. string[] invFiles = Directory.GetFiles(loadPath, "Warten-*.csv"); if (invFiles.Length == 0) return; diff --git a/AA-Forms/FormNeuerAuftrag.cs b/AA-Forms/FormNeuerAuftrag.cs index 7b538c6..e291c16 100644 --- a/AA-Forms/FormNeuerAuftrag.cs +++ b/AA-Forms/FormNeuerAuftrag.cs @@ -1,5 +1,7 @@ using DatenDB; +using Deckungsbeitrag.AA_Forms; using Deckungsbeitrag.AA_Klassen; +using Deckungsbeitrag.UserControls; using Microsoft.VisualBasic; using System; using System.Collections.Generic; @@ -10,16 +12,14 @@ using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; +using System.Reflection; using System.Runtime.InteropServices; using System.Text; +using System.Text.Json; using System.Threading.Tasks; using System.Web.Caching; using System.Windows.Forms; using System.Windows.Forms.VisualStyles; -using System.Text.Json; -using System.Reflection; -using Deckungsbeitrag.UserControls; -using Deckungsbeitrag.AA_Forms; namespace Deckungsbeitrag @@ -86,6 +86,7 @@ namespace Deckungsbeitrag // Kunde holen if (auftragtyp == AuftragTyp.Regelmäßig) kndService = "Geschäft"; + if (this.benutzer.Rolle == BenutzerRolle.Fahrer) kndService = "Geschäft"; this.kunde = Funktionen.Open_List(kndService); // ComboBox AuftragTyp wird geladen und richtiges Item selected. @@ -99,17 +100,7 @@ namespace Deckungsbeitrag if (Saison.Bezeichnung == "Winter") nextLiefertag = Funktionen.GetNextLiefertag((Liefertage)this.kunde.WinterLieferRhythmus); if (Saison.Bezeichnung == "Zwischensaison") { - - //TODO: UCTourenplan einbauen und Daten übernehmen... - FormShowUserControl showUserControl = new FormShowUserControl("Tourenplan", this.benutzer); - if (showUserControl.ShowDialog() == DialogResult.OK) - { - var data = showUserControl.lieferDaten; - nextLiefertag = data.datum; - touren = data.touren; - tour = data.text; - } - else + if (!ShowTourenplan()) { meldung.GetInfo(this, "Achtung Liefertag kann falsch sein, da Zwischensaison ist.", false); DateTime datum = DateTime.Today; @@ -124,7 +115,6 @@ namespace Deckungsbeitrag } nextLiefertag = datum; } - } } comboBoxTyp_Load(); @@ -145,7 +135,19 @@ namespace Deckungsbeitrag } - + private bool ShowTourenplan() + { + FormShowUserControl showUserControl = new FormShowUserControl("Tourenplan", this.benutzer, this.kunde); + if (showUserControl.ShowDialog() == DialogResult.OK) + { + var data = showUserControl.lieferDaten; + nextLiefertag = data.datum; + touren = data.touren; + tour = data.text; + return true; + } + else return false; + } /// /// Kundendaten Liefertag werden eingefügt. /// @@ -157,8 +159,14 @@ namespace Deckungsbeitrag this.dTPLiefertag.Value = nextLiefertag; this.textBoxCont.Text = "0"; + if (this.benutzer.Rolle == BenutzerRolle.Fahrer) + { + if (this.benutzer.Tour == tour) this.comboBoxFahrer.SelectedItem = this.comboBoxFahrer.Items.Cast().FirstOrDefault(t => t.Tour == tour); + else this.comboBoxFahrer.SelectedItem = this.comboBoxFahrer.Items.Cast().FirstOrDefault(t => t.Tour == tour); + } + else this.comboBoxFahrer.SelectedIndex = -1; + dTPLiefertag_Leave(this.dTPLiefertag, EventArgs.Empty); - //textBoxCont_TextChanged(this.textBoxCont, EventArgs.Empty); } private void comboBoxTyp_Load() { @@ -191,20 +199,11 @@ namespace Deckungsbeitrag } private void comboBoxFahrer_Load() { - if (touren == null) - { - List benutzerliste = Benutzer.GetFahrerList(); - this.comboBoxFahrer.DataSource = benutzerliste; - this.comboBoxFahrer.DisplayMember = "BenutzerName"; + List benutzerliste = Benutzer.GetFahrerList(); + this.comboBoxFahrer.DataSource = benutzerliste; + if (string.IsNullOrWhiteSpace(tour)) this.comboBoxFahrer.DisplayMember = "BenutzerName"; + else this.comboBoxFahrer.DisplayMember = "Tour"; - if (this.benutzer.Rolle == BenutzerRolle.Fahrer) this.comboBoxFahrer.SelectedItem = this.benutzer; - else this.comboBoxFahrer.SelectedIndex = -1; - } - else - { - this.comboBoxFahrer.DataSource = touren; - this.comboBoxFahrer.SelectedText = tour; - } } /// @@ -325,7 +324,15 @@ namespace Deckungsbeitrag { this.Auftrag = null; this.kunde = Funktionen.KundenAuswahl(); - if (this.kunde != null) { DatenLaden(); return; } + if (this.kunde != null) + { + if (ShowTourenplan()) + { + DatenLaden(); + return; + } + + } } this.DialogResult = DialogResult.OK; @@ -456,10 +463,17 @@ namespace Deckungsbeitrag { this.Auftrag = null; this.kunde = Funktionen.KundenAuswahl(); - if (this.kunde != null) { DatenLaden(); return; } + if (this.kunde != null) + { + if (ShowTourenplan()) + { + DatenLaden(); + return; + } + else this.Close(); + } else this.Close(); } - } private void Container_Click(object sender, EventArgs e) @@ -617,12 +631,13 @@ namespace Deckungsbeitrag { if (((ComboBox)sender).SelectedIndex == -1) return; if (((Benutzer)((ComboBox)sender).SelectedItem).BenutzerID == this.benutzer.BenutzerID) return; - if (this.benutzer.Rolle == BenutzerRolle.Verwaltung || this.benutzer.Rolle == BenutzerRolle.Admin) 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; } else { eingabe = Interaction.InputBox("Warum möchtest du den Auftrag einem anderen Fahrer zuteilen?\n\nGrund:", "Sonderzuteilung", ""); - eingabe += " / "; + if (string.IsNullOrWhiteSpace(eingabe)) e.Cancel = true; + else eingabe += " / "; } } diff --git a/AA-Forms/FormShowUserControl.cs b/AA-Forms/FormShowUserControl.cs index adcdd58..d261f3f 100644 --- a/AA-Forms/FormShowUserControl.cs +++ b/AA-Forms/FormShowUserControl.cs @@ -54,7 +54,13 @@ namespace Deckungsbeitrag.AA_Forms { this.auftragliste = auftragListe; } - + + public FormShowUserControl(string groupBox, Benutzer user, Kunde kunde) : this(groupBox, user) + { + this.Text = string.IsNullOrWhiteSpace(kunde.Suchtext) ? kunde.KundeName : kunde.Suchtext; + this.Text += " " + kunde.Ort; + } + private void FormShowUserControl_Load(object sender, EventArgs e) { switch (this.gb) @@ -96,12 +102,11 @@ namespace Deckungsbeitrag.AA_Forms private void FormShowUserControl_FormClosing(object sender, FormClosingEventArgs e) { var form = sender as Form; - if (this.benutzer.Rolle == BenutzerRolle.Expedit) this.DialogResult = DialogResult.OK; - else + if (this.benutzer.Rolle != BenutzerRolle.Expedit) { UCTourenplan uc = (UCTourenplan)form.Controls[0]; lieferDaten = uc.lieferDaten; - this.DialogResult = DialogResult.OK; + //this.DialogResult = DialogResult.OK; } } } diff --git a/UserControls/UCTourenplan.Designer.cs b/UserControls/UCTourenplan.Designer.cs index d1c8007..01118a1 100644 --- a/UserControls/UCTourenplan.Designer.cs +++ b/UserControls/UCTourenplan.Designer.cs @@ -118,311 +118,336 @@ this.tableLPTourenplan.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.tableLPTourenplan.Name = "tableLPTourenplan"; this.tableLPTourenplan.RowCount = 6; - this.tableLPTourenplan.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F)); + this.tableLPTourenplan.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 56F)); this.tableLPTourenplan.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.tableLPTourenplan.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.tableLPTourenplan.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.tableLPTourenplan.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.tableLPTourenplan.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLPTourenplan.Size = new System.Drawing.Size(1280, 715); + this.tableLPTourenplan.Size = new System.Drawing.Size(1440, 894); this.tableLPTourenplan.TabIndex = 0; // // button25 // + this.button25.BackColor = System.Drawing.Color.Lime; this.button25.Dock = System.Windows.Forms.DockStyle.Fill; - this.button25.Location = new System.Drawing.Point(1048, 583); + this.button25.Location = new System.Drawing.Point(1182, 726); this.button25.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button25.Name = "button25"; - this.button25.Size = new System.Drawing.Size(229, 130); + this.button25.Size = new System.Drawing.Size(255, 166); this.button25.TabIndex = 57; this.button25.Text = "button25"; - this.button25.UseVisualStyleBackColor = true; + this.button25.UseVisualStyleBackColor = false; this.button25.Click += new System.EventHandler(this.Button_Click); // // button24 // + this.button24.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); this.button24.Dock = System.Windows.Forms.DockStyle.Fill; - this.button24.Location = new System.Drawing.Point(815, 583); + this.button24.Location = new System.Drawing.Point(921, 726); this.button24.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button24.Name = "button24"; - this.button24.Size = new System.Drawing.Size(227, 130); + this.button24.Size = new System.Drawing.Size(255, 166); this.button24.TabIndex = 56; this.button24.Text = "button24"; - this.button24.UseVisualStyleBackColor = true; + this.button24.UseVisualStyleBackColor = false; this.button24.Click += new System.EventHandler(this.Button_Click); // // button23 // + this.button23.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); this.button23.Dock = System.Windows.Forms.DockStyle.Fill; - this.button23.Location = new System.Drawing.Point(582, 583); + this.button23.Location = new System.Drawing.Point(660, 726); this.button23.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button23.Name = "button23"; - this.button23.Size = new System.Drawing.Size(227, 130); + this.button23.Size = new System.Drawing.Size(255, 166); this.button23.TabIndex = 55; this.button23.Text = "button23"; - this.button23.UseVisualStyleBackColor = true; + this.button23.UseVisualStyleBackColor = false; this.button23.Click += new System.EventHandler(this.Button_Click); // // button22 // + this.button22.BackColor = System.Drawing.Color.Lime; this.button22.Dock = System.Windows.Forms.DockStyle.Fill; - this.button22.Location = new System.Drawing.Point(349, 583); + this.button22.Location = new System.Drawing.Point(399, 726); this.button22.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button22.Name = "button22"; - this.button22.Size = new System.Drawing.Size(227, 130); + this.button22.Size = new System.Drawing.Size(255, 166); this.button22.TabIndex = 54; this.button22.Text = "button22"; - this.button22.UseVisualStyleBackColor = true; + this.button22.UseVisualStyleBackColor = false; this.button22.Click += new System.EventHandler(this.Button_Click); // // button21 // + this.button21.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); this.button21.Dock = System.Windows.Forms.DockStyle.Fill; - this.button21.Location = new System.Drawing.Point(116, 583); + this.button21.Location = new System.Drawing.Point(138, 726); this.button21.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button21.Name = "button21"; - this.button21.Size = new System.Drawing.Size(227, 130); + this.button21.Size = new System.Drawing.Size(255, 166); this.button21.TabIndex = 53; this.button21.Text = "button21"; - this.button21.UseVisualStyleBackColor = true; + this.button21.UseVisualStyleBackColor = false; this.button21.Click += new System.EventHandler(this.Button_Click); // // button20 // + this.button20.BackColor = System.Drawing.Color.Yellow; this.button20.Dock = System.Windows.Forms.DockStyle.Fill; - this.button20.Location = new System.Drawing.Point(1048, 449); + this.button20.Location = new System.Drawing.Point(1182, 559); this.button20.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button20.Name = "button20"; - this.button20.Size = new System.Drawing.Size(229, 130); + this.button20.Size = new System.Drawing.Size(255, 163); this.button20.TabIndex = 52; this.button20.Text = "button20"; - this.button20.UseVisualStyleBackColor = true; + this.button20.UseVisualStyleBackColor = false; this.button20.Click += new System.EventHandler(this.Button_Click); // // button19 // + this.button19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); this.button19.Dock = System.Windows.Forms.DockStyle.Fill; - this.button19.Location = new System.Drawing.Point(815, 449); + this.button19.Location = new System.Drawing.Point(921, 559); this.button19.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button19.Name = "button19"; - this.button19.Size = new System.Drawing.Size(227, 130); + this.button19.Size = new System.Drawing.Size(255, 163); this.button19.TabIndex = 51; this.button19.Text = "button19"; - this.button19.UseVisualStyleBackColor = true; + this.button19.UseVisualStyleBackColor = false; this.button19.Click += new System.EventHandler(this.Button_Click); // // button18 // + this.button18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); this.button18.Dock = System.Windows.Forms.DockStyle.Fill; - this.button18.Location = new System.Drawing.Point(582, 449); + this.button18.Location = new System.Drawing.Point(660, 559); this.button18.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button18.Name = "button18"; - this.button18.Size = new System.Drawing.Size(227, 130); + this.button18.Size = new System.Drawing.Size(255, 163); this.button18.TabIndex = 50; this.button18.Text = "button18"; - this.button18.UseVisualStyleBackColor = true; + this.button18.UseVisualStyleBackColor = false; this.button18.Click += new System.EventHandler(this.Button_Click); // // button17 // + this.button17.BackColor = System.Drawing.Color.Yellow; this.button17.Dock = System.Windows.Forms.DockStyle.Fill; - this.button17.Location = new System.Drawing.Point(349, 449); + this.button17.Location = new System.Drawing.Point(399, 559); this.button17.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button17.Name = "button17"; - this.button17.Size = new System.Drawing.Size(227, 130); + this.button17.Size = new System.Drawing.Size(255, 163); this.button17.TabIndex = 49; this.button17.Text = "button17"; - this.button17.UseVisualStyleBackColor = true; + this.button17.UseVisualStyleBackColor = false; this.button17.Click += new System.EventHandler(this.Button_Click); // // button16 // + this.button16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); this.button16.Dock = System.Windows.Forms.DockStyle.Fill; - this.button16.Location = new System.Drawing.Point(116, 449); + this.button16.Location = new System.Drawing.Point(138, 559); this.button16.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button16.Name = "button16"; - this.button16.Size = new System.Drawing.Size(227, 130); + this.button16.Size = new System.Drawing.Size(255, 163); this.button16.TabIndex = 48; this.button16.Text = "button16"; - this.button16.UseVisualStyleBackColor = true; + this.button16.UseVisualStyleBackColor = false; this.button16.Click += new System.EventHandler(this.Button_Click); // // button15 // + this.button15.BackColor = System.Drawing.Color.CornflowerBlue; this.button15.Dock = System.Windows.Forms.DockStyle.Fill; - this.button15.Location = new System.Drawing.Point(1048, 315); + this.button15.Location = new System.Drawing.Point(1182, 392); this.button15.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button15.Name = "button15"; - this.button15.Size = new System.Drawing.Size(229, 130); + this.button15.Size = new System.Drawing.Size(255, 163); this.button15.TabIndex = 47; this.button15.Text = "button15"; - this.button15.UseVisualStyleBackColor = true; + this.button15.UseVisualStyleBackColor = false; this.button15.Click += new System.EventHandler(this.Button_Click); // // button14 // + this.button14.BackColor = System.Drawing.Color.LightSkyBlue; this.button14.Dock = System.Windows.Forms.DockStyle.Fill; - this.button14.Location = new System.Drawing.Point(815, 315); + this.button14.Location = new System.Drawing.Point(921, 392); this.button14.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button14.Name = "button14"; - this.button14.Size = new System.Drawing.Size(227, 130); + this.button14.Size = new System.Drawing.Size(255, 163); this.button14.TabIndex = 46; this.button14.Text = "button14"; - this.button14.UseVisualStyleBackColor = true; + this.button14.UseVisualStyleBackColor = false; this.button14.Click += new System.EventHandler(this.Button_Click); // // button13 // + this.button13.BackColor = System.Drawing.Color.LightBlue; this.button13.Dock = System.Windows.Forms.DockStyle.Fill; - this.button13.Location = new System.Drawing.Point(582, 315); + this.button13.Location = new System.Drawing.Point(660, 392); this.button13.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button13.Name = "button13"; - this.button13.Size = new System.Drawing.Size(227, 130); + this.button13.Size = new System.Drawing.Size(255, 163); this.button13.TabIndex = 45; this.button13.Text = "button13"; - this.button13.UseVisualStyleBackColor = true; + this.button13.UseVisualStyleBackColor = false; this.button13.Click += new System.EventHandler(this.Button_Click); // // button12 // + this.button12.BackColor = System.Drawing.Color.CornflowerBlue; this.button12.Dock = System.Windows.Forms.DockStyle.Fill; - this.button12.Location = new System.Drawing.Point(349, 315); + this.button12.Location = new System.Drawing.Point(399, 392); this.button12.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button12.Name = "button12"; - this.button12.Size = new System.Drawing.Size(227, 130); + this.button12.Size = new System.Drawing.Size(255, 163); this.button12.TabIndex = 44; this.button12.Text = "button12"; - this.button12.UseVisualStyleBackColor = true; + this.button12.UseVisualStyleBackColor = false; this.button12.Click += new System.EventHandler(this.Button_Click); // // button11 // + this.button11.BackColor = System.Drawing.Color.LightSkyBlue; this.button11.Dock = System.Windows.Forms.DockStyle.Fill; - this.button11.Location = new System.Drawing.Point(116, 315); + this.button11.Location = new System.Drawing.Point(138, 392); this.button11.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button11.Name = "button11"; - this.button11.Size = new System.Drawing.Size(227, 130); + this.button11.Size = new System.Drawing.Size(255, 163); this.button11.TabIndex = 43; this.button11.Text = "button11"; - this.button11.UseVisualStyleBackColor = true; + this.button11.UseVisualStyleBackColor = false; this.button11.Click += new System.EventHandler(this.Button_Click); // // button10 // + this.button10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); this.button10.Dock = System.Windows.Forms.DockStyle.Fill; - this.button10.Location = new System.Drawing.Point(1048, 181); + this.button10.Location = new System.Drawing.Point(1182, 225); this.button10.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button10.Name = "button10"; - this.button10.Size = new System.Drawing.Size(229, 130); + this.button10.Size = new System.Drawing.Size(255, 163); this.button10.TabIndex = 42; this.button10.Text = "button10"; - this.button10.UseVisualStyleBackColor = true; + this.button10.UseVisualStyleBackColor = false; this.button10.Click += new System.EventHandler(this.Button_Click); // // button9 // + this.button9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128))))); this.button9.Dock = System.Windows.Forms.DockStyle.Fill; - this.button9.Location = new System.Drawing.Point(815, 181); + this.button9.Location = new System.Drawing.Point(921, 225); this.button9.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button9.Name = "button9"; - this.button9.Size = new System.Drawing.Size(227, 130); + this.button9.Size = new System.Drawing.Size(255, 163); this.button9.TabIndex = 41; this.button9.Text = "button9"; - this.button9.UseVisualStyleBackColor = true; + this.button9.UseVisualStyleBackColor = false; this.button9.Click += new System.EventHandler(this.Button_Click); // // button8 // + this.button8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); this.button8.Dock = System.Windows.Forms.DockStyle.Fill; - this.button8.Location = new System.Drawing.Point(582, 181); + this.button8.Location = new System.Drawing.Point(660, 225); this.button8.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button8.Name = "button8"; - this.button8.Size = new System.Drawing.Size(227, 130); + this.button8.Size = new System.Drawing.Size(255, 163); this.button8.TabIndex = 40; this.button8.Text = "button8"; - this.button8.UseVisualStyleBackColor = true; + this.button8.UseVisualStyleBackColor = false; this.button8.Click += new System.EventHandler(this.Button_Click); // // button7 // + this.button7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); this.button7.Dock = System.Windows.Forms.DockStyle.Fill; - this.button7.Location = new System.Drawing.Point(349, 181); + this.button7.Location = new System.Drawing.Point(399, 225); this.button7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button7.Name = "button7"; - this.button7.Size = new System.Drawing.Size(227, 130); + this.button7.Size = new System.Drawing.Size(255, 163); this.button7.TabIndex = 39; this.button7.Text = "button7"; - this.button7.UseVisualStyleBackColor = true; + this.button7.UseVisualStyleBackColor = false; this.button7.Click += new System.EventHandler(this.Button_Click); // // button6 // + this.button6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128))))); this.button6.Dock = System.Windows.Forms.DockStyle.Fill; - this.button6.Location = new System.Drawing.Point(116, 181); + this.button6.Location = new System.Drawing.Point(138, 225); this.button6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button6.Name = "button6"; - this.button6.Size = new System.Drawing.Size(227, 130); + this.button6.Size = new System.Drawing.Size(255, 163); this.button6.TabIndex = 38; this.button6.Text = "button6"; - this.button6.UseVisualStyleBackColor = true; + this.button6.UseVisualStyleBackColor = false; this.button6.Click += new System.EventHandler(this.Button_Click); // // button5 // + this.button5.BackColor = System.Drawing.Color.Gray; this.button5.Dock = System.Windows.Forms.DockStyle.Fill; - this.button5.Location = new System.Drawing.Point(1048, 47); + this.button5.Location = new System.Drawing.Point(1182, 58); this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button5.Name = "button5"; - this.button5.Size = new System.Drawing.Size(229, 130); + this.button5.Size = new System.Drawing.Size(255, 163); this.button5.TabIndex = 37; this.button5.Text = "button5"; - this.button5.UseVisualStyleBackColor = true; + this.button5.UseVisualStyleBackColor = false; this.button5.Click += new System.EventHandler(this.Button_Click); // // button4 // + this.button4.BackColor = System.Drawing.Color.Silver; this.button4.Dock = System.Windows.Forms.DockStyle.Fill; - this.button4.Location = new System.Drawing.Point(815, 47); + this.button4.Location = new System.Drawing.Point(921, 58); this.button4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(227, 130); + this.button4.Size = new System.Drawing.Size(255, 163); this.button4.TabIndex = 36; this.button4.Text = "button4"; - this.button4.UseVisualStyleBackColor = true; + this.button4.UseVisualStyleBackColor = false; this.button4.Click += new System.EventHandler(this.Button_Click); // // button3 // + this.button3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.button3.Dock = System.Windows.Forms.DockStyle.Fill; - this.button3.Location = new System.Drawing.Point(582, 47); + this.button3.Location = new System.Drawing.Point(660, 58); this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(227, 130); + this.button3.Size = new System.Drawing.Size(255, 163); this.button3.TabIndex = 35; this.button3.Text = "button3"; - this.button3.UseVisualStyleBackColor = true; + this.button3.UseVisualStyleBackColor = false; this.button3.Click += new System.EventHandler(this.Button_Click); // // button2 // + this.button2.BackColor = System.Drawing.Color.Gray; this.button2.Dock = System.Windows.Forms.DockStyle.Fill; - this.button2.Location = new System.Drawing.Point(349, 47); + this.button2.Location = new System.Drawing.Point(399, 58); this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(227, 130); + this.button2.Size = new System.Drawing.Size(255, 163); this.button2.TabIndex = 34; this.button2.Text = "button2"; - this.button2.UseVisualStyleBackColor = true; + this.button2.UseVisualStyleBackColor = false; this.button2.Click += new System.EventHandler(this.Button_Click); // // label25 // this.label25.AutoSize = true; + this.label25.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); this.label25.Dock = System.Windows.Forms.DockStyle.Fill; this.label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 19.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label25.Location = new System.Drawing.Point(3, 581); + this.label25.Location = new System.Drawing.Point(3, 724); this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(107, 134); + this.label25.Size = new System.Drawing.Size(129, 170); this.label25.TabIndex = 31; this.label25.Text = "Tour1"; this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -430,11 +455,12 @@ // label19 // this.label19.AutoSize = true; + this.label19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); this.label19.Dock = System.Windows.Forms.DockStyle.Fill; this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 19.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label19.Location = new System.Drawing.Point(3, 447); + this.label19.Location = new System.Drawing.Point(3, 557); this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(107, 134); + this.label19.Size = new System.Drawing.Size(129, 167); this.label19.TabIndex = 25; this.label19.Text = "Tour1"; this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -442,11 +468,12 @@ // label13 // this.label13.AutoSize = true; + this.label13.BackColor = System.Drawing.Color.LightBlue; this.label13.Dock = System.Windows.Forms.DockStyle.Fill; this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 19.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label13.Location = new System.Drawing.Point(3, 313); + this.label13.Location = new System.Drawing.Point(3, 390); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(107, 134); + this.label13.Size = new System.Drawing.Size(129, 167); this.label13.TabIndex = 19; this.label13.Text = "Tour1"; this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -454,11 +481,12 @@ // label7 // this.label7.AutoSize = true; + this.label7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); this.label7.Dock = System.Windows.Forms.DockStyle.Fill; this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 19.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label7.Location = new System.Drawing.Point(3, 179); + this.label7.Location = new System.Drawing.Point(3, 223); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(107, 134); + this.label7.Size = new System.Drawing.Size(129, 167); this.label7.TabIndex = 13; this.label7.Text = "Tour1"; this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -468,9 +496,9 @@ this.labelFR.AutoSize = true; this.labelFR.Dock = System.Windows.Forms.DockStyle.Fill; this.labelFR.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelFR.Location = new System.Drawing.Point(1048, 0); + this.labelFR.Location = new System.Drawing.Point(1182, 0); this.labelFR.Name = "labelFR"; - this.labelFR.Size = new System.Drawing.Size(229, 45); + this.labelFR.Size = new System.Drawing.Size(255, 56); this.labelFR.TabIndex = 5; this.labelFR.Text = "FR"; this.labelFR.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -480,9 +508,9 @@ this.labelDO.AutoSize = true; this.labelDO.Dock = System.Windows.Forms.DockStyle.Fill; this.labelDO.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelDO.Location = new System.Drawing.Point(815, 0); + this.labelDO.Location = new System.Drawing.Point(921, 0); this.labelDO.Name = "labelDO"; - this.labelDO.Size = new System.Drawing.Size(227, 45); + this.labelDO.Size = new System.Drawing.Size(255, 56); this.labelDO.TabIndex = 4; this.labelDO.Text = "DO"; this.labelDO.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -492,9 +520,9 @@ this.labelMI.AutoSize = true; this.labelMI.Dock = System.Windows.Forms.DockStyle.Fill; this.labelMI.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelMI.Location = new System.Drawing.Point(582, 0); + this.labelMI.Location = new System.Drawing.Point(660, 0); this.labelMI.Name = "labelMI"; - this.labelMI.Size = new System.Drawing.Size(227, 45); + this.labelMI.Size = new System.Drawing.Size(255, 56); this.labelMI.TabIndex = 3; this.labelMI.Text = "MI"; this.labelMI.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -504,9 +532,9 @@ this.labelDI.AutoSize = true; this.labelDI.Dock = System.Windows.Forms.DockStyle.Fill; this.labelDI.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelDI.Location = new System.Drawing.Point(349, 0); + this.labelDI.Location = new System.Drawing.Point(399, 0); this.labelDI.Name = "labelDI"; - this.labelDI.Size = new System.Drawing.Size(227, 45); + this.labelDI.Size = new System.Drawing.Size(255, 56); this.labelDI.TabIndex = 2; this.labelDI.Text = "DI"; this.labelDI.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -516,9 +544,9 @@ this.labelMO.AutoSize = true; this.labelMO.Dock = System.Windows.Forms.DockStyle.Fill; this.labelMO.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelMO.Location = new System.Drawing.Point(116, 0); + this.labelMO.Location = new System.Drawing.Point(138, 0); this.labelMO.Name = "labelMO"; - this.labelMO.Size = new System.Drawing.Size(227, 45); + this.labelMO.Size = new System.Drawing.Size(255, 56); this.labelMO.TabIndex = 0; this.labelMO.Text = "MO"; this.labelMO.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -526,25 +554,27 @@ // labelTour1 // this.labelTour1.AutoSize = true; + this.labelTour1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.labelTour1.Dock = System.Windows.Forms.DockStyle.Fill; this.labelTour1.Font = new System.Drawing.Font("Microsoft Sans Serif", 19.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelTour1.Location = new System.Drawing.Point(3, 45); + this.labelTour1.Location = new System.Drawing.Point(3, 56); this.labelTour1.Name = "labelTour1"; - this.labelTour1.Size = new System.Drawing.Size(107, 134); + this.labelTour1.Size = new System.Drawing.Size(129, 167); this.labelTour1.TabIndex = 6; this.labelTour1.Text = "Tour1"; this.labelTour1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // button1 // + this.button1.BackColor = System.Drawing.Color.Silver; this.button1.Dock = System.Windows.Forms.DockStyle.Fill; - this.button1.Location = new System.Drawing.Point(116, 47); + this.button1.Location = new System.Drawing.Point(138, 58); this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(227, 130); + this.button1.Size = new System.Drawing.Size(255, 163); this.button1.TabIndex = 32; this.button1.Text = "button1"; - this.button1.UseVisualStyleBackColor = true; + this.button1.UseVisualStyleBackColor = false; this.button1.Click += new System.EventHandler(this.Button_Click); // // labelZusatz @@ -553,19 +583,19 @@ this.labelZusatz.Dock = System.Windows.Forms.DockStyle.Fill; this.labelZusatz.Location = new System.Drawing.Point(3, 0); this.labelZusatz.Name = "labelZusatz"; - this.labelZusatz.Size = new System.Drawing.Size(107, 45); + this.labelZusatz.Size = new System.Drawing.Size(129, 56); this.labelZusatz.TabIndex = 33; this.labelZusatz.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // UCTourenplan // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.tableLPTourenplan); this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Name = "UCTourenplan"; - this.Size = new System.Drawing.Size(1280, 715); + this.Size = new System.Drawing.Size(1440, 894); this.Load += new System.EventHandler(this.UCTourenplan_Load); this.tableLPTourenplan.ResumeLayout(false); this.tableLPTourenplan.PerformLayout(); diff --git a/UserControls/UCTourenplan.cs b/UserControls/UCTourenplan.cs index c7530bf..0c65828 100644 --- a/UserControls/UCTourenplan.cs +++ b/UserControls/UCTourenplan.cs @@ -128,7 +128,11 @@ namespace Deckungsbeitrag.UserControls string tour = touren[row - 1]; lieferDaten = (liefertag, tour, touren); - this.ParentForm?.Close(); + if (this.ParentForm != null) + { + this.ParentForm.DialogResult = DialogResult.OK; + this.ParentForm?.Close(); + } } } } diff --git a/Verwaltung_ReadMe.txt b/Verwaltung_ReadMe.txt index 09d4b21..4907634 100644 --- a/Verwaltung_ReadMe.txt +++ b/Verwaltung_ReadMe.txt @@ -5,7 +5,7 @@ NEUIGKEITEN - Version 1.0.9.2 Build-Info: - Build-Typ: Release Build - Erledigte TODOs: 19 -- Offene TODOs: 44 +- Offene TODOs: 43 - Install-Reminders: 4 - Changes: 15 @@ -56,7 +56,7 @@ Build-Info: - ✅ : Wenn RegAuftrag wird als augeliefert markiert, wird dieser automatisch neu erstellt laut hinterlegtem Rhythmus. [FormMain.cs] -=== 🔄 OFFENE TODOs (44) === +=== 🔄 OFFENE TODOs (43) === - 🔄 !!Ü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. [Tour.cs] - 🔄 Alle Icons in einer Spalte anzeigen? I für Anmerkung und ! für Aufgabe?? [FormExpedit.cs] @@ -92,7 +92,6 @@ Build-Info: - 🔄 Speichern etc. durchgehen und adaptieren [FormAuftragDetail.cs] - 🔄 Standverminderung und Standerhöhung mit einem Aufruf (Standveränderung?) Bei Verminderung -Zahlen sonst Plus. [FormAuftragDetail.cs] - 🔄 TourenListe Entwurf muss überarbeitet werden. [FormNeuerAuftrag.cs] -- 🔄 UCTourenplan einbauen und Daten übernehmen... [FormNeuerAuftrag.cs] - 🔄 Umbau in Switch. [FormWSVerfolgung.cs] - 🔄 UserSetting Properties eintragen und in EinstellungsScreen abrufen. [UserSettingsManager.cs] - 🔄 Warum der falsche Path? Immer mit \\ [UCFeedback.cs] @@ -102,5 +101,5 @@ Build-Info: - 🔄 Wenn Nachwäsche oder Müllwäsche alle Artikel anzeigen. [FormFehlmengeCount.cs] - 🔄 Zuweisung zu Fahrer muss geklärt werden. [Funktionen.cs] -Installation: 15.04.2026 17:23 +Installation: 16.04.2026 11:03 =====================================