diff --git a/MP-IO/Controllers/IOBController.cs b/MP-IO/Controllers/IOBController.cs index 257c52e3..75ffefba 100644 --- a/MP-IO/Controllers/IOBController.cs +++ b/MP-IO/Controllers/IOBController.cs @@ -423,6 +423,35 @@ namespace MP_IO.Controllers return answ; } + + /// + /// Recupera DATI PODL correnti x macchina: + /// + /// GET: IOB/getCurrPODL/SIMUL_03 + /// + /// id macchina, se "" oppure * mostra tutto + /// Json contenente lista oggetti PODL serializzati + public string getCurrPODL(string id) + { + // attenzione! poiché nell'URL il carattere "#" fiene filtrato ci aspettiamo il + // carattere "|" che poi trasformiamo ora in "#" + id = id.Replace("|", "#"); + string answ = ""; + + // init obj DataLayer + DataLayer DataLayerObj = new DataLayer(); + try + { + // recupero dati macchina... + var elencoOdl = DataLayerObj.taPODL.getByMaccArt(id, "", "", true); + var righeOdl = elencoOdl.Rows; + answ = JsonConvert.SerializeObject(righeOdl); + } + catch + { } + return answ; + } + /// /// Recupera ODL corrente x macchina: /// diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index fe85fa4b..b6d2d0fe 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -1,5 +1,6 @@ using MapoSDK; using Newtonsoft.Json; +using PdfSharp.Charting; using SteamWare; using System; using System.Collections.Generic; @@ -1388,7 +1389,7 @@ namespace MapoDb } catch (Exception exc) { - logger.lg.scriviLog($"Eccezione in deserializzazione getIobCurrParam{Environment.NewLine}{exc}"); + logger.lg.scriviLog($"Eccezione in deserializzazione getCurrObjItems{Environment.NewLine}{exc}"); } } return actValues; @@ -1420,7 +1421,7 @@ namespace MapoDb } catch (Exception exc) { - logger.lg.scriviLog($"Eccezione in deserializzazione getIobCurrParam{Environment.NewLine}{exc}"); + logger.lg.scriviLog($"Eccezione in deserializzazione getCurrObjItemsPendigWrite{Environment.NewLine}{exc}"); } } return writeValues;