Beispiel #1
0
        ///<summary>
        ///      Restore all tasks From DB and add them to relevant tasks Collection
        ///      <example>
        ///        <code>
        ///          Board.RestoreFromDB();
        ///        </code>
        ///      </example>
        ///    </summary>
        public static void RestoreFromDB()
        {
            long openColumnId    = GetKeyForValue("Open", Columns).columnId;
            long codingColumnId  = GetKeyForValue("Coding", Columns).columnId;
            long testColumnId    = GetKeyForValue("Test", Columns).columnId;
            long resolveColumnId = GetKeyForValue("Resolve", Columns).columnId;

            var openTasks    = BoardDB.GetTasksAndEmployeesFromColumn(openColumnId);
            var codingTasks  = BoardDB.GetTasksAndEmployeesFromColumn(codingColumnId);
            var testTasks    = BoardDB.GetTasksAndEmployeesFromColumn(testColumnId);
            var resolveTasks = BoardDB.GetTasksAndEmployeesFromColumn(resolveColumnId);

            foreach (TaskAndEmploy t in openTasks)
            {
                OpenTasksList.Add(t);
            }

            foreach (TaskAndEmploy t in codingTasks)
            {
                CodingTasksList.Add(t);
            }

            foreach (TaskAndEmploy t in testTasks)
            {
                TestsTasksList.Add(t);
            }

            foreach (TaskAndEmploy t in resolveTasks)
            {
                ResolveTasksList.Add(t);
            }
        }