Пример #1
0
        public ActionResult TimerDelete(string timerId)
        {
            try
            {
                var idInt = Convert.ToInt32(timerId);

                ContextService.DeleteTimer(idInt, User.Identity.Name);

                return(Json(new { data = "1", message = "Deleted timer" }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception e)
            {
                return(Json(new { data = "-1", message = e.Message }, JsonRequestBehavior.AllowGet));
            }
        }