Esempio n. 1
0
        public IHttpActionResult GetTaskById(int taskId)
        {
            TaskModel task = new TaskModel();

            var blTasks = _taskManagerBL.GetTaskById(taskId);

            if (blTasks != null)
            {
                task = new TaskModel
                {
                    TaskID     = blTasks.TaskID,
                    Task       = blTasks.Task,
                    ParentTask = blTasks.ParentTask,
                    Priority   = blTasks.Priority,
                    StartDate  = blTasks.StartDate,
                    EndDate    = blTasks.EndDate,
                    IsActive   = blTasks.IsActive
                };
            }

            return(Ok(task));
        }
 public IHttpActionResult GetTaskById(int Id)
 {
     return(Json <TaskModel>(_manager.GetTaskById(Id)));
 }
Esempio n. 3
0
        public IHttpActionResult GetTaskById(int taskId)
        {
            var result = _tasksService.GetTaskById(taskId);

            return(Ok(result));
        }