Пример #1
0
        public ActionResult Complete(int id)
        {
            var repo = new TaskRepository();

            repo.Complete(id);

            var response = new CompleteResponse();
            response.success = id == 2;

            if(response.success)
             response.message = "Everything worked";
            else
             response.message = "There was an error";

            return Json(response);
        }
Пример #2
0
        public ActionResult Complete(int id)
        {
            var repo = new TaskRepository();

            repo.Complete(id);

            var response = new CompleteResponse();

            response.success = id == 2;

            if (response.success)
            {
                response.message = "Everything worked";
            }
            else
            {
                response.message = "There was an error";
            }

            return(Json(response));
        }