Example #1
0
        public static List <List <TaskVO> > GetIndividualTasks2()
        {
            //TaskVO task = new TaskVO();
            var taskList      = new List <List <TaskVO> >();
            var iterationList = new List <TaskVO>();
            var tempList      = new List <TaskVO>();

            iterationList = TasksDAO.RetrieveTasks();

            Console.WriteLine("=====> Printing tasks list: " + iterationList.Count());

            for (int i = 0; i < iterationList.Count(); i++)
            {
                TaskVO task = iterationList[i];
                Console.WriteLine("=====> Printing tasks: " + task);

                if (i % 2 == 0)
                {
                    tempList.Add(task);
                    taskList.Add(tempList);
                    tempList = new List <TaskVO>();
                }
                else
                {
                    tempList.Add(task);
                }
            }

            Console.WriteLine("=====> Task list size: " + taskList.Count());

            return(taskList);
        }
Example #2
0
        public static List <TaskVO> GetIndividualTasks()
        {
            //TaskVO task = new TaskVO();
            var taskList = new List <TaskVO>();

            taskList = TasksDAO.RetrieveTasks();


            for (int i = 0; i < taskList.Count(); i++)
            {
                TaskVO task = taskList[i];
                Console.WriteLine("=====> Printing tasks: " + task);
            }

            Console.WriteLine("=====> Task list size: " + taskList.Count());

            return(taskList);
        }