Tabletänderungen speichern und in Tablet starten

This commit is contained in:
Kilian Wirl 2026-04-28 08:46:15 +02:00
parent dbfd17bad3
commit fbd9c63e25
14 changed files with 61 additions and 36 deletions

View File

@ -199,7 +199,7 @@ namespace Deckungsbeitrag
{
if (i > 0)
{
Artikel art = Artikel.GetArtikel(null, ((NachwaescheArtikelData)e.RowObject).ArtikelID);
Artikel art = Artikel.GetArtikel(((View_Artikel_Nachwaesche)e.RowObject).ArtNr, null);
ArtikelNachwaesche artnw = ArtikelNachwaesche.FindeDatensatz(art.ArtikelID, timestamp);
if (col.Text == "Sauber")

View File

@ -221,10 +221,26 @@ namespace Deckungsbeitrag
{
KundeArtikel kndart = KundeArtikel.GetItem(kvp.Key);
if (kndart.Reklamation != kvp.Value[0])
{
kndart.Reklamation = kvp.Value[0];
kndart.ReklamationBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
}
if (kndart.Fehlmenge != kvp.Value[1])
{
kndart.Fehlmenge = kvp.Value[1];
kndart.FehlmengeBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
}
if (kndart.Stand != kvp.Value[2])
{
kndart.Stand = kvp.Value[2];
kndart.StandBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
}
if (kndart.Korrektur != kvp.Value[3])
{
kndart.Korrektur = kvp.Value[3];
kndart.KorrekturBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
}
kndart.Save();
}

View File

@ -433,6 +433,14 @@ namespace Deckungsbeitrag
return;
}
// Typ-Tooltip
if (e.Column.Text == "Typ" && e.Model is View_Auftrag_Expedit expeditTyp)
{
var auftrag = Auftrag.GetAuftrag(expeditTyp.AuftragID);
if (e.SubItem.Text == "Laufzettel") e.Text = auftrag.ZusatzInfo;
return;
}
// Fahrer-Tooltip Typfix: hier passt View_Auftrag_Expedit besser
if (e.Column.Text == "Fahrer" && e.Model is View_Auftrag_Expedit expeditFahrer)
{

View File

@ -530,7 +530,7 @@ namespace Deckungsbeitrag
private void TextBoxAnmerkung_Leave(object sender, EventArgs e)
{
if (textBoxAnmerkung.TextLength > 0) if (meldung.GetFrage(this, "Möchtest du die Anmerkung speichern?", false) == DialogResult.Yes) { kunde.Anmerkung = textBoxAnmerkung.Text; }
if (meldung.GetFrage(this, "Möchtest du die Anmerkung speichern?", false) == DialogResult.Yes) { kunde.Anmerkung = textBoxAnmerkung.Text; }
}
private void NumericUpDownAufgabeCount_Leave(object sender, EventArgs e)
{

View File

@ -1458,6 +1458,7 @@ namespace Deckungsbeitrag
this.ClientSize = new System.Drawing.Size(1708, 848);
this.Controls.Add(this.toolStripMenu);
this.Controls.Add(this.panelMain);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.HelpButton = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
@ -1470,8 +1471,7 @@ namespace Deckungsbeitrag
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormMain_FormClosing);
this.Load += new System.EventHandler(this.FormMain_Load);
this.Shown += new System.EventHandler(this.FormMain_Shown);
this.ResizeBegin += new System.EventHandler(this.FormMain_ResizeBegin);
this.Resize += new System.EventHandler(this.FormMain_Resize);
this.SizeChanged += new System.EventHandler(this.FormMain_SizeChanged);
this.toolStripMenu.ResumeLayout(false);
this.toolStripMenu.PerformLayout();
this.panelMain.ResumeLayout(false);

View File

@ -113,6 +113,7 @@ namespace Deckungsbeitrag
if (saison.Bezeichnung == "Zwischensaison")
{
var data = ShowTourenplan();
if (data.datum == null) { Application.Exit(); return; }
tour = Tour.GetTour(saison.SaisonId, data.tour);
}
}
@ -157,23 +158,12 @@ namespace Deckungsbeitrag
this.Cursor = Cursors.Default;
}
private void FormMain_ResizeBegin(object sender, EventArgs e)
private void FormMain_SizeChanged(object sender, EventArgs e)
{
if (!this.DesignMode && this.Size != _fixedSize)
{
_handlingResize = true;
this.Size = _fixedSize;
_handlingResize = false;
}
private void FormMain_Resize(object sender, EventArgs e)
{
if (_handlingResize) return;
if (this.Size != _fixedSize)
{
_handlingResize = true;
this.Size = _fixedSize;
_handlingResize = false;
}
//this.panelMain.Size = new Size(this.ClientSize.Width - this.toolStripMenu.Right, this.Height);
//this.panelProgress.Location = new Point(this.panelMain.Right - this.panelProgress.Width - 100, this.panelMain.Bottom - this.panelProgress.Height - 20);
}
/// <summary>

View File

@ -61,6 +61,8 @@ namespace Deckungsbeitrag.AA_Forms
}
else
{
this.BringToFront();
this.CenterToScreen();
this.Text = "HEUTIGE TOUR WÄHLEN";
}
}

View File

@ -12,8 +12,8 @@ namespace DatenDB
{
public class KundeArtikel
{
// 0 1 2 3 4 5 6 7 8 9 10 11 12
private static string COLUMNS = "kunde_artikel_id, kunde_id, artikel_nr, artikel_name, stand, fehlmenge, stand_bearbeitet, fehlmenge_bearbeitet, korrektur, korrektur_bearbeitet, reklamation, artikel_id, reihung";
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
private static string COLUMNS = "kunde_artikel_id, kunde_id, artikel_nr, artikel_name, stand, fehlmenge, stand_bearbeitet, fehlmenge_bearbeitet, korrektur, korrektur_bearbeitet, reklamation, artikel_id, reihung, reklamation_bearbeitet";
private static string TABLE = "kundenverwaltung.kunde_artikel";
@ -127,13 +127,13 @@ namespace DatenDB
command.Connection = DatenbankConnection.GetConnection();
if (this.KundeArtikelID.HasValue & this.KundeArtikelID != 0)
{
command.CommandText = $"update {TABLE} set kunde_id = :p1, artikel_nr = :p2, artikel_name = :p3, stand = :p4, fehlmenge = :p5, stand_bearbeitet = :p6, fehlmenge_bearbeitet = :p7, korrektur = :p8, korrektur_bearbeitet = :p9, reklamation = :p10, artikel_id = :p11, reihung = :p12 WHERE kunde_artikel_id = :p0";
command.CommandText = $"update {TABLE} set kunde_id = :p1, artikel_nr = :p2, artikel_name = :p3, stand = :p4, fehlmenge = :p5, stand_bearbeitet = :p6, fehlmenge_bearbeitet = :p7, korrektur = :p8, korrektur_bearbeitet = :p9, reklamation = :p10, artikel_id = :p11, reihung = :p12, reklamation_bearbeitet = :p13 WHERE kunde_artikel_id = :p0";
}
else
{
command.CommandText = "select nextval('kundenverwaltung.kunde_artikel_seq')";
this.KundeArtikelID = (int)(long)command.ExecuteScalar();
command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9, :p10, :p11, :p12)";
command.CommandText = $"insert into {TABLE} ({COLUMNS}) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9, :p10, :p11, :p12, :p13)";
}
command.Parameters.AddWithValue("p0", this.KundeArtikelID.Value);
@ -149,6 +149,7 @@ namespace DatenDB
command.Parameters.AddWithValue("p10", this.Reklamation);
command.Parameters.AddWithValue("p11", this.ArtikelID.HasValue ?this.ArtikelID.Value : (object)DBNull.Value);
command.Parameters.AddWithValue("p12", this.Reihung);
command.Parameters.AddWithValue("p13", string.IsNullOrWhiteSpace(this.ReklamationBearbeitet) ? (object)DBNull.Value : this.ReklamationBearbeitet);
int result = command.ExecuteNonQuery();
DatenbankConnection.GetConnection().Close();
@ -237,6 +238,7 @@ namespace DatenDB
this.Reklamation = reader.IsDBNull(10) ? 0 : reader.GetInt32(10);
this.ArtikelID = reader.IsDBNull(11) ? (int?)null : reader.GetInt32(11);
this.Reihung = reader.IsDBNull(12) ? 0 : reader.GetInt32(12);
this.ReklamationBearbeitet = reader.IsDBNull(13) ? string.Empty : reader.GetString(13);
}
[OLVColumn(IsVisible = false)]
@ -260,5 +262,6 @@ namespace DatenDB
[OLVColumn("Reihung", IsVisible = false)]
public int Reihung { get; set; }
[OLVIgnore] public string ComboBoxAnzeige => $"{ArtikelNR} {ArtikelName}";
public string ReklamationBearbeitet { get; set; }
}
}

View File

@ -6,7 +6,7 @@
</sectionGroup>
</configSections>
<appSettings>
<add key="ConnectionString" value="user id=postgres;password=Ki985941Wi;host=10.10.10.1;port=5432;database=Test_Wirl;Timeout=15" />
<add key="ConnectionString" value="user id=postgres;password=Ki985941Wi;host=10.10.10.1;port=5432;database=Wirl_DB_17012023;Timeout=15" />
<add key="SortimentPfad" value="N:\\TECHNIK\\Software\\Wirl-Verwaltung\\Listen\\Kundensortiment.txt" />
<add key="InventurPfad" value="N:\BÜRO\KUNDEN\INVENTUREN\Verwaltung" />
<add key="BildPfad" value="C:\\Users\\KilianWirl\\OneDrive - gehgassi GmbH\\Wäscherei Wirl\\Programme\\Deckungsbeitrag\\Deckungsbeitrag\\Star.png" />

View File

@ -549,9 +549,12 @@ namespace Deckungsbeitrag
p.Kill();
// 3. 10 Sekunden warten (Restart Manager)
//Thread.Sleep(10000);
Thread.Sleep(10000);
using (var proc = Process.Start(psi))
{
proc.WaitForExit(); // Blockiert bis Installation beendet
}
//Process.Start(psi)?.Dispose();
return true;
}
@ -645,7 +648,8 @@ namespace Deckungsbeitrag
// Wenn User existiert wird dieser Verwendet. Sonst der bei Anmeldung registrierte Benutzer.
if (user != null) ben = user;
string benutzerKennung;
if (ben.BenutzerID == null) benutzerKennung = userid; else benutzerKennung = ben.Vorname + " " + ben.Nachname;
if (ben == null) benutzerKennung = userid;
else benutzerKennung = ben.Vorname + " " + ben.Nachname;
if (timeStamp == null) timeStamp = DateTime.Now.ToString("dd.MM.yyyy-HH-mm");
//string bildPath = Path.Combine(savePath, bildDateiname);
string fehler;

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.9.7")]
[assembly: AssemblyFileVersion("1.0.9.7")]
[assembly: AssemblyVersion("1.0.9.9")]
[assembly: AssemblyFileVersion("1.0.9.9")]

View File

@ -1647,15 +1647,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:SetupVerwaltung"
"ProductCode" = "8:{6B8C2382-5CE0-49C5-8D93-816BFC2E9948}"
"PackageCode" = "8:{0529029E-E7D8-439E-AC8C-37B0429A5800}"
"ProductCode" = "8:{EAA37164-29A8-4196-8D42-9F687DA3442F}"
"PackageCode" = "8:{5F45C29D-025D-47D5-A4F4-8DDE65C8B7D2}"
"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.97"
"ProductVersion" = "8:1.0.99"
"Manufacturer" = "8:Kilian Wirl GmbH"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"

View File

@ -403,6 +403,7 @@ namespace Deckungsbeitrag.UserControls
this.labelInvText.Text = groupBoxInventur.Text;
this.groupBoxInventur.Visible = false;
this.labelInvText.Visible = true;
this.buttonFreigeben.Visible = false;
this.Height = panelButtons.Height + 6;
this.Width = labelInvText.Right + 10;
this.Location = uci_loc;
@ -464,6 +465,7 @@ namespace Deckungsbeitrag.UserControls
if (!groupBoxInventur.Visible)
{
uci_loc = this.Location;
this.groupBoxInventur.Visible = true;
DataGridView_GetNewSize(this.dGArtikel);
this.buttonFreigeben.Visible = true;
this.labelInvText.Visible = false;

View File

@ -1,5 +1,5 @@
=====================================
NEUIGKEITEN - Version 1.0.9.7
NEUIGKEITEN - Version 1.0.9.9
=====================================
Build-Info:
@ -66,5 +66,5 @@ Build-Info:
=== ⚙️ INSTALL-REMINDER (1) ===
- ⚙️ DB anpassen. (Priority in Auftrag etc.) [Auftrag.cs]
Installation: 24.04.2026 17:10
Installation: 28.04.2026 08:40
=====================================