Esempio n. 1
0
        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"));
            }
        }
Esempio n. 2
0
        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));
        }