//remove all tasks that have already been aggregated from the task table
        public static void PurgeAllAggregatedTasks()
        {
            SatyamTaskTableAccess taskDB = new SatyamTaskTableAccess();
            //List<int> IDList = taskDB.getAllIDs();
            List <SatyamTaskTableEntry> taskList = taskDB.getAllEntries();

            SatyamAggregatedResultsTableAccess aggDB = new SatyamAggregatedResultsTableAccess();
            List <int> AggIDList = aggDB.getAllTaskIDs();

            //List<SatyamAggregatedResultsTableEntry> aggEntreis = aggDB.getAllEntries();

            foreach (SatyamTaskTableEntry t in taskList)
            {
                int id = t.ID;
                if (!AggIDList.Contains(id))
                {
                    continue;
                }

                //int LatestNumberAggregated = aggDB.getLatestNoResultsAggregatedByTaskID(id);
                //int MinResults = TaskConstants.getMinResultsByTemplate(t.JobTemplateType);

                //if(LatestNumberAggregated >= MinResults)
                //{
                taskDB.DeleteEntry(id);
                //}
            }
            aggDB.close();
            taskDB.close();
        }