using MapoDb; using SteamWare; using System; using System.Web.Mvc; namespace MP_IO.Controllers { public class BENCHController : Controller { // GET: IOB (è un check alive) public string Index() { return "OK"; } // disabilitato: non vale la pena //// GET: IOB/enabled/5 - tenuta in cache per 5 sec... //[OutputCache(Duration = 5, VaryByParam = "id")] // GET: BENCH/DB/1000 public string DB(int? id) { string answ = "ND"; // se id nullo --> KO! if (id == null) { answ = "KO"; } else { int numRep = 0; Int32.TryParse(id.ToString(), out numRep); try { answ = MapoDb.MapoDb.obj.benchReadTI("DB", numRep); } catch (Exception exc) { logger.lg.scriviLog(string.Format("Errore in BENCH/DB{0}{1}", Environment.NewLine, exc)); answ = "NO"; } } return answ; } // GET: BENCH/RED/1000 public string RED(int? id) { string answ = "ND"; // se id nullo --> KO! if (id == null) { answ = "KO"; } else { int numRep = 0; Int32.TryParse(id.ToString(), out numRep); try { answ = MapoDb.MapoDb.obj.benchReadTI("RED", numRep); } catch (Exception exc) { logger.lg.scriviLog(string.Format("Errore in BENCH/RED{0}{1}", Environment.NewLine, exc)); answ = "NO"; } } return answ; } } }