diff --git a/MP-IO/Controllers/IOBController.cs b/MP-IO/Controllers/IOBController.cs index 74731a3f..5f4432e5 100644 --- a/MP-IO/Controllers/IOBController.cs +++ b/MP-IO/Controllers/IOBController.cs @@ -223,7 +223,7 @@ namespace MP_IO.Controllers Int32.TryParse(id.ToString(), out idx); try { - long count = memLayer.ML.setRCI(string.Format("CNT{0}", idx)); + long count = memLayer.ML.setRCntI(string.Format("CNT{0}", idx)); answ = count.ToString(); } catch (Exception exc) @@ -249,7 +249,35 @@ namespace MP_IO.Controllers Int32.TryParse(id.ToString(), out idx); try { - answ = memLayer.ML.getRSV(string.Format("CNT{0}", idx)); + int answInt = memLayer.ML.getRCnt(string.Format("CNT{0}", idx)); + answ = answInt.ToString(); + //answ = answ != "" ? answ : "0"; + } + catch (Exception exc) + { + logger.lg.scriviLog(string.Format("Errore in getrediscount{0}{1}", Environment.NewLine, exc)); + answ = "NO"; + } + } + return answ; + } + // GET: IOB/getredis/5 + public string resetrediscount(int? id) + { + string answ = "ND"; + // se id nullo --> KO! + if (id == null) + { + answ = "KO"; + } + else + { + int idx = 0; + Int32.TryParse(id.ToString(), out idx); + try + { + bool fatto = memLayer.ML.resetRCnt(string.Format("CNT{0}", idx)); + answ = fatto ? "ZEROED" : "ERROR"; } catch (Exception exc) {