kleine Anpassungen

This commit is contained in:
Kilian Wirl 2026-04-01 15:57:08 +02:00
parent 20dad58b7a
commit 3c9fa8d411
8 changed files with 55 additions and 31 deletions

View File

@ -242,7 +242,7 @@ namespace Deckungsbeitrag
timer.Stop(); // Timer stoppen
Kunde kunde;
string zusatz = string.Empty;
if (string.IsNullOrEmpty(textBoxScan.Text)) { this.Cursor = Cursors.Default; return; }
if (int.TryParse(textBoxScan.Text, out _)) kunde = Kunde.GetKunde(textBoxScan.Text, null, null);
else
@ -255,6 +255,9 @@ namespace Deckungsbeitrag
else kunde = Kunde.GetKunde(null, null, textBoxScan.Text);
}
// Wenn kein Auftrag gefunden muss der Zettel zum Expedit gebracht werden. ÜBERGANGSZEIT FALLS AUFTRAG NICHT VON FAHRER ERFASST.
if (kunde == null) { MessageBox.Show("Der Auftrag konnte nicht gefunden werden. Bring die Karte zur Mirka.", "ACHTUNG", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }
List<Auftrag> auftList = Auftrag.FindeAuftragVonKunde(kunde, zusatz, null, (DateTime?)null);
if (auftList.Count == 0) { meldung.GetFehler(this, "Es konnte kein Auftrag zum eingescannten Kunden gefunden werden.\nBitte Informiere deinen Vorgesetzten."); return; }

View File

@ -192,12 +192,12 @@
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.Location = new System.Drawing.Point(3, 22);
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.Size = new System.Drawing.Size(287, 158);
this.tableLayoutPanelInfo.TabIndex = 0;
//
// labelAnmerkung
@ -207,7 +207,7 @@
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.Size = new System.Drawing.Size(281, 79);
this.labelAnmerkung.TabIndex = 0;
this.labelAnmerkung.Text = "label2";
//
@ -215,9 +215,9 @@
//
this.labelAufgabe.AutoSize = true;
this.labelAufgabe.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelAufgabe.Location = new System.Drawing.Point(3, 77);
this.labelAufgabe.Location = new System.Drawing.Point(3, 79);
this.labelAufgabe.Name = "labelAufgabe";
this.labelAufgabe.Size = new System.Drawing.Size(281, 77);
this.labelAufgabe.Size = new System.Drawing.Size(281, 79);
this.labelAufgabe.TabIndex = 1;
this.labelAufgabe.Text = "label3";
//
@ -270,9 +270,9 @@
// tabPageRampe
//
this.tabPageRampe.Controls.Add(this.objectListViewRampe);
this.tabPageRampe.Location = new System.Drawing.Point(4, 39);
this.tabPageRampe.Location = new System.Drawing.Point(4, 34);
this.tabPageRampe.Name = "tabPageRampe";
this.tabPageRampe.Size = new System.Drawing.Size(890, 579);
this.tabPageRampe.Size = new System.Drawing.Size(890, 584);
this.tabPageRampe.TabIndex = 3;
this.tabPageRampe.Text = "Rampe";
this.tabPageRampe.UseVisualStyleBackColor = true;
@ -291,7 +291,7 @@
this.objectListViewRampe.Location = new System.Drawing.Point(0, 0);
this.objectListViewRampe.Name = "objectListViewRampe";
this.objectListViewRampe.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu;
this.objectListViewRampe.Size = new System.Drawing.Size(890, 579);
this.objectListViewRampe.Size = new System.Drawing.Size(890, 584);
this.objectListViewRampe.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.objectListViewRampe.TabIndex = 2;
this.objectListViewRampe.TintSortColumn = true;
@ -304,14 +304,15 @@
this.objectListViewRampe.UseHotControls = false;
this.objectListViewRampe.UseHyperlinks = true;
this.objectListViewRampe.View = System.Windows.Forms.View.Details;
this.objectListViewRampe.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.objectListViewRampe_CellEditStarting);
//
// tabPageSonder
//
this.tabPageSonder.Controls.Add(this.objectListViewSonder);
this.tabPageSonder.Location = new System.Drawing.Point(4, 39);
this.tabPageSonder.Location = new System.Drawing.Point(4, 34);
this.tabPageSonder.Name = "tabPageSonder";
this.tabPageSonder.Padding = new System.Windows.Forms.Padding(3);
this.tabPageSonder.Size = new System.Drawing.Size(890, 579);
this.tabPageSonder.Size = new System.Drawing.Size(890, 584);
this.tabPageSonder.TabIndex = 1;
this.tabPageSonder.Text = "Sonderaufträge";
this.tabPageSonder.UseVisualStyleBackColor = true;
@ -329,7 +330,7 @@
this.objectListViewSonder.Location = new System.Drawing.Point(3, 3);
this.objectListViewSonder.Name = "objectListViewSonder";
this.objectListViewSonder.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu;
this.objectListViewSonder.Size = new System.Drawing.Size(884, 573);
this.objectListViewSonder.Size = new System.Drawing.Size(884, 578);
this.objectListViewSonder.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.objectListViewSonder.TabIndex = 2;
this.objectListViewSonder.TintSortColumn = true;
@ -347,10 +348,10 @@
// tabPageGeschaeft
//
this.tabPageGeschaeft.Controls.Add(this.objectListViewGeschaeft);
this.tabPageGeschaeft.Location = new System.Drawing.Point(4, 39);
this.tabPageGeschaeft.Location = new System.Drawing.Point(4, 34);
this.tabPageGeschaeft.Name = "tabPageGeschaeft";
this.tabPageGeschaeft.Padding = new System.Windows.Forms.Padding(3);
this.tabPageGeschaeft.Size = new System.Drawing.Size(890, 579);
this.tabPageGeschaeft.Size = new System.Drawing.Size(890, 584);
this.tabPageGeschaeft.TabIndex = 2;
this.tabPageGeschaeft.Text = "Geschäft";
this.tabPageGeschaeft.UseVisualStyleBackColor = true;
@ -369,7 +370,7 @@
this.objectListViewGeschaeft.Location = new System.Drawing.Point(3, 3);
this.objectListViewGeschaeft.Name = "objectListViewGeschaeft";
this.objectListViewGeschaeft.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu;
this.objectListViewGeschaeft.Size = new System.Drawing.Size(884, 573);
this.objectListViewGeschaeft.Size = new System.Drawing.Size(884, 578);
this.objectListViewGeschaeft.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.objectListViewGeschaeft.TabIndex = 2;
this.objectListViewGeschaeft.TintSortColumn = true;
@ -392,10 +393,10 @@
// tabPageAll
//
this.tabPageAll.Controls.Add(this.objectListViewAuftrag);
this.tabPageAll.Location = new System.Drawing.Point(4, 39);
this.tabPageAll.Location = new System.Drawing.Point(4, 34);
this.tabPageAll.Name = "tabPageAll";
this.tabPageAll.Padding = new System.Windows.Forms.Padding(3);
this.tabPageAll.Size = new System.Drawing.Size(890, 579);
this.tabPageAll.Size = new System.Drawing.Size(890, 584);
this.tabPageAll.TabIndex = 0;
this.tabPageAll.Text = "Aufträge heute";
this.tabPageAll.UseVisualStyleBackColor = true;
@ -414,7 +415,7 @@
this.objectListViewAuftrag.Location = new System.Drawing.Point(3, 3);
this.objectListViewAuftrag.Name = "objectListViewAuftrag";
this.objectListViewAuftrag.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu;
this.objectListViewAuftrag.Size = new System.Drawing.Size(884, 573);
this.objectListViewAuftrag.Size = new System.Drawing.Size(884, 578);
this.objectListViewAuftrag.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.objectListViewAuftrag.TabIndex = 1;
this.objectListViewAuftrag.TintSortColumn = true;
@ -457,9 +458,9 @@
// tabPageVorbereitet
//
this.tabPageVorbereitet.Controls.Add(this.objectListViewVorbereitet);
this.tabPageVorbereitet.Location = new System.Drawing.Point(4, 39);
this.tabPageVorbereitet.Location = new System.Drawing.Point(4, 34);
this.tabPageVorbereitet.Name = "tabPageVorbereitet";
this.tabPageVorbereitet.Size = new System.Drawing.Size(890, 579);
this.tabPageVorbereitet.Size = new System.Drawing.Size(890, 584);
this.tabPageVorbereitet.TabIndex = 4;
this.tabPageVorbereitet.Text = "Vorbereitet";
this.tabPageVorbereitet.UseVisualStyleBackColor = true;
@ -479,7 +480,7 @@
this.objectListViewVorbereitet.Location = new System.Drawing.Point(0, 0);
this.objectListViewVorbereitet.Name = "objectListViewVorbereitet";
this.objectListViewVorbereitet.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.Submenu;
this.objectListViewVorbereitet.Size = new System.Drawing.Size(890, 579);
this.objectListViewVorbereitet.Size = new System.Drawing.Size(890, 584);
this.objectListViewVorbereitet.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.objectListViewVorbereitet.TabIndex = 2;
this.objectListViewVorbereitet.TintSortColumn = true;

View File

@ -210,6 +210,11 @@ namespace Deckungsbeitrag
var model = objectListViewAuftrag.Objects.Cast<Auftrag>().FirstOrDefault(a => a.KundeID == kundeID);
if (model == null)
{
}
if (model != null)
{
objectListViewAuftrag.SelectedObject = model;
@ -219,6 +224,7 @@ namespace Deckungsbeitrag
}
else
{
FormShowGroupBox showGroupBox = new FormShowGroupBox("Auftrag Suchen", this.benutzer);
if (showGroupBox.ShowDialog() == DialogResult.OK)
{
@ -1257,5 +1263,18 @@ namespace Deckungsbeitrag
}
}
private void objectListViewRampe_CellEditStarting(object sender, CellEditEventArgs e)
{
ObjectListView olv = (ObjectListView)sender;
Auftrag _auftrag = e.RowObject as Auftrag;
if (_auftrag == null) return;
//Kunde _kunde = Kunde.GetKunde(null, _auftrag.KundeID, null);
_auftrag.Status = AuftragStatus.Gewaschen;
_auftrag.Save();
olv.RefreshObject(olv.SelectedObject);
e.Cancel = true;
}
}
}

View File

@ -613,11 +613,12 @@ namespace Deckungsbeitrag
int index = 0;
int artAnzahl = 1;
string anzahl = string.Empty;
DialogResult result;
UCArtikel uca;
var art = this.comboBoxArtikel.SelectedItem;
do
{
if (index > 0) MessageBox.Show("Bitte nur ganze Zahlen eingeben.", "ACHTUNG", MessageBoxButtons.OK, MessageBoxIcon.Warning);
if (index > 0) if (MessageBox.Show("Bitte nur ganze Zahlen eingeben.", "ACHTUNG", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.Cancel) return;
anzahl = Interaction.InputBox($"Wieviel Stück sollen geliefert werden?\n\nStück:", "Artikelanzahl", "");
index++;
} while (!int.TryParse(anzahl, out artAnzahl));

View File

@ -109,7 +109,7 @@ namespace DatenDB
{
// Listen für EXPEDIT
// Aufträge mit: alle Typen, mit Status "Gewaschen" und "Herrichten" fällig HEUTE + 2 Tage
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} AND liefertag < '{DateTime.Today.Date.AddDays(2)}' ORDER BY liefertag ASC";
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
{
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.Vorbereitet} ORDER BY liefertag ASC";
@ -203,7 +203,7 @@ namespace DatenDB
using (var command = new NpgsqlCommand())
{
command.Connection = conn;
command.CommandText = $"SELECT {COLUMNS} from {TABLE} where status <= {(int)aufgelegt} and liefertag >= CURRENT_DATE order by liefertag ASC and priority ASC";
command.CommandText = $"SELECT {COLUMNS} from {TABLE} where status <= {(int)aufgelegt} and liefertag >= CURRENT_DATE order by liefertag ASC, priority ASC";
using (var reader = await command.ExecuteReaderAsync())
{

View File

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
[assembly: AssemblyVersion("1.0.8.3")]
[assembly: AssemblyFileVersion("1.0.8.3")]
[assembly: AssemblyVersion("1.0.8.5")]
[assembly: AssemblyFileVersion("1.0.8.5")]

View File

@ -1867,15 +1867,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:SetupVerwaltung"
"ProductCode" = "8:{DD41E808-CC1B-435B-8010-93A1C9B3E97A}"
"PackageCode" = "8:{AB6183BA-817F-4160-A9FF-13F11152D881}"
"ProductCode" = "8:{2E803877-B3F2-470E-BB5C-2C0190319E33}"
"PackageCode" = "8:{45D39284-D030-4020-8642-9CD8A0718E93}"
"UpgradeCode" = "8:{2DC7CE56-8D1C-42EB-B326-2E887EBB7F5A}"
"AspNetVersion" = "8:"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.0.83"
"ProductVersion" = "8:1.0.85"
"Manufacturer" = "8:Kilian Wirl GmbH"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"

View File

@ -1,5 +1,5 @@
=====================================
NEUIGKEITEN - Version 1.0.8.3
NEUIGKEITEN - Version 1.0.8.5
=====================================
Build-Info:
@ -101,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: 30.03.2026 18:41
Installation: 01.04.2026 15:54
=====================================