From 9e024e0534e8a8b912672cedbfdcb3a9ca53eb1c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 18 Jul 2018 12:08:35 +0200 Subject: [PATCH] Aggiunto metodo reset della chaive ODL corrente in redis in IO --- MP-IO/Controllers/IOBController.cs | 11 +++++++++++ MapoDb/DataLayer.cs | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/MP-IO/Controllers/IOBController.cs b/MP-IO/Controllers/IOBController.cs index f21f2fee..ec21f3d6 100644 --- a/MP-IO/Controllers/IOBController.cs +++ b/MP-IO/Controllers/IOBController.cs @@ -162,6 +162,17 @@ namespace MP_IO.Controllers answ = "NO"; } return answ; + }/// + /// Effettua RESET dell'ODL corrente x macchina: + /// + /// GET: IOB/getCurrODL/5 + /// + /// + /// + /// + public string resetCurrODL(string id) + { + return DataLayer.emptyCurrODL(id); } /// /// Recupera COUNTER x macchina: diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index bb2880de..a167ac3a 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -864,6 +864,25 @@ namespace MapoDb return answ; } /// + /// Rimuove Key dell'ODL corrente x una data macchina IOB + /// + /// + /// + public static string emptyCurrODL(string idxMacchina) + { + string answ = ""; + try + { + memLayer.ML.redDelKey(currODLHash(idxMacchina)); + answ = "OK"; + } + catch + { + answ = "KO"; + } + return answ; + } + /// /// Processa registrazione di un counter x una data macchina IOB /// ///