From 7c0d1a3855ec48ce3fadb4001e5c546fb08d6878 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Sat, 2 Nov 2024 10:41:11 +0100 Subject: [PATCH] Fix prod data x FTP --- IOB-WIN-NEXT/IobNet/Ftp.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/IOB-WIN-NEXT/IobNet/Ftp.cs b/IOB-WIN-NEXT/IobNet/Ftp.cs index d3ade6ad..49628ca3 100644 --- a/IOB-WIN-NEXT/IobNet/Ftp.cs +++ b/IOB-WIN-NEXT/IobNet/Ftp.cs @@ -140,6 +140,13 @@ namespace IOB_WIN_NEXT.IobNet // controllo sulla KEY... switch (tName) { + case taskType.setArt: + case taskType.setPzComm: + // L'articolo ed il numPz li salva nei dati di produzione... SE disponibili li indicherà nel file ODL ATTIVA... + saveProdData(new KeyValuePair(item.Key, item.Value)); + // salvo nei taskVal il valore acquisito... + taskVal = $"Saved {item.Key} = {item.Value} on ProdData"; + break; case taskType.setComm: /*------------------------------------------------------------------ * La commessa è la cartella DI BASE per poter poi procedere con acquisizione dati... @@ -185,7 +192,10 @@ namespace IOB_WIN_NEXT.IobNet } // ora creo il file interno... remFile = $"{newDir}/{fNameOdl}"; - fileContent = $"NEW ODL activated | {item.Value} | {DateTime.Now}"; + // cerco se disponibili info in prodData x art/pezzi + string setArt = getCurrProdData("setArt", "ND"); + string setPzComm = getCurrProdData("setPzComm", "?"); + fileContent = $"NEW ODL activated | {item.Value} | ART: {setArt} x {setPzComm} pz | {DateTime.Now}"; locFile = Path.Combine(basePath, "temp", fNameOdl); taskOk = SendOdlActFile(locFile, remFile, fileContent); if (taskOk)