Exemple #1
0
        public DBCaseList(Logger l, string path, bool isReferenceMode) :
            base(l, path, isReferenceMode)
        {
            DateTime StartTime;
            DateTime EndTime;

            try
            {
                logger = l;

                m_ArchiveDB      = new ArchiveDatabase();
                base.m_DB        = m_ArchiveDB;
                base.m_DB.logger = l;

                m_ContainerDBPresent = bool.Parse(ConfigurationManager.AppSettings["ContainerDBPresent"]);

                if (m_ContainerDBPresent)
                {
                    m_ContainerDB = new ContainerDatabase();
                }

                logger.PrintInfoLine("Populating Case List from database...");
                StartTime = DateTime.Now;
                PopulateCaseList();
                EndTime = DateTime.Now;
                logger.PrintInfoLine("Populating Case List...Done. " + base.List.CaseListTable.Count + " entries, elapsed time: " +
                                     (EndTime - StartTime));

                SaveCaseList();
                StartUpdate = true;

                StartMonitoringFileSystem(m_FileSystemLocation);
                //create a thread to ensure dataset populated from xml file is up to date
                //with individual case.xml files
                m_CheckCaselistThread = new Thread(new ParameterizedThreadStart(delegate { CheckCaseListThreadMethod(false); }));
                m_CheckCaselistThread.Start();
            }
            catch (Exception exp)
            {
                logger.PrintInfoLine("DBCaseList exp: " + exp.Message);
                throw;
            }
        }
Exemple #2
0
        public DBCaseList (Logger l, string path, bool isReferenceMode) :
            base(l, path, isReferenceMode)
        {
            DateTime StartTime;
            DateTime EndTime;
            try
            {
                logger = l;

                m_ArchiveDB = new ArchiveDatabase();
                base.m_DB = m_ArchiveDB;
                base.m_DB.logger = l;

                m_ContainerDBPresent = bool.Parse(ConfigurationManager.AppSettings["ContainerDBPresent"]);

                if (m_ContainerDBPresent)
                    m_ContainerDB = new ContainerDatabase();

                logger.PrintInfoLine("Populating Case List from database...");
                StartTime = DateTime.Now;
                PopulateCaseList();
                EndTime = DateTime.Now;
                logger.PrintInfoLine("Populating Case List...Done. " + base.List.CaseListTable.Count + " entries, elapsed time: " +
                    (EndTime - StartTime));

                SaveCaseList();
                StartUpdate = true;

                StartMonitoringFileSystem(m_FileSystemLocation);
                //create a thread to ensure dataset populated from xml file is up to date 
                //with individual case.xml files
                m_CheckCaselistThread = new Thread(new ParameterizedThreadStart(delegate { CheckCaseListThreadMethod(false); }));
                m_CheckCaselistThread.Start();
            }
            catch (Exception exp)
            {
                logger.PrintInfoLine("DBCaseList exp: " + exp.Message);
                throw;
            }
        }