public ActionResult ActivarTimer(int id) { var aTimer = new MyTimer(5000); if (aTimer.Enabled == false) { var objComun = new comun(); objComun.ApagaCliente(false, id); var obj = new HomeController(); aTimer.Elapsed += obj.ActualizaClienteSignal; aTimer.Interval = 10000; aTimer.Enabled = true; aTimer.idlocal = id; string urlcliente = string.Empty; using (var db = new bdloginEntities()) { urlcliente = db.bingoParametro.Where(p => p.idLocal == 1).Single().urlcliente; } //string url = Request.UrlReferrer.ToString(); //string url = "http://localhost:51690/"; aTimer.urlDownload = String.Format("{0}home/BingoCiclico?varidlocal={1}", urlcliente, id); //aTimer.AutoReset = true; } return(RedirectToAction("Index")); }
public ActionResult DetenerTimer(int id) { var objComun = new comun(); objComun.ApagaCliente(true, id); Thread.Sleep(15000); return(RedirectToAction("Index")); }