public IHttpActionResult GetParentTasks()
        {
            var         taskBL   = new TaskBL(_context);
            List <Task> allTasks = new List <Task>();

            try
            {
                allTasks = taskBL.GetParentTasks();
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
            finally
            {
                taskBL = null;
            }

            var tasks = (from ts in allTasks
                         select new
            {
                TaskId = ts.TaskId,
                TaskName = ts.TaskName
            }).ToList();

            return(Ok(tasks));
        }
Esempio n. 2
0
        public Collection <CommonEntities.ParentTasks> GetParentTasks()
        {
            ProjectManagerEntities mockContext = MockDataSetList();
            var taskBL = new TaskBL(mockContext);
            Collection <CommonEntities.ParentTasks> tasks = taskBL.GetParentTasks();

            return(tasks);
        }
Esempio n. 3
0
        public JsonResponse RetrieveParentTasks()
        {
            List <ParentTask> ParentTasks = taskObj.GetParentTasks();

            return(new JsonResponse()
            {
                Data = ParentTasks
            });
        }
        public void GetParentTasks()
        {
            var taskLookups = taskBL.GetParentTasks();

            Assert.NotNull(taskLookups);
        }
        public IHttpActionResult GetParentTasks()
        {
            TaskBL blTask = new TaskBL();

            return(Ok(blTask.GetParentTasks()));
        }