コード例 #1
0
        //[Authorize]
        //[ValidateAntiForgeryToken]
        public HttpStatusCodeResult DeleteNormalTask(string taskId)
        {
            ToDoTask toDoTask = new ToDoTask();

            toDoTask.SetToDoTaskStrategy(new NormalTask());

            TodoTaskModel _normalTodoTaskModel = toDoTask.DeleteById(new Guid(taskId));

            return(_normalTodoTaskModel == null ? new HttpStatusCodeResult(HttpStatusCode.OK, "Record deleted") :
                   new HttpStatusCodeResult(HttpStatusCode.BadRequest, "Bad Request"));
        }