public ActionResult Disable(string id, int id2) { if (engine == null) { return(View("Error", ERROR_MESSAGE)); } UiTimerNode node = engine.GetNode(id) as UiTimerNode; if (node == null) { return(NotFound()); } UITimerTask task = node.GetTask(id2); if (task == null) { return(NotFound()); } task.Enabled = false; node.UpdateTask(task); if (Request.Headers["Referer"].Any()) { return(Redirect(Request.Headers["Referer"].ToString())); } else { return(RedirectToAction("Tasks")); } }
public ActionResult Edit(string id, int id2) { if (engine == null) { return(View("Error", ERROR_MESSAGE)); } UiTimerNode node = engine.GetNode(id) as UiTimerNode; if (node == null) { return(NotFound()); } UITimerTask task = node.GetTask(id2); if (task == null) { return(NotFound()); } ViewBag.Name = node.Settings["Name"].Value; return(View(task)); }