示例#1
0
        // GET: api/TaskManager/5
        public Task GetTask(int id)
        {
            TaskManagerBL taskManagerBL = new TaskManagerBL();

            DA.Task task = taskManagerBL.ReadTask(id);

            if (task != null)
            {
                return new Task()
                       {
                           Name      = task.Task1,
                           EndDate   = task.End_Date.ToString("dd/MM/yyyy"),
                           ParentId  = task.Parent__ID,
                           StartDate = task.Start_Date.ToString("dd/MM/yyyy"),
                           Priority  = task.Priority,
                           TaskId    = task.Task_ID
                       }
            }
            ;
            return(null);
        }