Пример #1
0
        protected override void Initialize()
        {
            configObj = Config as KoreaCheckIpoNdaConfig;

            DateTime dtChina = TimeUtil.ConvertToChina(DateTime.UtcNow);

            emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim());
            //AM
            if (dtChina.Hour >= 12)
            {
                isAfternoonTask = true;
            }

            string currentDate = DateTime.Today.ToString("yyyyMMdd", new CultureInfo("en-US"));

            if (!isAfternoonTask)
            {
                currentDate = DateTime.Today.AddDays(-1).ToString("yyyyMMdd", new CultureInfo("en-US"));
            }

            //mFileFolder = CreateFolderUnderCurrentPath(
            //    string.Format(@"{0}\{1}\{2}", "Output", this.TaskTypeName, currentDate));//GetOutputFilePath();

            mFileFolder = configObj.downloadFilePath.Trim();

            InitializeMailAccount();

            InitializeDseRule();
        }
Пример #2
0
        public void StartJob(KoreaCheckIpoNdaConfig obj, bool _isAfternoonTask)
        {
            //Sourcing
            Initialize1(obj, _isAfternoonTask);

            GetIpo();

            GetDseData();

            CompareIpo();

            if (changedIpo != null && changedIpo.Count > 0)
            {
                GenerateFile();
            }

            SendEmail();
        }
Пример #3
0
        private void Initialize1(KoreaCheckIpoNdaConfig obj, bool _isAfternoonTask)
        {
            configObj = obj;//config as KoreaCheckIpoNdaConfig;

            isAfternoonTask = _isAfternoonTask;

            string currentDate = DateTime.Today.ToString("yyyyMMdd", new CultureInfo("en-US"));

            if (!isAfternoonTask)
            {
                currentDate = DateTime.Today.AddDays(-1).ToString("yyyyMMdd", new CultureInfo("en-US"));
            }

            //mFileFolder = CreateFolderUnderCurrentPath(
            //    string.Format(@"{0}\{1}\{2}", "Output", this.TaskTypeName, currentDate));//GetOutputFilePath();

            InitializeMailAccount();

            InitializeDseRule();
        }