Exemplo n.º 1
0
        public JsonResult DeleteUserPersonTask(string taskId)
        {
            int id;

            int.TryParse(taskId, out id);
            if (id > 0)
            {
                var result = _employeeFacadeApiClient.DeleteUserTask(id).Result;
                var model  = result.IsSuccessStatusCode ? "Deleted successfully." : "API error occured.";
                return(Json(new { message = model, taskId, success = result.IsSuccessStatusCode }));
            }
            return(Json(new { message = "Task removed from calendar successfully.", taskId, success = true }));
        }