Ejemplo n.º 1
0
        public bool start()
        {
            DateTime processTime = DateTime.Now;

            try
            {
                for (int i = 0; i < dbList.Count; i++)
                {
                    LogUtil.logDbStart(dbList[i]);
                    LogUtil.logStarWith2EmptyLine("start processing data base: " + dbList[i]);
                    DateTime startTimeCopy = startTime;
                    while (startTimeCopy < processTime)
                    {
                        startTimeCopy = new PSDDBGenerater(dbList[i], startTimeCopy, DateTime.Now).run();
                    }
                    LogUtil.logDbFinish(dbList[i]);
                    LogUtil.logStarWith2EmptyLine("start processing data base: " + dbList[i]);
                }

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        public bool startDay()
        {
            DateTime processTime = DateTime.Now;

            try
            {
                if (startTime < processTime)
                {
                    DateTime startTimeCopy = startTime;
                    for (int i = 0; i < dbList.Count; i++)
                    {
                        startTimeCopy = new PSDDBGenerater(dbList[i], startTime, processTime).run();
                        LogUtil.logFinishDataBase(dbList[i]);
                    }
                    startTime = startTimeCopy;
                }

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }